Mercurial > emacs
changeset 107252:2da9673fc448
Fix more save-excursion warnings.
* textmodes/reftex-toc.el (reftex-toc-promote-prepare):
* emacs-lisp/elint.el (elint-add-required-env):
* cedet/semantic/db-find.el (semanticdb-find-translate-path-brutish-default):
* cedet/ede/make.el (ede-make-check-version):
* calendar/icalendar.el (icalendar--add-diary-entry):
* calc/calcalg2.el (math-tracing-integral): Use with-current-buffer instead of save-excursion.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 27 Feb 2010 20:22:44 -0500 |
parents | a383e724a57c |
children | 691c23d02cec fb6d984c76bf |
files | lisp/ChangeLog lisp/calc/calcalg2.el lisp/calendar/icalendar.el lisp/cedet/ede/make.el lisp/cedet/semantic/db-find.el lisp/emacs-lisp/elint.el lisp/textmodes/reftex-toc.el |
diffstat | 7 files changed, 15 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/ChangeLog Sat Feb 27 20:22:44 2010 -0500 @@ -1,5 +1,12 @@ 2010-02-28 Chong Yidong <cyd@stupidchicken.com> + * textmodes/reftex-toc.el (reftex-toc-promote-prepare): + * emacs-lisp/elint.el (elint-add-required-env): + * cedet/semantic/db-find.el + (semanticdb-find-translate-path-brutish-default): + * cedet/ede/make.el (ede-make-check-version): + * calendar/icalendar.el (icalendar--add-diary-entry): + * calc/calcalg2.el (math-tracing-integral): * files.el (recover-session-finish): Use with-current-buffer instead of save-excursion.
--- a/lisp/calc/calcalg2.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/calc/calcalg2.el Sat Feb 27 20:22:44 2010 -0500 @@ -670,8 +670,8 @@ (defmacro math-tracing-integral (&rest parts) (list 'and 'trace-buffer - (list 'save-excursion - '(set-buffer trace-buffer) + (list 'with-current-buffer + 'trace-buffer '(goto-char (point-max)) (list 'and '(bolp)
--- a/lisp/calendar/icalendar.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/calendar/icalendar.el Sat Feb 27 20:22:44 2010 -0500 @@ -2246,8 +2246,7 @@ 'make-diary-entry) string non-marking diary-file))) ;; Würgaround to remove the trailing blank char - (save-excursion - (set-buffer (find-file diary-file)) + (with-current-buffer (find-file diary-file) (goto-char (point-max)) (if (= (char-before) ? ) (delete-char -1)))
--- a/lisp/cedet/ede/make.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/cedet/ede/make.el Sat Feb 27 20:22:44 2010 -0500 @@ -76,9 +76,8 @@ (rev nil) (ans nil) ) - (save-excursion + (with-current-buffer b ;; Setup, and execute make. - (set-buffer b) (setq default-directory cd) (erase-buffer) (call-process ede-make-command nil b nil
--- a/lisp/cedet/semantic/db-find.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/cedet/semantic/db-find.el Sat Feb 27 20:22:44 2010 -0500 @@ -326,9 +326,8 @@ (cond ((null path) semanticdb-current-database) ((semanticdb-table-p path) (oref path parent-db)) (t (let ((tt (semantic-something-to-tag-table path))) - (save-excursion - ;; @todo - What does this DO ??!?! - (set-buffer (semantic-tag-buffer (car tt))) + ;; @todo - What does this DO ??!?! + (with-current-buffer (semantic-tag-buffer (car tt)) semanticdb-current-database)))))) (apply #'nconc
--- a/lisp/emacs-lisp/elint.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/emacs-lisp/elint.el Sat Feb 27 20:22:44 2010 -0500 @@ -505,11 +505,10 @@ ;; (Messes up the "Initializing elint..." message.) ;;; (message nil) (if lib - (save-excursion + (with-current-buffer (find-file-noselect lib) ;; FIXME this doesn't use a temp buffer, because it ;; stores the result in buffer-local variables so that ;; it can be reused. - (set-buffer (find-file-noselect lib)) (elint-update-env) (setq env (elint-env-add-env env elint-buffer-env))) ;;; (with-temp-buffer
--- a/lisp/textmodes/reftex-toc.el Sat Feb 27 20:11:15 2010 -0500 +++ b/lisp/textmodes/reftex-toc.el Sat Feb 27 20:22:44 2010 -0500 @@ -665,9 +665,8 @@ (if (and (markerp marker) (marker-buffer marker)) ;; Buffer is still live and we have the marker. (progn - (save-excursion + (with-current-buffer (marker-buffer marker) ;; Goto the buffer and check of section is unchanged - (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (if (looking-at (regexp-quote literal)) ;; OK, get the makro name