aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2021-04-25 00:54:01 +0300
committerJuri Linkov2021-04-25 00:54:01 +0300
commitbc026835df38cd6a4a695f18ea9ffe92ec625e65 (patch)
tree6f4dfd3e467a260384050ffb5163e4e4d213b05c
parent48b6cec61cf24c8693331a6b39876984bfdda328 (diff)
downloademacs-bc026835df38cd6a4a695f18ea9ffe92ec625e65.tar.gz
emacs-bc026835df38cd6a4a695f18ea9ffe92ec625e65.zip
* lisp/progmodes/project.el: Use project-prefixed-buffer-name in more places.
(project-shell, project-eshell): Use project-prefixed-buffer-name (bug#47975). (project-compilation-buffer-name-function): Add :version tag.
-rw-r--r--lisp/progmodes/project.el11
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 5996a764885..914d7ce9e4e 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -918,10 +918,7 @@ With \\[universal-argument] prefix arg, create a new inferior shell buffer even
918if one already exists." 918if one already exists."
919 (interactive) 919 (interactive)
920 (let* ((default-directory (project-root (project-current t))) 920 (let* ((default-directory (project-root (project-current t)))
921 (default-project-shell-name 921 (default-project-shell-name (project-prefixed-buffer-name "shell"))
922 (concat "*" (file-name-nondirectory
923 (directory-file-name default-directory))
924 "-shell*"))
925 (shell-buffer (get-buffer default-project-shell-name))) 922 (shell-buffer (get-buffer default-project-shell-name)))
926 (if (and shell-buffer (not current-prefix-arg)) 923 (if (and shell-buffer (not current-prefix-arg))
927 (pop-to-buffer-same-window shell-buffer) 924 (pop-to-buffer-same-window shell-buffer)
@@ -937,10 +934,7 @@ if one already exists."
937 (interactive) 934 (interactive)
938 (defvar eshell-buffer-name) 935 (defvar eshell-buffer-name)
939 (let* ((default-directory (project-root (project-current t))) 936 (let* ((default-directory (project-root (project-current t)))
940 (eshell-buffer-name 937 (eshell-buffer-name (project-prefixed-buffer-name "eshell"))
941 (concat "*" (file-name-nondirectory
942 (directory-file-name default-directory))
943 "-eshell*"))
944 (eshell-buffer (get-buffer eshell-buffer-name))) 938 (eshell-buffer (get-buffer eshell-buffer-name)))
945 (if (and eshell-buffer (not current-prefix-arg)) 939 (if (and eshell-buffer (not current-prefix-arg))
946 (pop-to-buffer-same-window eshell-buffer) 940 (pop-to-buffer-same-window eshell-buffer)
@@ -1004,6 +998,7 @@ loop using the command \\[fileloop-continue]."
1004 "Function to compute the name of a project compilation buffer. 998 "Function to compute the name of a project compilation buffer.
1005If non-nil, it overrides `compilation-buffer-name-function' for 999If non-nil, it overrides `compilation-buffer-name-function' for
1006`project-compile'." 1000`project-compile'."
1001 :version "28.1"
1007 :group 'project 1002 :group 'project
1008 :type '(choice (const :tag "Default" nil) 1003 :type '(choice (const :tag "Default" nil)
1009 (const :tag "Prefixed with root directory name" 1004 (const :tag "Prefixed with root directory name"