aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-12 16:39:22 +0000
committerGerd Moellmann2001-03-12 16:39:22 +0000
commit04528cda8169911f5723263bbf2672c8170bfbe6 (patch)
treeaf70266ec4a7548e81f42eef755698c282ed2983 /lisp
parent760cefb5abcf05f91329a57afe6a2bb73ebeb468 (diff)
downloademacs-04528cda8169911f5723263bbf2672c8170bfbe6.tar.gz
emacs-04528cda8169911f5723263bbf2672c8170bfbe6.zip
(tags-loop-continue): Don't change point in a
file that isn't interesting. In an interesting file, push the old value of point on the mark ring.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/etags.el26
2 files changed, 23 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 12f6bddd56f..21dde7721d5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12001-03-12 Gerd Moellmann <gerd@gnu.org> 12001-03-12 Gerd Moellmann <gerd@gnu.org>
2 2
3 * progmodes/etags.el (tags-loop-continue): Don't change point in a
4 file that isn't interesting. In an interesting file, push the old
5 value of point on the mark ring.
6
3 * mail/rmailsum.el (rmail-summary-override-mail-send-and-exit): 7 * mail/rmailsum.el (rmail-summary-override-mail-send-and-exit):
4 New function. 8 New function.
5 (rmail-summary-mail, rmail-summary-reply, rmail-summary-forward): 9 (rmail-summary-mail, rmail-summary-reply, rmail-summary-forward):
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 738f3ca2f8a..5efd54a9867 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1,5 +1,5 @@
1;;; etags.el --- etags facility for Emacs 1;;; etags.el --- etags facility for Emacs
2;; Copyright (C) 1985, 86, 88, 89, 92, 93, 94, 95, 96, 98, 2000 2;; Copyright (C) 1985, 86, 88, 89, 92, 93, 94, 95, 96, 98, 2000, 2001
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Roland McGrath <roland@gnu.org> 5;; Author: Roland McGrath <roland@gnu.org>
@@ -1656,24 +1656,35 @@ nil, we exit; otherwise we scan the next file."
1656 ;; Non-nil means we have finished one file 1656 ;; Non-nil means we have finished one file
1657 ;; and should not scan it again. 1657 ;; and should not scan it again.
1658 file-finished 1658 file-finished
1659 original-point
1659 (messaged nil)) 1660 (messaged nil))
1660 (while 1661 (while
1661 (progn 1662 (progn
1662 ;; Scan files quickly for the first or next interesting one. 1663 ;; Scan files quickly for the first or next interesting one.
1664 ;; This starts at point in the current buffer.
1663 (while (or first-time file-finished 1665 (while (or first-time file-finished
1664 (save-restriction 1666 (save-restriction
1665 (widen) 1667 (widen)
1666 (not (tags-loop-eval tags-loop-scan)))) 1668 (not (tags-loop-eval tags-loop-scan))))
1669 ;; If nothing was found in the previous file, and
1670 ;; that file isn't in a temp buffer, restore point to
1671 ;; where it was.
1672 (when original-point
1673 (goto-char original-point))
1674
1667 (setq file-finished nil) 1675 (setq file-finished nil)
1668 (setq new (next-file first-time t)) 1676 (setq new (next-file first-time t))
1677
1669 ;; If NEW is non-nil, we got a temp buffer, 1678 ;; If NEW is non-nil, we got a temp buffer,
1670 ;; and NEW is the file name. 1679 ;; and NEW is the file name.
1671 (if (or messaged 1680 (when (or messaged
1672 (and (not first-time) 1681 (and (not first-time)
1673 (> baud-rate search-slow-speed) 1682 (> baud-rate search-slow-speed)
1674 (setq messaged t))) 1683 (setq messaged t)))
1675 (message "Scanning file %s..." (or new buffer-file-name))) 1684 (message "Scanning file %s..." (or new buffer-file-name)))
1685
1676 (setq first-time nil) 1686 (setq first-time nil)
1687 (setq original-point (if new nil (point)))
1677 (goto-char (point-min))) 1688 (goto-char (point-min)))
1678 1689
1679 ;; If we visited it in a temp buffer, visit it now for real. 1690 ;; If we visited it in a temp buffer, visit it now for real.
@@ -1683,7 +1694,8 @@ nil, we exit; otherwise we scan the next file."
1683 (set-buffer (find-file-noselect new)) 1694 (set-buffer (find-file-noselect new))
1684 (setq new nil) ;No longer in a temp buffer. 1695 (setq new nil) ;No longer in a temp buffer.
1685 (widen) 1696 (widen)
1686 (goto-char pos))) 1697 (goto-char pos))
1698 (push-mark original-point t))
1687 1699
1688 (switch-to-buffer (current-buffer)) 1700 (switch-to-buffer (current-buffer))
1689 1701