diff options
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/subr.el | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88406f24626..b13dd0a7719 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2009-07-18 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * info.el: Virtual Info keyword finder. | ||
| 4 | (add-to-list)<Info-virtual-files>: Add "\\`\\*Finder.*\\*\\'". | ||
| 5 | (Info-finder-file): New variable. | ||
| 6 | (Info-finder-find-file): New function. | ||
| 7 | (finder-known-keywords, finder-package-info) | ||
| 8 | (find-library-name, lm-commentary): Use defvar and | ||
| 9 | declare-function to silence compiler warnings. | ||
| 10 | (Info-finder-find-node): New function. | ||
| 11 | (info-finder): New command. | ||
| 12 | |||
| 13 | * subr.el (process-kill-buffer-query-function): New function. | ||
| 14 | (add-hook)<kill-buffer-query-functions>: Add hook | ||
| 15 | `process-kill-buffer-query-function'. | ||
| 16 | |||
| 1 | 2009-07-18 Alan Mackenzie <acm@muc.de> | 17 | 2009-07-18 Alan Mackenzie <acm@muc.de> |
| 2 | 18 | ||
| 3 | * progmodes/cc-mode.el (c-before-hack-hook), | 19 | * progmodes/cc-mode.el (c-before-hack-hook), |
diff --git a/lisp/subr.el b/lisp/subr.el index 777202cf1ee..37411bcb8ad 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1722,6 +1722,16 @@ Value is t if a query was formerly required." | |||
| 1722 | (set-process-query-on-exit-flag process nil) | 1722 | (set-process-query-on-exit-flag process nil) |
| 1723 | old)) | 1723 | old)) |
| 1724 | 1724 | ||
| 1725 | (defun process-kill-buffer-query-function () | ||
| 1726 | "Ask before killing a buffer that has a running process." | ||
| 1727 | (let ((process (get-buffer-process (current-buffer)))) | ||
| 1728 | (or (not process) | ||
| 1729 | (not (memq (process-status process) '(run stop open listen))) | ||
| 1730 | (not (process-query-on-exit-flag process)) | ||
| 1731 | (yes-or-no-p "Buffer has a running process; kill it? ")))) | ||
| 1732 | |||
| 1733 | (add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function) | ||
| 1734 | |||
| 1725 | ;; process plist management | 1735 | ;; process plist management |
| 1726 | 1736 | ||
| 1727 | (defun process-get (process propname) | 1737 | (defun process-get (process propname) |