diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-07-24 13:54:49 -0700 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2020-07-27 02:52:10 +0300 |
commit | e3614fcc622df1cf5fbae8db9e7013f96196443c (patch) | |
tree | 53048d6dc31689285f5d6a4f5df1526b3ea06f97 /lisp/progmodes/project.el | |
parent | 7479c11b4e73fcb9aa9d42788012b850ee3245c5 (diff) | |
download | emacs-e3614fcc622df1cf5fbae8db9e7013f96196443c.tar.gz emacs-e3614fcc622df1cf5fbae8db9e7013f96196443c.tar.bz2 emacs-e3614fcc622df1cf5fbae8db9e7013f96196443c.zip |
Add project-display-buffer and project-display-buffer-other-frame
* lisp/progmodes/project.el (project-display-buffer,
project-display-buffer-other-frame): Add commands.
Diffstat (limited to 'lisp/progmodes/project.el')
-rw-r--r-- | lisp/progmodes/project.el | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2bccd3f0fe5..da3ab4d1fb5 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -904,7 +904,34 @@ current project. Two buffers belong to the same project if their project instances, as reported by `project-current' in each buffer, are identical." (interactive (list (project--read-project-buffer))) - (switch-to-buffer buffer)) + (switch-to-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer (buffer-or-name) + "Display BUFFER-OR-NAME in some window, without selecting it. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer' as a subroutine, which see +for how it is determined where the buffer will be displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer-other-frame (buffer-or-name) + "Display BUFFER-OR-NAME preferably in another frame. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer-other-frame' as a subroutine, +which see for how it is determined where the buffer will be +displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer-other-frame buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") |