diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-06-09 17:18:38 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-06-09 17:18:38 +0200 |
| commit | f6a3fc8f6735fbc804e02f9c54bc621746afd5b0 (patch) | |
| tree | 9aa3760d25a129c798045a2e20dea3fd46547db3 | |
| parent | 13397b98442028b676ae8843034f90fa8622a3a0 (diff) | |
Add docstring to all advices
| -rw-r--r-- | lisp/with-editor.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/with-editor.el b/lisp/with-editor.el index 9d0c573..b727e16 100644 --- a/lisp/with-editor.el +++ b/lisp/with-editor.el @@ -713,6 +713,9 @@ OPEN \\([^]+?\\)\ (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)) @@ -874,12 +877,12 @@ else like the former." (define-advice shell-command (:around (fn command &optional output-buffer error-buffer) shell-command-with-editor-mode) - ;; `shell-mode' and its hook are intended for buffers in which an - ;; interactive shell is running, but `shell-command' also turns on - ;; that mode, even though it only runs the shell to run a single - ;; command. The `with-editor-export-editor' hook function is only - ;; intended to be used in buffers in which an interactive shell is - ;; running, so it has to be removed here. + "`shell-mode' and its hook are intended for buffers in which an +interactive shell is running, but `shell-command' also turns on +that mode, even though it only runs the shell to run a single +command. The `with-editor-export-editor' hook function is only +intended to be used in buffers in which an interactive shell is +running, so it has to be removed here." (let ((shell-mode-hook (remove 'with-editor-export-editor shell-mode-hook))) (cond ((or (not (or with-editor--envvar shell-command-with-editor-mode)) (not (string-suffix-p "&" command))) |
