From: Eli Zaretskii <eliz@gnu.org>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: emacs-devel@gnu.org
Subject: Re: Should write-contents-functions be permanent-local?
Date: Tue, 15 Aug 2023 14:52:46 +0300 [thread overview]
Message-ID: <83pm3oa5f5.fsf@gnu.org> (raw)
In-Reply-To: <87edk494z5.fsf@breatheoutbreathe.in> (message from Joseph Turner on Mon, 14 Aug 2023 23:35:44 -0700)
> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Date: Mon, 14 Aug 2023 23:35:44 -0700
>
> WDYT about making write-contents-functions permanent-local?
That cannot be done, sorry. Some modes set this to mode-specific
values, you can find this even in the Emacs source tree. But even
without those examples, a variable that were not permanent-local for
so long cannot be suddenly made permanent-local, because it will
almost certainly break something somewhere.
In any case, if you are okay with making the variable permanent-local,
then why not just
(put 'write-contents-functions 'permanent-local t)
in your package, and be done with it? The effect of the above is the
same global effect as if we would do that by default in Emacs, right?
next prev parent reply other threads:[~2023-08-15 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 6:35 Should write-contents-functions be permanent-local? Joseph Turner
2023-08-15 11:52 ` Eli Zaretskii [this message]
2023-08-16 1:48 ` Joseph Turner
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=83pm3oa5f5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joseph@breatheoutbreathe.in \
/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).