changeset 2379:06abd963ec25

(enable-and-notify) Added. Inspired by Roland McGrath's LCD package enable-me.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Sat, 27 Mar 1993 01:58:24 +0000
parents c5d0140aa7b6
children e67f6d2679e3
files lisp/novice.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/novice.el	Sat Mar 27 01:58:22 1993 +0000
+++ b/lisp/novice.el	Sat Mar 27 01:58:24 1993 +0000
@@ -120,4 +120,13 @@
    (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