branch: externals/cm-mode
commit 3ebd75bf08eafddfae1f514263816102d70a52a5
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>
Wrap cm-delimiters and cm-markup predicates in eval-and-compile.
---
cm-mode.el | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/cm-mode.el b/cm-mode.el
index ff38fb05bd..449e840919 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -84,13 +84,6 @@
(require 'thingatpt)
(require 'cl-macs)
-(defvar cm-delimiters '((cm-addition "{++" "++}")
- (cm-deletion "{--" "--}")
- (cm-substitution "{~~" "~~}")
- (cm-comment "{>>" "<<}")
- (cm-highlight "{==" "==}"))
- "CriticMarkup Delimiters.")
-
(defvar cm-follow-changes nil
"Flag indicating whether follow changes mode is active.")
(make-variable-buffer-local 'cm-follow-changes)
@@ -184,12 +177,21 @@ it is added automatically."
(defvar cm-highlight-face 'cm-highlight-face
"CriticMarkup highlight face.")
+(eval-and-compile
+ (defvar cm-delimiters '((cm-addition "{++" "++}")
+ (cm-deletion "{--" "--}")
+ (cm-substitution "{~~" "~~}")
+ (cm-comment "{>>" "<<}")
+ (cm-highlight "{==" "==}"))
+ "CriticMarkup Delimiters."))
+
;; create markup predicates
-(mapc #'(lambda (markup)
- (fset (intern (concat (symbol-name markup) "-p"))
- `(lambda (change)
- (eq (car change) (quote ,markup)))))
- (mapcar #'car cm-delimiters))
+(eval-and-compile
+ (mapc #'(lambda (markup)
+ (fset (intern (concat (symbol-name markup) "-p"))
+ `(lambda (change)
+ (eq (car change) (quote ,markup)))))
+ (mapcar #'car cm-delimiters)))
(defvar cm-mode-map
(let ((map (make-sparse-keymap)))