summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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