From: Markus Triska <markus.triska@gmx.at>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 728@emacsbugs.donarmstrong.com
Subject: bug#728: 23.0.60; flyspell checking is sometimes silently disabled
Date: Sun, 14 Sep 2008 20:33:48 +0200 [thread overview]
Message-ID: <m1ej3m1ss3.fsf@gmx.at> (raw)
In-Reply-To: m1zlmijkfz.fsf@gmx.at
The following patch fixes this problem for me:
2008-09-14 Markus Triska <markus.triska@gmx.at>
* textmodes/flyspell.el (flyspell-math-tex-command-p): Always
catch errors raised in `texmathp'.
(flyspell-tex-math-initialized): Remove.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 47297c9..4296861 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1166,35 +1166,19 @@ Mostly we check word delimiters."
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 ... */
next prev parent reply other threads:[~2008-09-14 18:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 23:25 bug#728: 23.0.60; flyspell checking is sometimes silently disabled Chong Yidong
2008-08-22 2:15 ` Markus Triska
2008-09-08 23:18 ` Markus Triska
2008-09-14 18:33 ` Markus Triska [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-15 22:20 Markus Triska
2008-08-16 4:12 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1ej3m1ss3.fsf@gmx.at \
--to=markus.triska@gmx.at \
--cc=728@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.