Commit 8783fe91 authored by Juri Linkov's avatar Juri Linkov
Browse files

(Man-getpage-in-background): Don't disregard user option

`Man-width' on non-window systems.  Remove test for `window-system'
around setting envvar "COLUMNS" depending on the value of `Man-width'.
parent 6b8d0852
...@@ -766,17 +766,16 @@ all sections related to a subject, put something appropriate into the ...@@ -766,17 +766,16 @@ all sections related to a subject, put something appropriate into the
;; minal (using an ioctl(2) if available, the value of ;; minal (using an ioctl(2) if available, the value of
;; $COLUMNS, or falling back to 80 characters if nei- ;; $COLUMNS, or falling back to 80 characters if nei-
;; ther is available). ;; ther is available).
(if window-system (unless (or (getenv "MANWIDTH") (getenv "COLUMNS"))
(unless (or (getenv "MANWIDTH") (getenv "COLUMNS")) ;; This isn't strictly correct, since we don't know how
;; This isn't strictly correct, since we don't know how ;; the page will actually be displayed, but it seems
;; the page will actually be displayed, but it seems ;; reasonable.
;; reasonable. (setenv "COLUMNS" (number-to-string
(setenv "COLUMNS" (number-to-string (cond
(cond ((and (integerp Man-width) (> Man-width 0))
((and (integerp Man-width) (> Man-width 0)) Man-width)
Man-width) (Man-width (frame-width))
(Man-width (frame-width)) ((window-width))))))
((window-width)))))))
(setenv "GROFF_NO_SGR" "1") (setenv "GROFF_NO_SGR" "1")
(if (fboundp 'start-process) (if (fboundp 'start-process)
(set-process-sentinel (set-process-sentinel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment