all repos — nixfiles @ 5905ec6debb6dcf9df9843b8f166305c849f0e61

System and user configuration, managed by nix and home-manager

Make shell-execute work with a universal prefix argument

Alan Pearce
commit

5905ec6debb6dcf9df9843b8f166305c849f0e61

parent

47587e317708996e6966adf23859e39194869fba

1 file changed, 3 insertions(+), 3 deletions(-)

jump to
M emacs/elisp/ap-functions.elemacs/elisp/ap-functions.el
@@ -37,10 +37,10 @@ (t (let (byte-compile-dest-file-function)
(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)))