[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/spell-fu 38f4a4a275 08/21: Fix #31: Failure to detect upda
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/spell-fu 38f4a4a275 08/21: Fix #31: Failure to detect updated symlinked dictionaries |
Date: |
Sat, 7 Jan 2023 07:12:28 -0500 (EST) |
branch: elpa/spell-fu
commit 38f4a4a275389690f492d91a23c03af0bd9470ce
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix #31: Failure to detect updated symlinked dictionaries
Comparing dates wasn't working on symlinks.
Follow symlinks on dictionaries before comparing dates.
---
changelog.rst | 1 +
spell-fu.el | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/changelog.rst b/changelog.rst
index 0fe619a7c5..bec671bb24 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -4,6 +4,7 @@ Change Log
##########
- In development.
+ - Fix #31, failure to detect updated personal dictionary when it's a symlink.
- Stealthy font locking now checks words even when outside the view,
so stealthy font locking ensures words are checked.
- Fix #13, failure to properly generate word-list cache on MS-Windows.
diff --git a/spell-fu.el b/spell-fu.el
index ff4cf18882..8e87df25a5 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -1085,7 +1085,11 @@ Return t if the file was updated."
(dict-aspell-name (cadr (nth 5 (assoc dict-name
ispell-aspell-dictionary-alist))))
(dict-file (and dict-aspell-name (spell-fu--aspell-find-data-file
dict-name)))
(is-dict-outdated
- (and has-words-file dict-file (spell-fu--file-is-older words-file
dict-file)))
+ (and
+ has-words-file dict-file
+ (spell-fu--file-is-older words-file
+ ;; Chase links is needed as checking the symbolic-link date isn't
correct, #31.
+ (file-chase-links dict-file))))
;; Return value, failure to run `aspell' leaves this nil.
(updated nil))
@@ -1275,9 +1279,9 @@ Return t if the file was updated."
(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 personal-words-file))))
+ has-words-file has-dict-personal
+ ;; Chase links is needed as checking the symbolic-link date isn't
correct, #31.
+ (spell-fu--file-is-older words-file (file-chase-links
personal-words-file)))))
(when (or (not has-words-file) is-dict-outdated)
- [nongnu] elpa/spell-fu f0d49dcc5a 16/21: Cleanup: emacs native format, (continued)
- [nongnu] elpa/spell-fu f0d49dcc5a 16/21: Cleanup: emacs native format, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu d0e67cdb25 06/21: When using jit-lock-stealth, ensure words out of the view are checked, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 341575b1d0 10/21: Adding spell-fu-debug variable & spell-fu-reset command, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu bddea99f9c 17/21: Fix #36: byte compilation error with Emacs 28.2, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 68d33508ef 04/21: Add support for buffer local word-lists, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu b89bfe035d 20/21: Cleanup: correct typo in description, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 0dc0568186 11/21: Update doc-string and readme for spell-fu-faces-exclude, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 8412ba02df 03/21: Cleanup: use `zerop`, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 95e005969d 09/21: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 635c5c2eed 19/21: Cleanup: sharp-quote function, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 38f4a4a275 08/21: Fix #31: Failure to detect updated symlinked dictionaries,
ELPA Syncer <=
- [nongnu] elpa/spell-fu 89b014194a 18/21: Cleanup: emacs native format (update), ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 39549871c7 15/21: Cleanup: format, ELPA Syncer, 2023/01/07
- [nongnu] elpa/spell-fu 3caf7047ea 21/21: Rename functions & variables that used a global- prefix, ELPA Syncer, 2023/01/07