1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(sh-mode): Do not fail if buffer has no

magic number and is not associated with a file.
This commit is contained in:
Karl Heuer 1999-05-15 05:57:39 +00:00
parent a62a0574d4
commit 1448f5894e

View file

@ -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)