;ELC
;;; Compiled by LTX@Xue-LingTaos-MacBook-Pro.local on Wed Mar 16 23:09:17 2011
;;; from file /Users/LTX/Projects/Emacs/emacs/lisp/emacs-lock.el
;;; in Emacs version 24.0.50.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.

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


#@70 Whether Emacs is locked to prevent exiting.  See `check-emacs-lock'.
(defvar emacs-lock-from-exiting nil (#$ . 544))
(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 (#$ . 721))
(byte-code "\300\301!\210\302\301\303\304#\207" [make-variable-buffer-local emacs-lock-buffer-locked put permanent-local t] 4)
#@141 Check if variable `emacs-lock-from-exiting' is t for any buffer.
If any locked buffer is found, signal error and display the buffer's name.
(defalias 'check-emacs-lock #[nil "\212\303 \304\211\205\"	@\211q\210\n\203\305\306\307 \"\210	A\211\204\n\304+\207" [buffer --dolist-tail-- emacs-lock-from-exiting buffer-list nil error "Emacs is locked from exit due to buffer: %s" buffer-name] 4 (#$ . 977)])
#@82 Toggle `emacs-lock-from-exiting' for the current buffer.
See `check-emacs-lock'.
(defalias 'toggle-emacs-lock #[nil "?\211\203\301\302!\207\301\303!\207" [emacs-lock-from-exiting message "Buffer is now locked" "Buffer is now unlocked"] 3 (#$ . 1392) nil])
#@124 Check if variable `emacs-lock-from-exiting' is t for a buffer.
If the buffer is locked, signal error and display its name.
(defalias 'emacs-lock-check-buffer-lock #[nil "\205	\301\302\303 \"\207" [emacs-lock-from-exiting error "Buffer `%s' is locked, can't delete it" buffer-name] 3 (#$ . 1659)])
(defalias 'emacs-lock-shell-sentinel #[nil "\300\301\302 !\303\"\207" [set-process-sentinel get-buffer-process buffer-name emacs-lock-clear-sentinel] 3])
(defalias 'emacs-lock-clear-sentinel #[(proc str) "\203\f\302\303\304\305!\207\302\211\207" [emacs-lock-from-exiting emacs-lock-buffer-locked nil t message "Buffer is now unlocked"] 2])
(defalias 'emacs-lock-was-buffer-locked #[nil "\205\302\211\207" [emacs-lock-buffer-locked emacs-lock-from-exiting t] 2])
(byte-code "\204	\301\302\303\"\210\301\304\305\"\210\301\306\307\"\210\301\306\310\"\210\301\311\307\"\210\301\311\310\"\210\312\313!\207" [noninteractive 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)
