*** empty log message ***
[bpt/emacs.git] / lisp / novice.el
index 6fd67d4..a2a7fb2 100644 (file)
@@ -1,7 +1,7 @@
 ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs
 
-;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004, 2005
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1994, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal, help
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 If nil, the feature is disabled, i.e., all commands work normally.")
 
 ;;;###autoload
-(defvaralias 'disabled-command-hook 'disabled-command-function)
-;;;###autoload (make-obsolete-variable 'disabled-command-hook 'disabled-command-function "22.1")
+(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
 
+;; It is ok here to assume that this-command is a symbol
+;; because we won't get called otherwise.
 ;;;###autoload
 (defun disabled-command-function (&rest ignore)
   (let (char)
@@ -94,7 +95,7 @@ SPC to try the command just this once, but leave it disabled.
        (while (progn (setq char (read-event))
                     (or (not (numberp char))
                         (not (memq (downcase char)
-                                   '(?! ?y ?n ?\  ?\C-g)))))
+                                   '(?! ?y ?n ?\s ?\C-g)))))
         (ding)
         (message "Please type y, n, ! or SPC (the space bar): "))))
     (setq char (downcase char))