From 020c97d28eb2138fcff78705995351e1a3a76421 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 22 Dec 1994 22:53:34 +0000 Subject: [PATCH] (enable-command): Always insert code to enable. (disable-command): Insert newline before as well as after. --- lisp/novice.el | 11 ++++++----- 1 file 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 -- 2.39.5