diff options
| author | Richard M. Stallman | 2006-05-25 00:19:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-05-25 00:19:02 +0000 |
| commit | 113fe928bb71fc6d99b5b0c7220daa9d16359f43 (patch) | |
| tree | 8f2edcd27b94ef11fcd171fe5ee739d24e0ea80b | |
| parent | 379ba58e7676783024bfd1cba67e0c9996ae250a (diff) | |
| download | emacs-113fe928bb71fc6d99b5b0c7220daa9d16359f43.tar.gz emacs-113fe928bb71fc6d99b5b0c7220daa9d16359f43.zip | |
(with-local-quit): When handling `quit' signal,
make a chance for quit-flag to cause a quit.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf94fcb539c..4e4871d0efd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2006-05-24 Richard Stallman <rms@gnu.org> | 1 | 2006-05-24 Richard Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * subr.el (with-local-quit): When handling `quit' signal, | ||
| 4 | make a chance for quit-flag to cause a quit. | ||
| 5 | |||
| 3 | * emacs-lisp/advice.el (ad-enable-advice, ad-activate) | 6 | * emacs-lisp/advice.el (ad-enable-advice, ad-activate) |
| 4 | (ad-disable-advice): Add autoloads. | 7 | (ad-disable-advice): Add autoloads. |
| 5 | 8 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 67731f4d4c6..711f1822189 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1617,7 +1617,7 @@ Optional DEFAULT is a default password to use instead of empty input. | |||
| 1617 | This function echoes `.' for each character that the user types. | 1617 | This function echoes `.' for each character that the user types. |
| 1618 | The user ends with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. | 1618 | The user ends with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. |
| 1619 | C-g quits; if `inhibit-quit' was non-nil around this function, | 1619 | C-g quits; if `inhibit-quit' was non-nil around this function, |
| 1620 | then it returns nil if the user types C-g. | 1620 | then it returns nil if the user types C-g, but quit-flag remains set. |
| 1621 | 1621 | ||
| 1622 | Once the caller uses the password, it can erase the password | 1622 | Once the caller uses the password, it can erase the password |
| 1623 | by doing (clear-string STRING)." | 1623 | by doing (clear-string STRING)." |
| @@ -2321,7 +2321,13 @@ is allowed once again." | |||
| 2321 | `(condition-case nil | 2321 | `(condition-case nil |
| 2322 | (let ((inhibit-quit nil)) | 2322 | (let ((inhibit-quit nil)) |
| 2323 | ,@body) | 2323 | ,@body) |
| 2324 | (quit (setq quit-flag t) nil))) | 2324 | (quit (setq quit-flag t) |
| 2325 | ;; This call is to give a chance to handle quit-flag | ||
| 2326 | ;; in case inhibit-quit is nil. | ||
| 2327 | ;; Without this, it will not be handled until the next function | ||
| 2328 | ;; call, and that might allow it to exit thru a condition-case | ||
| 2329 | ;; that intends to handle the quit signal next time. | ||
| 2330 | (eval '(ignore nil))))) | ||
| 2325 | 2331 | ||
| 2326 | (defmacro while-no-input (&rest body) | 2332 | (defmacro while-no-input (&rest body) |
| 2327 | "Execute BODY only as long as there's no pending input. | 2333 | "Execute BODY only as long as there's no pending input. |