;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:21:07 2007 ;;; from file /home/cyd/emacs/lisp/savehist.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`savehist.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [require custom custom-declare-group savehist nil "Save minibuffer history." :version "22.1" :group minibuffer] 8) #@133 Mode for automatic saving of minibuffer history. Set this by calling the `savehist-mode' function or using the customize interface. (custom-declare-variable 'savehist-mode 'nil '(#$ . 744) :type 'boolean :set #[(symbol value) "\301\206\302!\207" [value savehist-mode 0] 2] :initialize 'custom-initialize-default :require 'savehist :group 'savehist) #@188 *If non-nil, save all recorded minibuffer histories. If you want to save only specific histories, use `savehist-save-hook' to modify the value of `savehist-minibuffer-history-variables'. (custom-declare-variable 'savehist-save-minibuffer-history 't '(#$ . -1103) :type 'boolean :group 'savehist) #@584 *List of additional variables to save. Each element is a symbol whose value will be persisted across Emacs sessions that use savehist. The contents of variables should be printable with the Lisp printer. You don't need to add minibuffer history variables to this list, all minibuffer histories will be saved automatically as long as `savehist-save-minibuffer-history' is non-nil. User options should be saved with the customize interface. This list is useful for saving automatically updated variables that are not minibuffer histories, such as `compile-command' or `kill-ring'. (custom-declare-variable 'savehist-additional-variables 'nil '(#$ . -1406) :type '(repeat variable) :group 'savehist) #@44 *List of additional variables not to save. (custom-declare-variable 'savehist-ignored-variables 'nil '(#$ . -2113) :type '(repeat variable) :group 'savehist) #@406 *File name where minibuffer history is saved to and loaded from. The minibuffer history is a series of Lisp expressions loaded automatically when `savehist-mode' is turned on. See `savehist-mode' for more details. If you want your minibuffer history shared between Emacs and XEmacs, customize this value and make sure that `savehist-coding-system' is set to a coding system that exists in both emacsen. (custom-declare-variable 'savehist-file '(cond ((file-exists-p "~/.emacs-history") "~/.emacs-history") ((and (not (featurep 'xemacs)) (file-directory-p "~/.emacs.d/")) "~/.emacs.d/history") ((and (featurep 'xemacs) (file-directory-p "~/.xemacs/")) "~/.xemacs/history") (t "~/.emacs-history")) '(#$ . -2278) :type 'file :group 'savehist) #@266 *Default permissions of the history file. This is decimal, not octal. The default is 384 (0600 in octal). Set to nil to use the default permissions that Emacs uses, typically mandated by umask. The default is a bit more restrictive to protect the user's privacy. (custom-declare-variable 'savehist-file-modes '384 '(#$ . -3027) :type 'integer :group 'savehist) #@104 *The interval between autosaves of minibuffer history. If set to nil, disables timer-based autosaving. (custom-declare-variable 'savehist-autosave-interval '(* 5 60) '(#$ . -3397) :type 'integer :group 'savehist) #@48 Hook called when `savehist-mode' is turned on. (custom-declare-variable 'savehist-mode-hook 'nil '(#$ . 3616) :type 'hook :group 'savehist) #@137 Hook called by `savehist-save' before saving the variables. You can use this hook to influence choice and content of variables to save. (custom-declare-variable 'savehist-save-hook 'nil '(#$ . 3763) :type 'hook :group 'savehist) #@184 The coding system savehist uses for saving the minibuffer history. Changing this value while Emacs is running is supported, but considered unwise, unless you know what you are doing. (defvar savehist-coding-system 'utf-8 (#$ . 3999)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\304\207" [current-load-list savehist-timer default-boundp set-default nil savehist-last-checksum] 3) #@226 List of minibuffer histories. The contents of this variable is built while Emacs is running, and saved along with minibuffer history. You can change its value off `savehist-save-hook' to influence which variables are saved. (defvar savehist-minibuffer-history-variables nil (#$ . 4434)) #@190 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. (defconst savehist-no-conversion 'no-conversion (#$ . 4729)) #@130 Whether the history has already been loaded. This prevents toggling `savehist-mode' from destroying existing minibuffer history. (defvar savehist-loaded nil (#$ . 4986)) #@464 Toggle savehist-mode. Positive ARG turns on `savehist-mode'. When on, savehist-mode causes minibuffer history to be saved periodically and when exiting Emacs. When turned on for the first time in an Emacs session, it causes the previous minibuffer history to be loaded from `savehist-file'. This mode should normally be turned on from your Emacs init file. Calling it at any other time replaces your current minibuffer histories, which is probably undesirable. (defalias 'savehist-mode #[(arg) "\204 ?\202\304!\305V\211\204\306 \210\202/\n\204(\307 !\203(\310\311\312\217\210\313 \210\314\315!\210 \207" [arg savehist-mode savehist-loaded savehist-file prefix-numeric-value 0 savehist-uninstall file-exists-p errvar (byte-code "\302\303t?#\210\304\303\207" [savehist-file savehist-loaded load nil t] 4) ((error (byte-code "\302\303 \210\304 @ A\"\207" [savehist-mode errvar nil savehist-uninstall signal] 3))) savehist-install run-hooks savehist-mode-hook] 4 (#$ . 5163) "P"]) (add-minor-mode 'savehist-mode "") #@396 Obsolete function provided for transition from old versions of savehist. Don't call this from new code, use (savehist-mode 1) instead. This function loads the variables stored in `savehist-file' and turns on `savehist-mode'. If `savehist-file' is in the old format that doesn't record the value of `savehist-minibuffer-history-variables', that value is deducted from the contents of the file. (defalias 'savehist-load #[nil "\304\305!\210?\2052\306\307!\310\216r q\210\311\312\313\217\210\311\211\311\314\315\217\211\203.\nA@ B\202 -\211\207" [savehist-minibuffer-history-variables #1=#:temp-buffer form vars savehist-mode 1 generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil (insert-file-contents savehist-file) ((error)) (byte-code "\300p!\207" [read] 2) ((error))] 3 (#$ . 6199)]) (make-obsolete 'savehist-load 'savehist-mode) #@201 Hook savehist into Emacs. Normally invoked by calling `savehist-mode' to set the minor mode. Installs `savehist-autosave' in `kill-emacs-hook' and on a timer. To undo this, call `savehist-uninstall'. (defalias 'savehist-install #[nil "\302\303\304\"\210\302\305\306\"\210\205 ?\205\307\211\306#\211\207" [savehist-autosave-interval savehist-timer add-hook minibuffer-setup-hook savehist-minibuffer-hook kill-emacs-hook savehist-autosave run-with-timer] 4 (#$ . 7112)]) #@96 Undo installing savehist. Normally invoked by calling `savehist-mode' to unset the minor mode. (defalias 'savehist-uninstall #[nil "\301\302\303\"\210\301\304\305\"\210\205\306!\210\307\211\207" [savehist-timer remove-hook minibuffer-setup-hook savehist-minibuffer-hook kill-emacs-hook savehist-autosave cancel-timer nil] 3 (#$ . 7594)]) #@249 Save the values of minibuffer history variables. Unbound symbols referenced in `savehist-additional-variables' are ignored. If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, and don't save the buffer if they are the same. (defalias 'savehist-save #[(&optional auto-save) "\306\307!\310\216rq\210\311\312 \"\313\261\210\314\315!\210\316\211\211\317\211\203p\320\321\322\323DEp\"\210\324c\210\316\211\203o@\325!\203f\326J!\211 \203e\320\321\323 DEp\"\210\324c\210)A\211\204?*!\316\211\"\203\254\"@\325!\203\243J \327 !\203\242\320\321\323 DEp\"\210\324c\210)\"A\211\"\204{.\330p\316\211#$$%\205\301$&\232?\205\353\317 '(\331ed)\316t?\205\327\332%\210**\203\346\333)*\"\210$\211&,\207" [#1=#:temp-buffer savehist-coding-system print-quoted print-readably print-level print-string-length generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) format ";; -*- mode: emacs-lisp; coding: %s -*-\n" ";; Minibuffer history file, automatically generated by `savehist'.\n\n" run-hooks savehist-save-hook nil t prin1 setq savehist-minibuffer-history-variables quote 10 boundp savehist-trim-history savehist-printable md5 write-region quiet set-file-modes print-length savehist-save-minibuffer-history symbol #2=#:--cl-dolist-temp-- value savehist-additional-variables #3=#:--cl-dolist-temp-- savehist-no-conversion checksum auto-save savehist-last-checksum coding-system-for-write file-precious-flag savehist-file savehist-file-modes] 6 (#$ . 7944) nil]) #@114 Save the minibuffer history if it has been modified since the last save. Does nothing if `savehist-mode' is off. (defalias 'savehist-autosave #[nil "\205\301\302!\207" [savehist-mode savehist-save t] 2 (#$ . 9554)]) #@173 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. (defalias 'savehist-trim-history #[(value) "\207" [value] 1 (#$ . 9780)]) #@39 Return non-nil if VALUE is printable. (defalias 'savehist-printable #[(value) ";\206\247\2069\206\302\303!\304\216r q\210\305\306\307\217+\207" [value #1=#:temp-buffer generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) nil (byte-code "\303\304\305\np\"\210\306\307 !\210*\303\207" [print-level print-readably value t nil prin1 read point-min-marker] 3) ((error))] 3 (#$ . 10033)]) (defalias 'savehist-minibuffer-hook #[nil "\302=\206  >?\205\303\304\"\207" [minibuffer-history-variable savehist-ignored-variables t add-to-list savehist-minibuffer-history-variables] 3]) (provide 'savehist)