diff options
| author | Artur Malabarba | 2015-04-22 11:51:11 +0100 |
|---|---|---|
| committer | Artur Malabarba | 2015-04-22 11:51:11 +0100 |
| commit | 3beb6b8b86f62762f9969b2d2393098c498eb04e (patch) | |
| tree | 96f7bc95d5760e6855c7a4186e9f39355a15dc61 | |
| parent | 8991937a746d2c941a4be05ae5d053df93f2537e (diff) | |
| download | emacs-3beb6b8b86f62762f9969b2d2393098c498eb04e.tar.gz emacs-3beb6b8b86f62762f9969b2d2393098c498eb04e.zip | |
* 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)
| -rw-r--r-- | 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 cd894f47263..9f57d0da24a 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.")) | |||
| 4377 | 4377 | ||
| 4378 | (defun custom-file (&optional no-error) | 4378 | (defun custom-file (&optional no-error) |
| 4379 | "Return the file name for saving customizations." | 4379 | "Return the file name for saving customizations." |
| 4380 | (if (null user-init-file) | 4380 | (if (or (null user-init-file) |
| 4381 | (and (null custom-file) init-file-had-error)) | ||
| 4381 | ;; Started with -q, i.e. the file containing Custom settings | 4382 | ;; Started with -q, i.e. the file containing Custom settings |
| 4382 | ;; hasn't been read. Saving settings there won't make much | 4383 | ;; hasn't been read. Saving settings there won't make much |
| 4383 | ;; sense. | 4384 | ;; sense. |