diff options
| author | Juanma Barranquero | 2006-01-29 02:49:03 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-01-29 02:49:03 +0000 |
| commit | 635ed242672f82cb37d38c5c3d9476898f62ba4e (patch) | |
| tree | ad3a44fe286a9746184658383c9433f1f25f46c7 | |
| parent | da46c5bec76335d48b76723479173e52a4bdae7f (diff) | |
| download | emacs-635ed242672f82cb37d38c5c3d9476898f62ba4e.tar.gz emacs-635ed242672f82cb37d38c5c3d9476898f62ba4e.zip | |
(bs--format-aux): Implement `middle' alignment as described in the docstring for
`bs-attributes-list'.
(bs--get-name): Simplify. Don't pad the buffer name.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/bs.el | 26 |
2 files changed, 18 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a63125ea226..e70f7679623 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-01-29 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * bs.el (bs--format-aux): Implement `middle' alignment as | ||
| 4 | described in the docstring for `bs-attributes-list'. | ||
| 5 | (bs--get-name): Simplify. Don't pad the buffer name. | ||
| 6 | |||
| 1 | 2006-01-27 Agustin Martin <agustin.martin@hispalinux.es> | 7 | 2006-01-27 Agustin Martin <agustin.martin@hispalinux.es> |
| 2 | 8 | ||
| 3 | * textmodes/ispell.el (ispell-find-aspell-dictionaries): If no | 9 | * textmodes/ispell.el (ispell-find-aspell-dictionaries): If no |
| @@ -46,7 +52,7 @@ | |||
| 46 | (widget-keymap): Use advertised-widget-backward for S-TAB. | 52 | (widget-keymap): Use advertised-widget-backward for S-TAB. |
| 47 | 53 | ||
| 48 | * tumme.el: Correct the keywords. | 54 | * tumme.el: Correct the keywords. |
| 49 | (tumme-dir-max-size): USe defvar. | 55 | (tumme-dir-max-size): Use defvar. |
| 50 | (tumme-setup-dired-keybindings, tumme-dired): Add autoload cookie. | 56 | (tumme-setup-dired-keybindings, tumme-dired): Add autoload cookie. |
| 51 | 57 | ||
| 52 | * simple.el (move-beginning-of-line): Take account of fields. | 58 | * simple.el (move-beginning-of-line): Take account of fields. |
| @@ -141,8 +147,8 @@ | |||
| 141 | 147 | ||
| 142 | * thumbs.el (thumbs-extra-images): New variable. Make it buffer-local | 148 | * thumbs.el (thumbs-extra-images): New variable. Make it buffer-local |
| 143 | and permanent-local. | 149 | and permanent-local. |
| 144 | (thumbs-max-image-number): New variable. Make it | 150 | (thumbs-max-image-number): New variable. |
| 145 | (thumbs-do-thumbs-insertion): Use them | 151 | (thumbs-do-thumbs-insertion): Use them. |
| 146 | (thumbs-per-line): Change default to 4. | 152 | (thumbs-per-line): Change default to 4. |
| 147 | (thumbs-marked-list): Rename from thumbs-markedL. | 153 | (thumbs-marked-list): Rename from thumbs-markedL. |
| 148 | (thumbs-cleanup-thumbsdir, thumbs-delete-images) | 154 | (thumbs-cleanup-thumbsdir, thumbs-delete-images) |
diff --git a/lisp/bs.el b/lisp/bs.el index 2e4fc881d9f..464f6086a04 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -1332,17 +1332,9 @@ The name of current buffer gets additional text properties | |||
| 1332 | for mouse highlighting. | 1332 | for mouse highlighting. |
| 1333 | START-BUFFER is the buffer where we started buffer selection. | 1333 | START-BUFFER is the buffer where we started buffer selection. |
| 1334 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." | 1334 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." |
| 1335 | (let ((name (copy-sequence (buffer-name)))) | 1335 | (propertize (buffer-name) |
| 1336 | (add-text-properties | 1336 | 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" |
| 1337 | 0 (length name) | 1337 | 'mouse-face 'highlight)) |
| 1338 | '(mouse-face highlight | ||
| 1339 | help-echo | ||
| 1340 | "mouse-2: select this buffer, mouse-3: select in other frame") | ||
| 1341 | name) | ||
| 1342 | (if (< (length name) bs--name-entry-length) | ||
| 1343 | (concat name | ||
| 1344 | (make-string (- bs--name-entry-length (length name)) ? )) | ||
| 1345 | name))) | ||
| 1346 | 1338 | ||
| 1347 | (defun bs--get-mode-name (start-buffer all-buffers) | 1339 | (defun bs--get-mode-name (start-buffer all-buffers) |
| 1348 | "Return the name of mode of current buffer for Buffer Selection Menu. | 1340 | "Return the name of mode of current buffer for Buffer Selection Menu. |
| @@ -1399,12 +1391,12 @@ normally *buffer-selection*." | |||
| 1399 | (defun bs--format-aux (string align len) | 1391 | (defun bs--format-aux (string align len) |
| 1400 | "Generate a string with STRING with alignment ALIGN and length LEN. | 1392 | "Generate a string with STRING with alignment ALIGN and length LEN. |
| 1401 | ALIGN is one of the symbols `left', `middle', or `right'." | 1393 | ALIGN is one of the symbols `left', `middle', or `right'." |
| 1402 | (let ((length (length string))) | 1394 | (let* ((width (length string)) |
| 1403 | (if (>= length len) | 1395 | (len (max len width))) |
| 1404 | string | 1396 | (format (format "%%%s%ds" (if (eq align 'right) "" "-") len) |
| 1405 | (if (eq 'right align) | 1397 | (if (eq align 'middle) |
| 1406 | (concat (make-string (- len length) ? ) string) | 1398 | (concat (make-string (/ (- len width) 2) ?\s) string) |
| 1407 | (concat string (make-string (- len length) ? )))))) | 1399 | string)))) |
| 1408 | 1400 | ||
| 1409 | (defun bs--show-header () | 1401 | (defun bs--show-header () |
| 1410 | "Insert header for Buffer Selection Menu in current buffer." | 1402 | "Insert header for Buffer Selection Menu in current buffer." |