emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v
Date: Wed, 17 Sep 2008 00:55:43 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/09/17 00:55:41

Index: flyspell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -b -r1.136 -r1.137
--- flyspell.el 28 Aug 2008 11:33:57 -0000      1.136
+++ flyspell.el 17 Sep 2008 00:55:38 -0000      1.137
@@ -1166,35 +1166,19 @@
              res))))))))
 
 ;;*---------------------------------------------------------------------*/
-;;*    flyspell-tex-math-initialized ...                                */
-;;*---------------------------------------------------------------------*/
-(defvar flyspell-tex-math-initialized nil)
-
-;;*---------------------------------------------------------------------*/
 ;;*    flyspell-math-tex-command-p ...                                  */
 ;;*    -------------------------------------------------------------    */
-;;*    This function uses the texmathp package to check if (point)      */
-;;*    is within a tex command. In order to avoid using                 */
-;;*    condition-case each time we use the variable                     */
-;;*    flyspell-tex-math-initialized to make a special case the first   */
-;;*    time that function is called.                                    */
+;;*    This function uses the texmathp package to check if point        */
+;;*    is within a TeX math environment. `texmathp' can yield errors    */
+;;*    if the document is currently not valid TeX syntax.               */
 ;;*---------------------------------------------------------------------*/
 (defun flyspell-math-tex-command-p ()
   (when (fboundp 'texmathp)
-    (cond
-     (flyspell-check-tex-math-command
-      nil)
-     ((eq flyspell-tex-math-initialized t)
-      (texmathp))
-     ((eq flyspell-tex-math-initialized 'error)
-      nil)
-     (t
-      (setq flyspell-tex-math-initialized t)
+    (if flyspell-check-tex-math-command
+        nil
       (condition-case nil
           (texmathp)
-        (error (progn
-                 (setq flyspell-tex-math-initialized 'error)
-                 nil)))))))
+        (error nil)))))
 
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-tex-command-p ...                                       */




reply via email to

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