GNU bug report logs - #17158
24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find shell type

Previous Next

Package: emacs;

Reported by: Christopher Monsanto <chris <at> monsan.to>

Date: Tue, 1 Apr 2014 11:38:01 UTC

Severity: minor

Tags: fixed

Found in version 24.4.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 17158 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Christopher Monsanto <chris <at> monsan.to>
Cc: 17158 <at> debbugs.gnu.org
Subject: Re: 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
Christopher Monsanto <chris <at> 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




This bug report was last modified 4 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.