emacs-devel
[Top][All Lists]
Advanced

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

Re: occur-hook changing the current buffer


From: Emilio Lopes
Subject: Re: occur-hook changing the current buffer
Date: Thu, 23 Jun 2005 13:44:42 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Juanma Barranquero <lekktu <at> gmail.com> writes:

> What about the problem with using `fit-window-to-buffer' in occur-hook?

Don't know if it helps you, but I have the following in my "~/.emacs" and it
seems to work:

(defun occur-shrink-window ()
  "*Shrink the \"*Occur*\" window as much as possible to display its contents."
  (let ((win (get-buffer-window "*Occur*")))
    (when (windowp win)
      (shrink-window-if-larger-than-buffer win))))
(add-hook 'occur-hook 'occur-shrink-window)






reply via email to

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