Function: custom-file

custom-file is a byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-file &optional NO-ERROR)

Documentation

Return the file name for saving customizations.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-file (&optional no-error)
  "Return the file name for saving customizations."
  (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.
      (if no-error
	  nil
	(user-error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
    (file-chase-links (or custom-file user-init-file))))