From: Teemu Likonen Date: Tue, 5 Jan 2016 06:24:29 +0000 (+0200) Subject: wcheck-mode: make generated face predicate a lambda X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/5adc7147556b54640cd354c406b3febb1f5694ee wcheck-mode: make generated face predicate a lambda --- diff --git a/packages/wcheck-mode/wcheck-mode.el b/packages/wcheck-mode/wcheck-mode.el index 7ac0658cc..d598f2342 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