[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105381: When running under emacs -q,
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105381: When running under emacs -q, always refuse to save the customisations, even if the .emacs file doesn't exist. |
Date: |
Tue, 02 Aug 2011 17:46:07 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105381
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2011-08-02 17:46:07 +0200
message:
When running under emacs -q, always refuse to save the customisations, even
if the .emacs file doesn't exist.
This makes it easier to reproduce testing runs under "emacs -Q" more
reliably.
modified:
lisp/ChangeLog
lisp/cus-edit.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-02 15:21:07 +0000
+++ b/lisp/ChangeLog 2011-08-02 15:46:07 +0000
@@ -1,5 +1,9 @@
2011-08-02 Lars Magne Ingebrigtsen <address@hidden>
+ * cus-edit.el (custom-file): When running under emacs -q, always
+ refuse to save the customisations, even if the .emacs file doesn't
+ exist.
+
* info.el: Remove the `Info-beginning-of-buffer' function
(bug#8325).
=== modified file 'lisp/cus-edit.el'
--- a/lisp/cus-edit.el 2011-07-11 20:12:07 +0000
+++ b/lisp/cus-edit.el 2011-08-02 15:46:07 +0000
@@ -4409,25 +4409,14 @@
(defun custom-file (&optional no-error)
"Return the file name for saving customizations."
- (let ((file
- (or custom-file
- (let ((user-init-file user-init-file)
- (default-init-file
- (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
- (when (null user-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
- ;; Custom settings hasn't been read. Saving
- ;; settings there would overwrite other settings.
- (if no-error
- nil
- (error "Saving settings from \"emacs -q\" would
overwrite existing customizations"))
- (setq user-init-file default-init-file)))
- user-init-file))))
- (and file
- (file-chase-links file))))
+ (if (null user-init-file)
+ ;; Started with -q, i.e. the file containing Custom settings
+ ;; hasn't been read. Saving settings there won't make much
+ ;; sense.
+ (if no-error
+ nil
+ (error "Saving settings from \"emacs -q\" would overwrite existing
customizations"))
+ (file-chase-links (or custom-file user-init-file))))
;; If recentf-mode is non-nil, this is defined.
(declare-function recentf-expand-file-name "recentf" (name))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105381: When running under emacs -q, always refuse to save the customisations, even if the .emacs file doesn't exist.,
Lars Magne Ingebrigtsen <=