summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-12-01 03:35:56 +0000
committerMiles Bader <miles@gnu.org>2000-12-01 03:35:56 +0000
commitdea0a87de4b7280d76c0c0f4c98390cfaf8ed4a6 (patch)
treec780ba30067eebb1dd132888878040dadb8a4879
parentb90d06b07e2a7e5bc7202c49a7f6e35bab4adc10 (diff)
downloademacs-dea0a87de4b7280d76c0c0f4c98390cfaf8ed4a6.tar.gz
(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/ChangeLog12
-rw-r--r--lisp/filecache.el16
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 @@
+2000-12-01 Miles Bader <miles@gnu.org>
+
+ * simple.el (minibuffer-contents)
+ (minibuffer-contents-no-properties, delete-minibuffer-contents):
+ New functions.
+ * filecache.el (file-cache-directory-name)
+ (file-cache-minibuffer-complete): Ignore the minibuffer prompt.
+
+ From Milan Zamazal <Milan.Zamazal@qbizm.com>:
+ * filecache.el (file-cache-minibuffer-complete): Don't try to
+ delete the minibuffer prompt.
+
2000-11-30 Dave Love <fx@gnu.org>
* 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 @@
;; Keywords: convenience
;; Time-stamp: <2000-08-31 19:44:13 pbreton>
;;
-;; Copyright (C) 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -446,7 +446,7 @@ or the optional REGEXP argument."
(error "No directory found for key %s" file))
;; Multiple elements
(t
- (let* ((minibuffer-dir (file-name-directory (buffer-string)))
+ (let* ((minibuffer-dir (file-name-directory (minibuffer-contents)))
(dir-list (member minibuffer-dir directory-list))
)
(setq directory
@@ -503,7 +503,7 @@ the name is considered already unique; only the second substitution
(
(completion-ignore-case file-cache-completion-ignore-case)
(case-fold-search file-cache-case-fold-search)
- (string (file-name-nondirectory (buffer-string)))
+ (string (file-name-nondirectory (minibuffer-contents)))
(completion-string (try-completion string file-cache-alist))
(completion-list)
(len)
@@ -513,9 +513,9 @@ the name is considered already unique; only the second substitution
;; If it's the only match, replace the original contents
((or arg (eq completion-string t))
(setq file-cache-string (file-cache-file-name string))
- (if (string= file-cache-string (buffer-string))
+ (if (string= file-cache-string (minibuffer-contents))
(file-cache-temp-minibuffer-message file-cache-sole-match-message)
- (delete-region (minibuffer-prompt-end) (point-max))
+ (delete-minibuffer-contents)
(insert-string file-cache-string)
(if file-cache-multiple-directory-message
(file-cache-temp-minibuffer-message
@@ -531,7 +531,7 @@ the name is considered already unique; only the second substitution
(if (and (eq last-command this-command)
(string= file-cache-last-completion completion-string))
(progn
- (delete-region (minibuffer-prompt-end) (point-max))
+ (delete-minibuffer-contents)
(insert-string (file-cache-file-name completion-string))
(setq file-cache-last-completion nil)
)
@@ -557,10 +557,10 @@ the name is considered already unique; only the second substitution
)
)
(setq file-cache-string (file-cache-file-name completion-string))
- (if (string= file-cache-string (buffer-string))
+ (if (string= file-cache-string (minibuffer-contents))
(file-cache-temp-minibuffer-message
file-cache-sole-match-message)
- (delete-region (minibuffer-prompt-end) (point-max))
+ (delete-minibuffer-contents)
(insert-string file-cache-string)
(if file-cache-multiple-directory-message
(file-cache-temp-minibuffer-message