branch: master
commit 3710268ecf8f075c8307c1649c73cb640cf3bd80
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    Some compatibiliy tweaks
    
    * Prioritize syntax-begin-function over 
font-lock-beginning-of-syntax-function.
    * Check if syntax-propertize-function is bound. It isn't in Emacs 23.
---
 mmm-region.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mmm-region.el b/mmm-region.el
index ee97390..927b56e 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -507,9 +507,11 @@ is non-nil, don't quit if the info is already there."
                 (put mode 'mmm-fontify-region-function
                      font-lock-fontify-region-function)
                 (put mode 'mmm-beginning-of-syntax-function
-                     font-lock-beginning-of-syntax-function)
+                     (or syntax-begin-function
+                         font-lock-beginning-of-syntax-function))
                 (put mode 'mmm-syntax-propertize-function
-                     syntax-propertize-function))
+                     (and (boundp 'syntax-propertize-function)
+                          syntax-propertize-function)))
               ;; Get variables
               (setq global-vars (mmm-get-locals 'global)
                     buffer-vars (mmm-get-locals 'buffer)

Reply via email to