aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-02-10 00:08:51 +0000
committerRichard M. Stallman1997-02-10 00:08:51 +0000
commit1884e32542ed6d4aa6bcde0b4b49685355e83961 (patch)
tree863dedf2c0106f8240d24a2cd120cbec9b2066c7
parent5ff083afb4c48a45d091a70fd9d260d5456aa7f6 (diff)
downloademacs-1884e32542ed6d4aa6bcde0b4b49685355e83961.tar.gz
emacs-1884e32542ed6d4aa6bcde0b4b49685355e83961.zip
(rmail-sort-messages): Preserve point
with respect to the the current message.
-rw-r--r--lisp/mail/rmailsort.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 4066890fea9..316e833a76d 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc.
4 4
5;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> 5;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
6;; Version: $Header: /home/fsf/rms/e19/lisp/RCS/rmailsort.el,v 1.24 1996/01/20 07:41:37 kwzh Exp rms $ 6;; Maintainer: FSF
7;; Keywords: mail 7;; Keywords: mail
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
@@ -154,11 +154,12 @@ KEYWORDS is a comma-separated list of labels."
154 "Sort messages of current Rmail file. 154 "Sort messages of current Rmail file.
155If 1st argument REVERSE is non-nil, sort them in reverse order. 155If 1st argument REVERSE is non-nil, sort them in reverse order.
1562nd argument KEYFUN is called with a message number, and should return a key." 1562nd argument KEYFUN is called with a message number, and should return a key."
157 (save-excursion 157 (save-current-buffer
158 ;; If we are in a summary buffer, operate on the Rmail buffer. 158 ;; If we are in a summary buffer, operate on the Rmail buffer.
159 (if (eq major-mode 'rmail-summary-mode) 159 (if (eq major-mode 'rmail-summary-mode)
160 (set-buffer rmail-buffer)) 160 (set-buffer rmail-buffer))
161 (let ((buffer-read-only nil) 161 (let ((buffer-read-only nil)
162 (point-offset (- (point) (point-min)))
162 (predicate nil) ;< or string-lessp 163 (predicate nil) ;< or string-lessp
163 (sort-lists nil)) 164 (sort-lists nil))
164 (message "Finding sort keys...") 165 (message "Finding sort keys...")
@@ -217,6 +218,7 @@ If 1st argument REVERSE is non-nil, sort them in reverse order.
217 (buffer-enable-undo) 218 (buffer-enable-undo)
218 (rmail-set-message-counters) 219 (rmail-set-message-counters)
219 (rmail-show-message current-message) 220 (rmail-show-message current-message)
221 (goto-char (+ point-offset (point-min)))
220 (if (rmail-summary-exists) 222 (if (rmail-summary-exists)
221 (rmail-select-summary 223 (rmail-select-summary
222 (rmail-update-summary))))))) 224 (rmail-update-summary)))))))