diff options
| author | Glenn Morris | 2009-03-04 04:18:51 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-03-04 04:18:51 +0000 |
| commit | 11d6c06103adfef4cbf744d3231bc7ea3e89e0f4 (patch) | |
| tree | f0be791d14c3e381118457f45a91a67dd6e9cd4c | |
| parent | f213f2c07e43935ea707632c289b2b198737459b (diff) | |
| download | emacs-11d6c06103adfef4cbf744d3231bc7ea3e89e0f4.tar.gz emacs-11d6c06103adfef4cbf744d3231bc7ea3e89e0f4.zip | |
(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'.
| -rw-r--r-- | lisp/mail/rmailsum.el | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index bad78369f7b..3c9d3e54709 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -330,11 +330,14 @@ message." | |||
| 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. |
| @@ -1791,53 +1794,61 @@ FILE-NAME defaults, interactively, from the Subject field of the message." | |||
| 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 |