Mercurial > emacs
comparison lisp/gnus/gnus-salt.el @ 82951:0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Thu, 22 Jul 2004 16:45:51 +0000 |
parents | 695cf19ef79e |
children | 69f3d9a9952b |
comparison
equal
deleted
inserted
replaced
56503:8bbd2323fbf2 | 82951:0fde48feb604 |
---|---|
1 ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus | 1 ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus |
2 | 2 |
3 ;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2001 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
6 ;; Keywords: news | 7 ;; Keywords: news |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
28 | 29 |
29 (eval-when-compile (require 'cl)) | 30 (eval-when-compile (require 'cl)) |
30 | 31 |
31 (require 'gnus) | 32 (require 'gnus) |
32 (require 'gnus-sum) | 33 (require 'gnus-sum) |
34 (require 'gnus-win) | |
33 | 35 |
34 ;;; | 36 ;;; |
35 ;;; gnus-pick-mode | 37 ;;; gnus-pick-mode |
36 ;;; | 38 ;;; |
37 | 39 |
38 (defvar gnus-pick-mode nil | 40 (defvar gnus-pick-mode nil |
39 "Minor mode for providing a pick-and-read interface in Gnus summary buffers.") | 41 "Minor mode for providing a pick-and-read interface in Gnus |
42 summary buffers.") | |
40 | 43 |
41 (defcustom gnus-pick-display-summary nil | 44 (defcustom gnus-pick-display-summary nil |
42 "*Display summary while reading." | 45 "*Display summary while reading." |
43 :type 'boolean | 46 :type 'boolean |
44 :group 'gnus-summary-pick) | 47 :group 'gnus-summary-pick) |
46 (defcustom gnus-pick-mode-hook nil | 49 (defcustom gnus-pick-mode-hook nil |
47 "Hook run in summary pick mode buffers." | 50 "Hook run in summary pick mode buffers." |
48 :type 'hook | 51 :type 'hook |
49 :group 'gnus-summary-pick) | 52 :group 'gnus-summary-pick) |
50 | 53 |
54 (when (featurep 'xemacs) | |
55 (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add)) | |
56 | |
51 (defcustom gnus-mark-unpicked-articles-as-read nil | 57 (defcustom gnus-mark-unpicked-articles-as-read nil |
52 "*If non-nil, mark all unpicked articles as read." | 58 "*If non-nil, mark all unpicked articles as read." |
53 :type 'boolean | 59 :type 'boolean |
54 :group 'gnus-summary-pick) | 60 :group 'gnus-summary-pick) |
55 | 61 |
56 (defcustom gnus-pick-elegant-flow t | 62 (defcustom gnus-pick-elegant-flow t |
57 "If non-nil, `gnus-pick-start-reading' runs `gnus-summary-next-group' when no articles have been picked." | 63 "If non-nil, `gnus-pick-start-reading' runs |
64 `gnus-summary-next-group' when no articles have been picked." | |
58 :type 'boolean | 65 :type 'boolean |
59 :group 'gnus-summary-pick) | 66 :group 'gnus-summary-pick) |
60 | 67 |
61 (defcustom gnus-summary-pick-line-format | 68 (defcustom gnus-summary-pick-line-format |
62 "%-5P %U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" | 69 "%-5P %U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n" |
63 "*The format specification of the lines in pick buffers. | 70 "*The format specification of the lines in pick buffers. |
64 It accepts the same format specs that `gnus-summary-line-format' does." | 71 It accepts the same format specs that `gnus-summary-line-format' does." |
65 :type 'string | 72 :type 'string |
66 :group 'gnus-summary-pick) | 73 :group 'gnus-summary-pick) |
67 | 74 |
80 "\r" gnus-pick-start-reading)) | 87 "\r" gnus-pick-start-reading)) |
81 | 88 |
82 (defun gnus-pick-make-menu-bar () | 89 (defun gnus-pick-make-menu-bar () |
83 (unless (boundp 'gnus-pick-menu) | 90 (unless (boundp 'gnus-pick-menu) |
84 (easy-menu-define | 91 (easy-menu-define |
85 gnus-pick-menu gnus-pick-mode-map "" | 92 gnus-pick-menu gnus-pick-mode-map "" |
86 '("Pick" | 93 '("Pick" |
87 ("Pick" | 94 ("Pick" |
88 ["Article" gnus-summary-mark-as-processable t] | 95 ["Article" gnus-summary-mark-as-processable t] |
89 ["Thread" gnus-uu-mark-thread t] | 96 ["Thread" gnus-uu-mark-thread t] |
90 ["Region" gnus-uu-mark-region t] | 97 ["Region" gnus-uu-mark-region t] |
91 ["Regexp" gnus-uu-mark-by-regexp t] | 98 ["Regexp" gnus-uu-mark-by-regexp t] |
92 ["Buffer" gnus-uu-mark-buffer t]) | 99 ["Buffer" gnus-uu-mark-buffer t]) |
93 ("Unpick" | 100 ("Unpick" |
94 ["Article" gnus-summary-unmark-as-processable t] | 101 ["Article" gnus-summary-unmark-as-processable t] |
95 ["Thread" gnus-uu-unmark-thread t] | 102 ["Thread" gnus-uu-unmark-thread t] |
96 ["Region" gnus-uu-unmark-region t] | 103 ["Region" gnus-uu-unmark-region t] |
97 ["Regexp" gnus-uu-unmark-by-regexp t] | 104 ["Regexp" gnus-uu-unmark-by-regexp t] |
98 ["Buffer" gnus-summary-unmark-all-processable t]) | 105 ["Buffer" gnus-summary-unmark-all-processable t]) |
99 ["Start reading" gnus-pick-start-reading t] | 106 ["Start reading" gnus-pick-start-reading t] |
100 ["Switch pick mode off" gnus-pick-mode gnus-pick-mode])))) | 107 ["Switch pick mode off" gnus-pick-mode gnus-pick-mode])))) |
101 | 108 |
102 (defun gnus-pick-mode (&optional arg) | 109 (defun gnus-pick-mode (&optional arg) |
103 "Minor mode for providing a pick-and-read interface in Gnus summary buffers. | 110 "Minor mode for providing a pick-and-read interface in Gnus summary buffers. |
104 | 111 |
105 \\{gnus-pick-mode-map}" | 112 \\{gnus-pick-mode-map}" |
146 "Start reading the picked articles. | 153 "Start reading the picked articles. |
147 If given a prefix, mark all unpicked articles as read." | 154 If given a prefix, mark all unpicked articles as read." |
148 (interactive "P") | 155 (interactive "P") |
149 (if gnus-newsgroup-processable | 156 (if gnus-newsgroup-processable |
150 (progn | 157 (progn |
151 (gnus-summary-limit-to-articles nil) | 158 (gnus-summary-limit-to-articles nil) |
152 (when (or catch-up gnus-mark-unpicked-articles-as-read) | 159 (when (or catch-up gnus-mark-unpicked-articles-as-read) |
153 (gnus-summary-limit-mark-excluded-as-read)) | 160 (gnus-summary-limit-mark-excluded-as-read)) |
154 (gnus-summary-first-article) | 161 (gnus-summary-first-article) |
155 (gnus-configure-windows | 162 (gnus-configure-windows |
156 (if gnus-pick-display-summary 'article 'pick) t)) | 163 (if gnus-pick-display-summary 'article 'pick) t)) |
157 (if gnus-pick-elegant-flow | 164 (if gnus-pick-elegant-flow |
158 (progn | 165 (progn |
159 (when (or catch-up gnus-mark-unpicked-articles-as-read) | 166 (when (or catch-up gnus-mark-unpicked-articles-as-read) |
160 (gnus-summary-catchup nil t)) | 167 (gnus-summary-catchup nil t)) |
221 (interactive "e") | 228 (interactive "e") |
222 (mouse-minibuffer-check start-event) | 229 (mouse-minibuffer-check start-event) |
223 (let* ((echo-keystrokes 0) | 230 (let* ((echo-keystrokes 0) |
224 (start-posn (event-start start-event)) | 231 (start-posn (event-start start-event)) |
225 (start-point (posn-point start-posn)) | 232 (start-point (posn-point start-posn)) |
226 (start-line (1+ (count-lines 1 start-point))) | 233 (start-line (1+ (count-lines 1 start-point))) |
227 (start-window (posn-window start-posn)) | 234 (start-window (posn-window start-posn)) |
228 (bounds (gnus-window-edges start-window)) | 235 (bounds (gnus-window-edges start-window)) |
229 (top (nth 1 bounds)) | 236 (top (nth 1 bounds)) |
230 (bottom (if (window-minibuffer-p start-window) | 237 (bottom (if (window-minibuffer-p start-window) |
231 (nth 3 bounds) | 238 (nth 3 bounds) |
233 (1- (nth 3 bounds)))) | 240 (1- (nth 3 bounds)))) |
234 (click-count (1- (event-click-count start-event)))) | 241 (click-count (1- (event-click-count start-event)))) |
235 (setq mouse-selection-click-count click-count) | 242 (setq mouse-selection-click-count click-count) |
236 (setq mouse-selection-click-count-buffer (current-buffer)) | 243 (setq mouse-selection-click-count-buffer (current-buffer)) |
237 (mouse-set-point start-event) | 244 (mouse-set-point start-event) |
238 ;; In case the down click is in the middle of some intangible text, | 245 ;; In case the down click is in the middle of some intangible text, |
239 ;; use the end of that text, and put it in START-POINT. | 246 ;; use the end of that text, and put it in START-POINT. |
240 (when (< (point) start-point) | 247 (when (< (point) start-point) |
241 (goto-char start-point)) | 248 (goto-char start-point)) |
242 (gnus-pick-article) | 249 (gnus-pick-article) |
243 (setq start-point (point)) | 250 (setq start-point (point)) |
244 ;; end-of-range is used only in the single-click case. | 251 ;; end-of-range is used only in the single-click case. |
245 ;; It is the place where the drag has reached so far | 252 ;; It is the place where the drag has reached so far |
246 ;; (but not outside the window where the drag started). | 253 ;; (but not outside the window where the drag started). |
247 (let (event end end-point (end-of-range (point))) | 254 (let (event end end-point (end-of-range (point))) |
248 (track-mouse | 255 (track-mouse |
249 (while (progn | 256 (while (progn |
250 (setq event (cdr (gnus-read-event-char))) | 257 (setq event (cdr (gnus-read-event-char))) |
251 (or (mouse-movement-p event) | 258 (or (mouse-movement-p event) |
252 (eq (car-safe event) 'switch-frame))) | 259 (eq (car-safe event) 'switch-frame))) |
253 (if (eq (car-safe event) 'switch-frame) | 260 (if (eq (car-safe event) 'switch-frame) |
254 nil | 261 nil |
255 (setq end (event-end event) | 262 (setq end (event-end event) |
256 end-point (posn-point end)) | 263 end-point (posn-point end)) |
257 | 264 |
258 (cond | 265 (cond |
259 ;; Are we moving within the original window? | 266 ;; Are we moving within the original window? |
260 ((and (eq (posn-window end) start-window) | 267 ((and (eq (posn-window end) start-window) |
261 (integer-or-marker-p end-point)) | 268 (integer-or-marker-p end-point)) |
262 ;; Go to START-POINT first, so that when we move to END-POINT, | 269 ;; Go to START-POINT first, so that when we move to END-POINT, |
263 ;; if it's in the middle of intangible text, | 270 ;; if it's in the middle of intangible text, |
264 ;; point jumps in the direction away from START-POINT. | 271 ;; point jumps in the direction away from START-POINT. |
265 (goto-char start-point) | 272 (goto-char start-point) |
266 (goto-char end-point) | 273 (goto-char end-point) |
267 (gnus-pick-article) | 274 (gnus-pick-article) |
268 ;; In case the user moved his mouse really fast, pick | 275 ;; In case the user moved his mouse really fast, pick |
269 ;; articles on the line between this one and the last one. | 276 ;; articles on the line between this one and the last one. |
270 (let* ((this-line (1+ (count-lines 1 end-point))) | 277 (let* ((this-line (1+ (count-lines 1 end-point))) |
271 (min-line (min this-line start-line)) | 278 (min-line (min this-line start-line)) |
272 (max-line (max this-line start-line))) | 279 (max-line (max this-line start-line))) |
273 (while (< min-line max-line) | 280 (while (< min-line max-line) |
274 (goto-line min-line) | 281 (goto-line min-line) |
275 (gnus-pick-article) | 282 (gnus-pick-article) |
276 (setq min-line (1+ min-line))) | 283 (setq min-line (1+ min-line))) |
277 (setq start-line this-line)) | 284 (setq start-line this-line)) |
278 (when (zerop (% click-count 3)) | 285 (when (zerop (% click-count 3)) |
279 (setq end-of-range (point)))) | 286 (setq end-of-range (point)))) |
280 (t | 287 (t |
281 (let ((mouse-row (cdr (cdr (mouse-position))))) | 288 (let ((mouse-row (cdr (cdr (mouse-position))))) |
282 (cond | 289 (cond |
283 ((null mouse-row)) | 290 ((null mouse-row)) |
284 ((< mouse-row top) | 291 ((< mouse-row top) |
285 (mouse-scroll-subr start-window (- mouse-row top))) | 292 (mouse-scroll-subr start-window (- mouse-row top))) |
286 ((>= mouse-row bottom) | 293 ((>= mouse-row bottom) |
287 (mouse-scroll-subr start-window | 294 (mouse-scroll-subr start-window |
288 (1+ (- mouse-row bottom))))))))))) | 295 (1+ (- mouse-row bottom))))))))))) |
289 (when (consp event) | 296 (when (consp event) |
290 (let ((fun (key-binding (vector (car event))))) | 297 (let ((fun (key-binding (vector (car event))))) |
291 ;; Run the binding of the terminating up-event, if possible. | 298 ;; Run the binding of the terminating up-event, if possible. |
292 ;; In the case of a multiple click, it gives the wrong results, | 299 ;; In the case of a multiple click, it gives the wrong results, |
293 ;; because it would fail to set up a region. | 300 ;; because it would fail to set up a region. |
294 (when nil | 301 (when nil |
295 ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) | 302 ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) |
296 ;; In this case, we can just let the up-event execute normally. | 303 ;; In this case, we can just let the up-event execute normally. |
297 (let ((end (event-end event))) | 304 (let ((end (event-end event))) |
298 ;; Set the position in the event before we replay it, | 305 ;; Set the position in the event before we replay it, |
299 ;; because otherwise it may have a position in the wrong | 306 ;; because otherwise it may have a position in the wrong |
300 ;; buffer. | 307 ;; buffer. |
301 (setcar (cdr end) end-of-range) | 308 (setcar (cdr end) end-of-range) |
302 ;; Delete the overlay before calling the function, | 309 ;; Delete the overlay before calling the function, |
303 ;; because delete-overlay increases buffer-modified-tick. | 310 ;; because delete-overlay increases buffer-modified-tick. |
304 (push event unread-command-events)))))))) | 311 (push event unread-command-events)))))))) |
305 | 312 |
306 (defun gnus-pick-next-page () | 313 (defun gnus-pick-next-page () |
307 "Go to the next page. If at the end of the buffer, start reading articles." | 314 "Go to the next page. If at the end of the buffer, start reading articles." |
308 (interactive) | 315 (interactive) |
331 "g" gnus-binary-show-article)) | 338 "g" gnus-binary-show-article)) |
332 | 339 |
333 (defun gnus-binary-make-menu-bar () | 340 (defun gnus-binary-make-menu-bar () |
334 (unless (boundp 'gnus-binary-menu) | 341 (unless (boundp 'gnus-binary-menu) |
335 (easy-menu-define | 342 (easy-menu-define |
336 gnus-binary-menu gnus-binary-mode-map "" | 343 gnus-binary-menu gnus-binary-mode-map "" |
337 '("Pick" | 344 '("Pick" |
338 ["Switch binary mode off" gnus-binary-mode t])))) | 345 ["Switch binary mode off" gnus-binary-mode t])))) |
339 | 346 |
340 (defun gnus-binary-mode (&optional arg) | 347 (defun gnus-binary-mode (&optional arg) |
341 "Minor mode for providing a binary group interface in Gnus summary buffers." | 348 "Minor mode for providing a binary group interface in Gnus summary buffers." |
342 (interactive "P") | 349 (interactive "P") |
343 (when (eq major-mode 'gnus-summary-mode) | 350 (when (eq major-mode 'gnus-summary-mode) |
359 (gnus-run-hooks 'gnus-binary-mode-hook)))) | 366 (gnus-run-hooks 'gnus-binary-mode-hook)))) |
360 | 367 |
361 (defun gnus-binary-display-article (article &optional all-header) | 368 (defun gnus-binary-display-article (article &optional all-header) |
362 "Run ARTICLE through the binary decode functions." | 369 "Run ARTICLE through the binary decode functions." |
363 (when (gnus-summary-goto-subject article) | 370 (when (gnus-summary-goto-subject article) |
364 (let ((gnus-view-pseudos 'automatic)) | 371 (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) |
365 (gnus-uu-decode-uu)))) | 372 (gnus-uu-decode-uu)))) |
366 | 373 |
367 (defun gnus-binary-show-article (&optional arg) | 374 (defun gnus-binary-show-article (&optional arg) |
368 "Bypass the binary functions and show the article." | 375 "Bypass the binary functions and show the article." |
369 (interactive "P") | 376 (interactive "P") |
415 | 422 |
416 (defcustom gnus-tree-mode-hook nil | 423 (defcustom gnus-tree-mode-hook nil |
417 "*Hook run in tree mode buffers." | 424 "*Hook run in tree mode buffers." |
418 :type 'hook | 425 :type 'hook |
419 :group 'gnus-summary-tree) | 426 :group 'gnus-summary-tree) |
427 | |
428 (when (featurep 'xemacs) | |
429 (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add) | |
430 (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off)) | |
431 | |
420 | 432 |
421 ;;; Internal variables. | 433 ;;; Internal variables. |
422 | 434 |
423 (defvar gnus-tree-line-format-alist | 435 (defvar gnus-tree-line-format-alist |
424 `((?n gnus-tmp-name ?s) | 436 `((?n gnus-tmp-name ?s) |
458 'undefined 'gnus-tree-read-summary-keys gnus-tree-mode-map)) | 470 'undefined 'gnus-tree-read-summary-keys gnus-tree-mode-map)) |
459 | 471 |
460 (defun gnus-tree-make-menu-bar () | 472 (defun gnus-tree-make-menu-bar () |
461 (unless (boundp 'gnus-tree-menu) | 473 (unless (boundp 'gnus-tree-menu) |
462 (easy-menu-define | 474 (easy-menu-define |
463 gnus-tree-menu gnus-tree-mode-map "" | 475 gnus-tree-menu gnus-tree-mode-map "" |
464 '("Tree" | 476 '("Tree" |
465 ["Select article" gnus-tree-select-article t])))) | 477 ["Select article" gnus-tree-select-article t])))) |
466 | 478 |
467 (defun gnus-tree-mode () | 479 (defun gnus-tree-mode () |
468 "Major mode for displaying thread trees." | 480 "Major mode for displaying thread trees." |
469 (interactive) | 481 (interactive) |
470 (gnus-set-format 'tree-mode) | 482 (gnus-set-format 'tree-mode) |
541 (goto-char pos)))) | 553 (goto-char pos)))) |
542 | 554 |
543 (defun gnus-tree-recenter () | 555 (defun gnus-tree-recenter () |
544 "Center point in the tree window." | 556 "Center point in the tree window." |
545 (let ((selected (selected-window)) | 557 (let ((selected (selected-window)) |
546 (tree-window (get-buffer-window gnus-tree-buffer t))) | 558 (tree-window (gnus-get-buffer-window gnus-tree-buffer t))) |
547 (when tree-window | 559 (when tree-window |
548 (select-window tree-window) | 560 (select-window tree-window) |
549 (when gnus-selected-tree-overlay | 561 (when gnus-selected-tree-overlay |
550 (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) | 562 (goto-char (or (gnus-overlay-end gnus-selected-tree-overlay) 1))) |
551 (let* ((top (cond ((< (window-height) 4) 0) | 563 (let* ((top (cond ((< (window-height) 4) 0) |
553 (t 2))) | 565 (t 2))) |
554 (height (1- (window-height))) | 566 (height (1- (window-height))) |
555 (bottom (save-excursion (goto-char (point-max)) | 567 (bottom (save-excursion (goto-char (point-max)) |
556 (forward-line (- height)) | 568 (forward-line (- height)) |
557 (point)))) | 569 (point)))) |
558 ;; Set the window start to either `bottom', which is the biggest | 570 ;; Set the window start to either `bottom', which is the biggest |
559 ;; possible valid number, or the second line from the top, | 571 ;; possible valid number, or the second line from the top, |
560 ;; whichever is the least. | 572 ;; whichever is the least. |
561 (set-window-start | 573 (set-window-start |
562 tree-window (min bottom (save-excursion | 574 tree-window (min bottom (save-excursion |
563 (forward-line (- top)) (point))))) | 575 (forward-line (- top)) (point))))) |
654 (save-excursion | 666 (save-excursion |
655 (set-buffer gnus-summary-buffer) | 667 (set-buffer gnus-summary-buffer) |
656 (let* ((score (or (cdr (assq article gnus-newsgroup-scored)) | 668 (let* ((score (or (cdr (assq article gnus-newsgroup-scored)) |
657 gnus-summary-default-score 0)) | 669 gnus-summary-default-score 0)) |
658 (default gnus-summary-default-score) | 670 (default gnus-summary-default-score) |
671 (default-high gnus-summary-default-high-score) | |
672 (default-low gnus-summary-default-low-score) | |
673 (uncached (memq article gnus-newsgroup-undownloaded)) | |
674 (downloaded (not uncached)) | |
659 (mark (or (gnus-summary-article-mark article) gnus-unread-mark))) | 675 (mark (or (gnus-summary-article-mark article) gnus-unread-mark))) |
660 ;; Eval the cars of the lists until we find a match. | 676 ;; Eval the cars of the lists until we find a match. |
661 (while (and list | 677 (while (and list |
662 (not (eval (caar list)))) | 678 (not (eval (caar list)))) |
663 (setq list (cdr list))))) | 679 (setq list (cdr list))))) |
684 (gnus-set-mode-line 'tree) | 700 (gnus-set-mode-line 'tree) |
685 (goto-char (point-min)) | 701 (goto-char (point-min)) |
686 (gnus-tree-minimize) | 702 (gnus-tree-minimize) |
687 (gnus-tree-recenter) | 703 (gnus-tree-recenter) |
688 (let ((selected (selected-window))) | 704 (let ((selected (selected-window))) |
689 (when (get-buffer-window (set-buffer gnus-tree-buffer) t) | 705 (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t) |
690 (select-window (get-buffer-window (set-buffer gnus-tree-buffer) t)) | 706 (select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)) |
691 (gnus-horizontal-recenter) | 707 (gnus-horizontal-recenter) |
692 (select-window selected)))))) | 708 (select-window selected)))))) |
693 | 709 |
694 (defun gnus-generate-horizontal-tree (thread level &optional dummyp adopted) | 710 (defun gnus-generate-horizontal-tree (thread level &optional dummyp adopted) |
695 "Generate a horizontal tree." | 711 "Generate a horizontal tree." |
823 (gnus-get-tree-buffer)) | 839 (gnus-get-tree-buffer)) |
824 | 840 |
825 (defun gnus-tree-close (group) | 841 (defun gnus-tree-close (group) |
826 (gnus-kill-buffer gnus-tree-buffer)) | 842 (gnus-kill-buffer gnus-tree-buffer)) |
827 | 843 |
844 (defun gnus-tree-perhaps-minimize () | |
845 (when (and gnus-tree-minimize-window | |
846 (get-buffer gnus-tree-buffer)) | |
847 (save-excursion | |
848 (set-buffer gnus-tree-buffer) | |
849 (gnus-tree-minimize)))) | |
850 | |
828 (defun gnus-highlight-selected-tree (article) | 851 (defun gnus-highlight-selected-tree (article) |
829 "Highlight the selected article in the tree." | 852 "Highlight the selected article in the tree." |
830 (let ((buf (current-buffer)) | 853 (let ((buf (current-buffer)) |
831 region) | 854 region) |
832 (set-buffer gnus-tree-buffer) | 855 (set-buffer gnus-tree-buffer) |
841 (gnus-move-overlay | 864 (gnus-move-overlay |
842 gnus-selected-tree-overlay (goto-char (car region)) (cdr region)) | 865 gnus-selected-tree-overlay (goto-char (car region)) (cdr region)) |
843 (gnus-tree-minimize) | 866 (gnus-tree-minimize) |
844 (gnus-tree-recenter) | 867 (gnus-tree-recenter) |
845 (let ((selected (selected-window))) | 868 (let ((selected (selected-window))) |
846 (when (get-buffer-window (set-buffer gnus-tree-buffer) t) | 869 (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t) |
847 (select-window (get-buffer-window (set-buffer gnus-tree-buffer) t)) | 870 (select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)) |
848 (gnus-horizontal-recenter) | 871 (gnus-horizontal-recenter) |
849 (select-window selected)))) | 872 (select-window selected)))) |
850 ;; If we remove this save-excursion, it updates the wrong mode lines?!? | 873 ;; If we remove this save-excursion, it updates the wrong mode lines?!? |
851 (save-excursion | 874 (save-excursion |
852 (set-buffer gnus-tree-buffer) | 875 (set-buffer gnus-tree-buffer) |
853 (gnus-set-mode-line 'tree)) | 876 (gnus-set-mode-line 'tree)) |
854 (set-buffer buf))) | 877 (set-buffer buf))) |
855 | 878 |
858 (set-buffer (gnus-get-tree-buffer)) | 881 (set-buffer (gnus-get-tree-buffer)) |
859 (let (region) | 882 (let (region) |
860 (when (setq region (gnus-tree-article-region article)) | 883 (when (setq region (gnus-tree-article-region article)) |
861 (gnus-put-text-property (car region) (cdr region) 'face face) | 884 (gnus-put-text-property (car region) (cdr region) 'face face) |
862 (set-window-point | 885 (set-window-point |
863 (get-buffer-window (current-buffer) t) (cdr region)))))) | 886 (gnus-get-buffer-window (current-buffer) t) (cdr region)))))) |
864 | 887 |
865 ;;; | 888 ;;; |
866 ;;; gnus-carpal | 889 ;;; gnus-carpal |
867 ;;; | 890 ;;; |
868 | 891 |
884 ("killed" . gnus-group-list-killed) | 907 ("killed" . gnus-group-list-killed) |
885 ("zombies" . gnus-group-list-zombies) | 908 ("zombies" . gnus-group-list-zombies) |
886 ("matching" . gnus-group-list-matching) | 909 ("matching" . gnus-group-list-matching) |
887 ("post" . gnus-group-post-news) | 910 ("post" . gnus-group-post-news) |
888 ("mail" . gnus-group-mail) | 911 ("mail" . gnus-group-mail) |
912 ("local" . (lambda () (interactive) (gnus-group-news 0))) | |
889 ("rescan" . gnus-group-get-new-news) | 913 ("rescan" . gnus-group-get-new-news) |
890 ("browse-foreign" . gnus-group-browse-foreign) | 914 ("browse-foreign" . gnus-group-browse-foreign) |
891 ("exit" . gnus-group-exit))) | 915 ("exit" . gnus-group-exit))) |
892 | 916 |
893 (defvar gnus-carpal-summary-buffer-buttons | 917 (defvar gnus-carpal-summary-buffer-buttons |
914 "threads" | 938 "threads" |
915 ("lower" . gnus-summary-lower-thread) | 939 ("lower" . gnus-summary-lower-thread) |
916 ("kill" . gnus-summary-kill-thread) | 940 ("kill" . gnus-summary-kill-thread) |
917 "post" | 941 "post" |
918 ("post" . gnus-summary-post-news) | 942 ("post" . gnus-summary-post-news) |
919 ("mail" . gnus-summary-mail) | 943 ("local" . gnus-summary-news-other-window) |
944 ("mail" . gnus-summary-mail-other-window) | |
920 ("followup" . gnus-summary-followup-with-original) | 945 ("followup" . gnus-summary-followup-with-original) |
921 ("reply" . gnus-summary-reply-with-original) | 946 ("reply" . gnus-summary-reply-with-original) |
922 ("cancel" . gnus-summary-cancel-article) | 947 ("cancel" . gnus-summary-cancel-article) |
923 "misc" | 948 "misc" |
924 ("exit" . gnus-summary-exit) | 949 ("exit" . gnus-summary-exit) |