[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3beb6b8 1/2: * lisp/cus-edit.el (custom-file): Cons
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master 3beb6b8 1/2: * lisp/cus-edit.el (custom-file): Consider init-file-had-error |
Date: |
Wed, 22 Apr 2015 10:56:29 +0000 |
branch: master
commit 3beb6b8b86f62762f9969b2d2393098c498eb04e
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* lisp/cus-edit.el (custom-file): Consider init-file-had-error
In case `(and (null custom-file) init-file-had-error)' do the same
thing we'd do if `(null user-init-file)', which is to either error out
or return nil. This is in line with `custom-save-all' which would
throw an error in that situation. (bug#20355)
---
lisp/cus-edit.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index cd894f4..9f57d0d 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4377,7 +4377,8 @@ if only the first line of the docstring is shown."))
(defun custom-file (&optional no-error)
"Return the file name for saving customizations."
- (if (null user-init-file)
+ (if (or (null user-init-file)
+ (and (null custom-file) init-file-had-error))
;; Started with -q, i.e. the file containing Custom settings
;; hasn't been read. Saving settings there won't make much
;; sense.