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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Monsanto <chris <at> monsan.to>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; sh-mode does not use auto-mode-interpreter-regexp to find
 shell type
Date: Tue, 1 Apr 2014 07:36:29 -0400
[Message part 1 (text/plain, inline)]
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.

Christopher Monsanto
chris <at> monsan.to  --  http://monsan.to/
[Message part 2 (text/html, inline)]

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.