branch: externals/do-at-point
commit 259a1a0076716d2957bf2513de9334b3e49289cc
Author: Philip Kaludercic <philip.kaluder...@fau.de>
Commit: Philip Kaludercic <philip.kaluder...@fau.de>

    Use 'shell-command+' if available
    
    Furthermore, this revision also addresses the issue of shell-command
    being potentially advised by Magit's 'with-editor', causing issues
    with the later 'func-arity' call.
---
 do-at-point.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/do-at-point.el b/do-at-point.el
index 41a2683899..5af9a81f82 100644
--- a/do-at-point.el
+++ b/do-at-point.el
@@ -5,7 +5,7 @@
 ;; Author: Philip Kaludercic <phil...@posteo.net>
 ;; Maintainer: Philip Kaludercic <phil...@posteo.net>
 ;; URL: https://wwwcip.cs.fau.de/~oj14ozun/src+etc/do-at-point.el
-;; Version: $Id: do-at-point.el,v 1.37 2023/08/08 06:55:26 oj14ozun Exp 
oj14ozun $
+;; Version: $Id: do-at-point.el,v 1.38 2023/08/08 09:06:53 oj14ozun Exp 
oj14ozun $
 ;; Package-Version: 1
 ;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: convenience
@@ -98,7 +98,9 @@ of this variable.")
         ,(lambda (beg end)
            (let ((cmd (read-shell-command "Command: ")))
              (shell-command-on-region beg end cmd nil t))))
-     (?! "Shell command" ,#'shell-command))
+     (?! "Shell command" ,(if (fboundp 'shell-command+)
+                             #'shell-command+
+                           (lambda (cmd) (shell-command cmd)))))
     (email
      (?m "Compose message" ,(lambda (to) (compose-mail to))))
     (existing-filename

Reply via email to