[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man.el
From: |
Kevin Rodgers |
Subject: |
Re: man.el |
Date: |
Fri, 20 Feb 2004 10:56:47 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Richard Stallman wrote:
> Regarding the change below, why is the current window's width more
> likely to be correct than the frame's width? (Neither one is
> guaranteed to be right.)
If you try to guess based on the value of Man-notify-method (which
defaults to friendly), it looks like window-width is at least as likely
to be correct (disregarding special-display-regexps etc.):
(defun Man-window-width ()
"Return the expected width of the window used to display Un*x manual pages.
See `Man-notify-method'."
;; see Man-notify-when-ready:
(cond ((eq Man-notify-method 'newframe) ; make-frame
(or (assq 'width Man-frame-parameters)
(assq 'width default-frame-alist)
(frame-width)))
((eq Man-notify-method 'pushy) ; switch-to-buffer
(window-width))
((eq Man-notify-method 'bully) ; pop-to-buffer, delete-other-windows
(frame-width))
((and (eq Man-notify-method 'aggressive) ; pop-to-buffer
pop-up-frames)
(or (assq 'width pop-up-frame-alist)
(assq 'width default-frame-alist)
(frame-width)))
((memq Man-notify-method '(aggressive friendly)) ; display-buffer
;; here we ignore special-display-regexps etc.
(window-width))
((memq Man-notify-method '(polite quiet meek)) ; ?
;; depends on how the user chooses to display the buffer, e.g
;; C-x b, C-x 4 b, C-x 5 b
(window-width))
(t ; same as meek
(window-width))))
--
Kevin Rodgers
- man.el, Richard Stallman, 2004/02/20
- Re: man.el, Kim F. Storm, 2004/02/20
- Re: man.el,
Kevin Rodgers <=
- Re: man.el, Alex Schroeder, 2004/02/20
Re: man.el, Juri Linkov, 2004/02/20