[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge b4bcc84 32/50: semantic: completi
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge b4bcc84 32/50: semantic: completion fixes |
Date: |
Wed, 25 Jan 2017 22:15:22 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit b4bcc8424f96db6d3357cc0ba5c45fcaedf6f0d3
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: completion fixes
* lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine):
Don't allow buffer switching.
(semantic-collector-calculate-completions): Protect against
cases where the context being completed with isn't a smart completion case.
---
lisp/cedet/semantic/complete.el | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 5bd76f0..ba640a2 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."
(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)))
)
@@ -1026,14 +1027,19 @@ Output must be in semanticdb Find result format."
(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)))
- [Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorporate local scope when finding type, (continued)
- [Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorporate local scope when finding type, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ec4505d 17/50: semantic: Accept FLAGS in texinfo-mode for analyzing completions, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 0a2b38b 26/50: EDE: Expand file name, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 2b42323 35/50: EDE: Fix for project detection, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge cfd7139 28/50: semantic: Some C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 278c06c 31/50: semantic: Optimize 'typeformbase' in C grammar, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 8daca76 30/50: semantic: C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 74263b1 37/50: semantic: Change unary expression rule, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge cfc56f5 38/50: semantic: Fix for db-global, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ebc8418 40/50: semantic: Check if slot is bound, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge b4bcc84 32/50: semantic: completion fixes,
David Engster <=
- [Emacs-diffs] scratch/last-cedet-merge b893e8a 41/50: semantic: Allow empty type relation separation character, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 592b5fe 48/50: semantic: Improve C++ 'friend' parsing, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 742013b 42/50: semantic: Improve grammar-mode, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 9c2feac 49/50: CEDET: Fix "obsolete name arg [...] to constructor" warnings, David Engster, 2017/01/25