]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/project.el (project-name): New
authorStephen Leake <stephen_leake@stephe-leake.org>
Tue, 22 Nov 2022 18:55:59 +0000 (10:55 -0800)
committerStephen Leake <stephen_leake@stephe-leake.org>
Tue, 22 Nov 2022 18:55:59 +0000 (10:55 -0800)
lisp/progmodes/project.el

index 63510e90502edaf46bec3f34ce34e8e13eca03c1..751e240a56ecb0e6e037265f355e209a22618a54 100644 (file)
@@ -251,6 +251,11 @@ depending on the languages used, this list should include the
 headers search path, load path, class path, and so on."
   nil)
 
+(cl-defgeneric project-name (project)
+  "A human-readable name for the project.
+Nominally unique, but not enforced."
+  (file-name-base (directory-file-name (project-root project))))
+
 (cl-defgeneric project-ignores (_project _dir)
   "Return the list of glob patterns to ignore inside DIR.
 Patterns can match both regular files and directories.