From 54a3610ee0b4daa340ef6366fcf23233d5207f61 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 19 Jun 2000 20:27:45 +0000 Subject: [PATCH] Reimplement M-x imail-toggle-header (in addition to imail-toggle-message). --- v7/src/imail/imail-top.scm | 18 +++++++++++++++--- v7/src/imail/todo.txt | 7 +------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index a788d5da1..569a85e62 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.171 2000/06/19 20:01:12 cph Exp $ +;;; $Id: imail-top.scm,v 1.172 2000/06/19 20:27:37 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -341,6 +341,7 @@ Instead, these commands are available: \\[imail-summary-by-flags] Like \\[imail-summary] only just messages with particular flag(s). \\[imail-summary-by-recipients] Like \\[imail-summary] only just messages with particular recipient(s). +\\[imail-toggle-header] Toggle between full headers and reduced headers. \\[imail-toggle-message] Toggle between standard and raw message formats.") (define (imail-revert-buffer buffer dont-use-auto-save? dont-confirm?) @@ -403,7 +404,8 @@ Instead, these commands are available: (define-key 'imail #\r 'imail-reply) (define-key 'imail #\s 'imail-save-folder) (define-key 'imail #\m-s 'imail-search) -(define-key 'imail #\t 'imail-toggle-message) +(define-key 'imail #\t 'imail-toggle-header) +(define-key 'imail #\T 'imail-toggle-message) (define-key 'imail #\u 'imail-undelete-previous-message) (define-key 'imail #\m-u 'imail-first-unseen-message) (define-key 'imail #\x 'imail-expunge) @@ -1319,6 +1321,16 @@ If it doesn't exist, it is created first." "Folder saved" "No changes need to be saved.")))) +(define-command imail-toggle-header + "Show full message headers if pruned headers currently shown, or vice versa." + () + (lambda () + (let ((message (selected-message))) + (select-message (selected-folder) + message + #t + (if (get-property message 'RAW? #f) #f 'FULL-HEADERS))))) + (define-command imail-toggle-message "Toggle between standard and raw formats for message." () @@ -1671,7 +1683,7 @@ Negative argument means search in reverse." (begin (store-property! message 'RAW? raw?) (insert-header-fields message raw? mark) - (cond (raw? + (cond ((and raw? (not (eq? raw? 'FULL-HEADERS))) (insert-message-body message mark)) ((folder-supports-mime? folder) (insert-mime-message-body message mark #f 0)) diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index c1d83fd4f..9c01f40bb 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,14 +1,9 @@ IMAIL To-Do List -$Id: todo.txt,v 1.87 2000/06/19 20:01:21 cph Exp $ +$Id: todo.txt,v 1.88 2000/06/19 20:27:45 cph Exp $ Bug fixes --------- -* M-x imail-toggle-message isn't really a replacement for M-x - imail-toggle-headers. If the message is really large, and you just - want to see the headers, it's serious overkill. So reimplement the - latter, and bind the former to `T'. - * Must be able to handle malformed headers in incoming mail. Generating a low-level error in this situation is unacceptable. -- 2.25.1