* cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
[bpt/emacs.git] / lisp / cedet / semantic / analyze / debug.el
index f7c3907..2b5325f 100644 (file)
@@ -104,8 +104,7 @@ Argument COMP are possible completions here."
        ;; NOTE: This line is copied from semantic-analyze-current-context.
        ;;       You will need to update both places.
        (condition-case err
-           (save-excursion
-             (set-buffer origbuf)
+           (with-current-buffer origbuf
              (let* ((position (or (cdr-safe (oref ctxt bounds)) (point)))
                     (prefixtypes nil) ; Used as type return
                     (scope (semantic-calculate-scope position))
@@ -246,13 +245,11 @@ with the command:
          (princ "\nSemantic has found the datatype ")
          (semantic-analyzer-debug-insert-tag dt)
          (if (or (not (semantic-equivalent-tag-p ots dt))
-                 (not (save-excursion
-                        (set-buffer orig-buffer)
+                 (not (with-current-buffer orig-buffer
                         (car (semantic-analyze-dereference-metatype
                          ots (oref ctxt scope))))))
              (let ((lasttype ots)
-                   (nexttype (save-excursion
-                               (set-buffer orig-buffer)
+                   (nexttype (with-current-buffer orig-buffer
                                (car (semantic-analyze-dereference-metatype
                                 ots (oref ctxt scope))))))
                (if (eq nexttype lasttype)
@@ -274,8 +271,7 @@ with the command:
                  (princ "\n")
                  (setq lasttype nexttype
                        nexttype
-                       (save-excursion
-                         (set-buffer orig-buffer)
+                       (with-current-buffer orig-buffer
                          (car (semantic-analyze-dereference-metatype
                           nexttype (oref ctxt scope)))))
                  )
@@ -391,21 +387,17 @@ or implementing a version specific to ")
   (let ((inc (semantic-find-tags-by-class 'include table))
        ;;(path (semanticdb-find-test-translate-path-no-loading))
        (unk
-        (save-excursion
-          (set-buffer (semanticdb-get-buffer table))
+        (with-current-buffer (semanticdb-get-buffer table)
           semanticdb-find-lost-includes))
        (ip
-        (save-excursion
-          (set-buffer (semanticdb-get-buffer table))
+        (with-current-buffer (semanticdb-get-buffer table)
           semantic-dependency-system-include-path))
        (edeobj
-        (save-excursion
-          (set-buffer (semanticdb-get-buffer table))
+        (with-current-buffer (semanticdb-get-buffer table)
           (and (boundp 'ede-object)
                ede-object)))
        (edeproj
-        (save-excursion
-          (set-buffer (semanticdb-get-buffer table))
+        (with-current-buffer (semanticdb-get-buffer table)
           (and (boundp 'ede-object-project)
                ede-object-project))))
 
@@ -589,9 +581,8 @@ PARENT is a possible parent (by nesting) tag."
 Look for key expressions, and add push-buttons near them."
   (let ((orig-buffer (make-marker)))
     (set-marker orig-buffer (point) (current-buffer))
-    (save-excursion
-      ;; Get a buffer ready.
-      (set-buffer "*Help*")
+    ;; Get a buffer ready.
+    (with-current-buffer "*Help*"
       (toggle-read-only -1)
       (goto-char (point-min))
       (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)