aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond1993-03-27 01:58:24 +0000
committerEric S. Raymond1993-03-27 01:58:24 +0000
commitb0912e2d9b3759d2e51ed7e23d1fe40c3325d717 (patch)
tree97663a7d0454c78101c4d0188f744c39c82a8548
parentd91e2b1a2d91d9dd76754d4c639a5671fb0dd8e6 (diff)
downloademacs-b0912e2d9b3759d2e51ed7e23d1fe40c3325d717.tar.gz
emacs-b0912e2d9b3759d2e51ed7e23d1fe40c3325d717.zip
(enable-and-notify) Added. Inspired by Roland McGrath's LCD package
enable-me.
-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."
120 (insert "(put '" (symbol-name command) " 'disabled t)\n") 120 (insert "(put '" (symbol-name command) " 'disabled t)\n")
121 (save-buffer))) 121 (save-buffer)))
122 122
123;;;###autoload
124(defun enable-and-notify (&rest args)
125 "A novice hook for non-novices."
126 (put this-command 'disabled nil)
127 (message "You typed %s. %s was disabled. It's enabled now."
128 (key-description (this-command-keys)) this-command)
129 (sit-for 0)
130 (call-interactively this-command))
131
123;;; novice.el ends here 132;;; novice.el ends here