summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-07-04 01:04:32 +0000
committerJuri Linkov <juri@jurta.org>2005-07-04 01:04:32 +0000
commitdf5f6df1de2fa8ea78e9e96efae4f4a6732a07d9 (patch)
tree9fb10a1b76d4b75b3ccf60be7b31f9196f202e23
parent224d108edcfc2d6d156434aeac4cdd828fc8c679 (diff)
downloademacs-df5f6df1de2fa8ea78e9e96efae4f4a6732a07d9.tar.gz
(crm-find-current-element)
(crm-minibuffer-complete-and-exit): Handle minibuffer prompt.
-rw-r--r--lisp/emacs-lisp/crm.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 5f54abf4e96..d5d385c2c7b 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -214,7 +214,7 @@ and return t."
(progn
;;
(setq crm-beginning-of-element (match-beginning 1))
- (setq crm-end-of-element end-index)
+ (setq crm-end-of-element (+ end-index prompt-end))
;; string to the left of the current element
(setq crm-left-of-element
(substring target-string 0 (match-beginning 1)))
@@ -482,7 +482,7 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c"
(setq result
(catch 'crm-exit
- (if (eq (point-min) (point-max))
+ (if (eq (minibuffer-prompt-end) (point-max))
(throw 'crm-exit t))
;; TODO: this test is suspect?
@@ -508,7 +508,8 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c"
nil
(if (equal result "check")
(let ((check-strings
- (crm-strings-completed-p (buffer-string))))
+ (crm-strings-completed-p
+ (buffer-substring (minibuffer-prompt-end) (point-max)))))
;; check all of minibuffer
(if (eq check-strings t)
(throw 'exit nil)