aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra <[email protected]>2005-04-27 07:44:15 +0000
committerLute Kamstra <[email protected]>2005-04-27 07:44:15 +0000
commitb2b46494df4c1f1672b6e260bb322bdf6a025949 (patch)
treec81c6827a0c6de3b28d6f30a36018ebceb631c75
parenta715531f6ee45ac7bf5ad77fc917913d93743062 (diff)
(disable-command): Don't add spurious newlines to the init file.
Reported by Dan Jacobson <[email protected]>.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/novice.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1fbb9a57de..5222a56d16 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-27 Lute Kamstra <[email protected]>
+
+ * novice.el (disable-command): Don't add spurious newlines to the
+ init file. Reported by Dan Jacobson <[email protected]>.
+
2005-04-26 Jay Belanger <[email protected]>
* calc/calc-yank.el (calc-edit-finish): Make sure there is more
diff --git a/lisp/novice.el b/lisp/novice.el
index 3e63f0a7bc..171285ca3f 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -1,6 +1,6 @@
;;; novice.el --- handling of disabled commands ("novice mode") for Emacs
-;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004
+;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004, 2005
;; Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -182,9 +182,10 @@ 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))))
- (goto-char (point-max))
- (insert "\n(put '" (symbol-name command) " 'disabled t)\n")
+ (progn (forward-line 1) (point)))
+ (goto-char (point-max))
+ (insert ?\n))
+ (insert "(put '" (symbol-name command) " 'disabled t)\n")
(save-buffer))))
(provide 'novice)