[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/novice.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/novice.el |
Date: |
Sat, 02 Feb 2002 08:00:42 -0500 |
Index: emacs/lisp/novice.el
diff -c emacs/lisp/novice.el:1.28 emacs/lisp/novice.el:1.29
*** emacs/lisp/novice.el:1.28 Sun Jul 15 12:15:34 2001
--- emacs/lisp/novice.el Sat Feb 2 07:47:54 2002
***************
*** 107,116 ****
to future sessions."
(interactive "CEnable command: ")
(put command 'disabled nil)
! (let ((init-file user-init-file))
! (when (or (not (stringp init-file))
! (not (file-exists-p init-file)))
! (setq init-file (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))
(if (and (not (file-exists-p init-file))
(eq system-type 'windows-nt)
(file-exists-p "~/_emacs"))
--- 107,124 ----
to future sessions."
(interactive "CEnable command: ")
(put command 'disabled nil)
! (let ((init-file user-init-file)
! (default-init-file
! (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
! (when (null init-file)
! (if (or (file-exists-p default-init-file)
! (and (eq system-type 'windows-nt)
! (file-exists-p "~/_emacs")))
! ;; Started with -q, i.e. the file containing
! ;; enabled/disabled commands hasn't been read. Saving
! ;; settings there would overwrite other settings.
! (error "Saving settings from \"emacs -q\" would overwrite existing
customizations"))
! (setq init-file default-init-file)
(if (and (not (file-exists-p init-file))
(eq system-type 'windows-nt)
(file-exists-p "~/_emacs"))
***************
*** 138,154 ****
(if (not (commandp command))
(error "Invalid command name `%s'" command))
(put command 'disabled t)
! (save-excursion
! (set-buffer (find-file-noselect
! (substitute-in-file-name user-init-file)))
! (goto-char (point-min))
! (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")
! (save-buffer)))
(provide 'novice)
--- 146,178 ----
(if (not (commandp command))
(error "Invalid command name `%s'" command))
(put command 'disabled t)
! (let ((init-file user-init-file)
! (default-init-file
! (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
! (when (null init-file)
! (if (or (file-exists-p default-init-file)
! (and (eq system-type 'windows-nt)
! (file-exists-p "~/_emacs")))
! ;; Started with -q, i.e. the file containing
! ;; enabled/disabled commands hasn't been read. Saving
! ;; settings there would overwrite other settings.
! (error "Saving settings from \"emacs -q\" would overwrite existing
customizations"))
! (setq init-file default-init-file)
! (if (and (not (file-exists-p init-file))
! (eq system-type 'windows-nt)
! (file-exists-p "~/_emacs"))
! (setq init-file "~/_emacs")))
! (save-excursion
! (set-buffer (find-file-noselect
! (substitute-in-file-name init-file)))
! (goto-char (point-min))
! (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")
! (save-buffer))))
(provide 'novice)