mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
(crm-find-current-element)
(crm-minibuffer-complete-and-exit): Handle minibuffer prompt.
This commit is contained in:
parent
224d108edc
commit
df5f6df1de
1 changed files with 4 additions and 3 deletions
|
|
@ -214,7 +214,7 @@ and return t."
|
||||||
(progn
|
(progn
|
||||||
;;
|
;;
|
||||||
(setq crm-beginning-of-element (match-beginning 1))
|
(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
|
;; string to the left of the current element
|
||||||
(setq crm-left-of-element
|
(setq crm-left-of-element
|
||||||
(substring target-string 0 (match-beginning 1)))
|
(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
|
(setq result
|
||||||
(catch 'crm-exit
|
(catch 'crm-exit
|
||||||
|
|
||||||
(if (eq (point-min) (point-max))
|
(if (eq (minibuffer-prompt-end) (point-max))
|
||||||
(throw 'crm-exit t))
|
(throw 'crm-exit t))
|
||||||
|
|
||||||
;; TODO: this test is suspect?
|
;; TODO: this test is suspect?
|
||||||
|
|
@ -508,7 +508,8 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c"
|
||||||
nil
|
nil
|
||||||
(if (equal result "check")
|
(if (equal result "check")
|
||||||
(let ((check-strings
|
(let ((check-strings
|
||||||
(crm-strings-completed-p (buffer-string))))
|
(crm-strings-completed-p
|
||||||
|
(buffer-substring (minibuffer-prompt-end) (point-max)))))
|
||||||
;; check all of minibuffer
|
;; check all of minibuffer
|
||||||
(if (eq check-strings t)
|
(if (eq check-strings t)
|
||||||
(throw 'exit nil)
|
(throw 'exit nil)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue