Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 102386:5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Disable undo in the summary buffer.
(rmail-summary-sort-by-date, rmail-summary-sort-by-subject)
(rmail-summary-sort-by-author, rmail-summary-sort-by-recipient)
(rmail-summary-sort-by-correspondent, rmail-summary-sort-by-lines)
(rmail-summary-sort-by-labels, rmail-sort-from-summary): Doc fixes.
(rmail-summary-sort-by-labels): Replace `(function (lambda' by `(lambda'.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 04 Mar 2009 04:18:51 +0000 |
parents | 6a06f943ee6d |
children | 3ba455e0b28d |
comparison
equal
deleted
inserted
replaced
102385:e85d013e3140 | 102386:5850b3824f16 |
---|---|
328 rmail-summary-redo form | 328 rmail-summary-redo form |
329 rmail-total-messages total))) | 329 rmail-total-messages total))) |
330 sumbuf)) | 330 sumbuf)) |
331 | 331 |
332 (defun rmail-get-create-summary-buffer () | 332 (defun rmail-get-create-summary-buffer () |
333 "Obtain a summary buffer by re-using an existing summary | 333 "Return the Rmail summary buffer. |
334 buffer, or by creating a new summary buffer." | 334 If necessary, it is created and undo is disabled." |
335 (if (and rmail-summary-buffer (buffer-name rmail-summary-buffer)) | 335 (if (and rmail-summary-buffer (buffer-name rmail-summary-buffer)) |
336 rmail-summary-buffer | 336 rmail-summary-buffer |
337 (generate-new-buffer (concat (buffer-name) "-summary")))) | 337 (let ((buff (generate-new-buffer (concat (buffer-name) "-summary")))) |
338 (with-current-buffer buff | |
339 (setq buffer-undo-list t)) | |
340 buff))) | |
338 | 341 |
339 | 342 |
340 ;; Low levels of generating a summary. | 343 ;; Low levels of generating a summary. |
341 | 344 |
342 (defun rmail-get-summary (msgnum) | 345 (defun rmail-get-summary (msgnum) |
1789 (rmail-summary-delete-forward nil))) | 1792 (rmail-summary-delete-forward nil))) |
1790 | 1793 |
1791 ;; Sorting messages in Rmail Summary buffer. | 1794 ;; Sorting messages in Rmail Summary buffer. |
1792 | 1795 |
1793 (defun rmail-summary-sort-by-date (reverse) | 1796 (defun rmail-summary-sort-by-date (reverse) |
1794 "Sort messages of current Rmail summary by date. | 1797 "Sort messages of current Rmail summary by \"Date\" header. |
1795 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1798 If prefix argument REVERSE is non-nil, sorts in reverse order." |
1796 (interactive "P") | 1799 (interactive "P") |
1797 (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) | 1800 (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) |
1798 | 1801 |
1799 (defun rmail-summary-sort-by-subject (reverse) | 1802 (defun rmail-summary-sort-by-subject (reverse) |
1800 "Sort messages of current Rmail summary by subject. | 1803 "Sort messages of current Rmail summary by \"Subject\" header. |
1801 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1804 Ignores any \"Re: \" prefix. If prefix argument REVERSE is |
1805 non-nil, sorts in reverse order." | |
1802 (interactive "P") | 1806 (interactive "P") |
1803 (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) | 1807 (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) |
1804 | 1808 |
1805 (defun rmail-summary-sort-by-author (reverse) | 1809 (defun rmail-summary-sort-by-author (reverse) |
1806 "Sort messages of current Rmail summary by author. | 1810 "Sort messages of current Rmail summary by author. |
1807 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1811 This uses either the \"From\" or \"Sender\" header, downcased. |
1812 If prefix argument REVERSE is non-nil, sorts in reverse order." | |
1808 (interactive "P") | 1813 (interactive "P") |
1809 (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) | 1814 (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) |
1810 | 1815 |
1811 (defun rmail-summary-sort-by-recipient (reverse) | 1816 (defun rmail-summary-sort-by-recipient (reverse) |
1812 "Sort messages of current Rmail summary by recipient. | 1817 "Sort messages of current Rmail summary by recipient. |
1813 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1818 This uses either the \"To\" or \"Apparently-To\" header, downcased. |
1819 If prefix argument REVERSE is non-nil, sorts in reverse order." | |
1814 (interactive "P") | 1820 (interactive "P") |
1815 (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) | 1821 (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) |
1816 | 1822 |
1817 (defun rmail-summary-sort-by-correspondent (reverse) | 1823 (defun rmail-summary-sort-by-correspondent (reverse) |
1818 "Sort messages of current Rmail summary by other correspondent. | 1824 "Sort messages of current Rmail summary by other correspondent. |
1819 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1825 This uses either the \"From\", \"Sender\", \"To\", or |
1826 \"Apparently-To\" header, downcased. Uses the first header not | |
1827 excluded by `rmail-dont-reply-to-names'. If prefix argument | |
1828 REVERSE is non-nil, sorts in reverse order." | |
1820 (interactive "P") | 1829 (interactive "P") |
1821 (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) | 1830 (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) |
1822 | 1831 |
1823 (defun rmail-summary-sort-by-lines (reverse) | 1832 (defun rmail-summary-sort-by-lines (reverse) |
1824 "Sort messages of current Rmail summary by lines of the message. | 1833 "Sort messages of current Rmail summary by the number of lines. |
1825 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1834 If prefix argument REVERSE is non-nil, sorts in reverse order." |
1826 (interactive "P") | 1835 (interactive "P") |
1827 (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) | 1836 (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) |
1828 | 1837 |
1829 (defun rmail-summary-sort-by-labels (reverse labels) | 1838 (defun rmail-summary-sort-by-labels (reverse labels) |
1830 "Sort messages of current Rmail summary by labels. | 1839 "Sort messages of current Rmail summary by labels. |
1831 If prefix argument REVERSE is non-nil, sort them in reverse order. | 1840 LABELS is a comma-separated list of labels. |
1832 KEYWORDS is a comma-separated list of labels." | 1841 If prefix argument REVERSE is non-nil, sorts in reverse order." |
1833 (interactive "P\nsSort by labels: ") | 1842 (interactive "P\nsSort by labels: ") |
1834 (rmail-sort-from-summary | 1843 (rmail-sort-from-summary |
1835 (function (lambda (reverse) | 1844 (lambda (reverse) (rmail-sort-by-labels reverse labels)) |
1836 (rmail-sort-by-labels reverse labels))) | |
1837 reverse)) | 1845 reverse)) |
1838 | 1846 |
1839 (defun rmail-sort-from-summary (sortfun reverse) | 1847 (defun rmail-sort-from-summary (sortfun reverse) |
1840 "Sort Rmail messages from Summary buffer and update it after sorting." | 1848 "Sort the Rmail buffer using sorting function SORTFUN. |
1849 Passes REVERSE to SORTFUN as its sole argument. Then regenerates | |
1850 the summary. Note that the whole Rmail buffer is sorted, even if | |
1851 the summary is only showing a subset of messages." | |
1841 (require 'rmailsort) | 1852 (require 'rmailsort) |
1842 (let ((selwin (selected-window))) | 1853 (let ((selwin (selected-window))) |
1843 (unwind-protect | 1854 (unwind-protect |
1844 (progn (pop-to-buffer rmail-buffer) | 1855 (progn (pop-to-buffer rmail-buffer) |
1845 (funcall sortfun reverse)) | 1856 (funcall sortfun reverse)) |