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

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

[nongnu] elpa/spell-fu c58be13845 39/86: Fix #3 default word regex now e


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu c58be13845 39/86: Fix #3 default word regex now excludes trailing apostrophes
Date: Thu, 7 Jul 2022 12:03:41 -0400 (EDT)

branch: elpa/spell-fu
commit c58be13845b3da2c4b86c61204ef13f0adeb114d
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix #3 default word regex now excludes trailing apostrophes
    
    Improve apostrophe handling, now TEX quotes don't cause problems.
---
 spell-fu.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/spell-fu.el b/spell-fu.el
index 6ccab5c2ae..de09b77345 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -90,7 +90,18 @@ Set to 0.0 to highlight immediately (as part of syntax 
highlighting)."
     table)
   "The syntax table to use when scanning words.")
 
-(defvar-local spell-fu-word-regexp "\\b\\([[:alpha:]][[:alpha:]']*\\)\\b"
+;; This regex handles:
+;;
+;; - ``Quotation'' <= don't match multiple trailing apostrophes.
+;;     ^^^^^^^^^
+;;
+;; - we're <= Connect letters with a single apostrophe.
+;;   ^^^^^
+;;
+;; - don't''join <= don't connect multiple apostrophes.
+;;   ^^^^^  ^^^^
+;;
+(defvar-local spell-fu-word-regexp 
"\\b\\([[:alpha:]][[:alpha:]]*\\('[[:alpha:]]*\\)?\\)\\b"
   "The regular expression used to scan for words to check (used by 
`spell-fu-check-range').")
 
 (defvar-local spell-fu-faces-include nil



reply via email to

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