Function: server-visit-files@with-editor-file-name-history-exclude
server-visit-files@with-editor-file-name-history-exclude is a
byte-compiled function defined in with-editor.el.
Signature
(server-visit-files@with-editor-file-name-history-exclude FILES PROC &optional NOWAIT)
Documentation
Prevent certain files from being added to file-name-history.
Files matching a regexp in with-editor-file-name-history-exclude
are prevented from being added to that list.
Source Code
;; Defined in ~/.emacs.d/elpa/with-editor-20260301.1317/with-editor.el
(define-advice server-visit-files
(:after (files _proc &optional _nowait)
with-editor-file-name-history-exclude)
"Prevent certain files from being added to `file-name-history'.
Files matching a regexp in `with-editor-file-name-history-exclude'
are prevented from being added to that list."
(pcase-dolist (`(,file . ,_) files)
(when (cl-find-if (lambda (regexp)
(string-match-p regexp file))
with-editor-file-name-history-exclude)
(setq file-name-history
(delete (abbreviate-file-name file) file-name-history)))))