summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-10-15 23:03:28 +0000
committerRichard M. Stallman <rms@gnu.org>2002-10-15 23:03:28 +0000
commit992d014dde531eb09782888bbf8f04202ce927fb (patch)
tree82ee7c387d3fa5aa0caea1240ed34a0b188c1c2b
parent424c9772f0571da2bb4df51add89ad6265fc9f2b (diff)
downloademacs-992d014dde531eb09782888bbf8f04202ce927fb.tar.gz
(Man-getpage-in-background): Set width in environment.
-rw-r--r--lisp/man.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 01451341b3f..a7b0ff16fa1 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -596,6 +596,23 @@ all sections related to a subject, put something appropriate into the
(default-directory "/"))
;; Prevent any attempt to use display terminal fanciness.
(setenv "TERM" "dumb")
+ ;; In Debian Woody, at least, we get overlong lines under X
+ ;; unless COLUMNS or MANWIDTH is set. This isn't a problem on
+ ;; a tty. man(1) says:
+ ;; MANWIDTH
+ ;; If $MANWIDTH is set, its value is used as the line
+ ;; length for which manual pages should be formatted.
+ ;; If it is not set, manual pages will be formatted
+ ;; with a line length appropriate to the current ter-
+ ;; minal (using an ioctl(2) if available, the value of
+ ;; $COLUMNS, or falling back to 80 characters if nei-
+ ;; ther is available).
+ (if window-system
+ (unless (or (getenv "MANWIDTH") (getenv "COLUMNS"))
+ ;; This isn't strictly correct, since we don't know how
+ ;; the page will actually be displayed, but it seems
+ ;; reasonable.
+ (setenv "COLUMNS" (number-to-string (frame-width)))))
(if (fboundp 'start-process)
(set-process-sentinel
(start-process manual-program buffer "sh" "-c"
@@ -659,7 +676,7 @@ See the variable `Man-notify-method' for the different notification behaviors."
)))
(defun Man-softhyphen-to-minus ()
- ;; \255 is some kind of dash in Latin-N. Versions of Debian man, at
+ ;; \255 is SOFT HYPHEN in Latin-N. Versions of Debian man, at
;; least, emit it even when not in a Latin-N locale.
(unless (eq t (compare-strings "latin-" 0 nil
current-language-environment 0 6 t))