From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: PGTK+ warning
Date: Thu, 17 Nov 2022 00:30:56 +0100 [thread overview]
Message-ID: <87cz9m4gun.fsf@dataswamp.org> (raw)
In-Reply-To: 87y1saa5e9.fsf@gmail.com
Alessandro Bertulli wrote:
>> But even so it should be avoided because people might put
>> stuff in their hooks in future versions.
>>
>> So that should perhaps be changed into something that
>> removes the mode-hook-f function from the hook, or just
>> sets it (the function) to `ignore' (#'ignore) perhaps ...
>
> Good ideas! Might be worth reasoning about it, thanks.
I realized you can simply use `remove-hook' to remove your
addition to it :)
Clear the whole thing:
(setq conf-space-mode-hook nil)
Make your addition do nothing: (useful)
(setq conf-space-mode-hook-f #'ignore)
Remove your addition: (useful to do after you do it)
(remove-hook 'conf-space-mode-hook #'conf-space-mode-hook-f)
Your addition can look like this for, for example, the
`conf-space-mode-hook'
(defun conf-space-mode-hook-f ()
;; do stuff
)
Then add it, this won't remove any stuff that's already there
or will appear in the future: (pretty safe)
(add-hook 'conf-space-mode-hook #'conf-space-mode-hook-f)
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-11-16 23:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 10:00 PGTK+ warning Alessandro Bertulli
2022-11-15 10:37 ` Po Lu
2022-11-15 15:14 ` Alessandro Bertulli
2022-11-15 14:22 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-11-15 15:14 ` Emanuel Berg
2022-11-15 15:16 ` Alessandro Bertulli
2022-11-15 15:35 ` Emanuel Berg
2022-11-15 18:05 ` Alessandro Bertulli
2022-11-15 18:22 ` Emanuel Berg
2022-11-16 22:41 ` Alessandro Bertulli
2022-11-16 23:30 ` Emanuel Berg [this message]
2022-11-19 10:21 ` Alessandro Bertulli
2022-11-15 16:03 ` Stefan Monnier
2022-11-15 18:02 ` Alessandro Bertulli
2022-11-15 18:17 ` Eli Zaretskii
2022-11-16 22:42 ` Alessandro Bertulli
2022-11-16 23:19 ` Emanuel Berg
2022-11-19 10:25 ` Alessandro Bertulli
2022-11-22 15:34 ` Emanuel Berg
2022-11-30 22:39 ` Alessandro Bertulli
2022-12-01 0:21 ` Emanuel Berg
2022-12-01 0:23 ` Emanuel Berg
2022-12-03 0:58 ` David Masterson
2022-11-17 6:25 ` Eli Zaretskii
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=87cz9m4gun.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=help-gnu-emacs@gnu.org \
/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.