diff options
| -rw-r--r-- | lisp/mail/rmail.el | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d3dbda54ed2..9eceb3da62a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -345,7 +345,102 @@ Note: it means the file has no messages in it.\n\^_"))) | |||
| 345 | (define-key rmail-mode-map "\177" 'scroll-down) | 345 | (define-key rmail-mode-map "\177" 'scroll-down) |
| 346 | (define-key rmail-mode-map "?" 'describe-mode) | 346 | (define-key rmail-mode-map "?" 'describe-mode) |
| 347 | ) | 347 | ) |
| 348 | |||
| 349 | (define-key rmail-mode-map [menu-bar] (make-sparse-keymap)) | ||
| 350 | |||
| 351 | (define-key rmail-mode-map [menu-bar classify] | ||
| 352 | (cons "Classify" (make-sparse-keymap "Classify"))) | ||
| 353 | |||
| 354 | (define-key rmail-mode-map [menu-bar classify output-inbox] | ||
| 355 | '("Output (inbox)" . rmail-output)) | ||
| 356 | |||
| 357 | (define-key rmail-mode-map [menu-bar classify output] | ||
| 358 | '("Output (Rmail)" . rmail-output-to-rmail-file)) | ||
| 359 | |||
| 360 | (define-key rmail-mode-map [menu-bar classify kill-label] | ||
| 361 | '("Kill Label" . rmail-kill-label)) | ||
| 362 | |||
| 363 | (define-key rmail-mode-map [menu-bar classify add-label] | ||
| 364 | '("Add Label" . rmail-add-label)) | ||
| 365 | |||
| 366 | (define-key rmail-mode-map [menu-bar summary] | ||
| 367 | (cons "Summary" (make-sparse-keymap "Summary"))) | ||
| 368 | |||
| 369 | (define-key rmail-mode-map [menu-bar summary labels] | ||
| 370 | '("By Labels" . rmail-summary-by-labels)) | ||
| 371 | |||
| 372 | (define-key rmail-mode-map [menu-bar summary recipients] | ||
| 373 | '("By Recipients" . rmail-summary-by-recipients)) | ||
| 374 | |||
| 375 | (define-key rmail-mode-map [menu-bar summary topic] | ||
| 376 | '("By Topic" . rmail-summary-by-topic)) | ||
| 377 | |||
| 378 | (define-key rmail-mode-map [menu-bar summary regexp] | ||
| 379 | '("By Regexp" . rmail-summary-by-regexp)) | ||
| 380 | |||
| 381 | (define-key rmail-mode-map [menu-bar summary all] | ||
| 382 | '("All" . rmail-summary)) | ||
| 383 | |||
| 384 | (define-key rmail-mode-map [menu-bar mail] | ||
| 385 | (cons "Mail" (make-sparse-keymap "Mail"))) | ||
| 386 | |||
| 387 | (define-key rmail-mode-map [menu-bar mail continue] | ||
| 388 | '("Continue" . rmail-continue)) | ||
| 389 | |||
| 390 | (define-key rmail-mode-map [menu-bar mail forward] | ||
| 391 | '("Forward" . rmail-forward)) | ||
| 392 | |||
| 393 | (define-key rmail-mode-map [menu-bar mail retry] | ||
| 394 | '("Retry" . rmail-retry-failure)) | ||
| 395 | |||
| 396 | (define-key rmail-mode-map [menu-bar mail reply] | ||
| 397 | '("Reply" . rmail-reply)) | ||
| 398 | |||
| 399 | (define-key rmail-mode-map [menu-bar mail mail] | ||
| 400 | '("Mail" . rmail-mail)) | ||
| 401 | |||
| 402 | (define-key rmail-mode-map [menu-bar delete] | ||
| 403 | (cons "Delete" (make-sparse-keymap "Delete"))) | ||
| 404 | |||
| 405 | (define-key rmail-mode-map [menu-bar delete expunge/save] | ||
| 406 | '("Expunge/Save" . rmail-expunge-and-save)) | ||
| 407 | |||
| 408 | (define-key rmail-mode-map [menu-bar delete expunge] | ||
| 409 | '("Expunge" . rmail-expunge)) | ||
| 410 | |||
| 411 | (define-key rmail-mode-map [menu-bar delete undelete] | ||
| 412 | '("Undelete" . rmail-undelete-previous-message)) | ||
| 413 | |||
| 414 | (define-key rmail-mode-map [menu-bar delete delete] | ||
| 415 | '("Delete" . rmail-delete-forward)) | ||
| 416 | |||
| 417 | (define-key rmail-mode-map [menu-bar move] | ||
| 418 | (cons "Move" (make-sparse-keymap "Move"))) | ||
| 419 | |||
| 420 | (define-key rmail-mode-map [menu-bar move search-back] | ||
| 421 | '("Search Back" . rmail-search-backward)) | ||
| 422 | |||
| 423 | (define-key rmail-mode-map [menu-bar move search] | ||
| 424 | '("Search" . rmail-search)) | ||
| 425 | |||
| 426 | (define-key rmail-mode-map [menu-bar move previous] | ||
| 427 | '("Previous Nondeleted" . rmail-previous-undeleted-message)) | ||
| 348 | 428 | ||
| 429 | (define-key rmail-mode-map [menu-bar move next] | ||
| 430 | '("Next Nondeleted" . rmail-next-undeleted-message)) | ||
| 431 | |||
| 432 | (define-key rmail-mode-map [menu-bar move last] | ||
| 433 | '("Last" . rmail-last-message)) | ||
| 434 | |||
| 435 | (define-key rmail-mode-map [menu-bar move first] | ||
| 436 | '("First" . rmail-first-message)) | ||
| 437 | |||
| 438 | (define-key rmail-mode-map [menu-bar move previous] | ||
| 439 | '("Previous" . rmail-previous-message)) | ||
| 440 | |||
| 441 | (define-key rmail-mode-map [menu-bar move next] | ||
| 442 | '("Next" . rmail-next-message)) | ||
| 443 | |||
| 349 | ;; Rmail mode is suitable only for specially formatted data. | 444 | ;; Rmail mode is suitable only for specially formatted data. |
| 350 | (put 'rmail-mode 'mode-class 'special) | 445 | (put 'rmail-mode 'mode-class 'special) |
| 351 | 446 | ||
| @@ -1277,6 +1372,30 @@ or forward if N is negative." | |||
| 1277 | (search-forward "*** EOOH ***" (point-max)) (point)))) | 1372 | (search-forward "*** EOOH ***" (point-max)) (point)))) |
| 1278 | (re-search-forward regexp end t))) | 1373 | (re-search-forward regexp end t))) |
| 1279 | 1374 | ||
| 1375 | (defun rmail-search-backward (regexp &optional n) | ||
| 1376 | "Show message containing next match for REGEXP. | ||
| 1377 | Prefix argument gives repeat count; negative argument means search | ||
| 1378 | backwards (through earlier messages). | ||
| 1379 | Interactively, empty argument means use same regexp used last time." | ||
| 1380 | (interactive | ||
| 1381 | (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) | ||
| 1382 | (prompt | ||
| 1383 | (concat (if reversep "Reverse " "") "Rmail search (regexp): ")) | ||
| 1384 | regexp) | ||
| 1385 | (if rmail-search-last-regexp | ||
| 1386 | (setq prompt (concat prompt | ||
| 1387 | "(default " | ||
| 1388 | rmail-search-last-regexp | ||
| 1389 | ") "))) | ||
| 1390 | (setq regexp (read-string prompt)) | ||
| 1391 | (cond ((not (equal regexp "")) | ||
| 1392 | (setq rmail-search-last-regexp regexp)) | ||
| 1393 | ((not rmail-search-last-regexp) | ||
| 1394 | (error "No previous Rmail search string"))) | ||
| 1395 | (list rmail-search-last-regexp | ||
| 1396 | (prefix-numeric-value current-prefix-arg)))) | ||
| 1397 | (rmail-search regexp (- n))) | ||
| 1398 | |||
| 1280 | (defvar rmail-search-last-regexp nil) | 1399 | (defvar rmail-search-last-regexp nil) |
| 1281 | (defun rmail-search (regexp &optional n) | 1400 | (defun rmail-search (regexp &optional n) |
| 1282 | "Show message containing next match for REGEXP. | 1401 | "Show message containing next match for REGEXP. |