;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\306\301\304\305& \210\310\320\312\313\321DD\322\316\323\306\301\304\305& \210\310\324\312\313\325DD\326\316\327\306\301\304\330& \210\331\332\333\302#\210\334\211\203f\211@\332N\203_\333N\204_\335\333\332N#\210A\266\202\202E\210\336\332\333\305#\207" [custom-declare-group emacs-lock nil "Emacs-Lock mode." :version "24.1" :group convenience custom-declare-variable emacs-lock-default-locking-mode funcall function #[0 "\300\207" [all] 1] "Default locking mode of Emacs-Locked buffers.\n\nIts value is used as the default for `emacs-lock-mode' (which\nsee) the first time that Emacs Lock mode is turned on in a buffer\nwithout passing an explicit locking mode.\n\nPossible values are:\n exit -- Emacs cannot exit while the buffer is locked\n kill -- the buffer cannot be killed, but Emacs can exit as usual\n all -- the buffer is locked against both actions\n nil -- the buffer is not locked" :type (choice (const :tag "Do not allow Emacs to exit" exit) (const :tag "Do not allow killing the buffer" kill) (const :tag "Do not allow killing the buffer or exiting Emacs" all) (const :tag "Do not lock the buffer" nil)) emacs-lock-unlockable-modes #[0 "\300\207" [((shell-mode . all) (telnet-mode . all))] 1] "Alist of auto-unlockable modes.\nEach element is a pair (MAJOR-MODE . ACTION), where ACTION is\none of `kill', `exit' or `all'. Buffers with matching major\nmodes are auto-unlocked for the specific action if their\ninferior processes are not alive. If this variable is t, all\nbuffers associated to inferior processes are auto-unlockable\nfor both actions (NOT RECOMMENDED)." (choice (const :tag "All buffers with inferior processes" t) (repeat :tag "Selected modes" (cons :tag "Set auto-unlock for" (symbol :tag "Major mode") (radio (const :tag "Allow exiting" exit) (const :tag "Allow killing" kill) (const :tag "Allow both" all))))) emacs-lock-locked-buffer-functions #[0 "\300\207" [nil] 1] "Abnormal hook run when Emacs Lock prevents exiting Emacs, or killing a buffer.\nThe functions get one argument, the first locked buffer found." hook "24.3" defvaralias emacs-lock-from-exiting emacs-lock-mode (saved-value saved-variable-comment) put make-obsolete-variable] 10) #@425 If non-nil, the current buffer is locked. It can be one of the following values: exit -- Emacs cannot exit while the buffer is locked kill -- the buffer cannot be killed, but Emacs can exit as usual all -- the buffer is locked against both actions nil -- the buffer is not locked See also `emacs-lock-unlockable-modes', which exempts buffers under some major modes from being locked under some circumstances. (defvar emacs-lock-mode nil (#$ . 2695)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local emacs-lock-mode put permanent-local t] 4) #@64 Most recent locking mode set on the buffer. Internal use only. (defvar emacs-lock--old-mode nil (#$ . 3284)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local emacs-lock--old-mode put permanent-local t] 4) #@84 Non-nil if current buffer should be checked for auto-unlocking. Internal use only. (defvar emacs-lock--try-unlocking nil (#$ . 3522)) (byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local emacs-lock--try-unlocking put permanent-local t] 4) #@84 Return t if BUFFER-OR-NAME is associated with a live process. (fn BUFFER-OR-NAME) (defalias 'emacs-lock-live-process-p #[257 "\300\301!!\205 \302\207" [process-live-p get-buffer-process t] 4 (#$ . 3790)]) #@148 Return t if the current buffer can auto-unlock for ACTION. ACTION must be one of `kill' or `exit'. See `emacs-lock-unlockable-modes'. (fn ACTION) (defalias 'emacs-lock--can-auto-unlock #[257 "\205 \303p!?\205 \304=\206 \n \236A\211\305=\206\211=\262\207" [emacs-lock--try-unlocking emacs-lock-unlockable-modes major-mode emacs-lock-live-process-p t all] 4 (#$ . 4005)]) #@44 Return the first exit-locked buffer found. (defalias 'emacs-lock--exit-locked-buffer #[0 "r\3012+\302 \211\203(\211@\211q\210\303\304!\204!\305>\204!\306\301\"\210A\266\202\202\210\3070)\207" [emacs-lock-mode :found buffer-list emacs-lock--can-auto-unlock exit (nil kill) throw nil] 5 (#$ . 4391)]) #@88 Signal an error if any buffer is exit-locked. Used from `kill-emacs-hook' (which see). (defalias 'emacs-lock--kill-emacs-hook #[0 "\300 \211\205\301\302\"\210\303\304\305!\"\207" [emacs-lock--exit-locked-buffer run-hook-with-args emacs-lock-locked-buffer-functions error "Emacs cannot exit because buffer %S is locked" buffer-name] 5 (#$ . 4705)]) #@122 Display a message if any buffer is exit-locked. Return a value appropriate for `kill-emacs-query-functions' (which see). (defalias 'emacs-lock--kill-emacs-query-functions #[0 "\300 \211\204\n\301\202\302\303\"\210\304\305\306!\"\210\307\207" [emacs-lock--exit-locked-buffer t run-hook-with-args emacs-lock-locked-buffer-functions message "Emacs cannot exit because buffer %S is locked" buffer-name nil] 5 (#$ . 5064)]) #@131 Display a message if the current buffer is kill-locked. Return a value appropriate for `kill-buffer-query-functions' (which see). (defalias 'emacs-lock--kill-buffer-query-functions #[0 "\301\302!\204\f\303>\203\304\207\305\306p\"\210\307\310\311 \"\210\312\207" [emacs-lock-mode emacs-lock--can-auto-unlock kill (nil exit) t run-hook-with-args emacs-lock-locked-buffer-functions message "Buffer %S is locked and cannot be killed" buffer-name nil] 3 (#$ . 5495)]) #@55 Setter function for `emacs-lock-mode'. (fn MODE ARG) (defalias 'emacs-lock--set-mode #[514 "\211\304>\203\n\211\2025\211=\203&:\203&\305\306\307\310\311\312\311\211\313 !&!\2025\312=\2034\n\2065 \2025\211\207" [current-prefix-arg emacs-lock-default-locking-mode emacs-lock--old-mode emacs-lock-mode (all exit kill) intern completing-read "Locking mode: " ("all" "exit" "kill") nil t symbol-name] 12 (#$ . 5968)]) #@755 Toggle Emacs Lock mode in the current buffer. If called with a plain prefix argument, ask for the locking mode to be used. Initially, if the user does not pass an explicit locking mode, it defaults to `emacs-lock-default-locking-mode' (which see); afterwards, the locking mode most recently set on the buffer is used instead. When called from Elisp code, ARG can be any locking mode: exit -- Emacs cannot exit while the buffer is locked kill -- the buffer cannot be killed, but Emacs can exit as usual all -- the buffer is locked against both actions Other values are interpreted as usual. See also `emacs-lock-unlockable-modes', which exempts buffers under some major modes from being locked under some circumstances. (fn &optional ARG) (defalias 'emacs-lock-mode #[256 "\305 \306\307\310\311\312!\313\"\314\315%\316=\203?\202\317!\320V!\210\203;\n\321=\2033\322p!\2026 \n\236\205:\321\323\324\203E\325\202F\326\"\210\327\330!\203j\305 \203Z\211\305 \232\203j\331\332\333\203e\334\202f\335#\266\210\336 \210\207" [emacs-lock-mode emacs-lock--old-mode emacs-lock-unlockable-modes major-mode emacs-lock--try-unlocking current-message make-byte-code 257 "\301\300\"\207" vconcat vector [emacs-lock--set-mode] 4 "\n\n(fn MODE)" toggle prefix-numeric-value 0 t emacs-lock-live-process-p run-hooks emacs-lock-mode-hook emacs-lock-mode-on-hook emacs-lock-mode-off-hook called-interactively-p any " in current buffer" message "Emacs-Lock mode %sabled%s" "en" "dis" force-mode-line-update] 8 (#$ . 6403) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar emacs-lock-mode-hook nil) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307\310\311\300!\205\312\211%\210 \204-\313\314\315\"\210\313\316\317\"\210\313\320\321\"\210\312\207" [emacs-lock-mode-map noninteractive emacs-lock-mode-hook variable-documentation put "Hook run after entering or leaving `emacs-lock-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 emacs-lock-mode ("" (emacs-lock--try-unlocking " locked:" " Locked:") (:eval (symbol-name emacs-lock-mode))) boundp nil add-hook kill-buffer-query-functions emacs-lock--kill-buffer-query-functions kill-emacs-hook emacs-lock--kill-emacs-hook kill-emacs-query-functions emacs-lock--kill-emacs-query-functions] 6) #@32 Unload the Emacs Lock library. (defalias 'emacs-lock-unload-function #[0 "\30127\302 \211\2034\211@\211q\210\203-\303\304\305\306 \"!\203$\300\307!\210\202-\310\311!\210\312\301\313\"\210A\266\202\202\210\3140\207" [emacs-lock-mode :continue buffer-list y-or-n-p format "Buffer %S is locked, unlock it? " buffer-name -1 message "Unloading of feature `emacs-lock' aborted." throw t nil] 6 (#$ . 8802)]) #@58 Toggle `emacs-lock-from-exiting' for the current buffer. (defalias 'toggle-emacs-lock #[0 "\300\301!\207" [call-interactively emacs-lock-mode] 2 (#$ . 9219) nil]) (byte-code "\300\301\302\303#\210\304\305!\207" [make-obsolete toggle-emacs-lock emacs-lock-mode "24.1" provide emacs-lock] 4)