Mercurial > emacs
comparison lisp/bs.el @ 38095:7b6797bc61ef
(bs--get-name, bs--get-file-name): Add help-echo to
mouse-highlighted text.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 18 Jun 2001 10:19:30 +0000 |
parents | 11256092b610 |
children | e67950065cf9 |
comparison
equal
deleted
inserted
replaced
38094:d65ad759dc22 | 38095:7b6797bc61ef |
---|---|
1337 The name of current buffer gets additional text properties | 1337 The name of current buffer gets additional text properties |
1338 for mouse highlighting. | 1338 for mouse highlighting. |
1339 START-BUFFER is the buffer where we started buffer selection. | 1339 START-BUFFER is the buffer where we started buffer selection. |
1340 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." | 1340 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." |
1341 (let ((name (copy-sequence (buffer-name)))) | 1341 (let ((name (copy-sequence (buffer-name)))) |
1342 (put-text-property 0 (length name) 'mouse-face 'highlight name) | 1342 (add-text-properties |
1343 0 (length name) | |
1344 '(mouse-face highlight | |
1345 help-echo | |
1346 "mouse-2: select this buffer, mouse-3: select in other frame") | |
1347 name) | |
1343 (if (< (length name) bs--name-entry-length) | 1348 (if (< (length name) bs--name-entry-length) |
1344 (concat name | 1349 (concat name |
1345 (make-string (- bs--name-entry-length (length name)) ? )) | 1350 (make-string (- bs--name-entry-length (length name)) ? )) |
1346 name))) | 1351 name))) |
1347 | 1352 |
1360 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." | 1365 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." |
1361 (let ((string (copy-sequence (if (member major-mode | 1366 (let ((string (copy-sequence (if (member major-mode |
1362 '(shell-mode dired-mode)) | 1367 '(shell-mode dired-mode)) |
1363 default-directory | 1368 default-directory |
1364 (or buffer-file-name ""))))) | 1369 (or buffer-file-name ""))))) |
1365 (put-text-property 0 (length string) 'mouse-face 'highlight string) | 1370 (add-text-properties |
1371 0 (length string) | |
1372 '(mouse-face highlight | |
1373 help-echo "mouse-2: select this buffer, mouse-3: select in other frame") | |
1374 string) | |
1366 string)) | 1375 string)) |
1367 | 1376 |
1368 (defun bs--insert-one-entry (buffer) | 1377 (defun bs--insert-one-entry (buffer) |
1369 "Generate one entry for buffer BUFFER in Buffer Selection Menu. | 1378 "Generate one entry for buffer BUFFER in Buffer Selection Menu. |
1370 It goes over all columns described in `bs-attributes-list' | 1379 It goes over all columns described in `bs-attributes-list' |