diff options
| -rw-r--r-- | lisp/cedet/semantic/complete.el | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 5bd76f018a1..ba640a2c5f0 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el | |||
| @@ -209,7 +209,8 @@ HISTORY is a symbol representing a variable to story the history in." | |||
| 209 | (semantic-completion-display-engine displayor) | 209 | (semantic-completion-display-engine displayor) |
| 210 | (semantic-complete-active-default nil) | 210 | (semantic-complete-active-default nil) |
| 211 | (semantic-complete-current-matched-tag nil) | 211 | (semantic-complete-current-matched-tag nil) |
| 212 | (default-as-tag (semantic-complete-default-to-tag default-tag)) | 212 | (default-as-tag (save-current-buffer |
| 213 | (semantic-complete-default-to-tag default-tag))) | ||
| 213 | (default-as-string (when (semantic-tag-p default-as-tag) | 214 | (default-as-string (when (semantic-tag-p default-as-tag) |
| 214 | (semantic-tag-name default-as-tag))) | 215 | (semantic-tag-name default-as-tag))) |
| 215 | ) | 216 | ) |
| @@ -1026,14 +1027,19 @@ Output must be in semanticdb Find result format." | |||
| 1026 | (eq (compare-strings | 1027 | (eq (compare-strings |
| 1027 | prefix 0 nil | 1028 | prefix 0 nil |
| 1028 | last-prefix 0 (length prefix)) t)) | 1029 | last-prefix 0 (length prefix)) t)) |
| 1029 | ;; The new prefix is a substring of the old | 1030 | ;; The new prefix is a substring of the old |
| 1030 | ;; prefix, and it's longer than one character. | 1031 | ;; prefix, and it's longer than one character. |
| 1031 | ;; Perform a full search to pull in additional | 1032 | ;; Perform a full search to pull in additional |
| 1032 | ;; matches. | 1033 | ;; matches. |
| 1033 | (let ((context (semantic-analyze-current-context (point)))) | 1034 | (when (slot-exists-p obj 'context) |
| 1034 | ;; Set new context and make first-pass-completions | 1035 | ;; If this collector wants an analyzed context, |
| 1035 | ;; unbound so that they are newly calculated. | 1036 | ;; then restart here. |
| 1036 | (oset obj context context) | 1037 | (save-current-buffer |
| 1038 | (set-buffer (oref obj buffer)) | ||
| 1039 | (let ((context (semantic-analyze-current-context (point)))) | ||
| 1040 | ;; Set new context and make first-pass-completions | ||
| 1041 | ;; unbound so that they are newly calculated. | ||
| 1042 | (oset obj context context))) | ||
| 1037 | (when (slot-boundp obj 'first-pass-completions) | 1043 | (when (slot-boundp obj 'first-pass-completions) |
| 1038 | (slot-makeunbound obj 'first-pass-completions))) | 1044 | (slot-makeunbound obj 'first-pass-completions))) |
| 1039 | nil))) | 1045 | nil))) |