Check if 'Man-columns' is non-nil before trying to reformat
the manpage buffer. The value of the varible 'Man-columns'
is nil on a non-window system where "MANWIDTH" or "COLUMNS"
is defined. And the return value of the function 'Man-columns'
is meaningless in this case anyway. So no need to react
to changes in window width (bug#74924).
(cherry picked from commit
351b6ac16d29459c5800bd980d428e61ee43cb7d)
(when (window-live-p window)
(with-current-buffer (window-buffer window)
(when (and (derived-mode-p 'Man-mode)
+ Man-columns
(not (eq Man-columns (Man-columns))))
(let ((proc (get-buffer-process (current-buffer))))
(unless (and proc (not (eq (process-status proc) 'exit)))