diff options
| author | John Wiegley | 2010-02-03 15:47:25 -0500 |
|---|---|---|
| committer | John Wiegley | 2010-02-03 15:47:25 -0500 |
| commit | 82055bb780cf6b8f0d3c53ca0eac635bf7e18d7e (patch) | |
| tree | b9e0a6e142a9bab0f417724677f56475c215719b | |
| parent | 8214b6e4e7e65e08bb055daf7d0a681155cb37c2 (diff) | |
| download | emacs-82055bb780cf6b8f0d3c53ca0eac635bf7e18d7e.tar.gz emacs-82055bb780cf6b8f0d3c53ca0eac635bf7e18d7e.zip | |
iswitchb.el (iswitchb-completions): Add bookmark files to the
list of files considered for "virtual buffer" completions.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/iswitchb.el | 25 |
2 files changed, 25 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e133665570..36df1bd0b72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-02-03 John Wiegley <jwiegley@gmail.com> | ||
| 2 | |||
| 3 | * iswitchb.el (iswitchb-completions): Add bookmark files to the | ||
| 4 | list of files considered for "virtual buffer" completions. | ||
| 5 | |||
| 1 | 2010-02-03 Michael Albinus <michael.albinus@gmx.de> | 6 | 2010-02-03 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory | 8 | * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory |
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index ea4b00dc90d..ee06db6f78f 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el | |||
| @@ -1274,7 +1274,7 @@ Modified from `icomplete-completions'." | |||
| 1274 | ;; consult the list of past visited files, to see if we can find | 1274 | ;; consult the list of past visited files, to see if we can find |
| 1275 | ;; the file which the user might thought was still open. | 1275 | ;; the file which the user might thought was still open. |
| 1276 | (when (and iswitchb-use-virtual-buffers (null comps) | 1276 | (when (and iswitchb-use-virtual-buffers (null comps) |
| 1277 | recentf-list) | 1277 | (or recentf-list bookmark-alist)) |
| 1278 | (setq iswitchb-virtual-buffers nil) | 1278 | (setq iswitchb-virtual-buffers nil) |
| 1279 | (let ((head recentf-list) name) | 1279 | (let ((head recentf-list) name) |
| 1280 | (while head | 1280 | (while head |
| @@ -1289,15 +1289,30 @@ Modified from `icomplete-completions'." | |||
| 1289 | (setq iswitchb-virtual-buffers | 1289 | (setq iswitchb-virtual-buffers |
| 1290 | (cons (cons name (car head)) | 1290 | (cons (cons name (car head)) |
| 1291 | iswitchb-virtual-buffers))) | 1291 | iswitchb-virtual-buffers))) |
| 1292 | (setq head (cdr head))) | 1292 | (setq head (cdr head)))) |
| 1293 | (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) | 1293 | (let ((head bookmark-alist) name path) |
| 1294 | comps (mapcar 'car iswitchb-virtual-buffers)) | 1294 | (while head |
| 1295 | (if (and (setq path (cdr (assq 'filename (cdar head)))) | ||
| 1296 | (setq name (file-name-nondirectory path)) | ||
| 1297 | (string-match (if iswitchb-regexp | ||
| 1298 | iswitchb-text | ||
| 1299 | (regexp-quote iswitchb-text)) name) | ||
| 1300 | (null (get-file-buffer path)) | ||
| 1301 | (not (assoc name iswitchb-virtual-buffers)) | ||
| 1302 | (not (iswitchb-ignore-buffername-p name)) | ||
| 1303 | (file-exists-p path)) | ||
| 1304 | (setq iswitchb-virtual-buffers | ||
| 1305 | (cons (cons name path) | ||
| 1306 | iswitchb-virtual-buffers))) | ||
| 1307 | (setq head (cdr head)))) | ||
| 1308 | (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) | ||
| 1309 | comps (mapcar 'car iswitchb-virtual-buffers)) | ||
| 1295 | (let ((comp comps)) | 1310 | (let ((comp comps)) |
| 1296 | (while comp | 1311 | (while comp |
| 1297 | (put-text-property 0 (length (car comp)) | 1312 | (put-text-property 0 (length (car comp)) |
| 1298 | 'face 'iswitchb-virtual-matches | 1313 | 'face 'iswitchb-virtual-matches |
| 1299 | (car comp)) | 1314 | (car comp)) |
| 1300 | (setq comp (cdr comp)))))) | 1315 | (setq comp (cdr comp))))) |
| 1301 | 1316 | ||
| 1302 | (cond ((null comps) (format " %sNo match%s" | 1317 | (cond ((null comps) (format " %sNo match%s" |
| 1303 | open-bracket-determined | 1318 | open-bracket-determined |