diff options
| author | Karl Heuer | 1994-04-07 07:09:16 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-07 07:09:16 +0000 |
| commit | 0732dfa5c1070905571405c03d7b613b0da5fa56 (patch) | |
| tree | 4d05b03a983686b21febfc37816ac461b9ba520b | |
| parent | c35fb2162d15282de38c19f7b8bbfdce727b784b (diff) | |
| download | emacs-0732dfa5c1070905571405c03d7b613b0da5fa56.tar.gz emacs-0732dfa5c1070905571405c03d7b613b0da5fa56.zip | |
(rmail-summary-disable): New function.
(rmail-summary-enable): New function.
(rmail-summary-mode): Call rmail-summary-enable.
| -rw-r--r-- | lisp/mail/rmailsum.el | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index a4079f2f527..a8428e065b5 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -515,7 +515,6 @@ Commands for sorting the summary: | |||
| 515 | (kill-all-local-variables) | 515 | (kill-all-local-variables) |
| 516 | (setq major-mode 'rmail-summary-mode) | 516 | (setq major-mode 'rmail-summary-mode) |
| 517 | (setq mode-name "RMAIL Summary") | 517 | (setq mode-name "RMAIL Summary") |
| 518 | (use-local-map rmail-summary-mode-map) | ||
| 519 | (setq truncate-lines t) | 518 | (setq truncate-lines t) |
| 520 | (setq buffer-read-only t) | 519 | (setq buffer-read-only t) |
| 521 | (set-syntax-table text-mode-syntax-table) | 520 | (set-syntax-table text-mode-syntax-table) |
| @@ -526,11 +525,25 @@ Commands for sorting the summary: | |||
| 526 | (make-local-variable 'rmail-summary-redo) | 525 | (make-local-variable 'rmail-summary-redo) |
| 527 | (setq rmail-summary-redo nil) | 526 | (setq rmail-summary-redo nil) |
| 528 | (make-local-variable 'revert-buffer-function) | 527 | (make-local-variable 'revert-buffer-function) |
| 529 | (setq revert-buffer-function 'rmail-update-summary) | ||
| 530 | (make-local-variable 'post-command-hook) | 528 | (make-local-variable 'post-command-hook) |
| 531 | (add-hook 'post-command-hook 'rmail-summary-rmail-update) | 529 | (rmail-summary-enable) |
| 532 | (run-hooks 'rmail-summary-mode-hook)) | 530 | (run-hooks 'rmail-summary-mode-hook)) |
| 533 | 531 | ||
| 532 | ;; Summary features need to be disabled during edit mode. | ||
| 533 | (defun rmail-summary-disable () | ||
| 534 | (save-excursion | ||
| 535 | (set-buffer rmail-summary-buffer) | ||
| 536 | (use-local-map text-mode-map) | ||
| 537 | (remove-hook 'post-command-hook 'rmail-summary-rmail-update) | ||
| 538 | (setq revert-buffer-function nil))) | ||
| 539 | |||
| 540 | (defun rmail-summary-enable () | ||
| 541 | (save-excursion | ||
| 542 | (set-buffer rmail-summary-buffer) | ||
| 543 | (use-local-map rmail-summary-mode-map) | ||
| 544 | (add-hook 'post-command-hook 'rmail-summary-rmail-update) | ||
| 545 | (setq revert-buffer-function 'rmail-update-summary))) | ||
| 546 | |||
| 534 | ;; Show in Rmail the message described by the summary line that point is on, | 547 | ;; Show in Rmail the message described by the summary line that point is on, |
| 535 | ;; but only if the Rmail buffer is already visible. | 548 | ;; but only if the Rmail buffer is already visible. |
| 536 | ;; This is a post-command-hook in summary buffers. | 549 | ;; This is a post-command-hook in summary buffers. |