Skip to content

Instantly share code, notes, and snippets.

@vbuaraujo
Last active October 16, 2016 16:42
Show Gist options
  • Save vbuaraujo/8e5c6e09bf68e2bb07e8827ea6e549c6 to your computer and use it in GitHub Desktop.
Save vbuaraujo/8e5c6e09bf68e2bb07e8827ea6e549c6 to your computer and use it in GitHub Desktop.
;;;; Restore the *Completions* window behavior of Emacs 24.
;; Based on https://emacs.stackexchange.com/a/21537
;; UPDATE: Turns out my previous solution could be radically simplified;
;; I was just using the wrong order for the 'display-buffer-*' functions.
(add-to-list 'display-buffer-alist
'("\\*Completions\\*"
(display-buffer-pop-up-window
display-buffer-use-some-window)
(inhibit-same-window . t)
(window-height . ignore) ))
;; Avoid resizing the buffer.
(defadvice minibuffer-completion-help (around elmord/do-not-fit-window activate)
(cl-letf (((symbol-function 'fit-window-to-buffer) #'ignore))
ad-do-it))
(defadvice completion-at-point (around elmord/do-not-fit-window activate)
(cl-letf (((symbol-function 'fit-window-to-buffer) #'ignore))
ad-do-it))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment