From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Davide Masserut via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54727: Recognize .bashrc as bash Date: Tue, 05 Apr 2022 17:00:04 +0200 Message-ID: <87bkxftw23.fsf@mssdvd.com> Reply-To: Davide Masserut Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12571"; mail-complaints-to="usenet@ciao.gmane.io" To: 54727@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 05 17:01:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbkgG-00032j-9U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 17:01:16 +0200 Original-Received: from localhost ([::1]:47026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbkgF-00083N-0A for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 11:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbkg2-00082J-Io for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbkg1-00082u-TG for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbkg1-0001Y8-Sc for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Davide Masserut Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2022 15:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16491708165825 (code B ref -1); Tue, 05 Apr 2022 15:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Apr 2022 15:00:16 +0000 Original-Received: from localhost ([127.0.0.1]:55810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbkfI-0001Vt-6H for submit@debbugs.gnu.org; Tue, 05 Apr 2022 11:00:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbkfG-0001Vm-OH for submit@debbugs.gnu.org; Tue, 05 Apr 2022 11:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbkfG-0007tA-GF for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:00:14 -0400 Original-Received: from out1.migadu.com ([2001:41d0:2:863f::]:39124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbkfD-0007lw-SF for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 11:00:14 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mssdvd.com; s=key1; t=1649170806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=ONlCu5e9KgQSOvkWa1TGNfPfFUoOuhmhAt7dCPke/rs=; b=rtBugwbtYZglOxWTikGjNsH9ydgQIDcJ82wT6IrYg/N7tjxctUeohKoHL0xbKMLJRqssbn HOrel/vlaQ48ar723kqrNwm/MHFArJCMu/o84aNbYUGJAXHgkPXszSQt858ipXO23WNVKn 5ThMVczEoGWY9vGqMw6LpolKYEaaUbM5k6gDgYXfF7u0GvTNb1hxJGWoIDP6NwG6wYl1rj 8wTNP0aDfFGN+Sw8RyokhzMxnNnoKMSaCmXpJ+ix5bNptdS3PO3nFEsSiLBEuj9yhXhwGf KXDG6OiMRlEJwQrs6/or+IrtUQF4Q8+Ss8eDKN78yOUk9JT1mvQ3AJGNMZ1JRw== X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: mssdvd.com Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=dm@mssdvd.com; helo=out1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229443 Archived-At: --=-=-= Content-Type: text/plain 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'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-.bashrc-detection-to-sh-mode.patch >From 5c7da5307751e1d8c4eb6e715f5073fc3f179018 Mon Sep 17 00:00:00 2001 From: Davide Masserut 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 --=-=-=--