bug-gnu-emacs
[Top][All Lists]
Advanced

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

fix for man on Debian


From: Dave Love
Subject: fix for man on Debian
Date: 09 Oct 2002 19:05:17 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

I hope the comment is sufficient explanation.  I set COLUMNS in the
cause of generality rather than MANWIDTH, which might be safer, but I
doubt it will break anything.  (I don't know why man is actually
getting it wrong and not defaulting to 80 columns; it DTRT in a shell
buffer.)

2002-10-09  Dave Love  <fx@gnu.org>

        * man.el (Man-getpage-in-background): Maybe set COLUMNS in
        environment.

*** man.el.~1.111.~     Sun Jan 13 09:58:40 2002
--- man.el      Wed Oct  9 12:56:43 2002
***************
*** 593,598 ****
--- 593,615 ----
            (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"
***************
*** 656,662 ****
       )))
  
  (defun Man-softhyphen-to-minus ()
!   ;; \255 is some kind of dash 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))
--- 673,679 ----
       )))
  
  (defun Man-softhyphen-to-minus ()
!   ;; \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))




reply via email to

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