/[emacs]/emacs/lisp/emacs-lisp/crm.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/crm.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by miles, Mon Sep 1 15:45:20 2003 UTC revision 1.6 by rms, Fri Jul 1 01:10:42 2005 UTC
# Line 197  If an element is found, bind: Line 197  If an element is found, bind:
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 "]*\\)$")
# Line 215  and return t." Line 216  and return t."
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
# Line 287  The meanings of the return values are: Line 289  The meanings of the return values are:
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))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26