(semantic-completion-display-engine displayor)
(semantic-complete-active-default nil)
(semantic-complete-current-matched-tag nil)
- (default-as-tag (semantic-complete-default-to-tag default-tag))
+ (default-as-tag (save-current-buffer
+ (semantic-complete-default-to-tag default-tag)))
(default-as-string (when (semantic-tag-p default-as-tag)
(semantic-tag-name default-as-tag)))
)
(eq (compare-strings
prefix 0 nil
last-prefix 0 (length prefix)) t))
- ;; The new prefix is a substring of the old
- ;; prefix, and it's longer than one character.
- ;; Perform a full search to pull in additional
- ;; matches.
- (let ((context (semantic-analyze-current-context (point))))
- ;; Set new context and make first-pass-completions
- ;; unbound so that they are newly calculated.
- (oset obj context context)
+ ;; The new prefix is a substring of the old
+ ;; prefix, and it's longer than one character.
+ ;; Perform a full search to pull in additional
+ ;; matches.
+ (when (slot-exists-p obj 'context)
+ ;; If this collector wants an analyzed context,
+ ;; then restart here.
+ (save-current-buffer
+ (set-buffer (oref obj buffer))
+ (let ((context (semantic-analyze-current-context (point))))
+ ;; Set new context and make first-pass-completions
+ ;; unbound so that they are newly calculated.
+ (oset obj context context)))
(when (slot-boundp obj 'first-pass-completions)
(slot-makeunbound obj 'first-pass-completions)))
nil)))