;ELC   
;;; Compiled by rms@psilocin.gnu.ai.mit.edu on Thu Jun 12 00:05:40 1997
;;; from file /home/fsf/rms/e19/lisp/emacs-lock.el
;;; in Emacs version 19.34.94.27
;;; with bytecomp version 2.28
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(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 "`emacs-lock.el' was compiled for Emacs 19.29 or later"))


#@70 Whether emacs is locked to prevent exiting.  See `check-emacs-lock'.
(defvar emacs-lock-from-exiting nil (#$ . 548))
(make-variable-buffer-local 'emacs-lock-from-exiting)
#@74 Whether a shell or telnet buffer was locked when its process was killed.
(defvar emacs-lock-buffer-locked nil (#$ . 725))
(byte-code "ÀÁ!ˆÂÁÃÄ#‡" [make-variable-buffer-local emacs-lock-buffer-locked put permanent-local t] 4)
#@134 Check if variable `emacs-lock-from-exiting' is t for any buffer.
If any t is found, signal error and display the locked buffer name.
(defalias 'check-emacs-lock #[nil "À Š	…! 	@qˆ\nƒ ÃÄÅ \"ˆ‚ 	A‰„ Æ*‡" [buffer-list buffers emacs-lock-from-exiting error "Emacs is locked from exit due to buffer: %s" buffer-name nil] 4 (#$ . 957)])
#@100 Toggle `emacs-lock-from-exiting' between t and nil for the current buffer.
See `check-emacs-lock'.
(defalias 'toggle-emacs-lock #[nil "ƒ	 Á‚ Âƒ ÃÄ!‡ÃÅ!‡" [emacs-lock-from-exiting nil t message "Buffer is now locked" "Buffer is now unlocked"] 2 (#$ . 1300) nil])
#@128 Check if variable `emacs-lock-from-exiting' is t for a buffer.
If t is found, signal error and display the locked buffer name.
(defalias 'emacs-lock-check-buffer-lock #[nil "…	 ÁÂÃ \"‡" [emacs-lock-from-exiting error "Buffer `%s' is locked, can't delete it" buffer-name] 3 (#$ . 1575)])
(defalias 'emacs-lock-shell-sentinel #[nil "ÀÁÂ !Ã\"‡" [set-process-sentinel get-buffer-process buffer-name emacs-lock-clear-sentinel] 3])
(defalias 'emacs-lock-clear-sentinel #[(proc str) "ƒ\f ÁÂÄÅ!‡Á‰‡" [emacs-lock-from-exiting nil t emacs-lock-buffer-locked message "Buffer is now unlocked"] 2])
(defalias 'emacs-lock-was-buffer-locked #[nil "… Á‰‡" [emacs-lock-buffer-locked t emacs-lock-from-exiting] 2])
(byte-code "ÀÁÂ\"ˆÀÃÄ\"ˆÀÅÆ\"ˆÀÅÇ\"ˆÀÈÆ\"ˆÀÈÇ\"ˆÉÊ!‡" [add-hook kill-emacs-hook check-emacs-lock kill-buffer-hook emacs-lock-check-buffer-lock shell-mode-hook emacs-lock-was-buffer-locked emacs-lock-shell-sentinel telnet-mode-hook provide emacs-lock] 3)
