;;; 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
;; 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)
(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))