diff options
| author | Bill Wohler | 2006-01-10 01:56:32 +0000 |
|---|---|---|
| committer | Bill Wohler | 2006-01-10 01:56:32 +0000 |
| commit | 8f9efec855eed488b79e1234fd04d91bf806bc82 (patch) | |
| tree | 76eeaff02278dfa83ea242cbc2560afce5c35c9e | |
| parent | d6e2b25feceb2574fa8eef948db0100b33de0fd6 (diff) | |
| download | emacs-8f9efec855eed488b79e1234fd04d91bf806bc82.tar.gz emacs-8f9efec855eed488b79e1234fd04d91bf806bc82.zip | |
(mh-rescan-folder): Try to keep cursor at current message, even if cur
sequence is no longer present (closes SF #1207247).
| -rw-r--r-- | lisp/mh-e/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index ddd7d94c8d0..99aa9b5a98c 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2006-01-09 Bill Wohler <wohler@newt.com> | 1 | 2006-01-09 Bill Wohler <wohler@newt.com> |
| 2 | 2 | ||
| 3 | * mh-e.el (mh-rescan-folder): Try to keep cursor at current | ||
| 4 | message, even if cur sequence is no longer present (closes SF | ||
| 5 | #1207247). | ||
| 6 | |||
| 3 | * mh-comp.el: Use ";; Shush compiler." comment consistently per | 7 | * mh-comp.el: Use ";; Shush compiler." comment consistently per |
| 4 | Mark's suggestion. | 8 | Mark's suggestion. |
| 5 | (mh-letter-mode): Derive from mail-mode and delete code copied | 9 | (mh-letter-mode): Derive from mail-mode and delete code copied |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 31ae49bfc43..43743e3cad2 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -1208,8 +1208,13 @@ if DONT-EXEC-PENDING is non-nil." | |||
| 1208 | mh-interpret-number-as-range-flag) | 1208 | mh-interpret-number-as-range-flag) |
| 1209 | nil))) | 1209 | nil))) |
| 1210 | (setq mh-next-direction 'forward) | 1210 | (setq mh-next-direction 'forward) |
| 1211 | (let ((threaded-flag (memq 'unthread mh-view-ops))) | 1211 | (let ((threaded-flag (memq 'unthread mh-view-ops)) |
| 1212 | (msg-num (mh-get-msg-num nil))) | ||
| 1212 | (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending) | 1213 | (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending) |
| 1214 | ;; If there isn't a cur sequence, mh-scan-folder goes to the first message. | ||
| 1215 | ;; Try to stay where we were. | ||
| 1216 | (if (null (car (mh-seq-to-msgs 'cur))) | ||
| 1217 | (mh-goto-msg msg-num t t)) | ||
| 1213 | (cond (threaded-flag (mh-toggle-threads)) | 1218 | (cond (threaded-flag (mh-toggle-threads)) |
| 1214 | (mh-index-data (mh-index-insert-folder-headers))))) | 1219 | (mh-index-data (mh-index-insert-folder-headers))))) |
| 1215 | 1220 | ||
| @@ -1293,7 +1298,6 @@ RANGE is read in interactive use." | |||
| 1293 | (if (not (mh-outstanding-commands-p)) | 1298 | (if (not (mh-outstanding-commands-p)) |
| 1294 | (mh-set-folder-modified-p nil))) | 1299 | (mh-set-folder-modified-p nil))) |
| 1295 | 1300 | ||
| 1296 | |||
| 1297 | (defun mh-folder-line-matches-show-buffer-p () | 1301 | (defun mh-folder-line-matches-show-buffer-p () |
| 1298 | "Return t if the message under point in folder-mode is in the show buffer. | 1302 | "Return t if the message under point in folder-mode is in the show buffer. |
| 1299 | Return nil in any other circumstance (no message under point, no | 1303 | Return nil in any other circumstance (no message under point, no |
| @@ -1474,7 +1478,6 @@ structures." | |||
| 1474 | (setq mh-previous-window-config config))) | 1478 | (setq mh-previous-window-config config))) |
| 1475 | nil) | 1479 | nil) |
| 1476 | 1480 | ||
| 1477 | |||
| 1478 | (defun mh-update-sequences () | 1481 | (defun mh-update-sequences () |
| 1479 | "Flush MH-E's state out to MH. | 1482 | "Flush MH-E's state out to MH. |
| 1480 | 1483 | ||
| @@ -2262,7 +2265,6 @@ removed." | |||
| 2262 | (mh-remove-sequence-notation msg nil t)) | 2265 | (mh-remove-sequence-notation msg nil t)) |
| 2263 | (clrhash mh-sequence-notation-history))) | 2266 | (clrhash mh-sequence-notation-history))) |
| 2264 | 2267 | ||
| 2265 | |||
| 2266 | (defun mh-goto-cur-msg (&optional minimal-changes-flag) | 2268 | (defun mh-goto-cur-msg (&optional minimal-changes-flag) |
| 2267 | "Position the cursor at the current message. | 2269 | "Position the cursor at the current message. |
| 2268 | When optional argument MINIMAL-CHANGES-FLAG is non-nil, the | 2270 | When optional argument MINIMAL-CHANGES-FLAG is non-nil, the |