summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorSimon Marshall <simon@gnu.org>1995-02-21 12:47:18 +0000
committerSimon Marshall <simon@gnu.org>1995-02-21 12:47:18 +0000
commit1db71b07c5e2952425c5783a661843ed789bb475 (patch)
tree8761af942ecf3a05aec3abfaef886e4380605ec4 /lisp/mouse.el
parent31d215581792f3982888ea5a1d9cff009d1e17c0 (diff)
downloademacs-1db71b07c5e2952425c5783a661843ed789bb475.tar.gz
Made mouse-buffer-menu use list-buffers-directory if buffer-file-name is nil.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el33
1 files changed, 19 insertions, 14 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8db2cafbfa6..9e4c4827aaf 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1034,20 +1034,25 @@ and selects that window."
(let ((elt (car tail)))
(if (not (string-match "^ "
(buffer-name elt)))
- (setq head (cons
- (cons
- (format
- (format "%%%ds %%s%%s %%s"
- maxbuf)
- (buffer-name elt)
- (if (buffer-modified-p elt)
- "*" " ")
- (save-excursion
- (set-buffer elt)
- (if buffer-read-only "%" " "))
- (or (buffer-file-name elt) ""))
- elt)
- head))))
+ (setq head
+ (cons
+ (cons
+ (format
+ (format "%%%ds %%s%%s %%s" maxbuf)
+ (buffer-name elt)
+ (if (buffer-modified-p elt) "*" " ")
+ (save-excursion
+ (set-buffer elt)
+ (if buffer-read-only "%" " "))
+ (or (buffer-file-name elt)
+ (save-excursion
+ (set-buffer elt)
+ (if list-buffers-directory
+ (expand-file-name
+ list-buffers-directory)))
+ ""))
+ elt)
+ head))))
(setq tail (cdr tail)))
(reverse head))))))
(let ((buf (x-popup-menu event menu))