summaryrefslogtreecommitdiff
path: root/common.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-01-27 18:34:52 +0800
committerJSDurand <mmemmew@gmail.com>2021-01-27 18:39:30 +0800
commit43afe6c5db55704f787aaee4cedd7f4c69206b8b (patch)
treebbaa1c90455801023c9f99ccfa175b1c5c121e9c /common.el
parent4108bfb79643248821fb1d62cae9a4ac7146f1bc (diff)
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.
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."