diff options
| author | Reiner Steib | 2006-04-03 17:32:28 +0000 |
|---|---|---|
| committer | Reiner Steib | 2006-04-03 17:32:28 +0000 |
| commit | cd4160e614e9d456125ec0e3e8b30d5d807affef (patch) | |
| tree | 5208d9270f0333633a4a97cb72f402b26b0200f4 | |
| parent | f7a8a96578e63406a1c5854d052edcce2f40b100 (diff) | |
| download | emacs-cd4160e614e9d456125ec0e3e8b30d5d807affef.tar.gz emacs-cd4160e614e9d456125ec0e3e8b30d5d807affef.zip | |
(savehist): Add :version.
(savehist-ignored-variables): New variable.
(savehist-minibuffer-hook): Don't save variables listed in
`savehist-ignored-variables'.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/savehist.el | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35e2ba3525c..1458541bbbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2006-04-03 Reiner Steib <Reiner.Steib@gmx.de> | 1 | 2006-04-03 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 2 | ||
| 3 | * savehist.el (savehist): Add :version. | ||
| 4 | (savehist-ignored-variables): New variable. | ||
| 5 | (savehist-minibuffer-hook): Don't save variables listed in | ||
| 6 | `savehist-ignored-variables'. | ||
| 7 | |||
| 3 | * dired.el (dired-dnd-protocol-alist): Mention that change does | 8 | * dired.el (dired-dnd-protocol-alist): Mention that change does |
| 4 | only apply to new buffers in doc string. | 9 | only apply to new buffers in doc string. |
| 5 | 10 | ||
diff --git a/lisp/savehist.el b/lisp/savehist.el index 8b8ca9c0f8a..56fc47a357b 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | (defgroup savehist nil | 57 | (defgroup savehist nil |
| 58 | "Save minibuffer history." | 58 | "Save minibuffer history." |
| 59 | :version "22.1" | ||
| 59 | :group 'minibuffer) | 60 | :group 'minibuffer) |
| 60 | 61 | ||
| 61 | ;;;###autoload | 62 | ;;;###autoload |
| @@ -91,6 +92,11 @@ minibuffer histories, such as `compile-command' or `kill-ring'." | |||
| 91 | :type '(repeat variable) | 92 | :type '(repeat variable) |
| 92 | :group 'savehist) | 93 | :group 'savehist) |
| 93 | 94 | ||
| 95 | (defcustom savehist-ignored-variables nil ;; '(command-history) | ||
| 96 | "*List of additional variables not to save." | ||
| 97 | :type '(repeat variable) | ||
| 98 | :group 'savehist) | ||
| 99 | |||
| 94 | (defcustom savehist-file | 100 | (defcustom savehist-file |
| 95 | (cond | 101 | (cond |
| 96 | ;; Backward compatibility with previous versions of savehist. | 102 | ;; Backward compatibility with previous versions of savehist. |
| @@ -371,9 +377,12 @@ trimming of history lists to `history-length' items." | |||
| 371 | (error nil)))))) | 377 | (error nil)))))) |
| 372 | 378 | ||
| 373 | (defun savehist-minibuffer-hook () | 379 | (defun savehist-minibuffer-hook () |
| 374 | ;; XEmacs sets minibuffer-history-variable to t to mean "no history | 380 | (when (memq minibuffer-history-variable savehist-ignored-variables) |
| 375 | ;; is being recorded". | 381 | (debug nil minibuffer-history-variable)) |
| 376 | (unless (eq minibuffer-history-variable t) | 382 | (unless (or (eq minibuffer-history-variable t) |
| 383 | ;; XEmacs sets minibuffer-history-variable to t to mean "no | ||
| 384 | ;; history is being recorded". | ||
| 385 | (memq minibuffer-history-variable savehist-ignored-variables)) | ||
| 377 | (add-to-list 'savehist-minibuffer-history-variables | 386 | (add-to-list 'savehist-minibuffer-history-variables |
| 378 | minibuffer-history-variable))) | 387 | minibuffer-history-variable))) |
| 379 | 388 | ||