Commit 3beb6b8b authored by Artur Malabarba's avatar Artur Malabarba

* 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)
parent 8991937a
......@@ -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.
......
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