emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog minibuffer.el
Date: Wed, 21 Jan 2009 21:21:04 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/01/21 21:21:02

Modified files:
        lisp           : ChangeLog minibuffer.el 

Log message:
        (completion--insert-strings): Fix up computation of
        column position which manifested e.g. in proced's signal completion.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15139&r2=1.15140
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/minibuffer.el?cvsroot=emacs&r1=1.69&r2=1.70

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15139
retrieving revision 1.15140
diff -u -b -r1.15139 -r1.15140
--- ChangeLog   21 Jan 2009 20:28:27 -0000      1.15139
+++ ChangeLog   21 Jan 2009 21:20:55 -0000      1.15140
@@ -1,3 +1,8 @@
+2009-01-21  Stefan Monnier  <address@hidden>
+
+       * minibuffer.el (completion--insert-strings): Fix up computation of
+       column position which manifested e.g. in proced's signal completion.
+
 2009-01-21  Chong Yidong  <address@hidden>
 
        * server.el (server-start): Allow server to shut down when no
@@ -19,8 +24,8 @@
 
 2009-01-20  Agustín Martín  <address@hidden>
 
-       * textmodes/ispell.el (ispell-find-aspell-dictionaries): Use
-       aspell default dict.
+       * textmodes/ispell.el (ispell-find-aspell-dictionaries):
+       Use aspell default dict.
 
 2009-01-20  Kenichi Handa  <address@hidden>
 
@@ -67,8 +72,7 @@
 
 2009-01-17  Roland Winkler  <address@hidden>
 
-       * textmodes/bibtex.el (bibtex-format-entry): Simplify previous
-       change.
+       * textmodes/bibtex.el (bibtex-format-entry): Simplify previous change.
 
 2009-01-17  Eli Zaretskii  <address@hidden>
 
@@ -101,8 +105,8 @@
 
 2009-01-16  Ulrich Mueller  <address@hidden>
 
-       * international/quail.el (quail-insert-kbd-layout): Delete
-       superfluous handling of 8-bit code.  (Bug#1418)
+       * international/quail.el (quail-insert-kbd-layout):
+       Delete superfluous handling of 8-bit code.  (Bug#1418)
 
 2009-01-16  Glenn Morris  <address@hidden>
 
@@ -184,8 +188,8 @@
        (special-display-regexps): Add customization support for
        function/other-args elements.  Rewrite doc-strings.
        (special-display-function): Rewrite doc-string.
-       (same-window-buffer-names, same-window-regexps): Minor
-       doc-string fixes.
+       (same-window-buffer-names, same-window-regexps):
+       Minor doc-string fixes.
        (special-display-p): Minor rewrite.
 
 2009-01-14  Glenn Morris  <address@hidden>
@@ -303,8 +307,8 @@
 
        Fix Bug #876:
 
-       * info.el (info-insert-file-contents, Info-insert-dir): Bind
-       inhibit-null-byte-detection to non-nil.
+       * info.el (info-insert-file-contents, Info-insert-dir):
+       Bind inhibit-null-byte-detection to non-nil.
 
 2009-01-10  Martin Rudalics  <address@hidden>
 
@@ -314,16 +318,15 @@
 2009-01-09  Chong Yidong  <address@hidden>
 
        * faces.el (face-valid-attribute-values): Use string as value for
-       :family attribute.  Now, font-family-list returns a list of
-       strings.
+       :family attribute.  Now, font-family-list returns a list of strings.
        (x-font-family-list): Obsolete compatibility version of function
        from xfaces.c.
 
 2009-01-09  Martin Rudalics  <address@hidden>
 
        * window.el (special-display-buffer-names)
-       (special-display-regexps, special-display-function): In
-       doc-strings say "same-window" instead of "same-buffer".
+       (special-display-regexps, special-display-function):
+       In doc-strings say "same-window" instead of "same-buffer".
 
 2009-01-09  Michael Albinus  <address@hidden>
 
@@ -415,8 +418,8 @@
 
 2009-01-09  Reiner Steib  <address@hidden>
 
-       * net/imap.el (imap-enable-exchange-bug-workaround): Explain
-       auto-detection in the doc string.
+       * net/imap.el (imap-enable-exchange-bug-workaround):
+       Explain auto-detection in the doc string.
 
 2009-01-09  Juanma Barranquero  <address@hidden>
 

Index: minibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- minibuffer.el       14 Jan 2009 02:29:56 -0000      1.69
+++ minibuffer.el       21 Jan 2009 21:21:01 -0000      1.70
@@ -725,9 +725,15 @@
       (dolist (str strings)
        (unless (equal laststring str)  ; Remove (consecutive) duplicates.
          (setq laststring str)
+          (let ((length (if (consp str)
+                            (+ (string-width (car str))
+                               (string-width (cadr str)))
+                          (string-width str))))
          (unless (bolp)
+              (if (< wwidth (+ (max colwidth length) column))
+                  ;; No space for `str' at point, move to next line.
+                  (progn (insert "\n") (setq column 0))
             (insert " \t")
-            (setq column (+ column colwidth))
             ;; Leave the space unpropertized so that in the case we're
             ;; already past the goal column, there is still
             ;; a space displayed.
@@ -736,20 +742,18 @@
                                  ;; completion-setup-function will kill all
                                  ;; local variables :-(
                                  `(display (space :align-to ,column)))
-           (when (< wwidth (+ (max colwidth
-                                   (if (consp str)
-                                       (+ (string-width (car str))
-                                          (string-width (cadr str)))
-                                     (string-width str)))
-                              column))
-             (delete-char -2) (insert "\n") (setq column 0)))
+                nil))
          (if (not (consp str))
              (put-text-property (point) (progn (insert str) (point))
                                 'mouse-face 'highlight)
            (put-text-property (point) (progn (insert (car str)) (point))
                               'mouse-face 'highlight)
            (put-text-property (point) (progn (insert (cadr str)) (point))
-                               'mouse-face nil)))))))
+                                 'mouse-face nil))
+            ;; Next column to align to.
+            (setq column (+ column
+                            ;; Round up to a whole number of columns.
+                            (* colwidth (ceiling length colwidth))))))))))
 
 (defvar completion-common-substring nil)
 (make-obsolete-variable 'completion-common-substring nil "23.1")




reply via email to

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