bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1291: 23.0.60; 1) resize-mini-windows: customizable, 2) if grow mini


From: martin rudalics
Subject: bug#1291: 23.0.60; 1) resize-mini-windows: customizable, 2) if grow mini, grow Completions
Date: Sun, 02 Nov 2008 19:14:55 +0100
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

> Previously (2008-10-09 build), the *Completions* buffer showed all of the
> candidates through `s==>Subdir', e.g. when I try it in a Dired buffer. It only
> left out one line, with the candidate `h==>Help'. Now, *Completions* leaves 
out
> all of these candidates:

I'm afraid we won't get this very right ever.  But you could try the
below version of `Electric-pop-up-window'.

martin

(defun Electric-pop-up-window (buffer &optional max-height)
  (let* ((win (or (get-buffer-window buffer) (selected-window)))
         (buf (get-buffer buffer))
         (one-window (one-window-p t))
         (pop-up-windows t)
         (pop-up-frames nil))
    (if (not buf)
        (error "Buffer %s does not exist" buffer)
      (cond ((and (eq (window-buffer win) buf))
             (select-window win))
            (one-window
             (pop-to-buffer buffer)
             (setq win (selected-window)))
            (t
             (switch-to-buffer buf)))
      ;; Don't shrink the window, but expand it if necessary.
      (goto-char (point-min))
      (unless (<= (point-max) (window-end win t))
        (fit-window-to-buffer win max-height))
      win)))







reply via email to

[Prev in Thread] Current Thread [Next in Thread]