mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(process-kill-buffer-query-function): New function.
(add-hook)<kill-buffer-query-functions>: Add hook `process-kill-buffer-query-function'.
This commit is contained in:
parent
f38fd73da3
commit
d842b10332
2 changed files with 26 additions and 0 deletions
|
|
@ -1,3 +1,19 @@
|
|||
2009-07-18 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* info.el: Virtual Info keyword finder.
|
||||
(add-to-list)<Info-virtual-files>: Add "\\`\\*Finder.*\\*\\'".
|
||||
(Info-finder-file): New variable.
|
||||
(Info-finder-find-file): New function.
|
||||
(finder-known-keywords, finder-package-info)
|
||||
(find-library-name, lm-commentary): Use defvar and
|
||||
declare-function to silence compiler warnings.
|
||||
(Info-finder-find-node): New function.
|
||||
(info-finder): New command.
|
||||
|
||||
* subr.el (process-kill-buffer-query-function): New function.
|
||||
(add-hook)<kill-buffer-query-functions>: Add hook
|
||||
`process-kill-buffer-query-function'.
|
||||
|
||||
2009-07-18 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-mode.el (c-before-hack-hook),
|
||||
|
|
|
|||
10
lisp/subr.el
10
lisp/subr.el
|
|
@ -1722,6 +1722,16 @@ Value is t if a query was formerly required."
|
|||
(set-process-query-on-exit-flag process nil)
|
||||
old))
|
||||
|
||||
(defun process-kill-buffer-query-function ()
|
||||
"Ask before killing a buffer that has a running process."
|
||||
(let ((process (get-buffer-process (current-buffer))))
|
||||
(or (not process)
|
||||
(not (memq (process-status process) '(run stop open listen)))
|
||||
(not (process-query-on-exit-flag process))
|
||||
(yes-or-no-p "Buffer has a running process; kill it? "))))
|
||||
|
||||
(add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
|
||||
|
||||
;; process plist management
|
||||
|
||||
(defun process-get (process propname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue