[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/savehist.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/savehist.el |
Date: |
Wed, 16 Nov 2005 12:20:25 -0500 |
Index: emacs/lisp/savehist.el
diff -c emacs/lisp/savehist.el:1.11 emacs/lisp/savehist.el:1.12
*** emacs/lisp/savehist.el:1.11 Mon Nov 14 22:30:35 2005
--- emacs/lisp/savehist.el Wed Nov 16 17:20:25 2005
***************
*** 4,10 ****
;; Author: Hrvoje Niksic <address@hidden>
;; Keywords: minibuffer
! ;; Version: 23
;; This file is part of GNU Emacs.
--- 4,10 ----
;; Author: Hrvoje Niksic <address@hidden>
;; Keywords: minibuffer
! ;; Version: 24
;; This file is part of GNU Emacs.
***************
*** 127,132 ****
--- 127,136 ----
:type 'integer
:group 'savehist)
+ (defcustom savehist-mode-hook nil
+ "Hook called when `savehist-mode' is turned on."
+ :type 'hook)
+
(defcustom savehist-save-hook nil
"Hook called by `savehist-save' before saving the variables.
You can use this hook to influence choice and content of variables to
***************
*** 157,170 ****
along with minibuffer history. You can change its value off
`savehist-save-hook' to influence which variables are saved.")
! ;; Coding system without any conversion, used for calculating an
! ;; internal checksum. Should be as fast as possible, ideally simply
! ;; exposing the internal representation of buffer text.
! (defconst savehist-no-conversion (if (featurep 'xemacs) 'binary
'no-conversion))
!
! ;; Whether the history has already been loaded. This prevents
! ;; toggling savehist-mode from destroying existing minibuffer history.
! (defvar savehist-loaded nil)
(when (featurep 'xemacs)
;; Must declare this under XEmacs, which doesn't have built-in
--- 161,176 ----
along with minibuffer history. You can change its value off
`savehist-save-hook' to influence which variables are saved.")
! (defconst savehist-no-conversion (if (featurep 'xemacs) 'binary
'no-conversion)
! "Coding system without any conversion.
! This is used for calculating an internal checksum. Should be as fast
! as possible, ideally simply exposing the internal representation of
! buffer text.")
!
! (defvar savehist-loaded nil
! "Whether the history has already been loaded.
! This prevents toggling savehist-mode from destroying existing
! minibuffer history.")
(when (featurep 'xemacs)
;; Must declare this under XEmacs, which doesn't have built-in
***************
*** 207,213 ****
(setq savehist-mode nil)
(savehist-uninstall)
(signal (car errvar) (cdr errvar)))))
! (savehist-install))
;; Return the new setting.
savehist-mode)
(add-minor-mode 'savehist-mode "")
--- 213,220 ----
(setq savehist-mode nil)
(savehist-uninstall)
(signal (car errvar) (cdr errvar)))))
! (savehist-install)
! (run-hooks 'savehist-mode-hook))
;; Return the new setting.
savehist-mode)
(add-minor-mode 'savehist-mode "")
***************
*** 329,337 ****
(savehist-save t)))
(defun savehist-trim-history (value)
! ;; Retain only the first history-length items in VALUE. Only used
! ;; under XEmacs, which doesn't (yet) implement automatic trimming of
! ;; history lists to history-length items.
(if (and (featurep 'xemacs)
(natnump history-length)
(> (length value) history-length))
--- 336,344 ----
(savehist-save t)))
(defun savehist-trim-history (value)
! "Retain only the first history-length items in VALUE.
! Only used under XEmacs, which doesn't (yet) implement automatic
! trimming of history lists to history-length items."
(if (and (featurep 'xemacs)
(natnump history-length)
(> (length value) history-length))