* bug#64251: [PATCH] Recognize PKGBUILD as bash style
@ 2023-06-23 13:46 Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-01 8:29 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-23 13:46 UTC (permalink / raw)
To: 64251
[-- Attachment #1: Type: text/plain, Size: 871 bytes --]
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'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Recognize-PKGBUILD-as-bash-style.patch --]
[-- Type: text/patch, Size: 900 bytes --]
From ca838aaabbfefb042e0d7a324708b546022e3ccf Mon Sep 17 00:00:00 2001
From: Davide Masserut <dm@mssdvd.com>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#64251: [PATCH] Recognize PKGBUILD as bash style
2023-06-23 13:46 bug#64251: [PATCH] Recognize PKGBUILD as bash style Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-07-01 8:29 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-07-01 8:29 UTC (permalink / raw)
To: Davide Masserut; +Cc: 64251-done
> 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" <bug-gnu-emacs@gnu.org>
>
> Arch Linux PKGBUILDs are Bash files [1], this patch adds detection
> to sh-mode.
Thanks, installed on the master branch, and closing the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-01 8:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 13:46 bug#64251: [PATCH] Recognize PKGBUILD as bash style Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-01 8:29 ` Eli Zaretskii
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.