diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/sh-script.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 22dae00d40c..44d70931f66 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -774,8 +774,9 @@ with your script for an edit-interpret-debug cycle." (save-excursion (goto-char (point-min)) (cond ((looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)") - (match-string 2)) - ((string-match "\\.m?spec$" buffer-file-name) + (match-string 2)) + ((and buffer-file-name + (string-match "\\.m?spec$" buffer-file-name)) "rpm"))))) (if interpreter (sh-set-shell interpreter nil nil) |