aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-22 22:53:34 +0000
committerRichard M. Stallman1994-12-22 22:53:34 +0000
commit020c97d28eb2138fcff78705995351e1a3a76421 (patch)
tree73501f960d82fdd3ff801f45d90e9eb266a3d007
parent70f20973508fa81840afbef31b6c25c6d6d876f5 (diff)
downloademacs-020c97d28eb2138fcff78705995351e1a3a76421.tar.gz
emacs-020c97d28eb2138fcff78705995351e1a3a76421.zip
(enable-command): Always insert code to enable.
(disable-command): Insert newline before as well as after.
-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."
104 (if (search-forward (concat "(put '" (symbol-name command) " ") nil t) 104 (if (search-forward (concat "(put '" (symbol-name command) " ") nil t)
105 (delete-region 105 (delete-region
106 (progn (beginning-of-line) (point)) 106 (progn (beginning-of-line) (point))
107 (progn (forward-line 1) (point))) 107 (progn (forward-line 1) (point))))
108 ;; Must have been disabled by default. 108 ;; Explicitly enable, in case this command is disabled by default
109 (goto-char (point-max)) 109 ;; or in case the code we deleted was actually a comment.
110 (insert "\n(put '" (symbol-name command) " 'disabled nil)\n")) 110 (goto-char (point-max))
111 (insert "\n(put '" (symbol-name command) " 'disabled nil)\n")
111 (save-buffer))) 112 (save-buffer)))
112 113
113;;;###autoload 114;;;###autoload
@@ -128,7 +129,7 @@ to future sessions."
128 (progn (beginning-of-line) (point)) 129 (progn (beginning-of-line) (point))
129 (progn (forward-line 1) (point)))) 130 (progn (forward-line 1) (point))))
130 (goto-char (point-max)) 131 (goto-char (point-max))
131 (insert "(put '" (symbol-name command) " 'disabled t)\n") 132 (insert "\n(put '" (symbol-name command) " 'disabled t)\n")
132 (save-buffer))) 133 (save-buffer)))
133 134
134;;; novice.el ends here 135;;; novice.el ends here