unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: Manuel Giraud via "Emacs development discussions." <emacs-devel@gnu.org>
Subject: Re: [ELPA] new single file package: mpdired.el
Date: Sun, 10 Mar 2024 18:15:38 +0000	[thread overview]
Message-ID: <87frwyymut.fsf@posteo.net> (raw)
In-Reply-To: <87ttle7ylv.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Sun,  10 Mar 2024 19:03:56 +0100")

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Manuel Giraud <manuel@ledu-giraud.fr> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>> [...]
>>
>>>> (defun mpdired-mode ()
>>>
>>> Why not use `define-derived-mode'?
>>
>> I have tried to do so but for whatever reason this completely messes up
>> the way I'm saving state in buffer local variables.  FWIW, I have tried
>> with parent as nil and special-mode with the same result.

This is because nil will just call `kill-all-local-variables',
and if you specify, special-mode it will call `kill-all-local-variables'
for you.

> It seems to be because `define-derived-mode' calls
> `kill-all-local-variables' (line 254 of derived.el).  Maybe this could
> be optional.  WDYT?

Theoretically you can do this by setting PARENT to `ignore', but I
wouldn't advise doing this.  Feels wrong...  The other solution would be
to use dynamic variables and bind them before calling `mpdired-mode'.

-- 
	Philip Kaludercic on icterid



  reply	other threads:[~2024-03-10 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08  9:26 [ELPA] new single file package: mpdired.el Manuel Giraud via Emacs development discussions.
2024-03-08 10:25 ` Philip Kaludercic
2024-03-08 11:17   ` Manuel Giraud via Emacs development discussions.
2024-03-08 11:26     ` Philip Kaludercic
2024-03-08 12:22       ` Manuel Giraud via Emacs development discussions.
2024-03-08 13:18         ` Philip Kaludercic
2024-03-08 16:25           ` Manuel Giraud via Emacs development discussions.
2024-03-08 16:34             ` Philip Kaludercic
2024-03-08 17:06               ` Manuel Giraud via Emacs development discussions.
2024-03-08 17:29                 ` Philip Kaludercic
2024-03-09 13:18                   ` Manuel Giraud via Emacs development discussions.
2024-03-09 13:36                     ` Philip Kaludercic
2024-03-10 16:00                       ` Manuel Giraud via Emacs development discussions.
2024-03-10 17:03                         ` Philip Kaludercic
2024-03-10 17:43                           ` Manuel Giraud via Emacs development discussions.
2024-03-10 17:49   ` Manuel Giraud via Emacs development discussions.
2024-03-10 18:03     ` Manuel Giraud via Emacs development discussions.
2024-03-10 18:15       ` Philip Kaludercic [this message]
2024-03-10 19:24       ` Eli Zaretskii
2024-03-11  8:44         ` Manuel Giraud via Emacs development discussions.

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=87frwyymut.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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).