/[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.31.2.2 by miles, Sat Sep 4 09:19:26 2004 UTC revision 1.31.2.3 by miles, Sat Sep 4 09:21:44 2004 UTC
# Line 1  Line 1 
1  ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs  ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs
2    
3  ;; Copyright (C) 1985, 1986, 1987, 1994, 2002 Free Software Foundation, Inc.  ;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004
4    ;;   Free Software Foundation, Inc.
5    
6  ;; Maintainer: FSF  ;; Maintainer: FSF
7  ;; Keywords: internal, help  ;; Keywords: internal, help
# Line 36  Line 37 
37  ;; and the keys are returned by (this-command-keys).  ;; and the keys are returned by (this-command-keys).
38    
39  ;;;###autoload  ;;;###autoload
40  (defvar disabled-command-hook 'disabled-command-hook  (defvar disabled-command-function 'disabled-command-function
41    "Function to call to handle disabled commands.    "Function to call to handle disabled commands.
42  If nil, the feature is disabled, i.e., all commands work normally.")  If nil, the feature is disabled, i.e., all commands work normally.")
43    
44    (defvaralias 'disabled-command-hook 'disabled-command-function)
45    (make-obsolete-variable
46     'disabled-command-hook
47     "use the variable `disabled-command-function' instead." "21.4")
48    
49  ;;;###autoload  ;;;###autoload
50  (defun disabled-command-hook (&rest ignore)  (defun disabled-command-function (&rest ignore)
51    (let (char)    (let (char)
52      (save-window-excursion      (save-window-excursion
53       (with-output-to-temp-buffer "*Help*"       (with-output-to-temp-buffer "*Help*"
# Line 91  SPC to try the command just this once, b Line 97  SPC to try the command just this once, b
97           (ding)           (ding)
98           (message "Please type y, n, ! or SPC (the space bar): "))))           (message "Please type y, n, ! or SPC (the space bar): "))))
99      (if (= char ?!)      (if (= char ?!)
100          (setq disabled-command-hook nil))          (setq disabled-command-function nil))
101      (if (= char ?y)      (if (= char ?y)
102          (if (and user-init-file          (if (and user-init-file
103                   (not (string= "" user-init-file))                   (not (string= "" user-init-file))

Legend:
Removed from v.1.31.2.2  
changed lines
  Added in v.1.31.2.3

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