(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.
This commit is contained in:
parent
da46c5bec7
commit
635ed24267
2 changed files with 18 additions and 20 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-01-29 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* bs.el (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.
|
||||
|
||||
2006-01-27 Agustin Martin <agustin.martin@hispalinux.es>
|
||||
|
||||
* textmodes/ispell.el (ispell-find-aspell-dictionaries): If no
|
||||
|
@ -46,7 +52,7 @@
|
|||
(widget-keymap): Use advertised-widget-backward for S-TAB.
|
||||
|
||||
* tumme.el: Correct the keywords.
|
||||
(tumme-dir-max-size): USe defvar.
|
||||
(tumme-dir-max-size): Use defvar.
|
||||
(tumme-setup-dired-keybindings, tumme-dired): Add autoload cookie.
|
||||
|
||||
* simple.el (move-beginning-of-line): Take account of fields.
|
||||
|
@ -141,8 +147,8 @@
|
|||
|
||||
* thumbs.el (thumbs-extra-images): New variable. Make it buffer-local
|
||||
and permanent-local.
|
||||
(thumbs-max-image-number): New variable. Make it
|
||||
(thumbs-do-thumbs-insertion): Use them
|
||||
(thumbs-max-image-number): New variable.
|
||||
(thumbs-do-thumbs-insertion): Use them.
|
||||
(thumbs-per-line): Change default to 4.
|
||||
(thumbs-marked-list): Rename from thumbs-markedL.
|
||||
(thumbs-cleanup-thumbsdir, thumbs-delete-images)
|
||||
|
|
26
lisp/bs.el
26
lisp/bs.el
|
@ -1332,17 +1332,9 @@ The name of current buffer gets additional text properties
|
|||
for mouse highlighting.
|
||||
START-BUFFER is the buffer where we started buffer selection.
|
||||
ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."
|
||||
(let ((name (copy-sequence (buffer-name))))
|
||||
(add-text-properties
|
||||
0 (length name)
|
||||
'(mouse-face highlight
|
||||
help-echo
|
||||
"mouse-2: select this buffer, mouse-3: select in other frame")
|
||||
name)
|
||||
(if (< (length name) bs--name-entry-length)
|
||||
(concat name
|
||||
(make-string (- bs--name-entry-length (length name)) ? ))
|
||||
name)))
|
||||
(propertize (buffer-name)
|
||||
'help-echo "mouse-2: select this buffer, mouse-3: select in other frame"
|
||||
'mouse-face 'highlight))
|
||||
|
||||
(defun bs--get-mode-name (start-buffer all-buffers)
|
||||
"Return the name of mode of current buffer for Buffer Selection Menu.
|
||||
|
@ -1399,12 +1391,12 @@ normally *buffer-selection*."
|
|||
(defun bs--format-aux (string align len)
|
||||
"Generate a string with STRING with alignment ALIGN and length LEN.
|
||||
ALIGN is one of the symbols `left', `middle', or `right'."
|
||||
(let ((length (length string)))
|
||||
(if (>= length len)
|
||||
string
|
||||
(if (eq 'right align)
|
||||
(concat (make-string (- len length) ? ) string)
|
||||
(concat string (make-string (- len length) ? ))))))
|
||||
(let* ((width (length string))
|
||||
(len (max len width)))
|
||||
(format (format "%%%s%ds" (if (eq align 'right) "" "-") len)
|
||||
(if (eq align 'middle)
|
||||
(concat (make-string (/ (- len width) 2) ?\s) string)
|
||||
string))))
|
||||
|
||||
(defun bs--show-header ()
|
||||
"Insert header for Buffer Selection Menu in current buffer."
|
||||
|
|
Loading…
Add table
Reference in a new issue