emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/last-cedet-merge 02644fe 36/50: semantic: Add miss


From: David Engster
Subject: [Emacs-diffs] scratch/last-cedet-merge 02644fe 36/50: semantic: Add missing save-excursion for scope calculation
Date: Wed, 25 Jan 2017 22:15:22 +0000 (UTC)

branch: scratch/last-cedet-merge
commit 02644fe47bc8380104e16a05e9e980f30c0c264a
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>

    semantic: Add missing save-excursion for scope calculation
    
    * lisp/cedet/semantic/scope.el (semantic-calculate-scope-for-tag):
     Also save-excursion in case the internal jump is local and moves
     point.
---
 lisp/cedet/semantic/scope.el |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 0ac994c..36a08d2 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -774,10 +774,11 @@ The class returned from the scope calculation is variable
 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)))) )
+  (save-excursion
+    (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]