summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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 b699464..104b444 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)))