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

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

[nongnu] elpa/spell-fu b7e5cf3d73 11/86: Fix missing checks that ispell


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu b7e5cf3d73 11/86: Fix missing checks that ispell variables are bound before use
Date: Thu, 7 Jul 2022 12:03:38 -0400 (EDT)

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

    Fix missing checks that ispell variables are bound before use
---
 spell-fu.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/spell-fu.el b/spell-fu.el
index 80c375d301..0405ee071b 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -123,7 +123,7 @@ Notes:
 
 (defun spell-fu--dictionary ()
   "Access the current dictionary."
-  (or ispell-local-dictionary ispell-dictionary "default"))
+  (or (bound-and-true-p ispell-local-dictionary) (bound-and-true-p 
ispell-dictionary) "default"))
 
 (defun spell-fu--cache-file ()
   "Return the location of the cache file."
@@ -228,14 +228,14 @@ Argument POS return faces at this point."
 Argument WORDS-FILE the file to write the word list into."
   (let*
     (
+      (personal-words-file (bound-and-true-p ispell-personal-dictionary))
       (has-words-file (file-exists-p words-file))
-      (has-dict-personal
-        (and ispell-personal-dictionary (file-exists-p 
ispell-personal-dictionary)))
+      (has-dict-personal (and personal-words-file (file-exists-p 
personal-words-file)))
       (is-dict-outdated
         (and
           has-words-file
           has-dict-personal
-          (spell-fu--file-is-older words-file ispell-personal-dictionary))))
+          (spell-fu--file-is-older words-file personal-words-file))))
 
     (when (or (not has-words-file) is-dict-outdated)
 
@@ -245,7 +245,7 @@ Argument WORDS-FILE the file to write the word list into."
         (with-temp-buffer
           ;; Optional: insert personal dictionary, stripping header and 
inserting a newline.
           (when has-dict-personal
-            (insert-file-contents ispell-personal-dictionary)
+            (insert-file-contents personal-words-file)
             (goto-char (point-min))
             (when (looking-at "personal_ws\-")
               (delete-region (line-beginning-position) (1+ 
(line-end-position))))



reply via email to

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