/[emacs]/emacs/lisp/novice.el
ViewVC logotype

Diff of /emacs/lisp/novice.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by rms, Wed Feb 16 09:48:29 2005 UTC revision 1.38 by rms, Sun Mar 6 18:29:10 2005 UTC
# Line 49  If nil, the feature is disabled, i.e., a Line 49  If nil, the feature is disabled, i.e., a
49  (defun disabled-command-function (&rest ignore)  (defun disabled-command-function (&rest ignore)
50    (let (char)    (let (char)
51      (save-window-excursion      (save-window-excursion
52       (with-output-to-temp-buffer "*Help*"       (with-output-to-temp-buffer "*Disabled Command*"
53         (let ((keys (this-command-keys)))         (let ((keys (this-command-keys)))
54           (if (or (eq (aref keys 0)           (if (or (eq (aref keys 0)
55                       (if (stringp keys)                       (if (stringp keys)
# Line 68  If nil, the feature is disabled, i.e., a Line 68  If nil, the feature is disabled, i.e., a
68           (princ "It is disabled because new users often find it confusing.\n")           (princ "It is disabled because new users often find it confusing.\n")
69           (princ "Here's the first part of its description:\n\n")           (princ "Here's the first part of its description:\n\n")
70           ;; Keep only the first paragraph of the documentation.           ;; Keep only the first paragraph of the documentation.
71           (with-current-buffer "*Help*"           (with-current-buffer "*Disabled Command*"
72             (goto-char (point-max))             (goto-char (point-max))
73             (let ((start (point)))             (let ((start (point)))
74               (save-excursion               (save-excursion
# Line 91  SPC to try the command just this once, b Line 91  SPC to try the command just this once, b
91          (help-mode)))          (help-mode)))
92       (message "Type y, n, ! or SPC (the space bar): ")       (message "Type y, n, ! or SPC (the space bar): ")
93       (let ((cursor-in-echo-area t))       (let ((cursor-in-echo-area t))
94         (while (not (memq (setq char (downcase (read-char)))         (while (progn (setq char (read-event))
95                           '(?! ?y ?n ?\ )))                       (or (not (numberp char))
96                             (not (memq (downcase char)
97                                        '(?! ?y ?n ?\  ?\C-g)))))
98           (ding)           (ding)
99           (message "Please type y, n, ! or SPC (the space bar): "))))           (message "Please type y, n, ! or SPC (the space bar): "))))
100        (setq char (downcase char))
101        (if (= char ?\C-g)
102            (setq quit-flag t))
103      (if (= char ?!)      (if (= char ?!)
104          (setq disabled-command-function nil))          (setq disabled-command-function nil))
105      (if (= char ?y)      (if (= char ?y)

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26