[Top][All Lists]

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

Re: master 7e387c9: * lisp/man.el (Man-width-max): New defcustom (bug#32

From: Juri Linkov
Subject: Re: master 7e387c9: * lisp/man.el (Man-width-max): New defcustom (bug#32536, bug#9385)
Date: Sun, 08 Dec 2019 23:41:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> +(defun Man-columns ()
>> +  (let ((width (cond
>> +                ((and (integerp Man-width) (> Man-width 0))
>> +                 Man-width)
>> +                (Man-width
>> +                 (let ((window (get-buffer-window nil t)))
>> +                   (frame-width (and window (window-frame window)))))
>> +                (t
>> +                 (window-width (get-buffer-window nil t))))))
> Bother: both frame-width and window-width return values in units of
> the canonical character width, which will not change if the default
> face is remapped.  And you are using the value to set the COLUMNS
> environment variable, so you could get too wide lines, which will not
> fit within the window.

This code is not new.  It was moved here from another function.
I don't know how to implement support for variable-pitch fonts
in the Man-mode buffers.  Maybe not to set COLUMNS at all, but
then call fill-paragraph on the output.

reply via email to

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