monnier pushed a commit to branch master
in repository elpa.

commit 7a8bdc011706fe2b84dcafd7d3b01947d901a057
Author: Teemu Likonen <[email protected]>
Date:   Fri Mar 12 08:29:11 2010 +0000

    Optimoidaan hieman funktiota wcheck-collect-faces
---
 wcheck-mode.el |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/wcheck-mode.el b/wcheck-mode.el
index 1642b47..2c33cd0 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -956,11 +956,10 @@ visible in BUFFER within position range from BEG to END."
         face faces)
     (while (< pos end)
       (setq face (get-text-property pos 'face)
-            faces (append (if (and face (listp face))
-                              face
-                            (list face))
-                          faces)
-            pos (1+ pos)))
+            pos (1+ pos))
+      (if (and face (listp face))
+          (setq faces (append face faces))
+        (push face faces)))
     (delete-dups faces)))
 
 

Reply via email to