Mercurial > emacs
changeset 3863:049283382a10
(rmail-mode-map): Add local menu bar bindings.
(rmail-search-backward): New command.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 22 Jun 1993 02:25:20 +0000 |
parents | d65e83bd1120 |
children | ee987f852b10 |
files | lisp/mail/rmail.el |
diffstat | 1 files changed, 119 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Tue Jun 22 02:25:05 1993 +0000 +++ b/lisp/mail/rmail.el Tue Jun 22 02:25:20 1993 +0000 @@ -345,7 +345,102 @@ (define-key rmail-mode-map "\177" 'scroll-down) (define-key rmail-mode-map "?" 'describe-mode) ) + +(define-key rmail-mode-map [menu-bar] (make-sparse-keymap)) +(define-key rmail-mode-map [menu-bar classify] + (cons "Classify" (make-sparse-keymap "Classify"))) + +(define-key rmail-mode-map [menu-bar classify output-inbox] + '("Output (inbox)" . rmail-output)) + +(define-key rmail-mode-map [menu-bar classify output] + '("Output (Rmail)" . rmail-output-to-rmail-file)) + +(define-key rmail-mode-map [menu-bar classify kill-label] + '("Kill Label" . rmail-kill-label)) + +(define-key rmail-mode-map [menu-bar classify add-label] + '("Add Label" . rmail-add-label)) + +(define-key rmail-mode-map [menu-bar summary] + (cons "Summary" (make-sparse-keymap "Summary"))) + +(define-key rmail-mode-map [menu-bar summary labels] + '("By Labels" . rmail-summary-by-labels)) + +(define-key rmail-mode-map [menu-bar summary recipients] + '("By Recipients" . rmail-summary-by-recipients)) + +(define-key rmail-mode-map [menu-bar summary topic] + '("By Topic" . rmail-summary-by-topic)) + +(define-key rmail-mode-map [menu-bar summary regexp] + '("By Regexp" . rmail-summary-by-regexp)) + +(define-key rmail-mode-map [menu-bar summary all] + '("All" . rmail-summary)) + +(define-key rmail-mode-map [menu-bar mail] + (cons "Mail" (make-sparse-keymap "Mail"))) + +(define-key rmail-mode-map [menu-bar mail continue] + '("Continue" . rmail-continue)) + +(define-key rmail-mode-map [menu-bar mail forward] + '("Forward" . rmail-forward)) + +(define-key rmail-mode-map [menu-bar mail retry] + '("Retry" . rmail-retry-failure)) + +(define-key rmail-mode-map [menu-bar mail reply] + '("Reply" . rmail-reply)) + +(define-key rmail-mode-map [menu-bar mail mail] + '("Mail" . rmail-mail)) + +(define-key rmail-mode-map [menu-bar delete] + (cons "Delete" (make-sparse-keymap "Delete"))) + +(define-key rmail-mode-map [menu-bar delete expunge/save] + '("Expunge/Save" . rmail-expunge-and-save)) + +(define-key rmail-mode-map [menu-bar delete expunge] + '("Expunge" . rmail-expunge)) + +(define-key rmail-mode-map [menu-bar delete undelete] + '("Undelete" . rmail-undelete-previous-message)) + +(define-key rmail-mode-map [menu-bar delete delete] + '("Delete" . rmail-delete-forward)) + +(define-key rmail-mode-map [menu-bar move] + (cons "Move" (make-sparse-keymap "Move"))) + +(define-key rmail-mode-map [menu-bar move search-back] + '("Search Back" . rmail-search-backward)) + +(define-key rmail-mode-map [menu-bar move search] + '("Search" . rmail-search)) + +(define-key rmail-mode-map [menu-bar move previous] + '("Previous Nondeleted" . rmail-previous-undeleted-message)) + +(define-key rmail-mode-map [menu-bar move next] + '("Next Nondeleted" . rmail-next-undeleted-message)) + +(define-key rmail-mode-map [menu-bar move last] + '("Last" . rmail-last-message)) + +(define-key rmail-mode-map [menu-bar move first] + '("First" . rmail-first-message)) + +(define-key rmail-mode-map [menu-bar move previous] + '("Previous" . rmail-previous-message)) + +(define-key rmail-mode-map [menu-bar move next] + '("Next" . rmail-next-message)) + ;; Rmail mode is suitable only for specially formatted data. (put 'rmail-mode 'mode-class 'special) @@ -1277,6 +1372,30 @@ (search-forward "*** EOOH ***" (point-max)) (point)))) (re-search-forward regexp end t))) +(defun rmail-search-backward (regexp &optional n) + "Show message containing next match for REGEXP. +Prefix argument gives repeat count; negative argument means search +backwards (through earlier messages). +Interactively, empty argument means use same regexp used last time." + (interactive + (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) + (prompt + (concat (if reversep "Reverse " "") "Rmail search (regexp): ")) + regexp) + (if rmail-search-last-regexp + (setq prompt (concat prompt + "(default " + rmail-search-last-regexp + ") "))) + (setq regexp (read-string prompt)) + (cond ((not (equal regexp "")) + (setq rmail-search-last-regexp regexp)) + ((not rmail-search-last-regexp) + (error "No previous Rmail search string"))) + (list rmail-search-last-regexp + (prefix-numeric-value current-prefix-arg)))) + (rmail-search regexp (- n))) + (defvar rmail-search-last-regexp nil) (defun rmail-search (regexp &optional n) "Show message containing next match for REGEXP.