unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: PGTK+ warning
Date: Tue, 15 Nov 2022 19:22:27 +0100	[thread overview]
Message-ID: <87fsekulgc.fsf@dataswamp.org> (raw)
In-Reply-To: 87cz9ow0n1.fsf@gmail.com

Alessandro Bertulli wrote:

>> ;; (setq text-mode-hook nil)
>>
>> (defun text-mode-hook-f ()
>>   (abbrev-mode)
>>   (define-key text-mode-map "\C-c\C-c" #'compile) )
>>   
>> (add-hook 'text-mode-hook #'text-mode-hook-f)
>
> Correct, but that doesn't account for functions possibly
> added by other packages. Anyway, now you make me think that
> this should never happen, so my concern is probably futile.
> Thanks for the suggestion!
>
> Moreover, correct me, but uncommenting also the first line
> makes the init file idempotent, right?

Interesting question ...

It removes whatever stuff might be there from the start, so
look what is there first.

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 ...

-- 
underground experts united
https://dataswamp.org/~incal




  reply	other threads:[~2022-11-15 18:22 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 [this message]
2022-11-16 22:41           ` Alessandro Bertulli
2022-11-16 23:30             ` Emanuel Berg
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

  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=87fsekulgc.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.
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).