diff options
| author | Chong Yidong | 2009-11-06 19:15:25 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-11-06 19:15:25 +0000 |
| commit | d19e23ae10b0740bce35efe761c4267e95030a24 (patch) | |
| tree | 75b9a2d066dff6100484658219d364fa31b1cde4 | |
| parent | 0ad57dfdc5c4c7df6800c9b4fe2000f34188a7b4 (diff) | |
| download | emacs-d19e23ae10b0740bce35efe761c4267e95030a24.tar.gz emacs-d19e23ae10b0740bce35efe761c4267e95030a24.zip | |
* buff-menu.el (Buffer-menu-buffer+size): Use display property to
align size column (Bug#4839).
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/buff-menu.el | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ac43c58125..04fff3dfcc1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-11-06 Chong Yidong <cyd@stupidchicken.com> | 1 | 2009-11-06 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * buff-menu.el (Buffer-menu-buffer+size): Use display property to | ||
| 4 | align size column (Bug#4839). | ||
| 5 | |||
| 3 | * emacs-lisp/autoload.el (autoload-rubric): Always issue a provide | 6 | * emacs-lisp/autoload.el (autoload-rubric): Always issue a provide |
| 4 | statement. | 7 | statement. |
| 5 | 8 | ||
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index d838f5ee18f..6ef7195c426 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -678,12 +678,13 @@ For more information, see the function `buffer-menu'." | |||
| 678 | (setq name (copy-sequence name))) | 678 | (setq name (copy-sequence name))) |
| 679 | (add-text-properties 0 (length name) name-props name) | 679 | (add-text-properties 0 (length name) name-props name) |
| 680 | (add-text-properties 0 (length size) size-props size) | 680 | (add-text-properties 0 (length size) size-props size) |
| 681 | (concat name | 681 | (let ((name+space-width (- Buffer-menu-buffer+size-width |
| 682 | (make-string (- Buffer-menu-buffer+size-width | 682 | (string-width size)))) |
| 683 | (string-width name) | 683 | (concat name |
| 684 | (string-width size)) | 684 | (propertize (make-string (- name+space-width (string-width name)) |
| 685 | ?\s) | 685 | ?\s) |
| 686 | size)) | 686 | 'display `(space :align-to ,(+ 4 name+space-width))) |
| 687 | size))) | ||
| 687 | 688 | ||
| 688 | (defun Buffer-menu-sort (column) | 689 | (defun Buffer-menu-sort (column) |
| 689 | "Sort the buffer menu by COLUMN." | 690 | "Sort the buffer menu by COLUMN." |
| @@ -889,7 +890,7 @@ For more information, see the function `buffer-menu'." | |||
| 889 | ;; This way we avoid problems with unusual buffer names. | 890 | ;; This way we avoid problems with unusual buffer names. |
| 890 | (let ((name (nth 2 buffer)) | 891 | (let ((name (nth 2 buffer)) |
| 891 | (size (int-to-string (nth 3 buffer)))) | 892 | (size (int-to-string (nth 3 buffer)))) |
| 892 | (Buffer-menu-buffer+size name size | 893 | (Buffer-menu-buffer+size name size |
| 893 | `(buffer-name ,name | 894 | `(buffer-name ,name |
| 894 | buffer ,(car buffer) | 895 | buffer ,(car buffer) |
| 895 | font-lock-face buffer-menu-buffer | 896 | font-lock-face buffer-menu-buffer |