tools/magit: remove +magit-display-popup-buffer
Because magit uses transient now, and other plugins that use magit-popup don't seem to need it anymore. And update docstring+comments.
This commit is contained in:
parent
0b6d21649e
commit
051f792205
2 changed files with 12 additions and 16 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +magit-display-buffer (buffer)
|
||||
"Like `magit-display-buffer-fullframe-status-v1' with two differences:
|
||||
"Marries `magit-display-buffer-fullcolumn-most-v1' with
|
||||
`magit-display-buffer-same-window-except-diff-v1', except:
|
||||
|
||||
1. Magit sub-buffers that aren't spawned from a status screen are opened as
|
||||
popups.
|
||||
|
@ -33,17 +34,6 @@
|
|||
;; Last resort: use current window
|
||||
('(display-buffer-same-window))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +magit-display-popup-buffer (buffer &optional alist)
|
||||
"TODO"
|
||||
(cond ((eq (window-dedicated-p) 'side)
|
||||
(if (fboundp '+popup-display-buffer-stacked-side-window)
|
||||
(+popup-display-buffer-stacked-side-window buffer alist)
|
||||
(display-buffer-in-side-window buffer alist)))
|
||||
((derived-mode-p 'magit-mode)
|
||||
(display-buffer-below-selected buffer alist))
|
||||
((display-buffer-in-side-window buffer alist))))
|
||||
|
||||
|
||||
;;
|
||||
;; Commands
|
||||
|
|
|
@ -21,10 +21,16 @@ It is passed a user and repository name.")
|
|||
magit-revision-show-gravatars '("^Author: " . "^Commit: ")
|
||||
magit-diff-refine-hunk t) ; show granular diffs in selected hunk
|
||||
|
||||
;; Leave it to `+magit-display-buffer' and `+magit-display-popup-buffer' to
|
||||
;; manage popup windows.
|
||||
(setq magit-display-buffer-function #'+magit-display-buffer
|
||||
magit-popup-display-buffer-action '((+magit-display-popup-buffer)))
|
||||
;; Magit uses `magit-display-buffer-traditional' to display windows, by
|
||||
;; default, which is a little primitive. `+magit-display-buffer' marries
|
||||
;; `magit-display-buffer-fullcolumn-most-v1' with
|
||||
;; `magit-display-buffer-same-window-except-diff-v1', except:
|
||||
;;
|
||||
;; 1. Magit sub-buffers (like `magit-log') that aren't spawned from a status
|
||||
;; screen are opened as popups.
|
||||
;; 2. The status screen isn't buried when viewing diffs or logs from the
|
||||
;; status screen.
|
||||
(setq magit-display-buffer-function #'+magit-display-buffer)
|
||||
(set-popup-rule! "^\\(?:\\*magit\\|magit:\\)" :ignore t)
|
||||
|
||||
;; so magit buffers can be switched to (except for process buffers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue