From: Miles Bader Date: Thu, 10 Aug 2000 10:54:40 +0000 (+0000) Subject: (gud-filter): Use `with-current-buffer' instead of save-excursion when X-Git-Tag: emacs-pretest-21.0.90~2368 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f09b5567e6fba589c96571ba625bf1c490356594;p=emacs.git (gud-filter): Use `with-current-buffer' instead of save-excursion when inserting the output, so that point gets updated correctly; the old method relied on a rather dodgy side-effect of comint-output-filter to avoid the effect of save-excursion. --- diff --git a/lisp/gud.el b/lisp/gud.el index 598aa036d1e..688346f1953 100644 --- a/lisp/gud.el +++ b/lisp/gud.el @@ -4,7 +4,7 @@ ;; Maintainer: FSF ;; Keywords: unix, tools -;; Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -2181,8 +2181,8 @@ It is saved for when this flag is not set.") (if gud-filter-pending-text (setq string (concat gud-filter-pending-text string) gud-filter-pending-text nil)) - (save-excursion - (set-buffer (process-buffer proc)) + + (with-current-buffer (process-buffer proc) ;; If we have been so requested, delete the debugger prompt. (if (marker-buffer gud-delete-prompt-marker) (progn