Commit 020c97d2 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(enable-command): Always insert code to enable.

(disable-command): Insert newline before as well as after.
parent 70f20973
......@@ -104,10 +104,11 @@ to future sessions."
(if (search-forward (concat "(put '" (symbol-name command) " ") nil t)
(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")
......@@ -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")
;;; novice.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment