diff options
| author | Juri Linkov | 2005-07-04 01:04:32 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-07-04 01:04:32 +0000 |
| commit | df5f6df1de2fa8ea78e9e96efae4f4a6732a07d9 (patch) | |
| tree | 9fb10a1b76d4b75b3ccf60be7b31f9196f202e23 | |
| parent | 224d108edcfc2d6d156434aeac4cdd828fc8c679 (diff) | |
| download | emacs-df5f6df1de2fa8ea78e9e96efae4f4a6732a07d9.tar.gz emacs-df5f6df1de2fa8ea78e9e96efae4f4a6732a07d9.zip | |
(crm-find-current-element)
(crm-minibuffer-complete-and-exit): Handle minibuffer prompt.
| -rw-r--r-- | lisp/emacs-lisp/crm.el | 7 |
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." | |||
| 214 | (progn | 214 | (progn |
| 215 | ;; | 215 | ;; |
| 216 | (setq crm-beginning-of-element (match-beginning 1)) | 216 | (setq crm-beginning-of-element (match-beginning 1)) |
| 217 | (setq crm-end-of-element end-index) | 217 | (setq crm-end-of-element (+ end-index prompt-end)) |
| 218 | ;; string to the left of the current element | 218 | ;; string to the left of the current element |
| 219 | (setq crm-left-of-element | 219 | (setq crm-left-of-element |
| 220 | (substring target-string 0 (match-beginning 1))) | 220 | (substring target-string 0 (match-beginning 1))) |
| @@ -482,7 +482,7 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" | |||
| 482 | (setq result | 482 | (setq result |
| 483 | (catch 'crm-exit | 483 | (catch 'crm-exit |
| 484 | 484 | ||
| 485 | (if (eq (point-min) (point-max)) | 485 | (if (eq (minibuffer-prompt-end) (point-max)) |
| 486 | (throw 'crm-exit t)) | 486 | (throw 'crm-exit t)) |
| 487 | 487 | ||
| 488 | ;; TODO: this test is suspect? | 488 | ;; TODO: this test is suspect? |
| @@ -508,7 +508,8 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" | |||
| 508 | nil | 508 | nil |
| 509 | (if (equal result "check") | 509 | (if (equal result "check") |
| 510 | (let ((check-strings | 510 | (let ((check-strings |
| 511 | (crm-strings-completed-p (buffer-string)))) | 511 | (crm-strings-completed-p |
| 512 | (buffer-substring (minibuffer-prompt-end) (point-max))))) | ||
| 512 | ;; check all of minibuffer | 513 | ;; check all of minibuffer |
| 513 | (if (eq check-strings t) | 514 | (if (eq check-strings t) |
| 514 | (throw 'exit nil) | 515 | (throw 'exit nil) |