(buffer-substring (nth 1 res) (nth 2 res))
table pred))
(sortfun (cdr (assq 'display-sort-function meta)))
- (boundaries (completion-boundaries arg table pred ""))
(candidates (completion-all-completions arg table pred (length arg)))
- (last (last candidates 1)))
- (when (numberp (cdr last))
+ (last (last candidates))
+ (base-size (and (numberp (cdr last)) (cdr last))))
+ (when base-size
(setcdr last nil))
(when sortfun
(setq candidates (funcall sortfun candidates)))
- (if (not (zerop (car boundaries)))
- (let ((before (substring arg 0 (car boundaries))))
+ (if (not (zerop (or base-size 0)))
+ (let ((before (substring arg 0 base-size)))
(mapcar (lambda (candidate)
(concat before candidate))
candidates))