From: Lars Ingebrigtsen <larsi@gnus.org>
To: Fu Yuan <casouri@gmail.com>
Cc: 32307@debbugs.gnu.org
Subject: bug#32307: [feature request] Add standard hooks to toggle common features
Date: Sat, 13 Jul 2019 05:15:17 +0200 [thread overview]
Message-ID: <87r26uy69m.fsf@mouse.gnus.org> (raw)
In-Reply-To: <78B50EFACD052CCA.4A6DF615-D8E0-40FB-AF99-1698855A4EE9@mail.outlook.com> (Fu Yuan's message of "Mon, 30 Jul 2018 00:52:14 +0000 (UTC)")
Fu Yuan <casouri@gmail.com> writes:
> 2. problem when other package needs to toggle
>
> For example, I wrote a package that needs to temporarily disable auto-parens.
> I have to write code that handles electric-pair-mode, autoparens and paredit.
> Further more, byte compiler is not happy
> because I was referring functions it doesn't know about.
You can use declare-function to tell the compiler about the functions.
> Here is my thought about it:
>
> Provide toggle commands and corresponding hook for each of these features.
> Feature providers add their toggle function to the proper hook.
> When user toggles on/off, the toggle command runs each function
> in the hook with an aregument indicating that user is turning on or turning off,
> maybe t and nil.
I'm not quite sure I understand you here. The vast majority of modes
can be called with an argument to turn them off or on.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-07-13 3:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 0:52 bug#32307: [feature request] Add standard hooks to toggle common features Fu Yuan
2019-07-13 3:15 ` Lars Ingebrigtsen [this message]
2019-09-27 16:35 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r26uy69m.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=32307@debbugs.gnu.org \
--cc=casouri@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).