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

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

bug#32536: displayed width of man pages


From: martin rudalics
Subject: bug#32536: displayed width of man pages
Date: Fri, 31 Aug 2018 08:54:39 +0200

> As proposed in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9385
> this patch implements a new option "Maximum width" as a hard limit
> that prevents the width to grow over this value:

While you're there could you please do some idiomatic changes that
avoid selecting a window in order to calculate its width:

For example, replace

(let ((width
       (if (window-live-p (get-buffer-window (current-buffer) t))
           (with-selected-window (get-buffer-window (current-buffer) t)
             (window-width))
         (window-width)))))

with something like

(window-width (get-buffer-window nil t))

and

(if (window-live-p (get-buffer-window (current-buffer) t))
    (with-selected-window (get-buffer-window (current-buffer) t)
      (frame-width))
  (frame-width))

with something like

(let ((window (get-buffer-window nil t)))
  (frame-width (and window (window-frame window))))

Probably you also want to add a version tag for 'Man-width'.

Thanks, martin





reply via email to

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