[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge fdd5968 15/50: semantic: New func
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge fdd5968 15/50: semantic: New function to calculate scope around tag |
Date: |
Wed, 25 Jan 2017 22:15:21 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit fdd5968c0b451cd38a923541de8aa5ce2422bfa8
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: New function to calculate scope around tag
* lisp/cedet/semantic/scope.el (semantic-calculate-scope-for-tag):
New.
---
lisp/cedet/semantic/scope.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 9bade56..272f37d 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -767,6 +767,16 @@ The class returned from the scope calculation is variable
;; can reset the scope cache without affecting others.
(clone scopecache)))))
+(defun semantic-calculate-scope-for-tag (tag)
+ "Calculate the current scope that is around TAG.
+Return nil if TAG has no position, or we cannot otherwise find a scope.
+Use this when pulling a datatype off TAG so when it is looked up
+it has the right context around it."
+ (save-current-buffer
+ (when (semantic-tag-with-position-p tag)
+ (semantic-go-to-tag tag)
+ (semantic-calculate-scope (point)))) )
+
(defun semantic-scope-find (name &optional class scope-in)
"Find the tag with NAME, and optional CLASS in the current SCOPE-IN.
Searches various elements of the scope for NAME. Return ALL the
- [Emacs-diffs] branch scratch/last-cedet-merge created (now d2a57bd), David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ca20c99 01/50: semantic: make semanticdb-default-find-index-class buffer-local, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 40dd3d9 02/50: semantic: Do not add enum-type for every type, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 5d6f4b8 05/50: EDE: Fix slot type in ede-proj-target-makefile, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 5776e7c 06/50: EDE: Fallback to project-linux-build-directory-default if necessary, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 05d6b4b 03/50: semantic: Apply enum-type to all members, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge fa84466 07/50: semantic: Fix current symbol info, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge a7276f6 08/50: ; semantic: Add TODO comment regarding arg indexing, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 307b510 09/50: semantic: Deal with missing prefix when completing symbol, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge fdd5968 15/50: semantic: New function to calculate scope around tag,
David Engster <=
- [Emacs-diffs] scratch/last-cedet-merge ebc59a5 19/50: semantic: Accept FLAGS parameter for srecode-template-mode, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 47471b9 12/50: EDE: Add missing require and silence byte compiler, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 7308eaf 18/50: semantic: Accept FLAGS parameter for makefile-mode for analyzing completions, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge b4d1399 14/50: EDE: Rework config file detection, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 95f8a69 29/50: semantic: More C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge deaa8c9 24/50: semantic: New function to find library with macro definition, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 0391760 13/50: semantic: Do not strip '*' from operator, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 6ca095c 21/50: semantic: Add autoload for Add autoload for `semantic-analyze-debug-assist', David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge f3674d0 33/50: semantic: Parse C++ override/final correctly, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge fb127f2 34/50: semantic: C grammar fixes, David Engster, 2017/01/25