bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17158: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to


From: Lars Ingebrigtsen
Subject: bug#17158: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type
Date: Wed, 20 Jan 2021 03:26:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Christopher Monsanto <chris@monsan.to> writes:

> See title; In sh-script.el, line ~1631
>
>>    (cond ((save-excursion
>>            (goto-char (point-min))
>>           (looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ 
>> \t\n]+\\)"))
>
> This appears to duplicate auto-mode-interpreter-regexp in files.el, line 
> ~2593:
>
>> (defvar auto-mode-interpreter-regexp
>>  (purecopy "#![ \t]?\\([^ \t\n]*\ 
> /bin/env[ \t]\\)?\\([^ \t\n]+\\)")
>
> This duplication makes it difficult to customize 
> auto-mode-interpreter-regexp. A
> discrepancy will cause the wrong shell type (bash, ksh, csh, ...) to be 
> selected.

This is now fixed in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]