From: Stefan Monnier via CC-Mode-help <cc-mode-help@lists.sourceforge.net>
To: Po Lu <luangruo@yahoo.com>
Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org
Subject: Re: feature/android a5b74e2ff62: Initialize text conversion hooks for each C Mode buffer
Date: Fri, 27 Oct 2023 21:18:55 -0400 [thread overview]
Message-ID: <jwvh6mbr1dt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87fs1vy51y.fsf@yahoo.com> (Po Lu's message of "Sat, 28 Oct 2023 08:16:41 +0800")
>> Why is this specific to CC-mode?
>> Is it because other modes handle electricity via the
>> `post-self-insert-hook` instead?
> Correct.
Thanks for confirming.
>> And why is the hook function added globally?
>> Wouldn't it be better to add it buffer-locally instead?
> It's installed buffer-locally, since the hook variable itself is
> buffer-local.
Ah, I missed that. I just changed the code to make it explicit.
Stefan
next prev parent reply other threads:[~2023-10-28 1:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <168629733551.31969.16984560043233541806@vcs2.savannah.gnu.org>
[not found] ` <20230609075536.0E919C1924D@vcs2.savannah.gnu.org>
2023-10-27 20:05 ` feature/android a5b74e2ff62: Initialize text conversion hooks for each C Mode buffer Stefan Monnier
2023-10-28 0:16 ` Po Lu
2023-10-28 1:18 ` Stefan Monnier via CC-Mode-help [this message]
2023-10-28 2:19 ` Po Lu
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=jwvh6mbr1dt.fsf-monnier+emacs@gnu.org \
--to=cc-mode-help@lists.sourceforge.net \
--cc=bug-cc-mode@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
--cc=monnier@iro.umontreal.ca \
/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.