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

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

[elpa] 53/352: Funktio wcheck-read-words englanniksi


From: Stefan Monnier
Subject: [elpa] 53/352: Funktio wcheck-read-words englanniksi
Date: Mon, 07 Jul 2014 14:01:58 +0000

monnier pushed a commit to branch master
in repository elpa.

commit 11cd1925f63cc8c3818469752a52859b7fd88b45
Author: Teemu Likonen <address@hidden>
Date:   Fri May 22 11:16:43 2009 +0000

    Funktio wcheck-read-words englanniksi
---
 wcheck-mode.el |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/wcheck-mode.el b/wcheck-mode.el
index 790e8f7..b534399 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -643,7 +643,10 @@ oikeanlaiset."
 
 
 (defun wcheck-read-words (language window)
-  "Palauttaa listan sanoista, jotka näkyvät ikkunassa IKKUNA."
+  "Return a list of visible text elements in WINDOW.
+Function scans WINDOW and searches for text elements defined in
+LANGUAGE (see `wcheck-language-data'). The returned list contains
+only visible text elements; all hidden parts are omitted."
   (when (window-live-p window)
     (with-selected-window window
       (save-excursion
@@ -669,12 +672,15 @@ oikeanlaiset."
             (while (re-search-forward regexp w-end t)
               (cond ((get-char-property (match-beginning 1)
                                         'invisible buffer)
+                     ;; This point is invisible. Let's jump forward to
+                     ;; next change of "invisible" property.
                      (goto-char (next-single-char-property-change
                                  (match-beginning 1) 'invisible buffer w-end)))
 
                     ((or (equal discard "")
                          (not (string-match discard
                                             (match-string-no-properties 1))))
+                     ;; Add the match to the word list.
                      (add-to-list 'words
                                   (match-string-no-properties 1)
                                   'append)



reply via email to

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