GNU bug report logs - #77746
[PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode

Previous Next

Package: emacs;

Reported by: James Cherti <contact <at> jamescherti.com>

Date: Fri, 11 Apr 2025 14:56:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 77746 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77746; Package emacs. (Fri, 11 Apr 2025 14:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Cherti <contact <at> jamescherti.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 11 Apr 2025 14:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: James Cherti <contact <at> jamescherti.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode
Date: Fri, 11 Apr 2025 10:55:02 -0400
[Message part 1 (text/plain, inline)]
Hello,

In sh and Bash, the characters !%^~:.,= and are not valid in variable or
function names.

Assigning them the "_" syntax causes Emacs to treat them as word
constituents, disrupting navigation and completion
(e.g. dabbrev-expand, forward-word, etc.).

The attached patch updates the syntax table in sh-mode to mark
these characters as punctuation, correcting the issue.

--
James Cherti
GitHub: https://github.com/jamescherti
Website: https://www.jamescherti.com/
[fix-sh-mode-syntax-table.patch (text/x-patch, attachment)]

This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.