aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2007-11-23 00:32:42 +0000
committerJuri Linkov2007-11-23 00:32:42 +0000
commit8783fe91be449416e1aab353afed54ff965c236f (patch)
tree47ead411421cef8812eb6ef07570247d2a73b415
parent6b8d0852a0b24ecb00b03ed13013184f6c98dbf1 (diff)
downloademacs-8783fe91be449416e1aab353afed54ff965c236f.tar.gz
emacs-8783fe91be449416e1aab353afed54ff965c236f.zip
(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'.
-rw-r--r--lisp/man.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 4056ddedb29..41f1d37bb18 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -766,17 +766,16 @@ all sections related to a subject, put something appropriate into the
766 ;; minal (using an ioctl(2) if available, the value of 766 ;; minal (using an ioctl(2) if available, the value of
767 ;; $COLUMNS, or falling back to 80 characters if nei- 767 ;; $COLUMNS, or falling back to 80 characters if nei-
768 ;; ther is available). 768 ;; ther is available).
769 (if window-system 769 (unless (or (getenv "MANWIDTH") (getenv "COLUMNS"))
770 (unless (or (getenv "MANWIDTH") (getenv "COLUMNS")) 770 ;; This isn't strictly correct, since we don't know how
771 ;; This isn't strictly correct, since we don't know how 771 ;; the page will actually be displayed, but it seems
772 ;; the page will actually be displayed, but it seems 772 ;; reasonable.
773 ;; reasonable. 773 (setenv "COLUMNS" (number-to-string
774 (setenv "COLUMNS" (number-to-string 774 (cond
775 (cond 775 ((and (integerp Man-width) (> Man-width 0))
776 ((and (integerp Man-width) (> Man-width 0)) 776 Man-width)
777 Man-width) 777 (Man-width (frame-width))
778 (Man-width (frame-width)) 778 ((window-width))))))
779 ((window-width)))))))
780 (setenv "GROFF_NO_SGR" "1") 779 (setenv "GROFF_NO_SGR" "1")
781 (if (fboundp 'start-process) 780 (if (fboundp 'start-process)
782 (set-process-sentinel 781 (set-process-sentinel