emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/shell-command+ 10f1d381b5: Allow customising the functi


From: ELPA Syncer
Subject: [elpa] externals/shell-command+ 10f1d381b5: Allow customising the function invoked on "clear"
Date: Sun, 28 Jul 2024 09:58:58 -0400 (EDT)

branch: externals/shell-command+
commit 10f1d381b59a20c860871b00cb26337f714c12d3
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Allow customising the function invoked on "clear"
---
 shell-command+.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/shell-command+.el b/shell-command+.el
index 4b94acbe3d..8838ebdeed 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -284,12 +284,16 @@ prefix the command with \"../../../../\" or \"....\".")
   (pcase-let ((`(,_ ,directory) (shell-command+-tokenize command)))
     (cd directory)))
 
+(defcustom shell-command+-clear-function (apply-partially #'quit-window t)
+  "Function to invoke without any arguments when handling \"clear\"."
+  :type 'function)
+
 (defun shell-command+-cmd-clear (&rest _command)
   "Empty the contents of the the *Shell Output* buffer."
   (with-current-buffer (or (bound-and-true-p shell-command-buffer-name)
                            "*Shell Command Output*")
     (erase-buffer)
-    (bury-buffer)))
+    (funcall shell-command+-clear-function)))
 
 (defcustom shell-command+-substitute-alist
   '(("grep" . shell-command+-cmd-grep)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]