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

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

[elpa] 201/352: Siirretään wcheck-loop-over-* makrojen yhteiset osat om


From: Stefan Monnier
Subject: [elpa] 201/352: Siirretään wcheck-loop-over-* makrojen yhteiset osat omaksi makroksi
Date: Mon, 07 Jul 2014 14:04:04 +0000

monnier pushed a commit to branch master
in repository elpa.

commit 912d6f514ff30468672fecc0b4f90e4562034e10
Author: Teemu Likonen <address@hidden>
Date:   Sat Jan 1 19:29:49 2011 +0000

    Siirretään wcheck-loop-over-* makrojen yhteiset osat omaksi makroksi
---
 wcheck-mode.el |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/wcheck-mode.el b/wcheck-mode.el
index dde298d..ac43b05 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -729,26 +729,20 @@ right-click mouse menu)."
     (setq wcheck-timer nil)))
 
 
-(defmacro wcheck-loop-over-read-reqs (var &rest body)
+(defmacro wcheck-loop-over-reqs-engine (key var &rest body)
   `(dolist (,var (delq nil (mapcar (lambda (buffer)
                                      (when (wcheck-buffer-data-get
-                                            :buffer buffer :read-req)
+                                            :buffer buffer ,key)
                                        buffer))
                                    (wcheck-buffer-data-get-all :buffer))))
      (when (buffer-live-p ,var)
        (with-current-buffer ,var
          ,@body))))
 
-
+(defmacro wcheck-loop-over-read-reqs (var &rest body)
+  `(wcheck-loop-over-reqs-engine :read-req ,var ,@body))
 (defmacro wcheck-loop-over-paint-reqs (var &rest body)
-  `(dolist (,var (delq nil (mapcar (lambda (buffer)
-                                     (when (wcheck-buffer-data-get
-                                            :buffer buffer :paint-req)
-                                       buffer))
-                                   (wcheck-buffer-data-get-all :buffer))))
-     (when (buffer-live-p ,var)
-       (with-current-buffer ,var
-         ,@body))))
+  `(wcheck-loop-over-reqs-engine :paint-req ,var ,@body))
 
 
 (defun wcheck-timer-read-event ()



reply via email to

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