Subject: bug#77229: [PATCH] Add 'project-customize-dirlocals'

From: Mauro Aranda <[email-masked]>
Date: Mon, 24 Mar 2025 06:45:27 -0300

Elijah Gabe Pérez <[email-masked]> writes:

 > Tags: patch
 >
 > This patch add a new function for use customize-dirlocals in projects.
 > customize-dirlocals by default creates a .dir-locals.el if there is
 > not one found at current directory, this new function aims to ensure
 > to create (or open) one at current project root.

Thanks.  I had that in my original package, but it seems I completely
forgot to add it back then.

 >>From 31f1f80668aea33c3f130e792f010a35b1609519 Mon Sep 17 00:00:00 2001
 > From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <[email-masked]>
 > Date: Sun, 23 Mar 2025 21:35:32 -0600
 > Subject: [PATCH] Add 'project-customize-dirlocals'
 >
 > * lisp/menu-bar.el (menu-bar-project-menu): Add new function
 > entry to project menu.
 > * lisp/progmodes/project.el (project-customize-dirlocals):
 > New interactive command.

Please mention the Bug#.

 > --- a/lisp/progmodes/project.el
 > +++ b/lisp/progmodes/project.el
 > @@ -1391,6 +1391,12 @@ project-vc-dir
 >    (interactive)
 >    (vc-dir (project-root (project-current t))))
 >
 > +;;;###autoload
 > +(defun project-customize-dirlocals ()
 > +  "Run `customize-dirlocals' in current project's root."
 > +  (interactive)
 > +  (customize-dirlocals (concat (project-root (project-current t)) 
".dir-locals.el")))
 > +

Would you change it to use file-name-concat or expand-file-name? From
past discussions, I think that using concat for file names is
discouraged.