aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-24 23:41:15 +0000
committerRichard M. Stallman1994-06-24 23:41:15 +0000
commitef97d5a271e65eaff59e5141fd29d83e908179dc (patch)
tree65d360f970cfcd8dc2e15de1d420dd5680700618
parent4841063fd95b365d2f71055b23ea6b0e79784cbe (diff)
downloademacs-ef97d5a271e65eaff59e5141fd29d83e908179dc.tar.gz
emacs-ef97d5a271e65eaff59e5141fd29d83e908179dc.zip
(gnus-summary-mode-map): Add menu bar menus.
(gnus-group-mode-map): Add menu bar menus. (gnus-summary-catchup-to-here): New function. (gnus-summary-show-all-threads): Enable thread use. (gnus-summary-show-thread): Enable thread use. (gnus-summary-hide-all-threads): Enable thread use. (gnus-summary-hide-thread): Enable thread use. (gnus-summary-next-article): Fix previous change.
-rw-r--r--lisp/gnus.el181
1 files changed, 177 insertions, 4 deletions
diff --git a/lisp/gnus.el b/lisp/gnus.el
index fb515e1e115..e1b43d40630 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -970,7 +970,54 @@ Optional argument HASHSIZE specifies the table size."
970 (define-key gnus-group-mode-map "q" 'gnus-group-exit) 970 (define-key gnus-group-mode-map "q" 'gnus-group-exit)
971 (define-key gnus-group-mode-map "Q" 'gnus-group-quit) 971 (define-key gnus-group-mode-map "Q" 'gnus-group-quit)
972 (define-key gnus-group-mode-map "?" 'gnus-group-describe-briefly) 972 (define-key gnus-group-mode-map "?" 'gnus-group-describe-briefly)
973 (define-key gnus-group-mode-map "\C-c\C-i" 'gnus-info-find-node)) 973 (define-key gnus-group-mode-map "\C-c\C-i" 'gnus-info-find-node)
974
975 ;; Make a menu bar item.
976 (define-key gnus-group-mode-map [menu-bar GNUS]
977 (cons "GNUS" (make-sparse-keymap "GNUS")))
978
979 (define-key gnus-group-mode-map [menu-bar GNUS force-update]
980 '("Force Update" . gnus-group-force-update))
981 (define-key gnus-group-mode-map [menu-bar GNUS quit]
982 '("Quit" . gnus-group-quit))
983 (define-key gnus-group-mode-map [menu-bar GNUS exit]
984 '("Exit" . gnus-group-exit))
985 (define-key gnus-group-mode-map [menu-bar GNUS restart]
986 '("Restart" . gnus-group-restart))
987 (define-key gnus-group-mode-map [menu-bar GNUS suspend]
988 '("Suspend" . gnus-group-suspend))
989 (define-key gnus-group-mode-map [menu-bar GNUS get-new-news]
990 '("Get New News" . gnus-group-get-new-news))
991
992 ;; Make a menu bar item.
993 (define-key gnus-group-mode-map [menu-bar groups]
994 (cons "Groups" (make-sparse-keymap "Groups")))
995
996 (define-key gnus-group-mode-map [menu-bar groups catchup]
997 '("Catchup" . gnus-group-catchup))
998 (define-key gnus-group-mode-map [menu-bar groups edit-global-kill]
999 '("Edit Kill File" . gnus-group-edit-global-kill))
1000
1001 (define-key gnus-group-mode-map [menu-bar groups separator-2]
1002 '("--"))
1003
1004 (define-key gnus-group-mode-map [menu-bar groups yank-group]
1005 '("Yank Group" . gnus-group-yank-group))
1006 (define-key gnus-group-mode-map [menu-bar groups kill-group]
1007 '("Kill Group" . gnus-group-kill-group))
1008
1009 (define-key gnus-group-mode-map [menu-bar groups separator-1]
1010 '("--"))
1011
1012 (define-key gnus-group-mode-map [menu-bar groups jump-to-group]
1013 '("Jump to Group..." . gnus-group-jump-to-group))
1014 (define-key gnus-group-mode-map [menu-bar groups list-all-groups]
1015 '("List All Groups" . gnus-group-list-all-groups))
1016 (define-key gnus-group-mode-map [menu-bar groups list-groups]
1017 '("List Groups" . gnus-group-list-groups))
1018 (define-key gnus-group-mode-map [menu-bar groups unsub-current-group]
1019 '("Unsubscribe Group" . gnus-group-unsubscribe-current-group))
1020 )
974 1021
975(defun gnus-group-mode () 1022(defun gnus-group-mode ()
976 "Major mode for reading network news. 1023 "Major mode for reading network news.
@@ -1625,7 +1672,7 @@ Type \\[widen] to remove restriction."
1625 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)"))) 1672 "Editing a local KILL file (Type \\[gnus-kill-file-exit] to exit)")))
1626 1673
1627(defun gnus-group-force-update () 1674(defun gnus-group-force-update ()
1628 "Update .newsrc file." 1675 "Update `.newsrc' file."
1629 (interactive) 1676 (interactive)
1630 (gnus-save-newsrc-file)) 1677 (gnus-save-newsrc-file))
1631 1678
@@ -1797,7 +1844,115 @@ The hook gnus-exit-gnus-hook is called before actually quitting."
1797 (define-key gnus-summary-mode-map "q" 'gnus-summary-exit) 1844 (define-key gnus-summary-mode-map "q" 'gnus-summary-exit)
1798 (define-key gnus-summary-mode-map "Q" 'gnus-summary-quit) 1845 (define-key gnus-summary-mode-map "Q" 'gnus-summary-quit)
1799 (define-key gnus-summary-mode-map "?" 'gnus-summary-describe-briefly) 1846 (define-key gnus-summary-mode-map "?" 'gnus-summary-describe-briefly)
1800 (define-key gnus-summary-mode-map "\C-c\C-i" 'gnus-info-find-node)) 1847 (define-key gnus-summary-mode-map "\C-c\C-i" 'gnus-info-find-node)
1848
1849 (define-key gnus-summary-mode-map [menu-bar misc]
1850 (cons "Misc" (make-sparse-keymap "misc")))
1851
1852 (define-key gnus-summary-mode-map [menu-bar misc caesar-message]
1853 '("Caesar Message" . gnus-summary-caesar-message))
1854 (define-key gnus-summary-mode-map [menu-bar misc cancel-article]
1855 '("Cancel Article" . gnus-summary-cancel-article))
1856 (define-key gnus-summary-mode-map [menu-bar misc edit-local-kill]
1857 '("Edit Kill File" . gnus-summary-edit-local-kill))
1858
1859 (define-key gnus-summary-mode-map [menu-bar misc mark-as-unread]
1860 '("Mark as Unread" . gnus-summary-mark-as-unread-forward))
1861 (define-key gnus-summary-mode-map [menu-bar misc mark-as-read]
1862 '("Mark as Read" . gnus-summary-mark-as-read))
1863
1864 (define-key gnus-summary-mode-map [menu-bar misc quit]
1865 '("Quit GNUS" . gnus-summary-quit))
1866 (define-key gnus-summary-mode-map [menu-bar misc exit]
1867 '("Exit GNUS" . gnus-summary-exit))
1868
1869 (define-key gnus-summary-mode-map [menu-bar sort]
1870 (cons "Sort" (make-sparse-keymap "sort")))
1871
1872 (define-key gnus-summary-mode-map [menu-bar sort sort-by-author]
1873 '("Sort by Author" . gnus-summary-sort-by-author))
1874 (define-key gnus-summary-mode-map [menu-bar sort sort-by-date]
1875 '("Sort by Date" . gnus-summary-sort-by-date))
1876 (define-key gnus-summary-mode-map [menu-bar sort sort-by-number]
1877 '("Sort by Number" . gnus-summary-sort-by-number))
1878 (define-key gnus-summary-mode-map [menu-bar sort sort-by-subject]
1879 '("Sort by Subject" . gnus-summary-sort-by-subject))
1880 (define-key gnus-summary-mode-map [menu-bar sort sort-summary]
1881 '("Sort Summary" . gnus-summary-sort-summary))
1882
1883 (define-key gnus-summary-mode-map [menu-bar show/hide]
1884 (cons "Show/Hide" (make-sparse-keymap "show/hide")))
1885
1886 (define-key gnus-summary-mode-map [menu-bar show/hide hide-all-threads]
1887 '("Hide All Threads" . gnus-summary-hide-all-threads))
1888 (define-key gnus-summary-mode-map [menu-bar show/hide hide-thread]
1889 '("Hide Thread" . gnus-summary-hide-thread))
1890 (define-key gnus-summary-mode-map [menu-bar show/hide show-all-threads]
1891 '("Show All Threads" . gnus-summary-show-all-threads))
1892 (define-key gnus-summary-mode-map [menu-bar show/hide show-all-headers]
1893 '("Show All Headers" . gnus-summary-show-all-headers))
1894 (define-key gnus-summary-mode-map [menu-bar show/hide show-thread]
1895 '("Show Thread" . gnus-summary-show-thread))
1896 (define-key gnus-summary-mode-map [menu-bar show/hide show-article]
1897 '("Show Article" . gnus-summary-show-article))
1898 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-truncation]
1899 '("Toggle Truncation" . gnus-summary-toggle-truncation))
1900 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-mime]
1901 '("Toggle Mime" . gnus-summary-toggle-mime))
1902 (define-key gnus-summary-mode-map [menu-bar show/hide toggle-header]
1903 '("Toggle Header" . gnus-summary-toggle-header))
1904
1905 (define-key gnus-summary-mode-map [menu-bar action]
1906 (cons "Action" (make-sparse-keymap "action")))
1907
1908 (define-key gnus-summary-mode-map [menu-bar action kill-same-subject]
1909 '("kill-same-subject" . gnus-summary-kill-same-subject))
1910 (define-key gnus-summary-mode-map [menu-bar action kill-thread]
1911 '("kill-thread" . gnus-summary-kill-thread))
1912 (define-key gnus-summary-mode-map [menu-bar action delete-marked-with]
1913 '("delete-marked-with" . gnus-summary-delete-marked-with))
1914 (define-key gnus-summary-mode-map [menu-bar action delete-marked-as-read]
1915 '("delete-marked-as-read" . gnus-summary-delete-marked-as-read))
1916 (define-key gnus-summary-mode-map [menu-bar action catchup-and-exit]
1917 '("catchup-and-exit" . gnus-summary-catchup-and-exit))
1918 (define-key gnus-summary-mode-map [menu-bar action catchup-to-here]
1919 '("catchup-to-here" . gnus-summary-catchup-to-here))
1920
1921 (define-key gnus-summary-mode-map [menu-bar action save-in-file]
1922 '("save-in-file" . gnus-summary-save-in-file))
1923 (define-key gnus-summary-mode-map [menu-bar action save-article]
1924 '("save-article" . gnus-summary-save-article))
1925
1926 (define-key gnus-summary-mode-map [menu-bar action followup-with-original]
1927 '("followup-with-original" . gnus-summary-followup-with-original))
1928 (define-key gnus-summary-mode-map [menu-bar action followup]
1929 '("followup" . gnus-summary-followup))
1930 (define-key gnus-summary-mode-map [menu-bar action reply-with-original]
1931 '("reply-with-original" . gnus-summary-reply-with-original))
1932 (define-key gnus-summary-mode-map [menu-bar action reply]
1933 '("reply" . gnus-summary-reply))
1934
1935 (define-key gnus-summary-mode-map [menu-bar move]
1936 (cons "Move" (make-sparse-keymap "move")))
1937
1938 (define-key gnus-summary-mode-map [menu-bar move down-thread]
1939 '("down-thread" . gnus-summary-down-thread))
1940 (define-key gnus-summary-mode-map [menu-bar move prev-same-subject]
1941 '("prev-same-subject" . gnus-summary-prev-same-subject))
1942 (define-key gnus-summary-mode-map [menu-bar move prev-group]
1943 '("prev-group" . gnus-summary-prev-group))
1944 (define-key gnus-summary-mode-map [menu-bar move next-unread-same-subject]
1945 '("next-unread-same-subject" . gnus-summary-next-unread-same-subject))
1946 (define-key gnus-summary-mode-map [menu-bar move next-unread-article]
1947 '("next-unread-article" . gnus-summary-next-unread-article))
1948 (define-key gnus-summary-mode-map [menu-bar move next-thread]
1949 '("next-thread" . gnus-summary-next-thread))
1950 (define-key gnus-summary-mode-map [menu-bar move next-group]
1951 '("next-group" . gnus-summary-next-group))
1952 (define-key gnus-summary-mode-map [menu-bar move first-unread-article]
1953 '("first-unread-article" . gnus-summary-first-unread-article))
1954 )
1955
1801 1956
1802(defun gnus-summary-mode () 1957(defun gnus-summary-mode ()
1803 "Major mode for reading articles in this newsgroup. 1958 "Major mode for reading articles in this newsgroup.
@@ -2742,7 +2897,7 @@ If argument UNREAD is non-nil, only unread article is selected."
2742 (if (listp event) 2897 (if (listp event)
2743 (car event) 2898 (car event)
2744 event))) 2899 event)))
2745 (if (eq char type) 2900 (if (and (eq event type) (eq event cmd))
2746 (gnus-summary-next-group nil) 2901 (gnus-summary-next-group nil)
2747 (setq unread-command-events (list event))))) 2902 (setq unread-command-events (list event)))))
2748 ) 2903 )
@@ -3377,6 +3532,8 @@ With arg, turn showing conversation threads on iff arg is positive."
3377(defun gnus-summary-show-all-threads () 3532(defun gnus-summary-show-all-threads ()
3378 "Show all thread subtrees." 3533 "Show all thread subtrees."
3379 (interactive) 3534 (interactive)
3535 (or gnus-show-threads
3536 (gnus-summary-show-all-threads 1))
3380 (if gnus-show-threads 3537 (if gnus-show-threads
3381 (save-excursion 3538 (save-excursion
3382 (let ((buffer-read-only nil)) 3539 (let ((buffer-read-only nil))
@@ -3386,6 +3543,8 @@ With arg, turn showing conversation threads on iff arg is positive."
3386(defun gnus-summary-show-thread () 3543(defun gnus-summary-show-thread ()
3387 "Show thread subtrees." 3544 "Show thread subtrees."
3388 (interactive) 3545 (interactive)
3546 (or gnus-show-threads
3547 (gnus-summary-show-all-threads 1))
3389 (if gnus-show-threads 3548 (if gnus-show-threads
3390 (save-excursion 3549 (save-excursion
3391 (let ((buffer-read-only nil)) 3550 (let ((buffer-read-only nil))
@@ -3399,6 +3558,8 @@ With arg, turn showing conversation threads on iff arg is positive."
3399(defun gnus-summary-hide-all-threads () 3558(defun gnus-summary-hide-all-threads ()
3400 "Hide all thread subtrees." 3559 "Hide all thread subtrees."
3401 (interactive) 3560 (interactive)
3561 (or gnus-show-threads
3562 (gnus-summary-show-all-threads 1))
3402 (if gnus-show-threads 3563 (if gnus-show-threads
3403 (save-excursion 3564 (save-excursion
3404 ;; Adjust cursor point. 3565 ;; Adjust cursor point.
@@ -3414,6 +3575,8 @@ With arg, turn showing conversation threads on iff arg is positive."
3414(defun gnus-summary-hide-thread () 3575(defun gnus-summary-hide-thread ()
3415 "Hide thread subtrees." 3576 "Hide thread subtrees."
3416 (interactive) 3577 (interactive)
3578 (or gnus-show-threads
3579 (gnus-summary-show-all-threads 1))
3417 (if gnus-show-threads 3580 (if gnus-show-threads
3418 (save-excursion 3581 (save-excursion
3419 ;; Adjust cursor point. 3582 ;; Adjust cursor point.
@@ -3963,6 +4126,16 @@ If prefix argument ALL is non-nil, all articles are marked as read."
3963 )) 4126 ))
3964 )) 4127 ))
3965 4128
4129(defun gnus-summary-catchup-to-here ()
4130 "Mark all articles before the current one in this newsgroup as read."
4131 (interactive)
4132 (beginning-of-line)
4133 (let ((current (gnus-summary-article-number)))
4134 (beginning-of-buffer)
4135 (while (not (= (gnus-summary-article-number) current))
4136 (gnus-summary-mark-as-read)
4137 (gnus-summary-next-subject 1))))
4138
3966(defun gnus-summary-catchup-all (&optional quietly) 4139(defun gnus-summary-catchup-all (&optional quietly)
3967 "Mark all articles in this newsgroup as read." 4140 "Mark all articles in this newsgroup as read."
3968 (interactive) 4141 (interactive)