diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/elisp/ap-functions.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/elisp/ap-functions.el b/emacs/elisp/ap-functions.el index d9278fa0..b6994643 100644 --- a/emacs/elisp/ap-functions.el +++ b/emacs/elisp/ap-functions.el @@ -39,6 +39,8 @@ ;;;###autoload (defun shell-execute () (interactive) - (let ((file-buffer (or (file-name-nondirectory (buffer-file-name)) "")) + (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)))) |