197 |
respectively, |
respectively, |
198 |
|
|
199 |
and return t." |
and return t." |
200 |
(let* ((minibuffer-string (buffer-string)) |
(let* ((prompt-end (minibuffer-prompt-end)) |
201 |
(end-index (or (string-match "," minibuffer-string (1- (point))) |
(minibuffer-string (buffer-substring prompt-end (point-max))) |
202 |
(1- (point-max)))) |
(end-index (or (string-match "," minibuffer-string (- (point) prompt-end)) |
203 |
|
(- (point-max) prompt-end))) |
204 |
(target-string (substring minibuffer-string 0 end-index)) |
(target-string (substring minibuffer-string 0 end-index)) |
205 |
(index (or (string-match |
(index (or (string-match |
206 |
(concat crm-separator "\\([^" crm-separator "]*\\)$") |
(concat crm-separator "\\([^" crm-separator "]*\\)$") |
216 |
(setq crm-beginning-of-element (match-beginning 1)) |
(setq crm-beginning-of-element (match-beginning 1)) |
217 |
(setq crm-end-of-element end-index) |
(setq crm-end-of-element end-index) |
218 |
;; string to the left of the current element |
;; string to the left of the current element |
219 |
(setq crm-left-of-element (substring target-string 0 (match-beginning 1))) |
(setq crm-left-of-element |
220 |
|
(substring target-string 0 (match-beginning 1))) |
221 |
;; the current element |
;; the current element |
222 |
(setq crm-current-element (match-string 1 target-string)) |
(setq crm-current-element (match-string 1 target-string)) |
223 |
;; string to the right of the current element |
;; string to the right of the current element |
289 |
|
|
290 |
(if completedp |
(if completedp |
291 |
(progn |
(progn |
292 |
(erase-buffer) |
(delete-region (minibuffer-prompt-end) (point-max)) |
293 |
(insert crm-left-of-element completion) |
(insert crm-left-of-element completion) |
294 |
;; (if crm-complete-up-to-point |
;; (if crm-complete-up-to-point |
295 |
;; (insert crm-separator)) |
;; (insert crm-separator)) |