Function: recentf-dump-variable
recentf-dump-variable is a byte-compiled function defined in
recentf.el.gz.
Signature
(recentf-dump-variable VARIABLE &optional LIMIT)
Documentation
Insert a "(setq VARIABLE value)" in the current buffer.
When the value of VARIABLE is a list, optional argument LIMIT specifies a maximum number of elements to insert. By default insert the full list.
Source Code
;; Defined in /usr/src/emacs/lisp/recentf.el.gz
(defun recentf-dump-variable (variable &optional limit)
"Insert a \"(setq VARIABLE value)\" in the current buffer.
When the value of VARIABLE is a list, optional argument LIMIT
specifies a maximum number of elements to insert. By default insert
the full list."
(let ((value (symbol-value variable)))
(if (atom value)
(insert (format "\n(setq %S '%S)\n" variable value))
(when (and (integerp limit) (> limit 0))
(setq value (seq-take value limit)))
(insert (format "\n(setq %S\n '(" variable))
(dolist (e value)
(insert (format "\n %S" e)))
(insert "\n ))\n"))))