diff options
| author | Stefan Monnier | 2009-01-21 21:20:55 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-01-21 21:20:55 +0000 |
| commit | f87ff5396e6be4ad5832c00963c2a19c2d38aef2 (patch) | |
| tree | 59550014bb34f5c381216a6ef5597be1c40ccfa3 | |
| parent | 97e121ccb058d3f0b7dc8f397fb2e4dc94264e89 (diff) | |
| download | emacs-f87ff5396e6be4ad5832c00963c2a19c2d38aef2.tar.gz emacs-f87ff5396e6be4ad5832c00963c2a19c2d38aef2.zip | |
(completion--insert-strings): Fix up computation of
column position which manifested e.g. in proced's signal completion.
| -rw-r--r-- | lisp/ChangeLog | 35 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 56 |
2 files changed, 49 insertions, 42 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1275d5449f7..2c55236e0b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-01-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * minibuffer.el (completion--insert-strings): Fix up computation of | ||
| 4 | column position which manifested e.g. in proced's signal completion. | ||
| 5 | |||
| 1 | 2009-01-21 Chong Yidong <cyd@stupidchicken.com> | 6 | 2009-01-21 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * server.el (server-start): Allow server to shut down when no | 8 | * server.el (server-start): Allow server to shut down when no |
| @@ -19,8 +24,8 @@ | |||
| 19 | 24 | ||
| 20 | 2009-01-20 Agustín Martín <agustin.martin@hispalinux.es> | 25 | 2009-01-20 Agustín Martín <agustin.martin@hispalinux.es> |
| 21 | 26 | ||
| 22 | * textmodes/ispell.el (ispell-find-aspell-dictionaries): Use | 27 | * textmodes/ispell.el (ispell-find-aspell-dictionaries): |
| 23 | aspell default dict. | 28 | Use aspell default dict. |
| 24 | 29 | ||
| 25 | 2009-01-20 Kenichi Handa <handa@m17n.org> | 30 | 2009-01-20 Kenichi Handa <handa@m17n.org> |
| 26 | 31 | ||
| @@ -67,8 +72,7 @@ | |||
| 67 | 72 | ||
| 68 | 2009-01-17 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 73 | 2009-01-17 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
| 69 | 74 | ||
| 70 | * textmodes/bibtex.el (bibtex-format-entry): Simplify previous | 75 | * textmodes/bibtex.el (bibtex-format-entry): Simplify previous change. |
| 71 | change. | ||
| 72 | 76 | ||
| 73 | 2009-01-17 Eli Zaretskii <eliz@gnu.org> | 77 | 2009-01-17 Eli Zaretskii <eliz@gnu.org> |
| 74 | 78 | ||
| @@ -101,8 +105,8 @@ | |||
| 101 | 105 | ||
| 102 | 2009-01-16 Ulrich Mueller <ulm@kph.uni-mainz.de> | 106 | 2009-01-16 Ulrich Mueller <ulm@kph.uni-mainz.de> |
| 103 | 107 | ||
| 104 | * international/quail.el (quail-insert-kbd-layout): Delete | 108 | * international/quail.el (quail-insert-kbd-layout): |
| 105 | superfluous handling of 8-bit code. (Bug#1418) | 109 | Delete superfluous handling of 8-bit code. (Bug#1418) |
| 106 | 110 | ||
| 107 | 2009-01-16 Glenn Morris <rgm@gnu.org> | 111 | 2009-01-16 Glenn Morris <rgm@gnu.org> |
| 108 | 112 | ||
| @@ -184,8 +188,8 @@ | |||
| 184 | (special-display-regexps): Add customization support for | 188 | (special-display-regexps): Add customization support for |
| 185 | function/other-args elements. Rewrite doc-strings. | 189 | function/other-args elements. Rewrite doc-strings. |
| 186 | (special-display-function): Rewrite doc-string. | 190 | (special-display-function): Rewrite doc-string. |
| 187 | (same-window-buffer-names, same-window-regexps): Minor | 191 | (same-window-buffer-names, same-window-regexps): |
| 188 | doc-string fixes. | 192 | Minor doc-string fixes. |
| 189 | (special-display-p): Minor rewrite. | 193 | (special-display-p): Minor rewrite. |
| 190 | 194 | ||
| 191 | 2009-01-14 Glenn Morris <rgm@gnu.org> | 195 | 2009-01-14 Glenn Morris <rgm@gnu.org> |
| @@ -303,8 +307,8 @@ | |||
| 303 | 307 | ||
| 304 | Fix Bug #876: | 308 | Fix Bug #876: |
| 305 | 309 | ||
| 306 | * info.el (info-insert-file-contents, Info-insert-dir): Bind | 310 | * info.el (info-insert-file-contents, Info-insert-dir): |
| 307 | inhibit-null-byte-detection to non-nil. | 311 | Bind inhibit-null-byte-detection to non-nil. |
| 308 | 312 | ||
| 309 | 2009-01-10 Martin Rudalics <rudalics@gmx.at> | 313 | 2009-01-10 Martin Rudalics <rudalics@gmx.at> |
| 310 | 314 | ||
| @@ -314,16 +318,15 @@ | |||
| 314 | 2009-01-09 Chong Yidong <cyd@stupidchicken.com> | 318 | 2009-01-09 Chong Yidong <cyd@stupidchicken.com> |
| 315 | 319 | ||
| 316 | * faces.el (face-valid-attribute-values): Use string as value for | 320 | * faces.el (face-valid-attribute-values): Use string as value for |
| 317 | :family attribute. Now, font-family-list returns a list of | 321 | :family attribute. Now, font-family-list returns a list of strings. |
| 318 | strings. | ||
| 319 | (x-font-family-list): Obsolete compatibility version of function | 322 | (x-font-family-list): Obsolete compatibility version of function |
| 320 | from xfaces.c. | 323 | from xfaces.c. |
| 321 | 324 | ||
| 322 | 2009-01-09 Martin Rudalics <rudalics@gmx.at> | 325 | 2009-01-09 Martin Rudalics <rudalics@gmx.at> |
| 323 | 326 | ||
| 324 | * window.el (special-display-buffer-names) | 327 | * window.el (special-display-buffer-names) |
| 325 | (special-display-regexps, special-display-function): In | 328 | (special-display-regexps, special-display-function): |
| 326 | doc-strings say "same-window" instead of "same-buffer". | 329 | In doc-strings say "same-window" instead of "same-buffer". |
| 327 | 330 | ||
| 328 | 2009-01-09 Michael Albinus <michael.albinus@gmx.de> | 331 | 2009-01-09 Michael Albinus <michael.albinus@gmx.de> |
| 329 | 332 | ||
| @@ -415,8 +418,8 @@ | |||
| 415 | 418 | ||
| 416 | 2009-01-09 Reiner Steib <Reiner.Steib@gmx.de> | 419 | 2009-01-09 Reiner Steib <Reiner.Steib@gmx.de> |
| 417 | 420 | ||
| 418 | * net/imap.el (imap-enable-exchange-bug-workaround): Explain | 421 | * net/imap.el (imap-enable-exchange-bug-workaround): |
| 419 | auto-detection in the doc string. | 422 | Explain auto-detection in the doc string. |
| 420 | 423 | ||
| 421 | 2009-01-09 Juanma Barranquero <lekktu@gmail.com> | 424 | 2009-01-09 Juanma Barranquero <lekktu@gmail.com> |
| 422 | 425 | ||
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 9e762d4ba32..c22448665b3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -723,33 +723,37 @@ It also eliminates runs of equal strings." | |||
| 723 | ;; The insertion should be "sensible" no matter what choices were made | 723 | ;; The insertion should be "sensible" no matter what choices were made |
| 724 | ;; for the parameters above. | 724 | ;; for the parameters above. |
| 725 | (dolist (str strings) | 725 | (dolist (str strings) |
| 726 | (unless (equal laststring str) ; Remove (consecutive) duplicates. | 726 | (unless (equal laststring str) ; Remove (consecutive) duplicates. |
| 727 | (setq laststring str) | 727 | (setq laststring str) |
| 728 | (unless (bolp) | 728 | (let ((length (if (consp str) |
| 729 | (insert " \t") | 729 | (+ (string-width (car str)) |
| 730 | (setq column (+ column colwidth)) | 730 | (string-width (cadr str))) |
| 731 | ;; Leave the space unpropertized so that in the case we're | 731 | (string-width str)))) |
| 732 | ;; already past the goal column, there is still | 732 | (unless (bolp) |
| 733 | ;; a space displayed. | 733 | (if (< wwidth (+ (max colwidth length) column)) |
| 734 | (set-text-properties (- (point) 1) (point) | 734 | ;; No space for `str' at point, move to next line. |
| 735 | ;; We can't just set tab-width, because | 735 | (progn (insert "\n") (setq column 0)) |
| 736 | ;; completion-setup-function will kill all | 736 | (insert " \t") |
| 737 | ;; local variables :-( | 737 | ;; Leave the space unpropertized so that in the case we're |
| 738 | `(display (space :align-to ,column))) | 738 | ;; already past the goal column, there is still |
| 739 | (when (< wwidth (+ (max colwidth | 739 | ;; a space displayed. |
| 740 | (if (consp str) | 740 | (set-text-properties (- (point) 1) (point) |
| 741 | (+ (string-width (car str)) | 741 | ;; We can't just set tab-width, because |
| 742 | (string-width (cadr str))) | 742 | ;; completion-setup-function will kill all |
| 743 | (string-width str))) | 743 | ;; local variables :-( |
| 744 | column)) | 744 | `(display (space :align-to ,column))) |
| 745 | (delete-char -2) (insert "\n") (setq column 0))) | 745 | nil)) |
| 746 | (if (not (consp str)) | 746 | (if (not (consp str)) |
| 747 | (put-text-property (point) (progn (insert str) (point)) | 747 | (put-text-property (point) (progn (insert str) (point)) |
| 748 | 'mouse-face 'highlight) | 748 | 'mouse-face 'highlight) |
| 749 | (put-text-property (point) (progn (insert (car str)) (point)) | 749 | (put-text-property (point) (progn (insert (car str)) (point)) |
| 750 | 'mouse-face 'highlight) | 750 | 'mouse-face 'highlight) |
| 751 | (put-text-property (point) (progn (insert (cadr str)) (point)) | 751 | (put-text-property (point) (progn (insert (cadr str)) (point)) |
| 752 | 'mouse-face nil))))))) | 752 | 'mouse-face nil)) |
| 753 | ;; Next column to align to. | ||
| 754 | (setq column (+ column | ||
| 755 | ;; Round up to a whole number of columns. | ||
| 756 | (* colwidth (ceiling length colwidth)))))))))) | ||
| 753 | 757 | ||
| 754 | (defvar completion-common-substring nil) | 758 | (defvar completion-common-substring nil) |
| 755 | (make-obsolete-variable 'completion-common-substring nil "23.1") | 759 | (make-obsolete-variable 'completion-common-substring nil "23.1") |