Subject: bug#64251: closed (Re: bug#64251: [PATCH] Recognize PKGBUILD as bash style)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 01 Jul 2023 08:29:02 +0000

Your bug report

#64251: [PATCH] Recognize PKGBUILD as bash style

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64251: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64251
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64251: [PATCH] Recognize PKGBUILD as bash style
From: Eli Zaretskii <[email-masked]>
To: Davide Masserut <[email-masked]>
Cc: [email-masked]
Date: Sat, 01 Jul 2023 11:29:02 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Fri, 23 Jun 2023 15:46:03 +0200
> From:  Davide Masserut via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Arch Linux PKGBUILDs are Bash files [1], this patch adds detection 
> to sh-mode.

Thanks, installed on the master branch, and closing the bug.

Subject: [PATCH] Recognize PKGBUILD as bash style
From: Davide Masserut <[email-masked]>
To: [email-masked]
Date: Fri, 23 Jun 2023 15:46:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Arch Linux PKGBUILDs are Bash files [1], this patch adds detection 
to sh-mode.

[1]: 
https://wiki.archlinux.org/title/Creating_packages#Creating_a_PKGBUILD

In GNU Emacs 30.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-06-21 built on T480s
Repository revision: 17e16f78596d895d6aca52d96b1caf9e82f7598b
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-pgtk --with-native-compilation
 '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-mssdvd-git/src=/usr/src/debug/emacs-mssdvd-git'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
>From ca838aaabbfefb042e0d7a324708b546022e3ccf Mon Sep 17 00:00:00 2001
From: Davide Masserut <[email-masked]>
Date: Tue, 20 Jun 2023 15:55:11 +0200
Subject: [PATCH] Recognize PKGBUILD as bash style

* lisp/progmodes/sh-script.el (sh--guess-shell): Handle PKGBUILD.
---
 lisp/progmodes/sh-script.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 6beff9f41e9..a305c35c5f8 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1489,6 +1489,7 @@ sh--guess-shell
         ((string-match "[.]t?csh\\(rc\\)?\\>" buffer-file-name) "csh")
         ((string-match "[.]zsh\\(rc\\|env\\)?\\>" buffer-file-name) "zsh")
 	((equal (file-name-nondirectory buffer-file-name) ".profile") "sh")
+	((equal (file-name-nondirectory buffer-file-name) "PKGBUILD") "bash")
         (t sh-shell-file)))
 
 ;;;###autoload
-- 
2.41.0