summaryrefslogtreecommitdiff
path: root/lisp/novice.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-22 22:53:34 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-22 22:53:34 +0000
commit020c97d28eb2138fcff78705995351e1a3a76421 (patch)
tree73501f960d82fdd3ff801f45d90e9eb266a3d007 /lisp/novice.el
parent70f20973508fa81840afbef31b6c25c6d6d876f5 (diff)
downloademacs-020c97d28eb2138fcff78705995351e1a3a76421.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.el11
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