branch: master
commit 05a787e163e09a3104afe0e68f32687cfc77e21f
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>
Fix further compilation warnings in recent Emacsen
---
mmm-mode.el | 18 +++++++++++-------
mmm-vars.el | 1 +
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/mmm-mode.el b/mmm-mode.el
index 4564294..b78a7ea 100644
--- a/mmm-mode.el
+++ b/mmm-mode.el
@@ -160,9 +160,11 @@ available through M-x customize under Programming | Tools
| Mmm."
(mmm-add-hooks)
(mmm-fixup-skeleton)
(make-local-variable 'font-lock-fontify-region-function)
- (make-local-variable 'font-lock-beginning-of-syntax-function)
- (setq font-lock-fontify-region-function 'mmm-fontify-region
- font-lock-beginning-of-syntax-function 'mmm-beginning-of-syntax)
+ (setq font-lock-fontify-region-function 'mmm-fontify-region)
+ (set (make-local-variable (if (boundp 'syntax-begin-function) ; Emacs >=
23
+ 'syntax-begin-function
+ 'font-lock-beginning-of-syntax-function))
+ 'mmm-beginning-of-syntax)
(setq mmm-mode t)
(condition-case err
(mmm-apply-all)
@@ -189,9 +191,11 @@ available through M-x customize under Programming | Tools
| Mmm."
(mmm-clear-local-variables)
(mmm-update-submode-region)
(setq font-lock-fontify-region-function
- (get mmm-primary-mode 'mmm-fontify-region-function)
- font-lock-beginning-of-syntax-function
- (get mmm-primary-mode 'mmm-beginning-of-syntax-function))
+ (get mmm-primary-mode 'mmm-fontify-region-function))
+ (set (if (boundp 'syntax-begin-function) ; Emacs >= 23
+ 'syntax-begin-function
+ 'font-lock-beginning-of-syntax-function)
+ (get mmm-primary-mode 'mmm-beginning-of-syntax-function))
(mmm-update-font-lock-buffer)
(mmm-refontify-maybe)
(setq mmm-mode nil)
@@ -293,4 +297,4 @@ available through M-x customize under Programming | Tools |
Mmm."
(provide 'mmm-mode)
-;;; mmm-mode.el ends here
\ No newline at end of file
+;;; mmm-mode.el ends here
diff --git a/mmm-vars.el b/mmm-vars.el
index ca70b92..e8ad284 100644
--- a/mmm-vars.el
+++ b/mmm-vars.el
@@ -33,6 +33,7 @@
;;; Code:
(require 'mmm-compat)
+(require 'cl)
;; MISCELLANEOUS
;;{{{ Shut up the Byte Compiler