summaryrefslogtreecommitdiff
path: root/lisp/novice.el
diff options
context:
space:
mode:
authorEric S. Raymond <esr@snark.thyrsus.com>1993-03-27 01:58:24 +0000
committerEric S. Raymond <esr@snark.thyrsus.com>1993-03-27 01:58:24 +0000
commit1f5fb93ddc21e88c2dad0d87b96f5246b9f46c23 (patch)
tree0d713bd2aa5425d47045cafcf85163284d119e52 /lisp/novice.el
parenta09fa56473a04e7a3d6b833216a30d37f0a19e8c (diff)
downloademacs-1f5fb93ddc21e88c2dad0d87b96f5246b9f46c23.tar.gz
(enable-and-notify) Added. Inspired by Roland McGrath's LCD package
enable-me.
Diffstat (limited to 'lisp/novice.el')
-rw-r--r--lisp/novice.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/novice.el b/lisp/novice.el
index 2ddbbac3250..28ba34d206f 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -120,4 +120,13 @@ to future sessions."
(insert "(put '" (symbol-name command) " 'disabled t)\n")
(save-buffer)))
+;;;###autoload
+(defun enable-and-notify (&rest args)
+ "A novice hook for non-novices."
+ (put this-command 'disabled nil)
+ (message "You typed %s. %s was disabled. It's enabled now."
+ (key-description (this-command-keys)) this-command)
+ (sit-for 0)
+ (call-interactively this-command))
+
;;; novice.el ends here