Function: eieio-persistent-save
eieio-persistent-save is a byte-compiled function defined in
eieio-base.el.gz.
Signature
(eieio-persistent-save ARG &rest ARGS)
Implementations
(eieio-persistent-save (THIS eieio-persistent) &optional FILE) in `eieio-base.el'.
Save persistent object THIS to disk. Optional argument FILE overrides the file name specified in the object instance.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio-base.el.gz
(cl-defmethod eieio-persistent-save ((this eieio-persistent) &optional file)
"Save persistent object THIS to disk.
Optional argument FILE overrides the file name specified in the object
instance."
(when file (setq file (expand-file-name file)))
(with-temp-buffer
(let* ((cfn (or file (oref this file)))
(default-directory (file-name-directory cfn)))
(cl-letf ((standard-output (current-buffer))
((oref this file) ;FIXME: Why change it?
(if file
;; FIXME: Makes a name relative to (oref this file),
;; whereas I think it should be relative to cfn.
(eieio-persistent-path-relative this file)
(file-name-nondirectory cfn))))
(object-write this (oref this file-header-line)))
(let ((backup-inhibited (not (oref this do-backups)))
(coding-system-for-write 'utf-8-emacs))
;; Old way - write file. Leaves message behind.
;;(write-file cfn nil)
;; New way - Avoid the vast quantities of error checking
;; just so I can get at the special flags that disable
;; displaying random messages.
(write-region (point-min) (point-max) cfn nil 1)
))))