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

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

[elpa] master 5adc714 2/7: wcheck-mode: make generated face predicate a


From: Teemu Likonen
Subject: [elpa] master 5adc714 2/7: wcheck-mode: make generated face predicate a lambda
Date: Tue, 05 Jan 2016 13:20:37 +0000

branch: master
commit 5adc7147556b54640cd354c406b3febb1f5694ee
Author: Teemu Likonen <address@hidden>
Commit: Teemu Likonen <address@hidden>

    wcheck-mode: make generated face predicate a lambda
---
 packages/wcheck-mode/wcheck-mode.el |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/packages/wcheck-mode/wcheck-mode.el 
b/packages/wcheck-mode/wcheck-mode.el
index 7ac0658..d598f23 100644
--- a/packages/wcheck-mode/wcheck-mode.el
+++ b/packages/wcheck-mode/wcheck-mode.el
@@ -1415,7 +1415,7 @@ areas, including invisible ones. Otherwise skip invisible 
text."
                                      (match-beginning 1) 'invisible buffer
                                      end)))
 
-                        ((and (eval face-p)
+                        ((and (funcall face-p)
                               (or (equal regexp-discard "")
                                   (not (string-match
                                         regexp-discard
@@ -1475,7 +1475,7 @@ text."
                            (goto-char (next-single-char-property-change
                                        (match-beginning 1) 'invisible buffer
                                        end)))
-                          ((eval face-p)
+                          ((funcall face-p)
                            ;; Make an overlay.
                            (wcheck--make-overlay
                             buffer ol-face ol-mouse-face ol-help-echo ol-keymap
@@ -1933,16 +1933,18 @@ expression will return a boolean."
          (mode (nth 1 face-settings))
          (faces (nthcdr 2 face-settings)))
     (cond ((not font-lock-mode)
-           t)
+           (lambda () t))
           ((eq mode 'read)
-           `(wcheck--face-found-p
-             ',faces (wcheck--collect-faces
-                      (match-beginning 1) (match-end 1))))
+           `(lambda ()
+              (wcheck--face-found-p
+               ',faces (wcheck--collect-faces
+                        (match-beginning 1) (match-end 1)))))
           ((eq mode 'skip)
-           `(not (wcheck--face-found-p
-                  ',faces (wcheck--collect-faces
-                           (match-beginning 1) (match-end 1)))))
-          (t t))))
+           `(lambda ()
+              (not (wcheck--face-found-p
+                    ',faces (wcheck--collect-faces
+                             (match-beginning 1) (match-end 1))))))
+          (t (lambda () t)))))
 
 
 ;;; Miscellaneous low-level functions



reply via email to

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