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:
parent
a62a0574d4
commit
1448f5894e
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue