Subject: bug#78098: [PATCH] ; Fix 6414ed0d116 commit

From: Elijah Gabe Pérez <[email-masked]>
Date: Sun, 27 Apr 2025 13:21:51 -0600

Tags: patch

This patch removes some redundant settings from commit 6414ed0d116.
(See thread: <[email-masked]>)

>From 152f05cfb206c3d78f0c4d7498ac01981c5435d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <[email-masked]>
Date: Sun, 27 Apr 2025 12:38:37 -0600
Subject: [PATCH] ; Fix 6414ed0d116 commit

* lisp/cus-edit.el (custom-dirlocals-map): Rename to
Custom-dirlocals-mode-map.
(Custom-dirlocals-mode): Remove redundant settings.
---
 lisp/cus-edit.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 5fc53bdcdd7..5d3b09bf2db 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -5919,7 +5919,7 @@ custom-dirlocals-widget
 (defvar-local custom-dirlocals-file-widget nil
   "Widget that holds the name of the dir-locals file being customized.")
 
-(defvar-keymap custom-dirlocals-map
+(defvar-keymap Custom-dirlocals-mode-map
   :doc "Keymap used in the \"*Customize Dirlocals*\" buffer."
   :full t
   :parent widget-keymap
@@ -5951,7 +5951,7 @@ custom-dirlocals-commands
 See `custom-commands' for further explanation.")
 
 (easy-menu-define
-  Custom-dirlocals-menu (list custom-dirlocals-map
+  Custom-dirlocals-menu (list Custom-dirlocals-mode-map
                               custom-dirlocals-field-map)
   "Menu used in dirlocals customization buffers."
   (nconc (list "Custom"
@@ -6067,10 +6067,8 @@ Custom-dirlocals-mode
 Entry to this mode calls the value of `Custom-mode-hook' if its value
 is non-nil.
 
-\\{custom-dirlocals-map}"
-  (kill-all-local-variables)
+\\{Custom-dirlocals-mode-map}"
   (custom-dirlocals--set-widget-vars)
-  (setq-local major-mode #'Custom-dirlocals-mode)
   (setq-local text-conversion-style 'action)
   (setq-local touch-screen-keyboard-function
               #'Custom-display-on-screen-keyboard-p)
@@ -6082,12 +6080,11 @@ Custom-dirlocals-mode
                     (mapc
                      (lambda (arg)
                        (tool-bar-local-item-from-menu
-                        (nth 1 arg) (nth 4 arg) map custom-dirlocals-map
+                        (nth 1 arg) (nth 4 arg) map Custom-dirlocals-mode-map
                         :label (nth 5 arg)))
                      custom-dirlocals-commands)
                     (setq custom-dirlocals-tool-bar-map map))))
-  (use-local-map custom-dirlocals-map)
-  (run-hooks 'Custom-mode-hook))
+  (run-mode-hooks 'Custom-mode-hook))
 
 (derived-mode-add-parents 'Custom-dirlocals-mode '(Custom-mode))
 
-- 
2.49.0

-- 
                                          - E.G via GNU Emacs and Org.