emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 3710268 350/433: Some compatibiliy tweaks


From: Dmitry Gutov
Subject: [elpa] master 3710268 350/433: Some compatibiliy tweaks
Date: Thu, 15 Mar 2018 19:44:34 -0400 (EDT)

branch: master
commit 3710268ecf8f075c8307c1649c73cb640cf3bd80
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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

[Prev in Thread] Current Thread [Next in Thread]