diff options
| author | Stephen Eglen | 2009-09-15 11:38:15 +0000 |
|---|---|---|
| committer | Stephen Eglen | 2009-09-15 11:38:15 +0000 |
| commit | 4078fd57bae25df45ab41082275f9c488d49ef2f (patch) | |
| tree | 4a37f01b4256a289b8c9dee10a710dd34e8561fa | |
| parent | a2c145f68f6588120f3f4a5feadf8e1c80481e3a (diff) | |
| download | emacs-4078fd57bae25df45ab41082275f9c488d49ef2f.tar.gz emacs-4078fd57bae25df45ab41082275f9c488d49ef2f.zip | |
(iswitchb-read-buffer): When selecting a match from
the virtual-buffers, use the name of the buffer specified by
find-file-noselect, as the match may be a symlink. (This was a
problem if the target and the symlink had differet names.)
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/iswitchb.el | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5545992e8e2..532c89656c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-09-15 Stephen Eglen <stephen@gnu.org> | ||
| 2 | |||
| 3 | * iswitchb.el (iswitchb-read-buffer): When selecting a match from | ||
| 4 | the virtual-buffers, use the name of the buffer specified by | ||
| 5 | find-file-noselect, as the match may be a symlink. (This was a | ||
| 6 | problem if the target and the symlink had differet names.) | ||
| 7 | |||
| 1 | 2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca> | 8 | 2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 9 | ||
| 3 | * custom.el (custom-initialize-default, custom-initialize-set): CSE. | 10 | * custom.el (custom-initialize-default, custom-initialize-set): CSE. |
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 802b45d23b1..8a800143bd2 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el | |||
| @@ -657,9 +657,12 @@ the selection process begins. Used by isearchb.el." | |||
| 657 | ;; that file now and act as though that buffer had been selected. | 657 | ;; that file now and act as though that buffer had been selected. |
| 658 | (if (and iswitchb-virtual-buffers | 658 | (if (and iswitchb-virtual-buffers |
| 659 | (not (iswitchb-existing-buffer-p))) | 659 | (not (iswitchb-existing-buffer-p))) |
| 660 | (let ((virt (car iswitchb-virtual-buffers))) | 660 | (let ((virt (car iswitchb-virtual-buffers)) |
| 661 | (find-file-noselect (cdr virt)) | 661 | (new-buf)) |
| 662 | (setq iswitchb-matches (list (car virt)) | 662 | ;; Keep the name of the buffer returned by find-file-noselect, as |
| 663 | ;; the buffer 'virt' could be a symlink to a file of a different name. | ||
| 664 | (setq new-buf (buffer-name (find-file-noselect (cdr virt)))) | ||
| 665 | (setq iswitchb-matches (list new-buf) | ||
| 663 | iswitchb-virtual-buffers nil))) | 666 | iswitchb-virtual-buffers nil))) |
| 664 | 667 | ||
| 665 | ;; Handling the require-match must be done in a better way. | 668 | ;; Handling the require-match must be done in a better way. |