;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:21:07 2007 ;;; from file /home/cyd/emacs/lisp/saveplace.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 "`saveplace.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'save-place nil "Automatically save place in files." :group 'data) #@255 Alist of saved places to go back to when revisiting files. Each element looks like (FILENAME . POSITION); visiting file FILENAME goes automatically to position POSITION rather than the beginning of the buffer. This alist is saved between Emacs sessions. (defvar save-place-alist nil (#$ . 655)) #@433 *Non-nil means automatically save place in each file. This means when you visit a file, point goes to the last place where it was when you previously visited the same file. This variable is automatically buffer-local. If you wish your place in any file to always be automatically saved, simply put this in your `~/.emacs' file: (setq-default save-place t) (require 'saveplace) or else use the Custom facility to set this option. (custom-declare-variable 'save-place 'nil '(#$ . -957) :type 'boolean :require 'saveplace :group 'save-place) (make-variable-buffer-local 'save-place) #@58 *Name of the file that records `save-place-alist' value. (custom-declare-variable 'save-place-file '(convert-standard-filename "~/.emacs-places") '(#$ . -1546) :type 'file :group 'save-place) #@297 *Controls whether to make numbered backups of master save-place file. It can have four values: t, nil, `never', and `nospecial'. The first three have the same meaning that they do for the variable `version-control', and the final value `nospecial' means just use the value of `version-control'. (custom-declare-variable 'save-place-version-control 'nil '(#$ . -1745) :type '(radio (const :tag "Unconditionally" t) (const :tag "For VC Files" nil) (const never) (const :tag "Use value of `version-control'" nospecial)) :group 'save-place) #@59 Non-nil means that the `save-place-file' has been loaded. (defvar save-place-loaded nil (#$ . 2289)) #@70 Maximum number of entries to retain in the list; nil means no limit. (custom-declare-variable 'save-place-limit 'nil '(#$ . 2396) :type '(choice (integer :tag "Entries" :value 1) (const :tag "No Limit" nil)) :group 'save-place) #@432 Non-nil means forget place in unreadable files. The filenames in `save-place-alist' that do not match `save-place-skip-check-regexp' are filtered through `file-readable-p'. if nil, their alist entries are removed. You may do this anytime by calling the complementary function, `save-place-forget-unreadable-files'. When this option is turned on, this happens automatically before saving `save-place-alist' to `save-place-file'. (custom-declare-variable 'save-place-forget-unreadable-files 't '(#$ . 2631) :type 'boolean :group 'save-place) #@225 If non-nil, remember files matching `save-place-skip-check-regexp'. When filtering `save-place-alist' for unreadable files, some will not be checked, based on said regexp, and instead saved or forgotten based on this flag. (custom-declare-variable 'save-place-save-skipped 't '(#$ . 3181) :type 'boolean :group 'save-place) #@331 Regexp whose file names shall not be checked for readability. When forgetting unreadable files, file names matching this regular expression shall not be checked for readability, but instead be subject to `save-place-save-skipped'. Files for which such a check may be inconvenient include those on removable and network volumes. (custom-declare-variable 'save-place-skip-check-regexp '"\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)" '(#$ . 3513) :type 'regexp :group 'save-place) #@428 Toggle whether to save your place in this file between sessions. If this mode is enabled, point is recorded when you kill the buffer or exit Emacs. Visiting this file again will go to that position, even in a later Emacs session. If called with a prefix arg, the mode is enabled if and only if the argument is positive. To save places automatically in all files, put this in your `.emacs' file: (setq-default save-place t) (defalias 'toggle-save-place #[(&optional parg) "\204\n\303\304\305 \"\207 \203 \n\203\n\306X\203 \303\307!\210\310\211\207\303\311!\210\312\211\207" [buffer-file-name save-place parg message "Buffer `%s' not visiting a file" buffer-name 0 "No place will be saved in this file" nil "Place will be saved" t] 3 (#$ . 4023) "P"]) (defalias 'save-place-to-alist #[nil "\204\306 \210 \205;\307 \n\" \310=\204`\202\311 T\211\203'\312 \n\"\f\205:\f\313U?\205: \fB\nB\211*\207" [save-place-loaded buffer-file-name save-place-alist major-mode position cell load-save-place-alist-from-file assoc hexl-mode hexl-current-address delq 1 save-place] 4]) #@233 Remove unreadable files from `save-place-alist'. For each entry in the alist, if `file-readable-p' returns nil for the filename, remove the entry. Save the new alist (as the first pair may have changed) back to `save-place-alist'. (defalias 'save-place-forget-unreadable-files #[nil "\205Z\211A \2039\306 \211@@)\"\203 \202%\307 \211@@)!\203- \2022\n A\241\210 A\211\204 *\306 \211@@)\"\203J \202R\307\211@@)!?\205ZA\211\207" [save-place-alist fmcur fmprev save-place-skip-check-regexp x save-place-save-skipped string-match file-readable-p] 4 (#$ . 5121) nil]) (defalias 'save-place-alist-to-file #[nil "\306!\212\307\310 \"\210\311\312!q\210ed|\210\n\203\302 \210\313\211\314 p\"\210*\204-\313\202E\315=\2038\315\202E\316=\203D\202E\317\313\320\321\217\210\322p!\210\307\323 \"+\207" [save-place-file file save-place-forget-unreadable-files print-level print-length save-place-alist expand-file-name message "Saving places to %s..." get-buffer-create " *Saved Places*" nil print never nospecial t (byte-code "\301ed#\207" [file write-region] 4) ((file-error (message "Can't write %s" file))) kill-buffer "Saving places to %s...done" save-place-version-control version-control] 3]) (defalias 'load-save-place-alist-from-file #[nil "?\205m\306\307 !\310\n!\203k\212\311\312\n\"\210\313\314!q\210ed|\210\315\n!\210eb\210\316ed{!@\f\203a\f\317X\203=\320\202a \321\211\203` \fY\203T\320\241\210\202W TA\211\204F*\322p!\210\311\323\n\"\210))\320\207" [save-place-loaded save-place-file file save-place-alist save-place-limit count t expand-file-name file-readable-p message "Loading places from %s..." get-buffer-create " *Saved Places*" insert-file-contents read-from-string 0 nil 1 kill-buffer "Loading places from %s...done" s] 4]) (defalias 'save-places-to-alist #[nil "\302 \205\212@q\210 \203\303 \210A)\202)\207" [buf-list buffer-file-name buffer-list save-place-to-alist] 1]) (defalias 'save-place-find-file-hook #[nil "\204\306 \210\307 \n\"\211\205\f\204 Ab\210\310\211)\207" [save-place-loaded buffer-file-name save-place-alist cell after-find-file-from-revert-buffer save-place load-save-place-alist-from-file assoc t] 4]) (defalias 'save-place-kill-emacs-hook #[nil "\301 \210\205 \302 \207" [save-place-loaded save-places-to-alist save-place-alist-to-file] 1]) (byte-code "\300\301\302\303#\210\300\304\305\"\210\300\306\307\"\210\310\311!\207" [add-hook find-file-hook save-place-find-file-hook t kill-emacs-hook save-place-kill-emacs-hook kill-buffer-hook save-place-to-alist provide saveplace] 4)