Function: recentf-save-list

recentf-save-list is an interactive and byte-compiled function defined in recentf.el.gz.

Signature

(recentf-save-list)

Documentation

Save the recent list.

Write data into the file specified by recentf-save-file.

View in manual

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/recentf.el.gz
(defun recentf-save-list ()
  "Save the recent list.
Write data into the file specified by `recentf-save-file'."
  (interactive)
  (condition-case error
      (with-temp-buffer
        (erase-buffer)
        (set-buffer-file-coding-system recentf-save-file-coding-system)
        (insert (format-message recentf-save-file-header
				(current-time-string)))
        (recentf-dump-variable 'recentf-list recentf-max-saved-items)
        (recentf-dump-variable 'recentf-filter-changer-current)
        (insert "\n\n;; Local Variables:\n"
                (format ";; coding: %s\n" recentf-save-file-coding-system)
                ";; End:\n")
        (write-region (point-min)
                      (point-max)
                      (expand-file-name recentf-save-file) nil
                      (unless (or (called-interactively-p 'interactive)
                                  recentf-show-messages)
                        'quiet))
        (when recentf-save-file-modes
          (set-file-modes recentf-save-file recentf-save-file-modes))
        nil)
    (error
     (warn "recentf mode: %s" (error-message-string error)))))