diff options
| author | Miles Bader | 2000-12-01 03:35:56 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-12-01 03:35:56 +0000 |
| commit | dea0a87de4b7280d76c0c0f4c98390cfaf8ed4a6 (patch) | |
| tree | c780ba30067eebb1dd132888878040dadb8a4879 | |
| parent | b90d06b07e2a7e5bc7202c49a7f6e35bab4adc10 (diff) | |
| download | emacs-dea0a87de4b7280d76c0c0f4c98390cfaf8ed4a6.tar.gz emacs-dea0a87de4b7280d76c0c0f4c98390cfaf8ed4a6.zip | |
(file-cache-directory-name, file-cache-minibuffer-complete):
Ignore the minibuffer prompt.
From Milan Zamazal <Milan.Zamazal@qbizm.com>:
(file-cache-minibuffer-complete): Don't try to delete the minibuffer prompt.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/filecache.el | 16 |
2 files changed, 20 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24038acf596..ee1eddc4d3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2000-12-01 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (minibuffer-contents) | ||
| 4 | (minibuffer-contents-no-properties, delete-minibuffer-contents): | ||
| 5 | New functions. | ||
| 6 | * filecache.el (file-cache-directory-name) | ||
| 7 | (file-cache-minibuffer-complete): Ignore the minibuffer prompt. | ||
| 8 | |||
| 9 | From Milan Zamazal <Milan.Zamazal@qbizm.com>: | ||
| 10 | * filecache.el (file-cache-minibuffer-complete): Don't try to | ||
| 11 | delete the minibuffer prompt. | ||
| 12 | |||
| 1 | 2000-11-30 Dave Love <fx@gnu.org> | 13 | 2000-11-30 Dave Love <fx@gnu.org> |
| 2 | 14 | ||
| 3 | * cus-start.el: Fix read-buffer-function type. | 15 | * cus-start.el: Fix read-buffer-function type. |
diff --git a/lisp/filecache.el b/lisp/filecache.el index 73baa8487ef..e421e5dd8f0 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Keywords: convenience | 5 | ;; Keywords: convenience |
| 6 | ;; Time-stamp: <2000-08-31 19:44:13 pbreton> | 6 | ;; Time-stamp: <2000-08-31 19:44:13 pbreton> |
| 7 | ;; | 7 | ;; |
| 8 | ;; Copyright (C) 1996 Free Software Foundation, Inc. | 8 | ;; Copyright (C) 1996, 2000 Free Software Foundation, Inc. |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -446,7 +446,7 @@ or the optional REGEXP argument." | |||
| 446 | (error "No directory found for key %s" file)) | 446 | (error "No directory found for key %s" file)) |
| 447 | ;; Multiple elements | 447 | ;; Multiple elements |
| 448 | (t | 448 | (t |
| 449 | (let* ((minibuffer-dir (file-name-directory (buffer-string))) | 449 | (let* ((minibuffer-dir (file-name-directory (minibuffer-contents))) |
| 450 | (dir-list (member minibuffer-dir directory-list)) | 450 | (dir-list (member minibuffer-dir directory-list)) |
| 451 | ) | 451 | ) |
| 452 | (setq directory | 452 | (setq directory |
| @@ -503,7 +503,7 @@ the name is considered already unique; only the second substitution | |||
| 503 | ( | 503 | ( |
| 504 | (completion-ignore-case file-cache-completion-ignore-case) | 504 | (completion-ignore-case file-cache-completion-ignore-case) |
| 505 | (case-fold-search file-cache-case-fold-search) | 505 | (case-fold-search file-cache-case-fold-search) |
| 506 | (string (file-name-nondirectory (buffer-string))) | 506 | (string (file-name-nondirectory (minibuffer-contents))) |
| 507 | (completion-string (try-completion string file-cache-alist)) | 507 | (completion-string (try-completion string file-cache-alist)) |
| 508 | (completion-list) | 508 | (completion-list) |
| 509 | (len) | 509 | (len) |
| @@ -513,9 +513,9 @@ the name is considered already unique; only the second substitution | |||
| 513 | ;; If it's the only match, replace the original contents | 513 | ;; If it's the only match, replace the original contents |
| 514 | ((or arg (eq completion-string t)) | 514 | ((or arg (eq completion-string t)) |
| 515 | (setq file-cache-string (file-cache-file-name string)) | 515 | (setq file-cache-string (file-cache-file-name string)) |
| 516 | (if (string= file-cache-string (buffer-string)) | 516 | (if (string= file-cache-string (minibuffer-contents)) |
| 517 | (file-cache-temp-minibuffer-message file-cache-sole-match-message) | 517 | (file-cache-temp-minibuffer-message file-cache-sole-match-message) |
| 518 | (delete-region (minibuffer-prompt-end) (point-max)) | 518 | (delete-minibuffer-contents) |
| 519 | (insert-string file-cache-string) | 519 | (insert-string file-cache-string) |
| 520 | (if file-cache-multiple-directory-message | 520 | (if file-cache-multiple-directory-message |
| 521 | (file-cache-temp-minibuffer-message | 521 | (file-cache-temp-minibuffer-message |
| @@ -531,7 +531,7 @@ the name is considered already unique; only the second substitution | |||
| 531 | (if (and (eq last-command this-command) | 531 | (if (and (eq last-command this-command) |
| 532 | (string= file-cache-last-completion completion-string)) | 532 | (string= file-cache-last-completion completion-string)) |
| 533 | (progn | 533 | (progn |
| 534 | (delete-region (minibuffer-prompt-end) (point-max)) | 534 | (delete-minibuffer-contents) |
| 535 | (insert-string (file-cache-file-name completion-string)) | 535 | (insert-string (file-cache-file-name completion-string)) |
| 536 | (setq file-cache-last-completion nil) | 536 | (setq file-cache-last-completion nil) |
| 537 | ) | 537 | ) |
| @@ -557,10 +557,10 @@ the name is considered already unique; only the second substitution | |||
| 557 | ) | 557 | ) |
| 558 | ) | 558 | ) |
| 559 | (setq file-cache-string (file-cache-file-name completion-string)) | 559 | (setq file-cache-string (file-cache-file-name completion-string)) |
| 560 | (if (string= file-cache-string (buffer-string)) | 560 | (if (string= file-cache-string (minibuffer-contents)) |
| 561 | (file-cache-temp-minibuffer-message | 561 | (file-cache-temp-minibuffer-message |
| 562 | file-cache-sole-match-message) | 562 | file-cache-sole-match-message) |
| 563 | (delete-region (minibuffer-prompt-end) (point-max)) | 563 | (delete-minibuffer-contents) |
| 564 | (insert-string file-cache-string) | 564 | (insert-string file-cache-string) |
| 565 | (if file-cache-multiple-directory-message | 565 | (if file-cache-multiple-directory-message |
| 566 | (file-cache-temp-minibuffer-message | 566 | (file-cache-temp-minibuffer-message |