* cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag):
* cedet/semantic/symref/grep.el (semantic-symref-perform-search):
* cedet/semantic/bovine/gcc.el (semantic-gcc-query):
* cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token):
* cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons)
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype)
(semantic-analyzer-debug-insert-include-summary):
* cedet/semantic/util.el (semantic-file-tag-table):
(semantic-describe-buffer-var-helper, semantic-something-to-tag-table)
(semantic-recursive-find-nonterminal-by-name):
* cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default):
* cedet/semantic/tag-file.el (semantic-prototype-file):
* cedet/semantic/symref.el (semantic-symref-parse-tool-output):
* cedet/semantic/sb.el (semantic-sb-fetch-tag-table):
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
* cedet/semantic/idle.el (semantic-idle-work-for-one-buffer):
(semantic-idle-summary-maybe-highlight):
* cedet/semantic/ia-sb.el (semantic-ia-speedbar)
(semantic-ia-sb-tag-info):
* cedet/semantic/grammar.el (semantic-analyze-possible-completions):
* cedet/semantic/find.el (semantic-brute-find-tag-by-position):
* cedet/semantic/ede-grammar.el (project-compile-target):
(ede-proj-makefile-insert-variables):
* cedet/semantic/debug.el (semantic-debug-set-parser-location):
(semantic-debug-set-source-location, semantic-debug-interface-layout)
(semantic-debug-mode, semantic-debug):
* cedet/semantic/db.el (semanticdb-needs-refresh-p):
* cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer):
* cedet/semantic/db-javascript.el (semanticdb-equivalent-mode):
* cedet/semantic/db-find.el (semanticdb-find-log-new-search)
(semanticdb-find-translate-path-includes--internal)
(semanticdb-reset-log, semanticdb-find-log-activity):
* cedet/semantic/db-file.el (object-write):
* cedet/semantic/db-el.el (semanticdb-equivalent-mode):
* cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p)
(semanticdb-create-ebrowse-database):
* cedet/semantic/db-debug.el (semanticdb-table-sanity-check):
* cedet/semantic/complete.el (semantic-displayor-focus-request)
(semantic-collector-calculate-completions-raw)
(semantic-complete-read-tag-analyzer):
* cedet/semantic/analyze.el (semantic-analyze-pulse):
* cedet/ede/util.el (ede-update-version-in-source):
* cedet/ede/proj.el (project-delete-target):
* cedet/ede/proj-elisp.el (ede-update-version-in-source)
(ede-proj-flush-autoconf):
* cedet/ede/pconf.el (ede-proj-configure-synchronize)
(ede-proj-configure-synchronize):
* cedet/ede/locate.el (ede-locate-file-in-project-impl):
* cedet/ede/linux.el (ede-linux-version):
* cedet/ede/emacs.el (ede-emacs-version):
* cedet/ede/dired.el (ede-dired-add-to-target):
* cedet/ede.el (ede-buffer-header-file, ede-find-target)
(ede-buffer-documentation-files, ede-project-buffers, ede-set)
(ede-target-buffers, ede-buffers, ede-make-project-local-variable):
* cedet/cedet-idutils.el (cedet-idutils-fnid-call):
(cedet-idutils-lid-call, cedet-idutils-expand-filename)
(cedet-idutils-version-check):
* cedet/cedet-global.el (cedet-gnu-global-call):
(cedet-gnu-global-expand-filename, cedet-gnu-global-root)
(cedet-gnu-global-version-check, cedet-gnu-global-scan-hits):
* cedet/cedet-cscope.el (cedet-cscope-call)
(cedet-cscope-expand-filename, cedet-cscope-version-check):
Use with-current-buffer.
* cedet/ede.el (ede-make-project-local-variable)
(ede-set-project-variables, ede-set): Use dolist.
40 files changed:
(let ((b (get-buffer-create "*CEDET CScope*"))
(cd default-directory)
)
(let ((b (get-buffer-create "*CEDET CScope*"))
(cd default-directory)
)
- (save-excursion
- (set-buffer b)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-cscope-command
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-cscope-command
"Expand the FILENAME with CScope.
Return a fully qualified filename."
(interactive "sFile: ")
"Expand the FILENAME with CScope.
Return a fully qualified filename."
(interactive "sFile: ")
- (let* ((ans1 (save-excursion
- (set-buffer (cedet-cscope-call (list "-d" "-L" "-7" filename)))
+ (let* ((ans1 (with-current-buffer
+ (cedet-cscope-call (list "-d" "-L" "-7" filename))
(goto-char (point-min))
(if (looking-at "[^ \n]*cscope: ")
(error "CScope not available")
(goto-char (point-min))
(if (looking-at "[^ \n]*cscope: ")
(error "CScope not available")
(when (interactive-p)
(message "CScope not found."))
nil)
(when (interactive-p)
(message "CScope not found."))
nil)
- (save-excursion
- (set-buffer b)
(goto-char (point-min))
(re-search-forward "cscope: version \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(goto-char (point-min))
(re-search-forward "cscope: version \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
"Call GNU Global with the list of FLAGS."
(let ((b (get-buffer-create "*CEDET Global*"))
(cd default-directory))
"Call GNU Global with the list of FLAGS."
(let ((b (get-buffer-create "*CEDET Global*"))
(cd default-directory))
- (save-excursion
- (set-buffer b)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-global-command
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-global-command
"Expand the FILENAME with GNU Global.
Return a fully qualified filename."
(interactive "sFile: ")
"Expand the FILENAME with GNU Global.
Return a fully qualified filename."
(interactive "sFile: ")
- (let ((ans (save-excursion
- (set-buffer (cedet-gnu-global-call (list "-Pa" filename)))
+ (let ((ans (with-current-buffer (cedet-gnu-global-call (list "-Pa" filename))
(goto-char (point-min))
(if (looking-at "global: ")
(error "GNU Global not available")
(goto-char (point-min))
(if (looking-at "global: ")
(error "GNU Global not available")
If a default starting DIR is not specified, the current buffer's
`default-directory' is used."
(let ((default-directory (or dir default-directory)))
If a default starting DIR is not specified, the current buffer's
`default-directory' is used."
(let ((default-directory (or dir default-directory)))
- (save-excursion
- (set-buffer (cedet-gnu-global-call (list "-pq")))
+ (with-current-buffer (cedet-gnu-global-call (list "-pq"))
(goto-char (point-min))
(when (not (eobp))
(file-name-as-directory
(goto-char (point-min))
(when (not (eobp))
(file-name-as-directory
(when (interactive-p)
(message "GNU Global not found."))
nil)
(when (interactive-p)
(message "GNU Global not found."))
nil)
- (save-excursion
- (set-buffer b)
(goto-char (point-min))
(re-search-forward "GNU GLOBAL \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(goto-char (point-min))
(re-search-forward "GNU GLOBAL \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
"Scan all the hits from the GNU Global output BUFFER."
(let ((hits nil)
(r1 "^\\([^ ]+\\) +\\([0-9]+\\) \\([^ ]+\\) "))
"Scan all the hits from the GNU Global output BUFFER."
(let ((hits nil)
(r1 "^\\([^ ]+\\) +\\([0-9]+\\) \\([^ ]+\\) "))
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(goto-char (point-min))
(while (re-search-forward r1 nil t)
(setq hits (cons (cons (string-to-number (match-string 2))
(goto-char (point-min))
(while (re-search-forward r1 nil t)
(setq hits (cons (cons (string-to-number (match-string 2))
(let ((b (get-buffer-create "*CEDET fnid*"))
(cd default-directory)
)
(let ((b (get-buffer-create "*CEDET fnid*"))
(cd default-directory)
)
- (save-excursion
- (set-buffer b)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-idutils-file-command
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-idutils-file-command
(let ((b (get-buffer-create "*CEDET lid*"))
(cd default-directory)
)
(let ((b (get-buffer-create "*CEDET lid*"))
(cd default-directory)
)
- (save-excursion
- (set-buffer b)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-idutils-token-command
(setq default-directory cd)
(erase-buffer))
(apply 'call-process cedet-idutils-token-command
"Expand the FILENAME with ID Utils.
Return a filename relative to the default directory."
(interactive "sFile: ")
"Expand the FILENAME with ID Utils.
Return a filename relative to the default directory."
(interactive "sFile: ")
- (let ((ans (save-excursion
- (set-buffer (cedet-idutils-fnid-call (list filename)))
+ (let ((ans (with-current-buffer (cedet-idutils-fnid-call (list filename))
(goto-char (point-min))
(if (looking-at "[^ \n]*fnid: ")
(error "ID Utils not available")
(goto-char (point-min))
(if (looking-at "[^ \n]*fnid: ")
(error "ID Utils not available")
(when (interactive-p)
(message "ID Utils not found."))
nil)
(when (interactive-p)
(message "ID Utils not found."))
nil)
- (save-excursion
- (set-buffer b)
(goto-char (point-min))
(re-search-forward "fnid - \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(goto-char (point-min))
(re-search-forward "fnid - \\([0-9.]+\\)" nil t)
(setq rev (match-string 1))
(defmethod ede-buffer-header-file ((this ede-target) buffer)
"There are no default header files in EDE.
Do a quick check to see if there is a Header tag in this buffer."
(defmethod ede-buffer-header-file ((this ede-target) buffer)
"There are no default header files in EDE.
Do a quick check to see if there is a Header tag in this buffer."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t)
(buffer-substring-no-properties (match-beginning 1)
(match-end 1))
(if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t)
(buffer-substring-no-properties (match-beginning 1)
(match-end 1))
(defmethod ede-buffer-documentation-files ((this ede-target) buffer)
"Check for some documentation files for THIS.
Also do a quick check to see if there is a Documentation tag in this BUFFER."
(defmethod ede-buffer-documentation-files ((this ede-target) buffer)
"Check for some documentation files for THIS.
Also do a quick check to see if there is a Documentation tag in this BUFFER."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(if (re-search-forward "::Documentation:: \\([a-zA-Z0-9.]+\\)" nil t)
(buffer-substring-no-properties (match-beginning 1)
(match-end 1))
(if (re-search-forward "::Documentation:: \\([a-zA-Z0-9.]+\\)" nil t)
(buffer-substring-no-properties (match-beginning 1)
(match-end 1))
(defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
(defmethod ede-find-target ((proj ede-project) buffer)
"Fetch the target in PROJ belonging to BUFFER or nil."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(or ede-object
(if (ede-buffer-mine proj buffer)
proj
(or ede-object
(if (ede-buffer-mine proj buffer)
proj
(let ((bl (buffer-list))
(pl nil))
(while bl
(let ((bl (buffer-list))
(pl nil))
(while bl
- (save-excursion
- (set-buffer (car bl))
+ (with-current-buffer (car bl)
(if (and ede-object (eq (ede-current-project) project))
(setq pl (cons (car bl) pl))))
(setq bl (cdr bl)))
(if (and ede-object (eq (ede-current-project) project))
(setq pl (cons (car bl) pl))))
(setq bl (cdr bl)))
(let ((bl (buffer-list))
(pl nil))
(while bl
(let ((bl (buffer-list))
(pl nil))
(while bl
- (save-excursion
- (set-buffer (car bl))
+ (with-current-buffer (car bl)
(if (if (listp ede-object)
(memq target ede-object)
(eq ede-object target))
(if (if (listp ede-object)
(memq target ede-object)
(eq ede-object target))
(let ((bl (buffer-list))
(pl nil))
(while bl
(let ((bl (buffer-list))
(pl nil))
(while bl
- (save-excursion
- (set-buffer (car bl))
+ (with-current-buffer (car bl)
(if ede-object
(setq pl (cons (car bl) pl))))
(setq bl (cdr bl)))
(if ede-object
(setq pl (cons (car bl) pl))))
(setq bl (cdr bl)))
nil
(oset project local-variables (cons (list variable)
(oref project local-variables)))
nil
(oset project local-variables (cons (list variable)
(oref project local-variables)))
- (mapcar (lambda (b) (save-excursion
- (set-buffer b)
- (make-local-variable variable)))
- (ede-project-buffers project))))
+ (dolist (b (ede-project-buffers project))
+ (with-current-buffer b
+ (make-local-variable variable)))))
(defmethod ede-set-project-variables ((project ede-project) &optional buffer)
"Set variables local to PROJECT in BUFFER."
(if (not buffer) (setq buffer (current-buffer)))
(defmethod ede-set-project-variables ((project ede-project) &optional buffer)
"Set variables local to PROJECT in BUFFER."
(if (not buffer) (setq buffer (current-buffer)))
- (save-excursion
- (set-buffer buffer)
- (mapcar (lambda (v)
- (make-local-variable (car v))
- ;; set it's value here?
- (set (car v) (cdr v))
- )
- (oref project local-variables))))
+ (with-current-buffer buffer
+ (dolist (v (oref project local-variables))
+ (make-local-variable (car v))
+ ;; set it's value here?
+ (set (car v) (cdr v)))))
(defun ede-set (variable value &optional proj)
"Set the project local VARIABLE to VALUE.
(defun ede-set (variable value &optional proj)
"Set the project local VARIABLE to VALUE.
(if (and p (setq a (assoc variable (oref p local-variables))))
(progn
(setcdr a value)
(if (and p (setq a (assoc variable (oref p local-variables))))
(progn
(setcdr a value)
- (mapc (lambda (b) (save-excursion
- (set-buffer b)
- (set variable value)))
- (ede-project-buffers p)))
+ (dolist (b (ede-project-buffers p))
+ (with-current-buffer b
+ (set variable value))))
(set variable value))
(ede-commit-local-variables p))
value)
(set variable value))
(ede-commit-local-variables p))
value)
(project-add-file target (car files))
;; Find the buffer for this files, and set it's ede-object
(if (get-file-buffer (car files))
(project-add-file target (car files))
;; Find the buffer for this files, and set it's ede-object
(if (get-file-buffer (car files))
- (save-excursion
- (set-buffer (get-file-buffer (car files)))
+ (with-current-buffer (get-file-buffer (car files))
(setq ede-object nil)
(setq ede-object (ede-buffer-object (current-buffer)))))
;; Increment.
(setq ede-object nil)
(setq ede-object (ede-buffer-object (current-buffer)))))
;; Increment.
(let ((buff (get-buffer-create " *emacs-query*"))
(emacs "Emacs")
(ver ""))
(let ((buff (get-buffer-create " *emacs-query*"))
(emacs "Emacs")
(ver ""))
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(erase-buffer)
(setq default-directory (file-name-as-directory dir))
;(call-process "egrep" nil buff nil "-n" "-e" "^version=" "Makefile")
(erase-buffer)
(setq default-directory (file-name-as-directory dir))
;(call-process "egrep" nil buff nil "-n" "-e" "^version=" "Makefile")
(defun ede-linux-version (dir)
"Find the Linux version for the Linux src in DIR."
(let ((buff (get-buffer-create " *linux-query*")))
(defun ede-linux-version (dir)
"Find the Linux version for the Linux src in DIR."
(let ((buff (get-buffer-create " *linux-query*")))
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(erase-buffer)
(setq default-directory (file-name-as-directory dir))
(insert-file-contents "Makefile" nil 0 512)
(erase-buffer)
(setq default-directory (file-name-as-directory dir))
(insert-file-contents "Makefile" nil 0 512)
(b (get-buffer-create "*LOCATE*"))
(cd default-directory)
)
(b (get-buffer-create "*LOCATE*"))
(cd default-directory)
)
- (save-excursion
- (set-buffer b)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process locate-command
nil b nil
searchstr nil)
(setq default-directory cd)
(erase-buffer))
(apply 'call-process locate-command
nil b nil
searchstr nil)
- (save-excursion
- (set-buffer b)
(split-string (buffer-string) "\n" t))
)
)
(split-string (buffer-string) "\n" t))
)
)
;; Verify that we have a make system.
(if (or (not (ede-expand-filename (ede-toplevel this) "Makefile"))
;; Now is this one of our old Makefiles?
;; Verify that we have a make system.
(if (or (not (ede-expand-filename (ede-toplevel this) "Makefile"))
;; Now is this one of our old Makefiles?
- (save-excursion
- (set-buffer (find-file-noselect
- (ede-expand-filename (ede-toplevel this)
- "Makefile" t) t))
+ (with-current-buffer
+ (find-file-noselect
+ (ede-expand-filename (ede-toplevel this)
+ "Makefile" t) t)
(goto-char (point-min))
;; Here is the unique piece for our makefiles.
(re-search-forward "For use with: make" nil t)))
(goto-char (point-min))
;; Here is the unique piece for our makefiles.
(re-search-forward "For use with: make" nil t)))
(accept-process-output)
(sit-for 1))
(accept-process-output)
(sit-for 1))
- (save-excursion
- (set-buffer "*compilation*")
+ (with-current-buffer "*compilation*"
(goto-char (point-max))
(when (not (string= mode-line-process ":exit [0]"))
(goto-char (point-max))
(when (not (string= mode-line-process ":exit [0]"))
(let ((vs (oref this versionsource))
(match nil))
(while vs
(let ((vs (oref this versionsource))
(match nil))
(while vs
- (save-excursion
- (set-buffer (find-file-noselect
- (ede-expand-filename this (car vs))))
+ (with-current-buffer (find-file-noselect
+ (ede-expand-filename this (car vs)))
(goto-char (point-min))
(let ((case-fold-search t))
(if (re-search-forward "-version\\s-+\"\\([^\"]+\\)\"" nil t)
(goto-char (point-min))
(let ((case-fold-search t))
(if (re-search-forward "-version\\s-+\"\\([^\"]+\\)\"" nil t)
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile))
)
(if (and ec (file-exists-p ec))
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile))
)
(if (and ec (file-exists-p ec))
- (save-excursion
- (set-buffer (find-file-noselect ec t))
+ (with-current-buffer (find-file-noselect ec t)
(goto-char (point-min))
(while (re-search-forward "(cons \\([^ ]+\\) load-path)"
nil t)
(goto-char (point-min))
(while (re-search-forward "(cons \\([^ ]+\\) load-path)"
nil t)
(let* ((default-directory (oref this path))
(b (get-file-buffer (car ts))))
(if b
(let* ((default-directory (oref this path))
(b (get-file-buffer (car ts))))
(if b
- (save-excursion
- (set-buffer b)
(if (eq ede-object this)
(progn
(setq ede-object nil)
(if (eq ede-object this)
(progn
(setq ede-object nil)
(oref this versionsource))
(let ((vs (oref this versionsource)))
(while vs
(oref this versionsource))
(let ((vs (oref this versionsource)))
(while vs
- (save-excursion
- (set-buffer (find-file-noselect
- (ede-expand-filename this (car vs))))
+ (with-current-buffer (find-file-noselect
+ (ede-expand-filename this (car vs)))
(goto-char (point-min))
(let ((case-fold-search t))
(if (re-search-forward "version:\\s-*\\([^ \t\n]+\\)" nil t)
(goto-char (point-min))
(let ((case-fold-search t))
(if (re-search-forward "version:\\s-*\\([^ \t\n]+\\)" nil t)
(defmethod semantic-analyze-pulse ((context semantic-analyze-context))
"Pulse the region that CONTEXT affects."
(require 'pulse)
(defmethod semantic-analyze-pulse ((context semantic-analyze-context))
"Pulse the region that CONTEXT affects."
(require 'pulse)
- (save-excursion
- (set-buffer (oref context :buffer))
+ (with-current-buffer (oref context :buffer)
(let ((bounds (oref context :bounds)))
(when bounds
(pulse-momentary-highlight-region (car bounds) (cdr bounds))))))
(let ((bounds (oref context :bounds)))
(when bounds
(pulse-momentary-highlight-region (car bounds) (cdr bounds))))))
;; NOTE: This line is copied from semantic-analyze-current-context.
;; You will need to update both places.
(condition-case err
;; 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))
(let* ((position (or (cdr-safe (oref ctxt bounds)) (point)))
(prefixtypes nil) ; Used as type return
(scope (semantic-calculate-scope position))
(princ "\nSemantic has found the datatype ")
(semantic-analyzer-debug-insert-tag dt)
(if (or (not (semantic-equivalent-tag-p ots dt))
(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)
(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)
(car (semantic-analyze-dereference-metatype
ots (oref ctxt scope))))))
(if (eq nexttype lasttype)
(princ "\n")
(setq lasttype nexttype
nexttype
(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)))))
)
(car (semantic-analyze-dereference-metatype
nexttype (oref ctxt scope)))))
)
(let ((inc (semantic-find-tags-by-class 'include table))
;;(path (semanticdb-find-test-translate-path-no-loading))
(unk
(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
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
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
(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))))
(and (boundp 'ede-object-project)
ede-object-project))))
Look for key expressions, and add push-buttons near them."
(let ((orig-buffer (make-marker)))
(set-marker orig-buffer (point) (current-buffer))
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)
(toggle-read-only -1)
(goto-char (point-min))
(set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)
(symtext (semantic-lex-token-text lexicaltoken))
(macros (get-text-property 0 'macros symtext))
)
(symtext (semantic-lex-token-text lexicaltoken))
(macros (get-text-property 0 'macros symtext))
)
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(erase-buffer)
(when (not (eq major-mode mode))
(save-match-data
(erase-buffer)
(when (not (eq major-mode mode))
(save-match-data
;;
(let ((buff (get-buffer-create " *gcc-query*"))
(old-lc-messages (getenv "LC_ALL")))
;;
(let ((buff (get-buffer-create " *gcc-query*"))
(old-lc-messages (getenv "LC_ALL")))
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(erase-buffer)
(setenv "LC_ALL" "C")
(condition-case nil
(erase-buffer)
(setenv "LC_ALL" "C")
(condition-case nil
"Calculate the completions for prefix from completionlist.
Output must be in semanticdb Find result format."
;; Must output in semanticdb format
"Calculate the completions for prefix from completionlist.
Output must be in semanticdb Find result format."
;; Must output in semanticdb format
- (let ((table (save-excursion
- (set-buffer (oref obj buffer))
+ (let ((table (with-current-buffer (oref obj buffer)
semanticdb-current-table))
(result (semantic-find-tags-for-completion
prefix
semanticdb-current-table))
(result (semantic-find-tags-for-completion
prefix
(semantic-analyze-possible-completions (oref obj context))))
;; search our cached completion list. make it look like a semanticdb
;; results type.
(semantic-analyze-possible-completions (oref obj context))))
;; search our cached completion list. make it look like a semanticdb
;; results type.
- (list (cons (save-excursion
- (set-buffer (oref (oref obj context) buffer))
+ (list (cons (with-current-buffer (oref (oref obj context) buffer)
semanticdb-current-table)
(semantic-find-tags-for-completion
prefix
semanticdb-current-table)
(semantic-find-tags-for-completion
prefix
(and table (semanticdb-get-buffer table)))))
;; If no buffer is provided, then we can make up a summary buffer.
(when (not buf)
(and table (semanticdb-get-buffer table)))))
;; If no buffer is provided, then we can make up a summary buffer.
(when (not buf)
- (save-excursion
- (set-buffer (get-buffer-create "*Completion Focus*"))
+ (with-current-buffer (get-buffer-create "*Completion Focus*")
(erase-buffer)
(insert "Focus on tag: \n")
(insert (semantic-format-tag-summarize tag nil t) "\n\n")
(erase-buffer)
(insert "Focus on tag: \n")
(insert (semantic-format-tag-summarize tag nil t) "\n\n")
:buffer (oref context buffer)
:context context)
(semantic-displayor-traditional-with-focus-highlight "simple")
:buffer (oref context buffer)
:context context)
(semantic-displayor-traditional-with-focus-highlight "simple")
- (save-excursion
- (set-buffer (oref context buffer))
+ (with-current-buffer (oref context buffer)
(goto-char (cdr (oref context bounds)))
(concat prompt (mapconcat 'identity syms ".")
(if syms "." "")
(goto-char (cdr (oref context bounds)))
(concat prompt (mapconcat 'identity syms ".")
(if syms "." "")
(let* ((full-filename (semanticdb-full-filename table))
(buff (find-buffer-visiting full-filename)))
(if buff
(let* ((full-filename (semanticdb-full-filename table))
(buff (find-buffer-visiting full-filename)))
(if buff
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(semantic-sanity-check))
;; We can't use the usual semantic validity check, so hack our own.
(semanticdb-table-oob-sanity-check (semanticdb-get-tags table)))))
(semantic-sanity-check))
;; We can't use the usual semantic validity check, so hack our own.
(semanticdb-table-oob-sanity-check (semanticdb-get-tags table)))))
(and (string-match "/\\w+$" file)
(not (file-directory-p file))
(let ((tmp (get-buffer-create "*semanticdb-ebrowse-tmp*")))
(and (string-match "/\\w+$" file)
(not (file-directory-p file))
(let ((tmp (get-buffer-create "*semanticdb-ebrowse-tmp*")))
- (save-excursion
- (set-buffer tmp)
+ (with-current-buffer tmp
(condition-case nil
(insert-file-contents file nil 0 100 t)
(error (insert-file-contents file nil nil nil t)))
(condition-case nil
(insert-file-contents file nil 0 100 t)
(error (insert-file-contents file nil nil nil t)))
(regexp nil)
)
;; Create the input to the ebrowse command
(regexp nil)
)
;; Create the input to the ebrowse command
- (save-excursion
- (set-buffer filebuff)
+ (with-current-buffer filebuff
(buffer-disable-undo filebuff)
(setq default-directory (expand-file-name dir))
(buffer-disable-undo filebuff)
(setq default-directory (expand-file-name dir))
(insert "\n")))
files)
;; Cleanup the ebrowse output buffer.
(insert "\n")))
files)
;; Cleanup the ebrowse output buffer.
- (save-excursion
- (set-buffer (get-buffer-create "*EBROWSE OUTPUT*"))
+ (with-current-buffer (get-buffer-create "*EBROWSE OUTPUT*")
(erase-buffer))
;; Call the EBROWSE command.
(message "Creating ebrowse file: %s ..." savein)
(erase-buffer))
;; Call the EBROWSE command.
(message "Creating ebrowse file: %s ..." savein)
;; Create a short LOADER program for loading in this database.
(let* ((lfn (concat savein "-load.el"))
(lf (find-file-noselect lfn)))
;; Create a short LOADER program for loading in this database.
(let* ((lfn (concat savein "-load.el"))
(lf (find-file-noselect lfn)))
- (save-excursion
- (set-buffer lf)
+ (with-current-buffer lf
(erase-buffer)
(insert "(semanticdb-ebrowse-load-helper \""
(expand-file-name dir)
(erase-buffer)
(insert "(semanticdb-ebrowse-load-helper \""
(expand-file-name dir)
"Return non-nil if TABLE's mode is equivalent to BUFFER.
Equivalent modes are specified by by `semantic-equivalent-major-modes'
local variable."
"Return non-nil if TABLE's mode is equivalent to BUFFER.
Equivalent modes are specified by by `semantic-equivalent-major-modes'
local variable."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode)))
(defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp))
(eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode)))
(defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp))
Argument OBJ is the object to write."
(when (semanticdb-live-p obj)
(when (semanticdb-in-buffer-p obj)
Argument OBJ is the object to write."
(when (semanticdb-live-p obj)
(when (semanticdb-in-buffer-p obj)
- (save-excursion
- (set-buffer (semanticdb-in-buffer-p obj))
+ (with-current-buffer (semanticdb-in-buffer-p obj)
;; Make sure all our tag lists are up to date.
(semantic-fetch-tags)
;; Make sure all our tag lists are up to date.
(semantic-fetch-tags)
incfname (semanticdb-full-filename path))
)
((bufferp path)
incfname (semanticdb-full-filename path))
)
((bufferp path)
- (save-excursion
- (set-buffer path)
+ (with-current-buffer path
(semantic-refresh-tags-safe))
(setq includetags (semantic-find-tags-included path)
(semantic-refresh-tags-safe))
(setq includetags (semantic-find-tags-included path)
- curtable (save-excursion (set-buffer path)
- semanticdb-current-table)
+ curtable (with-current-buffer path
+ semanticdb-current-table)
incfname (buffer-file-name path)))
(t
(setq includetags (semantic-find-tags-included path))
incfname (buffer-file-name path)))
(t
(setq includetags (semantic-find-tags-included path))
"Reset the log buffer."
(interactive)
(when semanticdb-find-log-flag
"Reset the log buffer."
(interactive)
(when semanticdb-find-log-flag
- (save-excursion
- (set-buffer (get-buffer-create semanticdb-find-log-buffer-name))
+ (with-current-buffer (get-buffer-create semanticdb-find-log-buffer-name)
(defun semanticdb-find-log-new-search (forwhat)
"Start a new search FORWHAT."
(when semanticdb-find-log-flag
(defun semanticdb-find-log-new-search (forwhat)
"Start a new search FORWHAT."
(when semanticdb-find-log-flag
- (save-excursion
- (set-buffer (get-buffer-create semanticdb-find-log-buffer-name))
+ (with-current-buffer (get-buffer-create semanticdb-find-log-buffer-name)
(insert (format "New Search: %S\n" forwhat))
)
(semanticdb-find-log-move-to-end)))
(insert (format "New Search: %S\n" forwhat))
)
(semanticdb-find-log-move-to-end)))
(defun semanticdb-find-log-activity (table result)
"Log that TABLE has been searched and RESULT was found."
(when semanticdb-find-log-flag
(defun semanticdb-find-log-activity (table result)
"Log that TABLE has been searched and RESULT was found."
(when semanticdb-find-log-flag
- (save-excursion
- (set-buffer semanticdb-find-log-buffer-name)
+ (with-current-buffer semanticdb-find-log-buffer-name
(insert "Table: " (object-print table)
" Result: " (int-to-string (length result)) " tags"
"\n")
(insert "Table: " (object-print table)
" Result: " (int-to-string (length result)) " tags"
"\n")
"Return non-nil if TABLE's mode is equivalent to BUFFER.
Equivalent modes are specified by by `semantic-equivalent-major-modes'
local variable."
"Return non-nil if TABLE's mode is equivalent to BUFFER.
Equivalent modes are specified by by `semantic-equivalent-major-modes'
local variable."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(eq (or mode-local-active-mode major-mode) 'javascript-mode)))
;;; Usage
(eq (or mode-local-active-mode major-mode) 'javascript-mode)))
;;; Usage
(defun semanticdb-typecache-refresh-for-buffer (buffer)
"Refresh the typecache for BUFFER."
(defun semanticdb-typecache-refresh-for-buffer (buffer)
"Refresh the typecache for BUFFER."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(let* ((tab semanticdb-current-table)
;(idx (semanticdb-get-table-index tab))
(tc (semanticdb-get-typecache tab)))
(let* ((tab semanticdb-current-table)
;(idx (semanticdb-get-table-index tab))
(tc (semanticdb-get-typecache tab)))
(buff (semanticdb-in-buffer-p obj))
)
(if buff
(buff (semanticdb-in-buffer-p obj))
)
(if buff
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
;; Use semantic's magic tracker to determine of the buffer is up
;; to date or not.
(not (semantic-parse-tree-up-to-date-p))
;; Use semantic's magic tracker to determine of the buffer is up
;; to date or not.
(not (semantic-parse-tree-up-to-date-p))
(defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point)
"Set the parser location in IFACE to POINT."
(defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point)
"Set the parser location in IFACE to POINT."
- (save-excursion
- (set-buffer (oref iface parser-buffer))
+ (with-current-buffer (oref iface parser-buffer)
(if (not (slot-boundp iface 'parser-location))
(oset iface parser-location (make-marker)))
(move-marker (oref iface parser-location) point))
(if (not (slot-boundp iface 'parser-location))
(oset iface parser-location (make-marker)))
(move-marker (oref iface parser-location) point))
(defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point)
"Set the source location in IFACE to POINT."
(defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point)
"Set the source location in IFACE to POINT."
- (save-excursion
- (set-buffer (oref iface source-buffer))
+ (with-current-buffer (oref iface source-buffer)
(if (not (slot-boundp iface 'source-location))
(oset iface source-location (make-marker)))
(move-marker (oref iface source-location) point))
(if (not (slot-boundp iface 'source-location))
(oset iface source-location (make-marker)))
(move-marker (oref iface source-location) point))
;; Deal with the data buffer
(when (slot-boundp iface 'data-buffer)
(let ((lines (/ (frame-height (selected-frame)) 3))
;; Deal with the data buffer
(when (slot-boundp iface 'data-buffer)
(let ((lines (/ (frame-height (selected-frame)) 3))
- (cnt (save-excursion
- (set-buffer (oref iface data-buffer))
+ (cnt (with-current-buffer (oref iface data-buffer)
(count-lines (point-min) (point-max))))
)
;; Set the number of lines to 1/3, or the size of the data buffer.
(count-lines (point-min) (point-max))))
)
;; Set the number of lines to 1/3, or the size of the data buffer.
(let ((iface semantic-debug-current-interface))
(if onoff
;; Turn it on
(let ((iface semantic-debug-current-interface))
(if onoff
;; Turn it on
- (save-excursion
- (set-buffer (oref iface parser-buffer))
+ (with-current-buffer (oref iface parser-buffer)
;; Install our map onto this buffer
(use-local-map semantic-debug-mode-map)
;; Make the buffer read only
;; Install our map onto this buffer
(use-local-map semantic-debug-mode-map)
;; Make the buffer read only
(run-hooks 'semantic-debug-mode-hook)
)
;; Restore old mode information
(run-hooks 'semantic-debug-mode-hook)
)
;; Restore old mode information
- (save-excursion
- (set-buffer
- (oref semantic-debug-current-interface parser-buffer))
+ (with-current-buffer
+ (oref semantic-debug-current-interface parser-buffer)
(use-local-map
(oref semantic-debug-current-interface parser-local-map))
)
(use-local-map
(oref semantic-debug-current-interface parser-local-map))
)
- (save-excursion
- (set-buffer
- (oref semantic-debug-current-interface source-buffer))
+ (with-current-buffer
+ (oref semantic-debug-current-interface source-buffer)
(use-local-map
(oref semantic-debug-current-interface source-local-map))
)
(use-local-map
(oref semantic-debug-current-interface source-local-map))
)
(semantic-debug-interface
"Debug Interface"
:parser-buffer parserb
(semantic-debug-interface
"Debug Interface"
:parser-buffer parserb
- :parser-local-map (save-excursion
- (set-buffer parserb)
+ :parser-local-map (with-current-buffer parserb
(current-local-map))
:source-buffer (current-buffer)
:source-local-map (current-local-map)
(current-local-map))
:source-buffer (current-buffer)
:source-local-map (current-local-map)
(proj (ede-target-parent obj))
(default-directory (oref proj directory)))
(mapc (lambda (src)
(proj (ede-target-parent obj))
(default-directory (oref proj directory)))
(mapc (lambda (src)
- (save-excursion
- (set-buffer (find-file-noselect src))
+ (with-current-buffer (find-file-noselect src)
(save-excursion
(semantic-grammar-create-package))
(save-buffer)
(save-excursion
(semantic-grammar-create-package))
(save-buffer)
(concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL")
(insert
(mapconcat (lambda (src)
(concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL")
(insert
(mapconcat (lambda (src)
- (save-excursion
- (set-buffer (find-file-noselect src))
+ (with-current-buffer (find-file-noselect src)
(concat (semantic-grammar-package) ".el")))
(oref this source)
" ")))
(concat (semantic-grammar-package) ".el")))
(oref this source)
" ")))
(save-excursion
(if (markerp position) (set-buffer (marker-buffer position)))
(let* ((stream (if (bufferp streamorbuffer)
(save-excursion
(if (markerp position) (set-buffer (marker-buffer position)))
(let* ((stream (if (bufferp streamorbuffer)
- (save-excursion
- (set-buffer streamorbuffer)
+ (with-current-buffer streamorbuffer
(semantic-fetch-tags))
streamorbuffer))
(prev nil)
(semantic-fetch-tags))
streamorbuffer))
(prev nil)
(if (semantic-grammar-in-lisp-p)
(with-mode-local emacs-lisp-mode
(semantic-analyze-possible-completions context))
(if (semantic-grammar-in-lisp-p)
(with-mode-local emacs-lisp-mode
(semantic-analyze-possible-completions context))
- (save-excursion
- (set-buffer (oref context buffer))
+ (with-current-buffer (oref context buffer)
(let* ((prefix (car (oref context :prefix)))
(completetext (cond ((semantic-tag-p prefix)
(semantic-tag-name prefix))
(let* ((prefix (car (oref context :prefix)))
(completetext (cond ((semantic-tag-p prefix)
(semantic-tag-name prefix))
))
(error nil))
(select-frame cf)
))
(error nil))
(select-frame cf)
- (save-excursion
- (set-buffer speedbar-buffer)
+ (with-current-buffer speedbar-buffer
;; If we have something, do something spiff with it.
(erase-buffer)
(speedbar-insert-separator "Buffer/Function")
;; If we have something, do something spiff with it.
(erase-buffer)
(speedbar-insert-separator "Buffer/Function")
(setq ob (current-buffer))
(with-output-to-temp-buffer "*Tag Information*"
;; Output something about this tag:
(setq ob (current-buffer))
(with-output-to-temp-buffer "*Tag Information*"
;; Output something about this tag:
- (save-excursion
- (set-buffer "*Tag Information*")
+ (with-current-buffer "*Tag Information*"
(goto-char (point-max))
(insert
(semantic-format-tag-prototype tag nil t)
"\n")
(let ((typetok
(condition-case nil
(goto-char (point-max))
(insert
(semantic-format-tag-prototype tag nil t)
"\n")
(let ((typetok
(condition-case nil
- (save-excursion
- (set-buffer ob)
+ (with-current-buffer ob
;; @todo - We need a context to derive a scope from.
(semantic-analyze-tag-type tag nil))
(error nil))))
;; @todo - We need a context to derive a scope from.
(semantic-analyze-tag-type tag nil))
(error nil))))
"Do long-processing work for for BUFFER.
Uses `semantic-safe' and returns the output.
Returns t of all processing succeeded."
"Do long-processing work for for BUFFER.
Uses `semantic-safe' and returns the output.
Returns t of all processing succeeded."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(not (and
;; Just in case
(semantic-safe "Idle Work Parse Error: %S"
(not (and
;; Just in case
(semantic-safe "Idle Work Parse Error: %S"
(pulse-flag nil)
)
(cond ((semantic-overlay-p region)
(pulse-flag nil)
)
(cond ((semantic-overlay-p region)
- (save-excursion
- (set-buffer (semantic-overlay-buffer region))
+ (with-current-buffer (semantic-overlay-buffer region)
(goto-char (semantic-overlay-start region))
(when (pos-visible-in-window-p
(point) (get-buffer-window (current-buffer) 'visible))
(goto-char (semantic-overlay-start region))
(when (pos-visible-in-window-p
(point) (get-buffer-window (current-buffer) 'visible))
semantic-lex-spp-expanded-macro-stack
))
)
semantic-lex-spp-expanded-macro-stack
))
)
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(erase-buffer)
;; Below is a painful hack to make sure everything is setup correctly.
(when (not (eq major-mode mode))
(erase-buffer)
;; Below is a painful hack to make sure everything is setup correctly.
(when (not (eq major-mode mode))
;; Successful DB query.
nil
;; No database, do it the old way.
;; Successful DB query.
nil
;; No database, do it the old way.
- (save-excursion
- (set-buffer (find-file-noselect file))
+ (with-current-buffer (find-file-noselect file)
(if (or (not (featurep 'semantic))
(not semantic--parse-table))
(setq out t)
(if (or (not (featurep 'semantic))
(not semantic--parse-table))
(setq out t)
"Parse the entire OUTPUTBUFFER of a symref tool.
Calls the method `semantic-symref-parse-tool-output-one-line' over and
over until it returns nil."
"Parse the entire OUTPUTBUFFER of a symref tool.
Calls the method `semantic-symref-parse-tool-output-one-line' over and
over until it returns nil."
- (save-excursion
- (set-buffer outputbuffer)
+ (with-current-buffer outputbuffer
(goto-char (point-min))
(let ((result nil)
(hit nil))
(goto-char (point-min))
(let ((result nil)
(hit nil))
- (save-excursion
- (set-buffer b)
(erase-buffer)
(setq default-directory rootdir)
(erase-buffer)
(setq default-directory rootdir)
(cond
((eq state 'closed)
(toggle-read-only -1)
(cond
((eq state 'closed)
(toggle-read-only -1)
- (save-excursion
- (set-buffer buff)
+ (with-current-buffer buff
(dolist (H hits)
(goto-char (point-min))
(forward-line (1- H))
(dolist (H hits)
(goto-char (point-min))
(forward-line (1- H))
(:override
;; Perform some default behaviors
(if (and (fboundp 'ede-header-file) ede-minor-mode)
(:override
;; Perform some default behaviors
(if (and (fboundp 'ede-header-file) ede-minor-mode)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(ede-header-file))
;; No EDE options for a quick answer. Search.
(ede-header-file))
;; No EDE options for a quick answer. Search.
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t)
(match-string 1))))))
(if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t)
(match-string 1))))))
(defun semantic-tag-calculate-parent-default (tag)
"Attempt to calculate the parent of TAG."
(when (semantic-tag-in-buffer-p tag)
(defun semantic-tag-calculate-parent-default (tag)
"Attempt to calculate the parent of TAG."
(when (semantic-tag-in-buffer-p tag)
- (save-excursion
- (set-buffer (semantic-tag-buffer tag))
+ (with-current-buffer (semantic-tag-buffer tag)
(save-excursion
(goto-char (semantic-tag-start tag))
(semantic-current-tag-parent))
(save-excursion
(goto-char (semantic-tag-start tag))
(semantic-current-tag-parent))
and parse it."
(save-match-data
(if (find-buffer-visiting file)
and parse it."
(save-match-data
(if (find-buffer-visiting file)
- (save-excursion
- (set-buffer (find-buffer-visiting file))
+ (with-current-buffer (find-buffer-visiting file)
(semantic-fetch-tags))
;; File not loaded
(if (and (require 'semantic/db-mode)
(semantic-fetch-tags))
;; File not loaded
(if (and (require 'semantic/db-mode)
;; semanticdb is around, use it.
(semanticdb-file-stream file)
;; Get the stream ourselves.
;; semanticdb is around, use it.
(semanticdb-file-stream file)
;; Get the stream ourselves.
- (save-excursion
- (set-buffer (find-file-noselect file))
+ (with-current-buffer (find-file-noselect file)
(semantic-fetch-tags))))))
(semantic-alias-obsolete 'semantic-file-token-stream
(semantic-fetch-tags))))))
(semantic-alias-obsolete 'semantic-file-token-stream
something)
;; A buffer
((bufferp something)
something)
;; A buffer
((bufferp something)
- (save-excursion
- (set-buffer something)
+ (with-current-buffer something
(semantic-fetch-tags)))
;; A Tag: Get that tag's buffer
((and (semantic-tag-with-position-p something)
(semantic-tag-in-buffer-p something))
(semantic-fetch-tags)))
;; A Tag: Get that tag's buffer
((and (semantic-tag-with-position-p something)
(semantic-tag-in-buffer-p something))
- (save-excursion
- (set-buffer (semantic-tag-buffer something))
+ (with-current-buffer (semantic-tag-buffer something)
(semantic-fetch-tags)))
;; Tag with a file name in it
((and (semantic-tag-p something)
(semantic-fetch-tags)))
;; Tag with a file name in it
((and (semantic-tag-p something)
in which TOKEN (the token found to match NAME) was found.
THIS ISN'T USED IN SEMANTIC. DELETE ME SOON."
in which TOKEN (the token found to match NAME) was found.
THIS ISN'T USED IN SEMANTIC. DELETE ME SOON."
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(let* ((stream (semantic-fetch-tags))
(includelist (or (semantic-find-tags-by-class 'include stream)
"empty.silly.thing"))
(let* ((stream (semantic-fetch-tags))
(includelist (or (semantic-find-tags-by-class 'include stream)
"empty.silly.thing"))
(while (and (not found) includelist)
(let ((fn (semantic-dependency-tag-file (car includelist))))
(if (and fn (not (member fn unfound)))
(while (and (not found) includelist)
(let ((fn (semantic-dependency-tag-file (car includelist))))
(if (and fn (not (member fn unfound)))
- (save-excursion
- (save-match-data
- (set-buffer (find-file-noselect fn)))
+ (with-current-buffer (save-match-data
+ (find-file-noselect fn))
(message "Scanning %s" (buffer-file-name))
(setq stream (semantic-fetch-tags))
(setq found (semantic-find-first-tag-by-name name stream))
(message "Scanning %s" (buffer-file-name))
(setq stream (semantic-fetch-tags))
(setq found (semantic-find-first-tag-by-name name stream))
(defun semantic-describe-buffer-var-helper (varsym buffer)
"Display to standard out the value of VARSYM in BUFFER."
(require 'data-debug)
(defun semantic-describe-buffer-var-helper (varsym buffer)
"Display to standard out the value of VARSYM in BUFFER."
(require 'data-debug)
- (let ((value (save-excursion
- (set-buffer buffer)
+ (let ((value (with-current-buffer buffer
(symbol-value varsym))))
(cond
((and (consp value)
(symbol-value varsym))))
(cond
((and (consp value)
(define-mode-local-override semantic-analyze-possible-completions
srecode-template-mode (context)
"Return a list of possible completions based on NONTEXT."
(define-mode-local-override semantic-analyze-possible-completions
srecode-template-mode (context)
"Return a list of possible completions based on NONTEXT."
- (save-excursion
- (set-buffer (oref context buffer))
+ (with-current-buffer (oref context buffer)
(let* ((prefix (car (last (oref context :prefix))))
(prefixstr (cond ((stringp prefix)
prefix)
(let* ((prefix (car (last (oref context :prefix))))
(prefixstr (cond ((stringp prefix)
prefix)