]> git.eshelyaron.com Git - emacs.git/commitdiff
Add 'project-customize-dirlocals'
authorElías Gabriel Pérez <eg642616@gmail.com>
Mon, 24 Mar 2025 03:35:32 +0000 (21:35 -0600)
committerEshel Yaron <me@eshelyaron.com>
Thu, 3 Apr 2025 16:50:32 +0000 (18:50 +0200)
* etc/NEWS: Add command entry.
* lisp/menu-bar.el (menu-bar-project-menu): Add command entry to
project menu.
* lisp/progmodes/project.el (project-customize-dirlocals):
New command.  (Bug#77229)

(cherry picked from commit da6da5744b95451bdc3339c3a241892466a08551)

lisp/menu-bar.el
lisp/progmodes/project.el

index f79de0fa449bae07efa8ba671b8a80ccbc4c9b32..e231b125025f0e7e39fe5e7d55f760c2ed1c4186 100644 (file)
@@ -1824,6 +1824,7 @@ mail status in mode line"))
     (define-key menu [project-compile] '(menu-item "Compile..." project-compile :help "Invoke compiler or Make for current project, view errors"))
     (define-key menu [separator-project-programs] menu-bar-separator)
     (define-key menu [project-switch-project] '(menu-item "Switch Project..." project-switch-project :help "Switch to another project and then run a command"))
+    (define-key menu [project-customize-dirlocals] '(menu-item "Customize Directory Local Variables" project-customize-dirlocals :help "Customize current project Directory Local Variables."))
     (define-key menu [project-vc-dir] '(menu-item "VC Dir" project-vc-dir :help "Show the VC status of the project repository"))
     (define-key menu [project-dired] '(menu-item "Open Project Root" project-dired :help "Read the root directory of the current project, to operate on its files"))
     (define-key menu [project-find-dir] '(menu-item "Open Directory..." project-find-dir :help "Open existing directory that belongs to current project"))
index 19a77720e8087f4893f907e8fedc32174d98ef83..3721a19d8529ae6d5d3b2267aef7cfd3db776381 100644 (file)
@@ -1305,6 +1305,14 @@ The current buffer's `default-directory' is available as part of
   (interactive)
   (vc-dir (project-root (project-current t))))
 
+;;;###autoload
+(defun project-customize-dirlocals ()
+  "Run `customize-dirlocals' in current project's root."
+  (interactive)
+  (customize-dirlocals
+   (expand-file-name ".dir-locals.el"
+                     (project-root (project-current t)))))
+
 (declare-function comint-check-proc "comint")
 
 ;;;###autoload