1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

(savehist): Add :version.

(savehist-ignored-variables): New variable.
(savehist-minibuffer-hook): Don't save variables listed in
`savehist-ignored-variables'.
This commit is contained in:
Reiner Steib 2006-04-03 17:32:28 +00:00
parent f7a8a96578
commit cd4160e614
2 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,10 @@
2006-04-03 Reiner Steib <Reiner.Steib@gmx.de>
* savehist.el (savehist): Add :version.
(savehist-ignored-variables): New variable.
(savehist-minibuffer-hook): Don't save variables listed in
`savehist-ignored-variables'.
* dired.el (dired-dnd-protocol-alist): Mention that change does
only apply to new buffers in doc string.

View File

@ -56,6 +56,7 @@
(defgroup savehist nil
"Save minibuffer history."
:version "22.1"
:group 'minibuffer)
;;;###autoload
@ -91,6 +92,11 @@ minibuffer histories, such as `compile-command' or `kill-ring'."
:type '(repeat variable)
:group 'savehist)
(defcustom savehist-ignored-variables nil ;; '(command-history)
"*List of additional variables not to save."
:type '(repeat variable)
:group 'savehist)
(defcustom savehist-file
(cond
;; Backward compatibility with previous versions of savehist.
@ -371,9 +377,12 @@ trimming of history lists to `history-length' items."
(error nil))))))
(defun savehist-minibuffer-hook ()
;; XEmacs sets minibuffer-history-variable to t to mean "no history
;; is being recorded".
(unless (eq minibuffer-history-variable t)
(when (memq minibuffer-history-variable savehist-ignored-variables)
(debug nil minibuffer-history-variable))
(unless (or (eq minibuffer-history-variable t)
;; XEmacs sets minibuffer-history-variable to t to mean "no
;; history is being recorded".
(memq minibuffer-history-variable savehist-ignored-variables))
(add-to-list 'savehist-minibuffer-history-variables
minibuffer-history-variable)))