comparison lisp/novice.el @ 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 f287613dfc28
children afb11b3822c2
comparison
equal deleted inserted replaced
2378:c5d0140aa7b6 2379:06abd963ec25
118 (progn (forward-line 1) (point)))) 118 (progn (forward-line 1) (point))))
119 (goto-char (point-max)) 119 (goto-char (point-max))
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