Commit b2b46494 authored by Lute Kamstra's avatar Lute Kamstra
Browse files

(disable-command): Don't add spurious newlines to the init file.

Reported by Dan Jacobson <jidanni@jidanni.org>.
parent a715531f
2005-04-27 Lute Kamstra <lute@gnu.org>
* novice.el (disable-command): Don't add spurious newlines to the
init file. Reported by Dan Jacobson <jidanni@jidanni.org>.
2005-04-26 Jay Belanger <belanger@truman.edu>
 
* calc/calc-yank.el (calc-edit-finish): Make sure there is more
......
;;; 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)
......
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