%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/userlock.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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303#\210\304\305\306\307#\207" [put create-lockfiles safe-local-variable booleanp define-error file-locked "File is locked" file-error] 4)
#@402 Ask user what to do when he wants to edit FILE but it is locked by OPPONENT.
This function has a choice of three things to do:
  do (signal \='file-locked (list FILE OPPONENT))
    to refrain from editing the file
  return t (grab the lock on the file)
  return nil (edit the file even though it is locked).
You can redefine this function to choose among those three alternatives
in any way you like.
(defalias 'ask-user-about-lock #[(file opponent) "\306 \210\307 \310\216\311\211\211\fG\312V\203!\313\314\f\211G\312Z\"P\202\"\f
G\315V\203D\316 &\317\216\320\321
\"\210\314
\322\323#\313\324\322
\"Q*\202E
\204\256\325\326	\n#\210'\203Y\327\330!\210\331\211()\332 \227\311**\211+,U\203u\333 \210\202\252\334+\335\"\211\204\215\336 \210\325\337!\210\340\341!\210\202\252A\342=\203\234\333 \210\311\202\252A\343=\203\252\344\345\f
D\"\210)\202FA-\207" [#1=#:wconfig short-file short-opponent answer file opponent discard-input current-window-configuration #[nil "\301!\207" [#1# set-window-configuration] 2] nil 22 "..." substring 25 match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match " (pid [0-9]+)" 0 13 match-string message "%s locked by %s: (s, q, p, ?)? " error "Cannot resolve lock conflict in batch mode" t read-char ask-user-about-lock-help assoc ((115 . t) (113 . yield) (7 . yield) (112) (63 . help)) beep "Please type q, s, or p; or ? for help" sit-for 3 help yield signal file-locked save-match-data-internal noninteractive cursor-in-echo-area inhibit-quit quit-flag tem help-char] 6 (#$ . 573)])
(defalias 'ask-user-about-lock-help #[nil "r\306\307!q\210p\310 \210	\311\211\312\211\312\313 \210\314\315!\210+\211\316\317!\210rq\210\320 )\321!\210+\207" [default-directory #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks get-buffer-create "*Help*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook princ "It has been detected that you want to modify a file that someone else has\nalready started modifying in Emacs.\n\nYou can <s>teal the file; the other user becomes the\n  intruder if (s)he ever unmodifies the file and then changes it again.\nYou can <p>roceed; you edit at your own (and the other user's) risk.\nYou can <q>uit; don't modify this file." help-mode internal-temp-output-buffer-show inhibit-read-only #2=#:buf standard-output] 4])
(define-error 'file-supersession nil 'file-error)
(defalias 'userlock--check-content-unchanged #[(filename) "\3061W\307	!\232\204\310\311!\210\214~\210p\ned\312\313!rq\210\314\216
\315\316!\210*\317 \fZU\205L\320\321\fped&)\322U+\205T\323 \210\324-0\207\325\326\"\210)\320\207" [filename buffer-file-truename buffer-file-coding-system end start cs (debug error) expand-file-name cl--assertion-failed (equal filename (expand-file-name buffer-file-truename)) generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] t insert-file-contents buffer-size nil compare-buffer-substrings 0 set-visited-file-modtime unchanged message "Unchanged content check: %S" buf #1# non-essential coding-system-for-read case-fold-search #2=#:err] 7])
(defalias 'userlock--ask-user-about-supersession-threat #[(filename) "\301!?\205\n\302!\207" [filename userlock--check-content-unchanged ask-user-about-supersession-threat] 2])
#@427 Ask a user who is about to modify an obsolete buffer what to do.
This function has two choices: it can return, in which case the modification
of the buffer will proceed, or it can (signal \='file-supersession (file)),
in which case the proposed buffer modification will not be made.

You can rewrite this to use any criterion you like to choose which one to do.
The buffer in question is current when this function is called.
(defalias 'ask-user-about-supersession-threat #[(filename) "\306 \210\307 \310\216\311\312\313	!\"\314\315
\203 \316\317\f\"\210\320\321!\210\n\204V\322\f\"\211\323\267\202 \324 \210\315\211\202!\325\315\326 ?\"\210\327\330\331	D\"\210\202 \327\330\332	D\"\210\202 \202 \316\333!\210\315\211-\207" [#1=#:wconfig filename answer choices prompt noninteractive discard-input current-window-configuration #[nil "\301!\207" [#1# set-window-configuration] 2] format "%s changed on disk; really edit the buffer? (y, n, r or C-h) " file-name-nondirectory (121 110 114 63 8) nil message "%s" error "Cannot resolve conflict in batch mode" read-char-from-minibuffer #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (63 47 8 47 114 56 110 73)) ask-user-about-supersession-help revert-buffer buffer-modified-p signal file-supersession "File reverted" "File changed on disk" "File on disk now will become a backup file if you save these changes." buffer-backed-up] 5 (#$ . 4004)])
(defalias 'ask-user-about-supersession-help #[nil "r\306\307!q\210p\310 \210	\311\211\312\211\312\313 \210\314\315!\210+\211\316\317\320!!\210rq\210\321 )\322!\210+\207" [default-directory #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks get-buffer-create "*Help*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook princ substitute-command-keys "You want to modify a buffer whose disk file has changed\nsince you last read it in or saved it with this buffer.\n\nIf you say `y' to go ahead and modify this buffer,\nyou risk ruining the work of whoever rewrote the file.\nIf you say `r' to revert, the contents of the buffer are refreshed\nfrom the file on disk.\nIf you say `n', the change you started to make will be aborted.\n\nUsually, you should type `n' and then `\\[revert-buffer]',\nto get the latest version of the file, then make the change again." help-mode internal-temp-output-buffer-show inhibit-read-only #2=#:buf standard-output] 4])

Zerion Mini Shell 1.0