From: Alan Mackenzie <acm@muc.de>
To: Po Lu <luangruo@yahoo.com>
Cc: acm@muc.de, 64204@debbugs.gnu.org
Subject: bug#64204: C/C++ local variables not syntax highlighted if they start with $
Date: Wed, 21 Jun 2023 21:06:37 +0000 [thread overview]
Message-ID: <ZJNmXbCYwKFB7kt6@ACM> (raw)
In-Reply-To: <ZJNOtfftIC2S38mm@ACM>
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
Hello, Po.
Apologies, the patch I sent earlier was defective, not applying cleanly
to the Emacs master branch. I also should have sent the patch as an
attachment.
I'm now sending the patch as attachment. It should apply cleanly to the
master branch or emacs-29.
On Wed, Jun 21, 2023 at 19:25:41 +0000, Alan Mackenzie wrote:
> On Wed, Jun 21, 2023 at 19:51:50 +0800, Po Lu wrote:
> > Joseph Garvin <k04jg02@gmail.com> writes:
[ .... ]
> OK, I've amended C Mode, C++ Mode and Objective C Mode to fontify
> identifiers starting with a $.
> Please apply the patch below to .../lisp/progmodes/cc-langs.el, and
> (since Lisp macros have been changed) recompile the entire CC Mode files
> and reload them. (Joseph, if you want any help with the patching or
> compiling, feel free to send me private email.) Then please try out the
> new version on your real code, and confirm to me that the bug has been
> fixed, or tell me what's still wrong.
> Thanks!
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
[-- Attachment #2: diff.20230621b.diff --]
[-- Type: text/plain, Size: 996 bytes --]
diff -r c45cc2208ed4 cc-langs.el
--- a/cc-langs.el Wed Jun 21 14:58:04 2023 +0000
+++ b/cc-langs.el Wed Jun 21 19:14:40 2023 +0000
@@ -819,8 +819,9 @@
keyword. It's unspecified how far it matches. Does not contain a \\|
operator at the top level."
t (concat "[" c-alpha "_]")
+ (c c++) (concat "[" c-alpha "_$]")
java (concat "[" c-alpha "_@]")
- objc (concat "[" c-alpha "_@]")
+ objc (concat "[" c-alpha "_@$]")
pike (concat "[" c-alpha "_`]"))
(c-lang-defvar c-symbol-start (c-lang-const c-symbol-start))
@@ -844,9 +845,10 @@
t (concat (c-lang-const c-symbol-start)
"[" (c-lang-const c-symbol-chars) "]\\{,1000\\}")
pike (concat
- ;; Use the value from C here since the operator backquote is
+ ;; Use the value from AWK here since the operator backquote is
;; covered by the other alternative.
- (c-lang-const c-symbol-key c)
+ (c-lang-const c-symbol-key awk
+ )
"\\|"
(c-make-keywords-re nil
(c-lang-const c-overloadable-operators))))
next prev parent reply other threads:[~2023-06-21 21:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 20:54 bug#64204: C/C++ local variables not syntax highlighted if they start with $ Joseph Garvin
2023-06-21 11:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-21 19:25 ` Alan Mackenzie
2023-06-21 21:06 ` Alan Mackenzie [this message]
2023-06-22 4:50 ` Eli Zaretskii
2023-06-22 5:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 5:57 ` Eli Zaretskii
2023-06-22 6:18 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 6:55 ` Eli Zaretskii
2023-06-22 7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 10:07 ` Eli Zaretskii
2023-06-22 11:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 12:00 ` Eli Zaretskii
2023-06-22 13:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 9:11 ` Alan Mackenzie
2023-06-22 10:13 ` Eli Zaretskii
2023-06-22 12:33 ` Alan Mackenzie
2023-06-28 18:45 ` Alan Mackenzie
2023-06-28 18:50 ` Eli Zaretskii
2023-06-28 23:19 ` Joseph Garvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZJNmXbCYwKFB7kt6@ACM \
--to=acm@muc.de \
--cc=64204@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.