summaryrefslogtreecommitdiff
path: root/common.el
diff options
context:
space:
mode:
Diffstat (limited to 'common.el')
-rw-r--r--common.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/common.el b/common.el
index fa6f3fe..3b75063 100644
--- a/common.el
+++ b/common.el
@@ -132,6 +132,21 @@ ARG means do this command ARG times."
(goto-char (point-max))))))))
;;;###autoload
+(defun durand-display-in-one-window (buffer _alist)
+ "Display BUFFER in one window.
+ALIST is an association list of action symbols and values. See
+Info node `(elisp) Buffer Display Action Alists' for details of
+such alists.
+
+This function pops up a new window and then deletes all other
+windows. And ALIST is completely ignored."
+ (let ((window (split-window (frame-root-window (selected-frame)))))
+ (set-window-buffer window buffer)
+ (select-window window)
+ (delete-other-windows)
+ window))
+
+;;;###autoload
(defun durand-completion-scroll-up-or-go-to-minibuffer (&optional arg)
"Scroll up; if this is not feasible, go to the mini-buffer.
ARG means do this command ARG times."