diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-12-22 22:53:34 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-12-22 22:53:34 +0000 |
commit | 9b66415eab47e4dae0128507bc1f20bbca31d673 (patch) | |
tree | 4ac07646bf6fda5aa671dff8077b0458789fe3d2 /lisp/novice.el | |
parent | 3a8329e062bbc807caff8a3530ac3d3cd7261c89 (diff) | |
download | emacs-9b66415eab47e4dae0128507bc1f20bbca31d673.tar.gz |
(enable-command): Always insert code to enable.
(disable-command): Insert newline before as well as after.
Diffstat (limited to 'lisp/novice.el')
-rw-r--r-- | lisp/novice.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/novice.el b/lisp/novice.el index ad9fc94655c..0d23f26b3a1 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -104,10 +104,11 @@ to future sessions." (if (search-forward (concat "(put '" (symbol-name command) " ") nil t) (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point))) - ;; Must have been disabled by default. - (goto-char (point-max)) - (insert "\n(put '" (symbol-name command) " 'disabled nil)\n")) + (progn (forward-line 1) (point)))) + ;; Explicitly enable, in case this command is disabled by default + ;; or in case the code we deleted was actually a comment. + (goto-char (point-max)) + (insert "\n(put '" (symbol-name command) " 'disabled nil)\n") (save-buffer))) ;;;###autoload @@ -128,7 +129,7 @@ to future sessions." (progn (beginning-of-line) (point)) (progn (forward-line 1) (point)))) (goto-char (point-max)) - (insert "(put '" (symbol-name command) " 'disabled t)\n") + (insert "\n(put '" (symbol-name command) " 'disabled t)\n") (save-buffer))) ;;; novice.el ends here |