Function: treemacs--replace-recentf-entry

treemacs--replace-recentf-entry is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs--replace-recentf-entry OLD-FILE NEW-FILE)

Documentation

Replace OLD-FILE with NEW-FILE in the recent file list.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(defun treemacs--replace-recentf-entry (old-file new-file)
  "Replace OLD-FILE with NEW-FILE in the recent file list."
  ;; code taken from spacemacs - is-bound check due to being introduced after emacs24?
  ;; better safe than sorry so let's keep it
  (with-no-warnings
    (when (fboundp 'recentf-add-file)
      (recentf-add-file new-file)
      (recentf-remove-if-non-kept old-file))))