diff options
| author | Stefan Monnier | 2025-04-12 22:49:48 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2025-04-12 22:49:48 -0400 |
| commit | 356178c8e726cc4c309254b2ba1eae9c41bd2f38 (patch) | |
| tree | 5c215a6a2a8c052d0453c3017e04355649d91f6a | |
| parent | bfeb755e03b5cab8f1f234b1a54afbcfd71f9eb2 (diff) | |
| download | emacs-356178c8e726cc4c309254b2ba1eae9c41bd2f38.tar.gz emacs-356178c8e726cc4c309254b2ba1eae9c41bd2f38.zip | |
savehist.el: Unbreak tests
* lisp/savehist.el (savehist-loaded): Fix typo.
(savehist--reload): Add compatibility with test case.
| -rw-r--r-- | lisp/savehist.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/savehist.el b/lisp/savehist.el index fa616e58672..7a0c1fe6952 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el | |||
| @@ -162,7 +162,7 @@ along with minibuffer history. You can change its value off | |||
| 162 | 162 | ||
| 163 | (defvar savehist-loaded nil | 163 | (defvar savehist-loaded nil |
| 164 | "Whether the history has already been loaded.") | 164 | "Whether the history has already been loaded.") |
| 165 | (make-obsolete-variable savehist-loaded 'savehist--file-sync-modtime "31") | 165 | (make-obsolete-variable 'savehist-loaded 'savehist--file-sync-modtime "31") |
| 166 | 166 | ||
| 167 | (defvar savehist--file-sync-modtime nil | 167 | (defvar savehist--file-sync-modtime nil |
| 168 | "Modtime of the `savehist-file' when we last sync'd up with it.") | 168 | "Modtime of the `savehist-file' when we last sync'd up with it.") |
| @@ -209,7 +209,9 @@ histories, which is probably undesirable." | |||
| 209 | "Load the history data from `savehist-file'. | 209 | "Load the history data from `savehist-file'. |
| 210 | Be careful to do it while preserving the current history data." | 210 | Be careful to do it while preserving the current history data." |
| 211 | (when (and (file-exists-p savehist-file) | 211 | (when (and (file-exists-p savehist-file) |
| 212 | (not (equal savehist--file-sync-modtime (savehist--file-modtime)))) | 212 | (not (and savehist-loaded |
| 213 | (equal savehist--file-sync-modtime | ||
| 214 | (savehist--file-modtime))))) | ||
| 213 | ;; FIXME: Process the file manually rather than passing it to `load'. | 215 | ;; FIXME: Process the file manually rather than passing it to `load'. |
| 214 | (let ((savehist-old-minibuffer-history-variables | 216 | (let ((savehist-old-minibuffer-history-variables |
| 215 | (mapcar (lambda (s) (and (boundp s) (cons s (symbol-value s)))) | 217 | (mapcar (lambda (s) (and (boundp s) (cons s (symbol-value s)))) |