(base-position completion-base-position)
(insert-function completion-list-insert-choice-function)
(completion-no-auto-exit (if no-exit t completion-no-auto-exit))
- (choice
- (save-excursion
- (goto-char (posn-point (event-start event)))
- (let (beg)
- (cond
- ((and (not (eobp))
- (get-text-property (point) 'completion--string))
- (setq beg (1+ (point))))
- ((and (not (bobp))
- (get-text-property (1- (point)) 'completion--string))
- (setq beg (point)))
- (t (error "No completion here")))
- (setq beg (or (previous-single-property-change
- beg 'completion--string)
- beg))
- (get-text-property beg 'completion--string)))))
-
- (unless (buffer-live-p buffer)
- (error "Destination buffer is dead"))
+ (choice (get-text-property (posn-point (event-start event))
+ 'completion--string)))
+ (unless choice (error "No completion here"))
+ (unless (buffer-live-p buffer) (error "Destination buffer is dead"))
(unless no-quit
(quit-window nil (posn-window (event-start event))))
(let ((mstate completions-minibuffer-state))