# HG changeset patch # User Richard M. Stallman # Date 1110133750 0 # Node ID 7da5648c2f7d22b41a1f0010836765ac657e36e8 # Parent 7d534323afd25b36c62ed2a0afc7705962b48f21 (disabled-command-function): Output in *Disabled Command*. Explicitly ignore non-keyboard events, and explicitly handle C-g. diff -r 7d534323afd2 -r 7da5648c2f7d lisp/novice.el --- a/lisp/novice.el Sun Mar 06 18:27:25 2005 +0000 +++ b/lisp/novice.el Sun Mar 06 18:29:10 2005 +0000 @@ -49,7 +49,7 @@ (defun disabled-command-function (&rest ignore) (let (char) (save-window-excursion - (with-output-to-temp-buffer "*Help*" + (with-output-to-temp-buffer "*Disabled Command*" (let ((keys (this-command-keys))) (if (or (eq (aref keys 0) (if (stringp keys) @@ -68,7 +68,7 @@ (princ "It is disabled because new users often find it confusing.\n") (princ "Here's the first part of its description:\n\n") ;; Keep only the first paragraph of the documentation. - (with-current-buffer "*Help*" + (with-current-buffer "*Disabled Command*" (goto-char (point-max)) (let ((start (point))) (save-excursion @@ -91,10 +91,15 @@ (help-mode))) (message "Type y, n, ! or SPC (the space bar): ") (let ((cursor-in-echo-area t)) - (while (not (memq (setq char (downcase (read-char))) - '(?! ?y ?n ?\ ))) + (while (progn (setq char (read-event)) + (or (not (numberp char)) + (not (memq (downcase char) + '(?! ?y ?n ?\ ?\C-g))))) (ding) (message "Please type y, n, ! or SPC (the space bar): ")))) + (setq char (downcase char)) + (if (= char ?\C-g) + (setq quit-flag t)) (if (= char ?!) (setq disabled-command-function nil)) (if (= char ?y)