GNU bug report logs - #77228
[PATCH] ; * lisp/cus-edit.el (custom-dirlocals-with-buffer): Use Custom-mode

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Mon, 24 Mar 2025 03:47:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 77228 <at> debbugs.gnu.org (full text, mbox):

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 77228 <at> debbugs.gnu.org
Subject: Re: bug#77228: [PATCH] ; * lisp/cus-edit.el
 (custom-dirlocals-with-buffer): Use Custom-mode
Date: Wed, 02 Apr 2025 18:26:08 -0600
[Message part 1 (text/plain, inline)]
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Elijah Gabe Pérez <eg642616 <at> gmail.com> writes:
>
>> Tags: patch
>>
>> Little patch for make customize-dirlocals use Custom-mode instead
>> fundamental-mode, Mostly intended for make this inherit and use
>> Custom-mode-hook.
>>
>> I have tested it and at the moment it does not cause problems with the
>> configuration made.
>
> Yes, I don't anticipate any real problems, but just using Custom-mode is
> almost entirely redundant since some of the settings that it performs
> are not relevant, and others get clobbered right away.
>
> Overriden:
> custom-mode-map, tool-bar-map, revert-buffer-function.
>
> Not relevant:
> custom--invocation-options, custom--hidden-state, custom-options,
> custom-local-buffer, widget-edit-functions.
>
> Redundant:
> custom--initialize-widget-variables.
>
>
> That just leaves us with the text-conversion-style and
> touch-screen-keyboard-function settings, which my guess is that they
> should've been added to custom-dirlocals-with-buffer too, and of course,
> running Custom-mode-hook.
>
> So I think it'd be better either to derive from Custom-mode, or find a
> way to avoid the redundant settings.

But making it derived won't include Custom-mode options anyway?

I made it a major mode but not derived from it.
I've included the Custom-mode options that are useful (as you pointed)
and run Custom-mode-hook.



[Message part 2 (text/html, inline)]
[0001-Create-major-mode-for-customize-dirlocals-bug-77228.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
-- 
                                          - E.G via GNU Emacs and Org.

This bug report was last modified 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.