summary refs log tree commit diff stats
path: root/emacs/elisp
diff options
context:
space:
mode:
authorAlan Pearce2013-07-17 13:57:05 +0100
committerAlan Pearce2013-07-17 13:57:05 +0100
commit5905ec6debb6dcf9df9843b8f166305c849f0e61 (patch)
tree52ef212cd14635d952c156124614ae490268102b /emacs/elisp
parent47587e317708996e6966adf23859e39194869fba (diff)
downloadnixfiles-5905ec6debb6dcf9df9843b8f166305c849f0e61.tar.lz
nixfiles-5905ec6debb6dcf9df9843b8f166305c849f0e61.tar.zst
nixfiles-5905ec6debb6dcf9df9843b8f166305c849f0e61.zip
Make shell-execute work with a universal prefix argument
Diffstat (limited to 'emacs/elisp')
-rw-r--r--emacs/elisp/ap-functions.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/emacs/elisp/ap-functions.el b/emacs/elisp/ap-functions.el
index b6994643..104b4449 100644
--- a/emacs/elisp/ap-functions.el
+++ b/emacs/elisp/ap-functions.el
@@ -37,10 +37,10 @@
           (byte-compile-dest-file filename))))))

 

 ;;;###autoload

-(defun shell-execute ()

-  (interactive)

+(defun shell-execute (to-current-buffer)

+  (interactive "P")

   (let ((file-buffer (if (buffer-file-name)

                          (file-name-nondirectory (buffer-file-name))

                        ""))

         (command (read-shell-command "Shell command: " nil nil nil)))

-    (shell-command (replace-regexp-in-string "%" file-buffer command))))

+    (shell-command (replace-regexp-in-string "%" file-buffer command) to-current-buffer)))