# HG changeset patch # User Lute Kamstra # Date 1114587740 0 # Node ID 305cf10830d58bd65a06faf7d4e9a1fdef4caf49 # Parent 45242a1c6ec262001a4b9692d74e7f4bcf0daff4 (disable-command): Don't add spurious newlines to the init file. Reported by Dan Jacobson . diff -r 45242a1c6ec2 -r 305cf10830d5 lisp/novice.el --- a/lisp/novice.el Wed Apr 27 04:53:04 2005 +0000 +++ b/lisp/novice.el Wed Apr 27 07:42:20 2005 +0000 @@ -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 @@ (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)