diff options
| author | Chong Yidong | 2010-02-27 20:22:44 -0500 |
|---|---|---|
| committer | Chong Yidong | 2010-02-27 20:22:44 -0500 |
| commit | de3a1fe9358d3d833a15dc4fb559b902cdc1168b (patch) | |
| tree | 2c9238dc843da462a720a64df7a75f5e053d9d42 | |
| parent | 8c3e96d2f0e4fee24498567c5840eb8d03d26720 (diff) | |
| download | emacs-de3a1fe9358d3d833a15dc4fb559b902cdc1168b.tar.gz emacs-de3a1fe9358d3d833a15dc4fb559b902cdc1168b.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/calc/calcalg2.el | 4 | ||||
| -rw-r--r-- | lisp/calendar/icalendar.el | 3 | ||||
| -rw-r--r-- | lisp/cedet/ede/make.el | 3 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-find.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/elint.el | 3 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-toc.el | 3 |
7 files changed, 15 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 27890d66ba6..1c91ebe4831 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2010-02-28 Chong Yidong <cyd@stupidchicken.com> | 1 | 2010-02-28 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * textmodes/reftex-toc.el (reftex-toc-promote-prepare): | ||
| 4 | * emacs-lisp/elint.el (elint-add-required-env): | ||
| 5 | * cedet/semantic/db-find.el | ||
| 6 | (semanticdb-find-translate-path-brutish-default): | ||
| 7 | * cedet/ede/make.el (ede-make-check-version): | ||
| 8 | * calendar/icalendar.el (icalendar--add-diary-entry): | ||
| 9 | * calc/calcalg2.el (math-tracing-integral): | ||
| 3 | * files.el (recover-session-finish): Use with-current-buffer | 10 | * files.el (recover-session-finish): Use with-current-buffer |
| 4 | instead of save-excursion. | 11 | instead of save-excursion. |
| 5 | 12 | ||
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 3d90de3f0b3..2b45ce1b2f0 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el | |||
| @@ -670,8 +670,8 @@ | |||
| 670 | (defmacro math-tracing-integral (&rest parts) | 670 | (defmacro math-tracing-integral (&rest parts) |
| 671 | (list 'and | 671 | (list 'and |
| 672 | 'trace-buffer | 672 | 'trace-buffer |
| 673 | (list 'save-excursion | 673 | (list 'with-current-buffer |
| 674 | '(set-buffer trace-buffer) | 674 | 'trace-buffer |
| 675 | '(goto-char (point-max)) | 675 | '(goto-char (point-max)) |
| 676 | (list 'and | 676 | (list 'and |
| 677 | '(bolp) | 677 | '(bolp) |
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 535956be140..a07402aa031 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el | |||
| @@ -2246,8 +2246,7 @@ the entry." | |||
| 2246 | 'make-diary-entry) | 2246 | 'make-diary-entry) |
| 2247 | string non-marking diary-file))) | 2247 | string non-marking diary-file))) |
| 2248 | ;; Würgaround to remove the trailing blank char | 2248 | ;; Würgaround to remove the trailing blank char |
| 2249 | (save-excursion | 2249 | (with-current-buffer (find-file diary-file) |
| 2250 | (set-buffer (find-file diary-file)) | ||
| 2251 | (goto-char (point-max)) | 2250 | (goto-char (point-max)) |
| 2252 | (if (= (char-before) ? ) | 2251 | (if (= (char-before) ? ) |
| 2253 | (delete-char -1))) | 2252 | (delete-char -1))) |
diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el index e9bc4b3b8e0..6b59f510bed 100644 --- a/lisp/cedet/ede/make.el +++ b/lisp/cedet/ede/make.el | |||
| @@ -76,9 +76,8 @@ If NOERROR is nil, then throw an error on failure. Return t otherwise." | |||
| 76 | (rev nil) | 76 | (rev nil) |
| 77 | (ans nil) | 77 | (ans nil) |
| 78 | ) | 78 | ) |
| 79 | (save-excursion | 79 | (with-current-buffer b |
| 80 | ;; Setup, and execute make. | 80 | ;; Setup, and execute make. |
| 81 | (set-buffer b) | ||
| 82 | (setq default-directory cd) | 81 | (setq default-directory cd) |
| 83 | (erase-buffer) | 82 | (erase-buffer) |
| 84 | (call-process ede-make-command nil b nil | 83 | (call-process ede-make-command nil b nil |
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index eba04a7ee02..754ba231c37 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el | |||
| @@ -326,9 +326,8 @@ Default action as described in `semanticdb-find-translate-path'." | |||
| 326 | (cond ((null path) semanticdb-current-database) | 326 | (cond ((null path) semanticdb-current-database) |
| 327 | ((semanticdb-table-p path) (oref path parent-db)) | 327 | ((semanticdb-table-p path) (oref path parent-db)) |
| 328 | (t (let ((tt (semantic-something-to-tag-table path))) | 328 | (t (let ((tt (semantic-something-to-tag-table path))) |
| 329 | (save-excursion | 329 | ;; @todo - What does this DO ??!?! |
| 330 | ;; @todo - What does this DO ??!?! | 330 | (with-current-buffer (semantic-tag-buffer (car tt)) |
| 331 | (set-buffer (semantic-tag-buffer (car tt))) | ||
| 332 | semanticdb-current-database)))))) | 331 | semanticdb-current-database)))))) |
| 333 | (apply | 332 | (apply |
| 334 | #'nconc | 333 | #'nconc |
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 6e0758680d5..b9aa29decd0 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el | |||
| @@ -505,11 +505,10 @@ Return nil if there are no more forms, t otherwise." | |||
| 505 | ;; (Messes up the "Initializing elint..." message.) | 505 | ;; (Messes up the "Initializing elint..." message.) |
| 506 | ;;; (message nil) | 506 | ;;; (message nil) |
| 507 | (if lib | 507 | (if lib |
| 508 | (save-excursion | 508 | (with-current-buffer (find-file-noselect lib) |
| 509 | ;; FIXME this doesn't use a temp buffer, because it | 509 | ;; FIXME this doesn't use a temp buffer, because it |
| 510 | ;; stores the result in buffer-local variables so that | 510 | ;; stores the result in buffer-local variables so that |
| 511 | ;; it can be reused. | 511 | ;; it can be reused. |
| 512 | (set-buffer (find-file-noselect lib)) | ||
| 513 | (elint-update-env) | 512 | (elint-update-env) |
| 514 | (setq env (elint-env-add-env env elint-buffer-env))) | 513 | (setq env (elint-env-add-env env elint-buffer-env))) |
| 515 | ;;; (with-temp-buffer | 514 | ;;; (with-temp-buffer |
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 1066066462d..ae1690416b9 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el | |||
| @@ -665,9 +665,8 @@ promotion/demotion later." | |||
| 665 | (if (and (markerp marker) (marker-buffer marker)) | 665 | (if (and (markerp marker) (marker-buffer marker)) |
| 666 | ;; Buffer is still live and we have the marker. | 666 | ;; Buffer is still live and we have the marker. |
| 667 | (progn | 667 | (progn |
| 668 | (save-excursion | 668 | (with-current-buffer (marker-buffer marker) |
| 669 | ;; Goto the buffer and check of section is unchanged | 669 | ;; Goto the buffer and check of section is unchanged |
| 670 | (set-buffer (marker-buffer marker)) | ||
| 671 | (goto-char (marker-position marker)) | 670 | (goto-char (marker-position marker)) |
| 672 | (if (looking-at (regexp-quote literal)) | 671 | (if (looking-at (regexp-quote literal)) |
| 673 | ;; OK, get the makro name | 672 | ;; OK, get the makro name |