mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
project.el: Use project-name to calculate prefixed buffer name
* lisp/progmodes/project.el (project-prefixed-buffer-name): Use project-name to calculate prefixed buffer name (bug#62548). (project-compilation-buffer-name-function): Update doc.
This commit is contained in:
parent
e33c0a5491
commit
b26ccf488e
1 changed files with 5 additions and 3 deletions
|
|
@ -1248,8 +1248,10 @@ If you exit the `query-replace', you can later continue the
|
|||
|
||||
(defun project-prefixed-buffer-name (mode)
|
||||
(concat "*"
|
||||
(file-name-nondirectory
|
||||
(directory-file-name default-directory))
|
||||
(if-let ((proj (project-current nil)))
|
||||
(project-name proj)
|
||||
(file-name-nondirectory
|
||||
(directory-file-name default-directory)))
|
||||
"-"
|
||||
(downcase mode)
|
||||
"*"))
|
||||
|
|
@ -1261,7 +1263,7 @@ If non-nil, it overrides `compilation-buffer-name-function' for
|
|||
:version "28.1"
|
||||
:group 'project
|
||||
:type '(choice (const :tag "Default" nil)
|
||||
(const :tag "Prefixed with root directory name"
|
||||
(const :tag "Prefixed with project name"
|
||||
project-prefixed-buffer-name)
|
||||
(function :tag "Custom function")))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue