Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 14293:87b4bd8fea26
(rmail-make-basic-summary-line): Include msg line number.
(rmail-summary-goto-msg):
Pass along args NOWARN and SKIP-RMAIL in recursive call.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 24 Jan 1996 23:30:25 +0000 |
parents | 83f275dcd93a |
children | 55ffd73831cb |
comparison
equal
deleted
inserted
replaced
14292:7e97c9b8801f | 14293:87b4bd8fea26 |
---|---|
376 (setq lo (cond ((< (- mch 14) 0) 0) | 376 (setq lo (cond ((< (- mch 14) 0) 0) |
377 ((< len (+ mch 11)) | 377 ((< len (+ mch 11)) |
378 (- len 25)) | 378 (- len 25)) |
379 (t (- mch 14)))) | 379 (t (- mch 14)))) |
380 (min len (+ lo 25)))))))) | 380 (min len (+ lo 25)))))))) |
381 (save-excursion | |
382 (save-restriction | |
383 (widen) | |
384 (let | |
385 ((lines (count-lines (rmail-msgbeg msgnum) (rmail-msgend msgnum)))) | |
386 (format (cond | |
387 ((<= lines 9) " [%d]") | |
388 ((<= lines 99) " [%d]") | |
389 ((<= lines 999) " [%3d]") | |
390 (t "[%d]")) | |
391 lines)))) | |
381 " #" | 392 " #" |
382 (if (re-search-forward "^Subject:" nil t) | 393 (if (re-search-forward "^Subject:" nil t) |
383 (progn (skip-chars-forward " \t") | 394 (progn (skip-chars-forward " \t") |
384 (buffer-substring (point) | 395 (buffer-substring (point) |
385 (progn (end-of-line) | 396 (progn (end-of-line) |
528 Deleted messages stay in the file until the \\[rmail-expunge] command is given." | 539 Deleted messages stay in the file until the \\[rmail-expunge] command is given." |
529 (interactive) | 540 (interactive) |
530 (rmail-summary-delete-forward t)) | 541 (rmail-summary-delete-forward t)) |
531 | 542 |
532 (defun rmail-summary-mark-deleted (&optional n undel) | 543 (defun rmail-summary-mark-deleted (&optional n undel) |
544 ;; Since third arg is t, this only alters the summary, not the Rmail buf. | |
533 (and n (rmail-summary-goto-msg n t t)) | 545 (and n (rmail-summary-goto-msg n t t)) |
534 (or (eobp) | 546 (or (eobp) |
535 (not (overlay-get rmail-summary-overlay 'face)) | 547 (not (overlay-get rmail-summary-overlay 'face)) |
536 (let ((buffer-read-only nil)) | 548 (let ((buffer-read-only nil)) |
537 (skip-chars-forward " ") | 549 (skip-chars-forward " ") |
875 '("Next" . rmail-summary-next-all)) | 887 '("Next" . rmail-summary-next-all)) |
876 | 888 |
877 (defvar rmail-summary-overlay nil) | 889 (defvar rmail-summary-overlay nil) |
878 (put 'rmail-summary-overlay 'permanent-local t) | 890 (put 'rmail-summary-overlay 'permanent-local t) |
879 | 891 |
892 ;; Go to message N in the summary buffer which is current, | |
893 ;; and in the corresponding Rmail buffer. | |
894 ;; If N is nil, use the message corresponding to point in the summary | |
895 ;; and move to that message in the Rmail buffer. | |
896 | |
897 ;; If NOWARN, don't say anything if N is out of range. | |
898 ;; If SKIP-RMAIL, don't do anything to the Rmail buffer. | |
899 | |
880 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) | 900 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) |
881 (interactive "P") | 901 (interactive "P") |
882 (if (consp n) (setq n (prefix-numeric-value n))) | 902 (if (consp n) (setq n (prefix-numeric-value n))) |
883 (if (eobp) (forward-line -1)) | 903 (if (eobp) (forward-line -1)) |
884 (beginning-of-line) | 904 (beginning-of-line) |
900 (progn (message "No preceding message") | 920 (progn (message "No preceding message") |
901 (setq n 1))) | 921 (setq n 1))) |
902 (if (> n total) | 922 (if (> n total) |
903 (progn (message "No following message") | 923 (progn (message "No following message") |
904 (goto-char (point-max)) | 924 (goto-char (point-max)) |
905 (rmail-summary-goto-msg))) | 925 (rmail-summary-goto-msg nil nowarn skip-rmail))) |
906 (goto-char (point-min)) | 926 (goto-char (point-min)) |
907 (if (not (re-search-forward (format "^%4d[^0-9]" n) nil t)) | 927 (if (not (re-search-forward (format "^%4d[^0-9]" n) nil t)) |
908 (progn (or nowarn (message "Message %d not found" n)) | 928 (progn (or nowarn (message "Message %d not found" n)) |
909 (setq n curmsg) | 929 (setq n curmsg) |
910 (setq message-not-found t) | 930 (setq message-not-found t) |