* bug#54727: Recognize .bashrc as bash
@ 2022-04-05 15:00 Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-06 9:37 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-04-05 15:00 UTC (permalink / raw)
To: 54727
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
Tags: patch
I have just noticed that the .bashrc file is not recognized as a bash
file, so here is patch that should fix it.
In GNU Emacs 29.0.50 (build 45, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)
of 2022-04-05 built on T480s
Repository revision: 7d504c9acc0c8d75d11c3a2b5e016f39e6156bf8
Repository branch: master
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-sound=alsa --with-modules --without-libotf --without-m17n-flt
--without-gconf --without-gsettings --with-native-compilation
--with-xinput2 --with-pgtk --without-xaw3d --with-sound=no
--without-gpm --without-compress-install
'--program-transform-name=s/\([ec]tags\)/\1.emacs/'
'CFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection -g
-ffile-prefix-map=/home/davide/src/emacs-git/src=/usr/src/debug'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
'CXXFLAGS=-march=native -O2 -pipe -fno-plt -fexceptions
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
-fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g
-ffile-prefix-map=/home/davide/src/emacs-git/src=/usr/src/debug''
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-.bashrc-detection-to-sh-mode.patch --]
[-- Type: text/patch, Size: 1098 bytes --]
From 5c7da5307751e1d8c4eb6e715f5073fc3f179018 Mon Sep 17 00:00:00 2001
From: Davide Masserut <dm@mssdvd.com>
Date: Tue, 5 Apr 2022 16:42:37 +0200
Subject: [PATCH] Add .bashrc detection to sh-mode
* lisp/progmodes/sh-script.el (sh-mode): Add .bashrc string-match
---
lisp/progmodes/sh-script.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8dc5562143..9151fd0a34 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1549,7 +1549,7 @@ sh-mode
;; Checks that use `buffer-file-name' follow.
((string-match "\\.m?spec\\'" buffer-file-name) "rpm")
((string-match "[.]sh\\>" buffer-file-name) "sh")
- ((string-match "[.]bash\\>" buffer-file-name) "bash")
+ ((string-match "[.]bash\\(rc\\)?\\>" buffer-file-name) "bash")
((string-match "[.]ksh\\>" buffer-file-name) "ksh")
((string-match "[.]mkshrc\\>" buffer-file-name) "mksh")
((string-match "[.]t?csh\\(rc\\)?\\>" buffer-file-name) "csh")
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-06 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-05 15:00 bug#54727: Recognize .bashrc as bash Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-06 9:37 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.