%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/saveplace.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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 (#$ . 498)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\306\313%\207" [custom-declare-variable save-place-file (locate-user-emacs-file "places" ".emacs-places") "Name of the file that records `save-place-alist' value." :version "24.4" :type file save-place-version-control nil "Controls whether to make numbered backups of master save-place file.\nIt can have four values: t, nil, `never', and `nospecial'. The first\nthree have the same meaning that they do for the variable\n`version-control', and the final value `nospecial' means just use the\nvalue of `version-control'." (radio (const :tag "Unconditionally" t) (const :tag "For VC Files" nil) (const never) (const :tag "Use value of `version-control'" nospecial))] 8) #@59 Non-nil means that the `save-place-file' has been loaded. (defvar save-place-loaded nil (#$ . 1535)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\306\313%\210\300\314\311\315\306\313%\210\300\316\317\320\306\321%\210\300\322\323\324\304\305\306\321&\207" [custom-declare-variable save-place-limit 400 "Maximum number of entries to retain in the list; nil means no limit." :version "24.1" :type (choice (integer :tag "Entries" :value 1) (const :tag "No Limit" nil)) save-place-forget-unreadable-files t "Non-nil means forget place in unreadable files.\n\nThe filenames in `save-place-alist' that do not match\n`save-place-skip-check-regexp' are filtered through\n`file-readable-p'. If nil, their alist entries are removed.\n\nYou may do this anytime by calling the complementary function,\n`save-place-forget-unreadable-files'. When this option is turned on,\nthis happens automatically before saving `save-place-alist' to\n`save-place-file'." boolean save-place-save-skipped "If non-nil, remember files matching `save-place-skip-check-regexp'.\n\nWhen filtering `save-place-alist' for unreadable files, some will not\nbe checked, based on said regexp, and instead saved or forgotten based\non this flag." save-place-skip-check-regexp "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)" "Regexp whose file names shall not be checked for readability.\n\nWhen forgetting unreadable files, file names matching this regular\nexpression shall not be checked for readability, but instead be\nsubject to `save-place-save-skipped'.\n\nFiles for which such a check may be inconvenient include those on\nremovable and network volumes." regexp save-place-ignore-files-regexp "\\(?:COMMIT_EDITMSG\\|hg-editor-[[:alnum:]]+\\.txt\\|svn-commit\\.tmp\\|bzr_log\\.[[:alnum:]]+\\)$" "Regexp matching files for which no position should be recorded.\nUseful for temporary file such as commit message files that are\nautomatically created by the VCS. If set to nil, this feature is\ndisabled, i.e., the position is recorded for all files."] 8) (defalias 'save-place--setup-hooks #[(add) "\203 \302\303\304\305#\210\302\306\307\"\210 \204 \302\310\311\"\210\302\312\313\"\207\305\207" [add noninteractive add-hook find-file-hook save-place-find-file-hook t dired-initial-position-hook save-place-dired-hook kill-emacs-hook save-place-kill-emacs-hook kill-buffer-hook save-place-to-alist] 4]) (byte-code "\302\303\304\305#\210\306\305\211\203, @\303N\203% \304N\204% \307\304\303N#\210 A\211\204 *\310\303\304\311#\210\312\304\305\313\314\315\316\317\320\303\321\322&\207" [prop --dolist-tail-- defvaralias save-place save-place-mode nil (saved-value saved-variable-comment) put make-obsolete-variable "25.1" custom-declare-variable "Non-nil if Save-Place mode is enabled.\nSee the `save-place-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `save-place-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group :type boolean] 13) #@416 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. If called interactively, enable Save-Place mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. (defalias 'save-place-mode #[(&optional arg) "\304 \305\302 \306=\203 \307\302!?\202 \310 !\311V\"\210\312\n!\210\313\314\307\302!\203) \315\202* \316\"\210\317\320!\203U \321\302!\210\304 \203B \304 \232\203U \322\323\324\307\302!\203P \325\202Q \326#\210))\327 \210\307\302!\207" [#1=#:last-message arg save-place-mode local current-message set-default toggle default-value prefix-numeric-value 0 save-place--setup-hooks run-hooks save-place-mode-hook save-place-mode-on-hook save-place-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Save-Place mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 4672) (list (or current-prefix-arg 'toggle))]) (defvar save-place-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\300!\205 \307\211%\210\311\306!\210\312\313\314\307#\210\315\313\314\316#\207" [save-place-mode-map save-place-mode-hook variable-documentation put "Hook run after entering or leaving `save-place-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode save-place-mode nil boundp make-variable-buffer-local defalias toggle-save-place save-place-local-mode make-obsolete "25.1"] 6) #@574 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 interactively, enable Save-Place-Local mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. To save places automatically in all files, put this in your init file: (save-place-mode 1) (defalias 'save-place-local-mode #[(&optional arg) "\306 \307=\203 \n?\202 \310 !\311V\2046 \312\313!\203- \314\304!\203- \f\203- \315 \2046 \316\317\320 \"\210\202: \321\n!\210\322\323\n\203D \324\202E \325\"\210\326\327!\203j \306 \203Y \306 \232\203j \330\316\331\n\203e \332\202f \333 #\210))\334 \210\n\207" [#1=#:last-message arg save-place-mode buffer-file-name dired-subdir-alist local current-message toggle prefix-numeric-value 0 derived-mode-p dired-mode boundp dired-current-directory message "Buffer `%s' not visiting a file or directory" buffer-name save-place--setup-hooks run-hooks save-place-local-mode-hook save-place-local-mode-on-hook save-place-local-mode-off-hook called-interactively-p any " in current buffer" "Save-Place-Local mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 6357) (list (or current-prefix-arg 'toggle))]) (defvar save-place-local-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\300!\205 \307\211%\207" [save-place-local-mode-map save-place-local-mode-hook variable-documentation put "Hook run after entering or leaving `save-place-local-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode save-place-mode nil boundp] 6) (defalias 'save-place-to-alist #[nil "\204 \306 \210\307\310!\205 \311\301!\205 \205 \312 \206/ \n\205/ \313\n:\203- \n@\202. \n!\211\205\242 \203@ \314 \f\"?\205\242 \315\f\"\316=\203R \317 T\202t \307\310!\203s \n\203s \320\321\322\"\211\203n \323BC\202o `)\202t `\211\203\204 \324\"\205\241 \250\205\223 \325U?\205\241 \fBB\211**\207" [save-place-loaded dired-subdir-alist directory buffer-file-name item save-place-ignore-files-regexp load-save-place-alist-from-file derived-mode-p dired-mode boundp dired-current-directory expand-file-name string-match assoc hexl-mode hexl-current-address dired-get-filename nil t dired-filename delq 1 save-place-alist major-mode filename position cell save-place] 5]) #@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 "\205N \211A \2033 \305 @@\"\203 \f\202 \306 @@!\203' \202, \n A\241\210 A\211\204 *\305@@\"\203A \f\202F \306@@!?\205N A\211\207" [save-place-alist fmcur fmprev save-place-skip-check-regexp save-place-save-skipped string-match file-readable-p] 4 (#$ . 9000) nil]) (defalias 'save-place-alist-to-file #[nil "\306!\307r\310\311!q\210ed|\210\203 \303 \210\312\313\314 !\"c\210\315\211\316p\"\210*\2043 \315\202D \317\267\202C \320\202D \202D \321\3221S \323ed\n#0\202X \210\324\325\n\"\210\326p!,\207" [save-place-file coding-system-for-write file save-place-forget-unreadable-files print-level print-length expand-file-name utf-8 get-buffer-create " *Saved Places*" format ";;; -*- coding: %s -*-\n" symbol-name nil pp #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (never 58 nospecial 62)) never t (file-error) write-region message "Saving places: can't write %s" kill-buffer save-place-alist save-place-version-control version-control] 4]) (defalias 'load-save-place-alist-from-file #[nil "?\205w \306\307 !\310\n!\203u r\311\312!q\210ed|\210\313\n!\210eb\210\31410 \315ed{!@0\2028 \316\317\"\210)\320 \203p \321X\203H \320\202p \f\322\211\203o Y\203a \320\241\210\202f TA\211\204R *\323p!\210))\320\207" [save-place-loaded save-place-file file #1=#:err save-place-alist save-place-limit t expand-file-name file-readable-p get-buffer-create " *Saved Places*" insert-file-contents (debug error) read-from-string message "Error reading save-place-file: %S" nil 0 1 kill-buffer count s] 4]) (defalias 'save-places-to-alist #[nil "\303 \205/ r@q\210 \204% \304\305!\203( \306\302!\203( \n\203( \307 \203( \310 \210A)\202 )\207" [buf-list buffer-file-name dired-subdir-alist buffer-list derived-mode-p dired-mode boundp dired-current-directory save-place-to-alist] 2]) (defalias 'save-place-find-file-hook #[nil "\204 \306 \210\307 \n\"\211\205! \f\204 A\250\203 Ab\210\310\211)\207" [save-place-loaded buffer-file-name save-place-alist cell revert-buffer-in-progress-p save-place-mode load-save-place-alist-from-file assoc t] 4]) #@39 Position the point in a Dired buffer. (defalias 'save-place-dired-hook #[nil "\204 \306 \210\307\310!\205 \311\301!\205 \205 \312 \313\n\205, \314\n:\203* \n@\202+ \n!\"\211\205] \204Y \fA\250\203D \fAb\210\202Y \fA<\203Y \315\fA\236\203Y \316\315\fA\236A!\210\317\211*\207" [save-place-loaded dired-subdir-alist directory save-place-alist cell revert-buffer-in-progress-p load-save-place-alist-from-file derived-mode-p dired-mode boundp dired-current-directory assoc expand-file-name dired-filename dired-goto-file t save-place-mode] 4 (#$ . 11427)]) (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]) (provide 'saveplace)