emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog textmodes/flyspell.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp ChangeLog textmodes/flyspell.el
Date: Thu, 16 Apr 2009 18:45:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/04/16 18:45:25

Modified files:
        lisp           : ChangeLog 
        lisp/textmodes : flyspell.el 

Log message:
        * textmodes/flyspell.el (flyspell-correct-word-before-point):
        Don't create markers.
        (tex-mode-flyspell-verify): Don't create markers.  Use
        line-end-position.
        (sgml-mode-flyspell-verify): Don't create markers.  Simplify code
        using looking-at and looking-back.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15595&r2=1.15596
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/textmodes/flyspell.el?cvsroot=emacs&r1=1.143&r2=1.144

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15595
retrieving revision 1.15596
diff -u -b -r1.15595 -r1.15596
--- ChangeLog   16 Apr 2009 04:31:13 -0000      1.15595
+++ ChangeLog   16 Apr 2009 18:45:20 -0000      1.15596
@@ -1,3 +1,12 @@
+2009-04-16  Chong Yidong  <address@hidden>
+
+       * textmodes/flyspell.el (flyspell-correct-word-before-point):
+       Don't create markers.
+       (tex-mode-flyspell-verify): Don't create markers.  Use
+       line-end-position.
+       (sgml-mode-flyspell-verify): Don't create markers.  Simplify code
+       using looking-at and looking-back.
+
 2009-04-16  Robert Brown  <address@hidden>  (tiny change)
 
        * emacs-lisp/lisp-mode.el: Give `deftype' a doc-string-elt

Index: textmodes/flyspell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -b -r1.143 -r1.144
--- textmodes/flyspell.el       24 Feb 2009 04:44:21 -0000      1.143
+++ textmodes/flyspell.el       16 Apr 2009 18:45:25 -0000      1.144
@@ -347,12 +347,12 @@
    (not (save-excursion
          (re-search-backward "^[ \t]*%%%[ \t]+Local" nil t)))
    (not (save-excursion
-         (let ((this (point-marker))
-               (e (progn (end-of-line) (point-marker))))
+         (let ((this (point)))
            (beginning-of-line)
-           (if (re-search-forward "\\\\\\(cite\\|label\\|ref\\){[^}]*}" e t)
-               (and (>= this (match-beginning 0))
-                    (<= this (match-end 0)) )))))))
+           (and (re-search-forward "\\\\\\(cite\\|label\\|ref\\){[^}]*}"
+                                   (line-end-position) t)
+                (>= this (match-beginning 0))
+                (<= this (match-end 0))))))))
 
 ;;*--- sgml mode -------------------------------------------------------*/
 (put 'sgml-mode 'flyspell-mode-predicate 'sgml-mode-flyspell-verify)
@@ -362,25 +362,10 @@
 (defun sgml-mode-flyspell-verify ()
   "Function used for `flyspell-generic-check-word-predicate' in SGML mode."
   (not (save-excursion
-        (let ((this (point-marker))
-              (s (progn (beginning-of-line) (point-marker)))
-              (e (progn (end-of-line) (point-marker))))
-          (or (progn
-                (goto-char this)
-                (and (re-search-forward  "[^<]*>" e t)
-                     (= (match-beginning 0) this)))
-              (progn
-                (goto-char this)
-                (and (re-search-backward "<[^>]*" s t)
-                     (= (match-end 0) this)))
-              (and (progn
-                     (goto-char this)
-                     (and (re-search-forward  "[^&]*;" e t)
-                          (= (match-beginning 0) this)))
-                   (progn
-                     (goto-char this)
-                     (and (re-search-backward "&[^;]*" s t)
-                          (= (match-end 0) this)))))))))
+        (or (looking-at "[^<\n]*>")
+            (looking-back "<[^>\n]*")
+            (and (looking-at "[^&\n]*;")
+                 (looking-back "&[^;\n]*"))))))
 
 ;;*---------------------------------------------------------------------*/
 ;;*    Programming mode                                                 */
@@ -2063,7 +2048,7 @@
     (error "Pop-up menus do not work on this terminal"))
   ;; use the correct dictionary
   (flyspell-accept-buffer-local-defs)
-  (or opoint (setq opoint (point-marker)))
+  (or opoint (setq opoint (point)))
   (let ((cursor-location (point))
        (word (flyspell-get-word nil)))
     (if (consp word)




reply via email to

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