emacs-devel
[Top][All Lists]
Advanced

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

Man-width on terminals


From: Juri Linkov
Subject: Man-width on terminals
Date: Thu, 08 Nov 2007 02:54:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Terminals don't necessarily have 80 columns nowadays but man.el still
limits the width of the formatted man pages to 80 columns on non-window
systems, and it's impossible to override this with an user option.

I propose to remove this restriction that treats terminals as a special case,
and to allow terminals using all available horizontal space (defined by
`window-width').  This also allows using an existing user option `Man-width'
to define any other desired width equally on terminals and window systems:

Index: lisp/man.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/man.el,v
retrieving revision 1.172
diff -u -w -b -r1.172 man.el
--- lisp/man.el 13 Sep 2007 08:04:38 -0000      1.172
+++ lisp/man.el 8 Nov 2007 00:54:16 -0000
@@ -763,7 +764,6 @@
        ;;               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
@@ -773,7 +773,7 @@
                                  ((and (integerp Man-width) (> Man-width 0))
                                   Man-width)
                                  (Man-width (frame-width))
-                                 ((window-width)))))))
+                             ((window-width))))))
        (setenv "GROFF_NO_SGR" "1")
        (if (fboundp 'start-process)
            (set-process-sentinel

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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