From 43afe6c5db55704f787aaee4cedd7f4c69206b8b Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 27 Jan 2021 18:34:52 +0800 Subject: Further configurations * basic.el (eval-expression-print-length): (eval-expression-print-level): Now echo are will print without limits. (winner): Enable winner-mode at start up. (input-decode-map): (key-translation-map): Translate ESC to make the following key modified by control. (bookmark-completing-read): (durand-bookmark-completing-read): Now it won't ask me for confirmation about my choices. * init.el ("durand-chercher-pdf"): Further enhance the convenience of viewing PDFs. ("embark-conf.el"): Now I don't use embark anymore. * view-conf.el (durand-view-map): Add my own way of viewing things. (durand-open-targets): These are the things I can open. (durand-open-object): Open things quickly. --- common.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'common.el') diff --git a/common.el b/common.el index fa6f3fe..3b75063 100644 --- a/common.el +++ b/common.el @@ -131,6 +131,21 @@ ARG means do this command ARG times." ((< arg 0) (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. -- cgit v1.2.3-18-g5258