emacs-devel
[Top][All Lists]
Advanced

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

Re: man.el


From: Juri Linkov
Subject: Re: man.el
Date: Thu, 18 Mar 2004 09:03:53 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

I looked at other functions that use `frame-window' which produces too
long lines in side-by-side windows, and replaced it with `window-width'.

BTW, one of the fixes was made in the file abbrevlist.el with a lone
function `list-one-abbrev-table' which is not used anywhere in Emacs.
I'm not sure if this function should be removed because it might be
used in Emacs Lisp programs outside Emacs and also it looks like
a useful function, but perhaps this functions should be moved
to the abbrev.el file and the abbrevlist.el file be deleted.

Index: emacs/lisp/abbrevlist.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/abbrevlist.el,v
retrieving revision 1.11
diff -c -r1.11 abbrevlist.el
*** emacs/lisp/abbrevlist.el    1 Sep 2003 15:45:04 -0000       1.11
--- emacs/lisp/abbrevlist.el    18 Mar 2004 01:57:40 -0000
***************
*** 39,45 ****
          abbrev-table)
        (setq abbrev-list (sort abbrev-list 'string-lessp))
        (while abbrev-list
!         (if (> (+ first-column 40) (frame-width))
              (progn
                (insert "\n")
                (setq first-column 0)))
--- 39,45 ----
          abbrev-table)
        (setq abbrev-list (sort abbrev-list 'string-lessp))
        (while abbrev-list
!         (if (> (+ first-column 40) (window-width))
              (progn
                (insert "\n")
                (setq first-column 0)))
Index: emacs/lisp/descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.17
diff -c -r1.17 descr-text.el
*** emacs/lisp/descr-text.el    9 Nov 2003 19:38:32 -0000       1.17
--- emacs/lisp/descr-text.el    18 Mar 2004 01:57:40 -0000
***************
*** 589,595 ****
                (when (>= (+ (current-column)
                             (or (string-match "\n" clm)
                                 (string-width clm)) 1)
!                         (frame-width))
                  (insert "\n")
                  (indent-to (1+ max-width)))
                (insert " " clm))
--- 589,595 ----
                (when (>= (+ (current-column)
                             (or (string-match "\n" clm)
                                 (string-width clm)) 1)
!                         (window-width))
                  (insert "\n")
                  (indent-to (1+ max-width)))
                (insert " " clm))
Index: emacs/lisp/international/mule-diag.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-diag.el,v
retrieving revision 1.92
diff -c -r1.92 mule-diag.el
*** emacs/lisp/international/mule-diag.el       7 Oct 2003 06:45:46 -0000       
1.92
--- emacs/lisp/international/mule-diag.el       18 Mar 2004 01:57:41 -0000
***************
*** 845,851 ****
                 (setq codings (cons x codings))))
           (get (car categories) 'coding-systems))
          (if codings
!             (let ((max-col (frame-width))
                    pos)
                (princ (format "\
    The following are decoded correctly but recognized as %s:\n   "
--- 845,851 ----
                 (setq codings (cons x codings))))
           (get (car categories) 'coding-systems))
          (if codings
!             (let ((max-col (window-width))
                    pos)
                (princ (format "\
    The following are decoded correctly but recognized as %s:\n   "
Index: emacs/lisp/international/quail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/quail.el,v
retrieving revision 1.132
diff -c -r1.132 quail.el
*** emacs/lisp/international/quail.el   10 Nov 2003 04:30:46 -0000      1.132
--- emacs/lisp/international/quail.el   18 Mar 2004 01:57:43 -0000
***************
*** 2289,2296 ****
                          (or (> (length x) (length y))
                              (and (= (length x) (length y))
                                   (not (string< x y))))))))
!   (let ((frame-width (frame-width (window-frame (get-buffer-window
!                                                (current-buffer) 'visible))))
        (single-key-width 3)
        (single-trans-width 4)
        (multiple-key-width 3)
--- 2289,2296 ----
                          (or (> (length x) (length y))
                              (and (= (length x) (length y))
                                   (not (string< x y))))))))
!   (let ((window-width (window-width (get-buffer-window
!                                      (current-buffer) 'visible)))
        (single-key-width 3)
        (single-trans-width 4)
        (multiple-key-width 3)
***************
*** 2319,2325 ****
          (setq multiple-key-width width)))
      (when single-list
        (setq col-width (+ single-key-width 1 single-trans-width 1)
!           cols (/ frame-width col-width)
            rows (/ (length single-list) cols))
        (if (> (% (length single-list) cols) 0)
          (setq rows (1+ rows)))
--- 2319,2325 ----
          (setq multiple-key-width width)))
      (when single-list
        (setq col-width (+ single-key-width 1 single-trans-width 1)
!           cols (/ window-width col-width)
            rows (/ (length single-list) cols))
        (if (> (% (length single-list) cols) 0)
          (setq rows (1+ rows)))
***************
*** 2365,2371 ****
                   (lambda (x)
                     (let ((width (if (integerp x) (char-width x)
                                    (string-width x))))
!                      (when (> (+ (current-column) 1 width) frame-width)
                         (insert "\n")
                         (indent-to multiple-key-width))
                       (insert " " x))))
--- 2365,2371 ----
                   (lambda (x)
                     (let ((width (if (integerp x) (char-width x)
                                    (string-width x))))
!                      (when (> (+ (current-column) 1 width) window-width)
                         (insert "\n")
                         (indent-to multiple-key-width))
                       (insert " " x))))
***************
*** 2402,2408 ****
        (with-current-buffer standard-output
          (setq quail-current-package package-def))))
      ;; Then, insert text in the help buffer while paying attention to
!     ;; the width of the frame in which the buffer displayed.
      (with-current-buffer (help-buffer)
        (setq buffer-read-only nil)
        (insert "Input method: " (quail-name)
--- 2402,2408 ----
        (with-current-buffer standard-output
          (setq quail-current-package package-def))))
      ;; Then, insert text in the help buffer while paying attention to
!     ;; the width of the window in which the buffer displayed.
      (with-current-buffer (help-buffer)
        (setq buffer-read-only nil)
        (insert "Input method: " (quail-name)

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





reply via email to

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