1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
emacs/lisp/gnus/gnus-salt.el

864 lines
29 KiB
EmacsLisp
Raw Normal View History

1997-04-16 22:13:18 +00:00
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
;; Copyright (C) 1996-1999, 2001-2019 Free Software Foundation, Inc.
1997-04-16 22:13:18 +00:00
1999-02-20 14:05:57 +00:00
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
1997-04-16 22:13:18 +00:00
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
1997-04-16 22:13:18 +00:00
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
1997-04-16 22:13:18 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
1997-04-16 22:13:18 +00:00
;;; Commentary:
;;; Code:
gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
2018-03-23 20:13:09 +00:00
(eval-when-compile (require 'cl-lib))
1997-08-25 04:40:29 +00:00
1997-04-16 22:13:18 +00:00
(require 'gnus)
(require 'gnus-sum)
(require 'gnus-win)
1997-04-16 22:13:18 +00:00
;;;
;;; gnus-pick-mode
;;;
1997-09-24 01:50:24 +00:00
(defcustom gnus-pick-display-summary nil
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"Display summary while reading."
1997-09-24 01:50:24 +00:00
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-pick-mode-hook nil
"Hook run in summary pick mode buffers."
:type 'hook
:group 'gnus-summary-pick)
(defcustom gnus-mark-unpicked-articles-as-read nil
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"If non-nil, mark all unpicked articles as read."
1997-09-24 01:50:24 +00:00
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-pick-elegant-flow t
"If non-nil, `gnus-pick-start-reading' runs
`gnus-summary-next-group' when no articles have been picked."
1997-09-24 01:50:24 +00:00
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-summary-pick-line-format
"%-5P %U\ %R\ %z\ %I\ %(%[%4L: %-23,23n%]%) %s\n"
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"The format specification of the lines in pick buffers.
1997-09-24 01:50:24 +00:00
It accepts the same format specs that `gnus-summary-line-format' does."
:type 'string
:group 'gnus-summary-pick)
1997-04-16 22:13:18 +00:00
;;; Internal variables.
(defvar gnus-pick-mode-map
(let ((map (make-sparse-keymap)))
(gnus-define-keys map
" " gnus-pick-next-page
"u" gnus-pick-unmark-article-or-thread
"." gnus-pick-article-or-thread
[down-mouse-2] gnus-pick-mouse-pick-region
"\r" gnus-pick-start-reading)
map))
1997-04-16 22:13:18 +00:00
(defun gnus-pick-make-menu-bar ()
(unless (boundp 'gnus-pick-menu)
(easy-menu-define
gnus-pick-menu gnus-pick-mode-map ""
'("Pick"
("Pick"
["Article" gnus-summary-mark-as-processable t]
["Thread" gnus-uu-mark-thread t]
["Region" gnus-uu-mark-region t]
["Regexp" gnus-uu-mark-by-regexp t]
["Buffer" gnus-uu-mark-buffer t])
("Unpick"
["Article" gnus-summary-unmark-as-processable t]
["Thread" gnus-uu-unmark-thread t]
["Region" gnus-uu-unmark-region t]
["Regexp" gnus-uu-unmark-by-regexp t]
["Buffer" gnus-summary-unmark-all-processable t])
["Start reading" gnus-pick-start-reading t]
["Switch pick mode off" gnus-pick-mode gnus-pick-mode]))))
1997-04-16 22:13:18 +00:00
(define-minor-mode gnus-pick-mode
1997-04-16 22:13:18 +00:00
"Minor mode for providing a pick-and-read interface in Gnus summary buffers.
\\{gnus-pick-mode-map}"
:lighter " Pick" :keymap gnus-pick-mode-map
(cond
((not (derived-mode-p 'gnus-summary-mode)) (setq gnus-pick-mode nil))
((not gnus-pick-mode)
;; FIXME: a buffer-local minor mode removing globally from a hook??
(remove-hook 'gnus-message-setup-hook 'gnus-pick-setup-message))
(t
;; Make sure that we don't select any articles upon group entry.
(set (make-local-variable 'gnus-auto-select-first) nil)
;; Change line format.
(setq gnus-summary-line-format gnus-summary-pick-line-format)
(setq gnus-summary-line-format-spec nil)
(gnus-update-format-specifications nil 'summary)
(gnus-update-summary-mark-positions)
;; FIXME: a buffer-local minor mode adding globally to a hook??
(add-hook 'gnus-message-setup-hook 'gnus-pick-setup-message)
(set (make-local-variable 'gnus-summary-goto-unread) 'never)
;; Set up the menu.
(when (gnus-visual-p 'pick-menu 'menu)
(gnus-pick-make-menu-bar)))))
1997-04-16 22:13:18 +00:00
(defun gnus-pick-setup-message ()
"Make Message do the right thing on exit."
(when (and (gnus-buffer-live-p gnus-summary-buffer)
(with-current-buffer gnus-summary-buffer
1997-04-16 22:13:18 +00:00
gnus-pick-mode))
(message-add-action
`(gnus-configure-windows ,gnus-current-window-configuration t)
'send 'exit 'postpone 'kill)))
1997-04-16 22:13:18 +00:00
(defvar gnus-pick-line-number 1)
(defun gnus-pick-line-number ()
"Return the current line number."
gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
2018-03-23 20:13:09 +00:00
(cl-incf gnus-pick-line-number))
1997-04-16 22:13:18 +00:00
(defun gnus-pick-start-reading (&optional catch-up)
"Start reading the picked articles.
If given a prefix, mark all unpicked articles as read."
(interactive "P")
(if gnus-newsgroup-processable
(progn
(gnus-summary-limit-to-articles nil)
(when (or catch-up gnus-mark-unpicked-articles-as-read)
1997-04-16 22:13:18 +00:00
(gnus-summary-limit-mark-excluded-as-read))
(gnus-summary-first-article)
(gnus-configure-windows
1997-04-16 22:13:18 +00:00
(if gnus-pick-display-summary 'article 'pick) t))
(if gnus-pick-elegant-flow
(progn
(when (or catch-up gnus-mark-unpicked-articles-as-read)
1997-09-24 01:50:24 +00:00
(gnus-summary-catchup nil t))
1997-04-16 22:13:18 +00:00
(if (gnus-group-quit-config gnus-newsgroup-name)
(gnus-summary-exit)
(gnus-summary-next-group)))
(error "No articles have been picked"))))
1999-02-20 14:05:57 +00:00
(defun gnus-pick-goto-article (arg)
"Go to the article number indicated by ARG.
If ARG is an invalid article number, then stay on current line."
1999-02-20 14:05:57 +00:00
(let (pos)
(save-excursion
(goto-char (point-min))
(when (zerop (forward-line (1- (prefix-numeric-value arg))))
(setq pos (point))))
(if (not pos)
(gnus-error 2 "No such line: %s" arg)
(goto-char pos))))
1997-04-16 22:13:18 +00:00
(defun gnus-pick-article (&optional arg)
"Pick the article on the current line.
1997-04-16 22:13:18 +00:00
If ARG, pick the article on that line instead."
(interactive "P")
(when arg
1999-02-20 14:05:57 +00:00
(gnus-pick-goto-article arg))
1997-04-16 22:13:18 +00:00
(gnus-summary-mark-as-processable 1))
1999-02-20 14:05:57 +00:00
(defun gnus-pick-article-or-thread (&optional arg)
"If `gnus-thread-hide-subtree' is t, then pick the thread on the current line.
1999-02-20 14:05:57 +00:00
Otherwise pick the article on the current line.
If ARG, pick the article/thread on that line instead."
(interactive "P")
(when arg
(gnus-pick-goto-article arg))
(if gnus-thread-hide-subtree
(progn
(save-excursion
(gnus-uu-mark-thread))
(forward-line 1))
1999-02-20 14:05:57 +00:00
(gnus-summary-mark-as-processable 1)))
1999-02-20 14:05:57 +00:00
(defun gnus-pick-unmark-article-or-thread (&optional arg)
"If `gnus-thread-hide-subtree' is t, then unmark the thread on current line.
1999-02-20 14:05:57 +00:00
Otherwise unmark the article on current line.
If ARG, unmark thread/article on that line instead."
(interactive "P")
(when arg
(gnus-pick-goto-article arg))
(if gnus-thread-hide-subtree
(save-excursion
(gnus-uu-unmark-thread))
1999-02-20 14:05:57 +00:00
(gnus-summary-unmark-as-processable 1)))
1997-04-16 22:13:18 +00:00
(defun gnus-pick-mouse-pick (e)
(interactive "e")
(mouse-set-point e)
(save-excursion
(gnus-summary-mark-as-processable 1)))
(defun gnus-pick-mouse-pick-region (start-event)
"Pick articles that the mouse is dragged over.
This must be bound to a button-down mouse event."
(interactive "e")
(mouse-minibuffer-check start-event)
(let* ((echo-keystrokes 0)
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
(start-line (1+ (count-lines (point-min) start-point)))
1997-04-16 22:13:18 +00:00
(start-window (posn-window start-posn))
(bounds (window-edges start-window))
1997-04-16 22:13:18 +00:00
(top (nth 1 bounds))
(bottom (if (window-minibuffer-p start-window)
(nth 3 bounds)
;; Don't count the mode line.
(1- (nth 3 bounds))))
(click-count (1- (event-click-count start-event))))
(setq mouse-selection-click-count click-count)
(setq mouse-selection-click-count-buffer (current-buffer))
(mouse-set-point start-event)
;; In case the down click is in the middle of some intangible text,
1997-04-16 22:13:18 +00:00
;; use the end of that text, and put it in START-POINT.
(when (< (point) start-point)
(goto-char start-point))
(gnus-pick-article)
(setq start-point (point))
;; end-of-range is used only in the single-click case.
;; It is the place where the drag has reached so far
;; (but not outside the window where the drag started).
1999-02-20 14:05:57 +00:00
(let (event end end-point (end-of-range (point)))
1997-04-16 22:13:18 +00:00
(track-mouse
(while (progn
(setq event (cdr (gnus-read-event-char)))
(or (mouse-movement-p event)
(eq (car-safe event) 'switch-frame)))
(if (eq (car-safe event) 'switch-frame)
nil
(setq end (event-end event)
end-point (posn-point end))
(cond
;; Are we moving within the original window?
((and (eq (posn-window end) start-window)
(integer-or-marker-p end-point))
;; Go to START-POINT first, so that when we move to END-POINT,
;; if it's in the middle of intangible text,
;; point jumps in the direction away from START-POINT.
(goto-char start-point)
(goto-char end-point)
(gnus-pick-article)
;; In case the user moved his mouse really fast, pick
;; articles on the line between this one and the last one.
(let* ((this-line (1+ (count-lines (point-min) end-point)))
(min-line (min this-line start-line))
(max-line (max this-line start-line)))
(while (< min-line max-line)
(goto-char (point-min))
(forward-line (1- min-line))
(gnus-pick-article)
(setq min-line (1+ min-line)))
(setq start-line this-line))
(when (zerop (% click-count 3))
(setq end-of-range (point))))
(t
(let ((mouse-row (cdr (cdr (mouse-position)))))
(cond
((null mouse-row))
((< mouse-row top)
(mouse-scroll-subr start-window (- mouse-row top)))
((>= mouse-row bottom)
(mouse-scroll-subr start-window
(1+ (- mouse-row bottom)))))))))))
1997-04-16 22:13:18 +00:00
(when (consp event)
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(let (;; (fun (key-binding (vector (car event))))
)
1997-04-16 22:13:18 +00:00
;; Run the binding of the terminating up-event, if possible.
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
;; In the case of a multiple click, it gives the wrong results,
1997-04-16 22:13:18 +00:00
;; because it would fail to set up a region.
(when nil
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
;; In this case, we can just let the up-event execute normally.
1997-04-16 22:13:18 +00:00
(let ((end (event-end event)))
;; Set the position in the event before we replay it,
;; because otherwise it may have a position in the wrong
;; buffer.
(setcar (cdr end) end-of-range)
;; Delete the overlay before calling the function,
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
;; because delete-overlay increases buffer-modified-tick.
1997-04-16 22:13:18 +00:00
(push event unread-command-events))))))))
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defvar scroll-in-place)
1997-04-16 22:13:18 +00:00
(defun gnus-pick-next-page ()
"Go to the next page. If at the end of the buffer, start reading articles."
(interactive)
(let ((scroll-in-place nil))
(condition-case nil
(scroll-up)
(end-of-buffer (gnus-pick-start-reading)))))
;;;
;;; gnus-binary-mode
;;;
(defvar gnus-binary-mode-hook nil
"Hook run in summary binary mode buffers.")
(defvar gnus-binary-mode-map
(let ((map (make-sparse-keymap)))
(gnus-define-keys map
"g" gnus-binary-show-article)
map))
1997-04-16 22:13:18 +00:00
(defun gnus-binary-make-menu-bar ()
(unless (boundp 'gnus-binary-menu)
(easy-menu-define
gnus-binary-menu gnus-binary-mode-map ""
'("Pick"
["Switch binary mode off" gnus-binary-mode t]))))
1997-04-16 22:13:18 +00:00
(define-minor-mode gnus-binary-mode
1997-04-16 22:13:18 +00:00
"Minor mode for providing a binary group interface in Gnus summary buffers."
:lighter " Binary" :keymap gnus-binary-mode-map
(cond
((not (derived-mode-p 'gnus-summary-mode)) (setq gnus-binary-mode nil))
(gnus-binary-mode
;; Make sure that we don't select any articles upon group entry.
(make-local-variable 'gnus-auto-select-first)
(setq gnus-auto-select-first nil)
(make-local-variable 'gnus-summary-display-article-function)
(setq gnus-summary-display-article-function 'gnus-binary-display-article)
;; Set up the menu.
(when (gnus-visual-p 'binary-menu 'menu)
(gnus-binary-make-menu-bar)))))
1997-04-16 22:13:18 +00:00
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defun gnus-binary-display-article (article &optional _all-header)
1997-04-16 22:13:18 +00:00
"Run ARTICLE through the binary decode functions."
(when (gnus-summary-goto-subject article)
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
1997-04-16 22:13:18 +00:00
(gnus-uu-decode-uu))))
(defun gnus-binary-show-article (&optional arg)
"Bypass the binary functions and show the article."
(interactive "P")
(let (gnus-summary-display-article-function)
(gnus-summary-show-article arg)))
;;;
;;; gnus-tree-mode
;;;
1997-09-24 01:50:24 +00:00
(defcustom gnus-tree-line-format "%(%[%3,3n%]%)"
"Format of tree elements."
:type 'string
:group 'gnus-summary-tree)
1997-04-16 22:13:18 +00:00
1997-09-24 01:50:24 +00:00
(defcustom gnus-tree-minimize-window t
1997-04-16 22:13:18 +00:00
"If non-nil, minimize the tree buffer window.
If a number, never let the tree buffer grow taller than that number of
1997-09-24 01:50:24 +00:00
lines."
1999-02-20 14:05:57 +00:00
:type '(choice boolean
integer)
1997-09-24 01:50:24 +00:00
:group 'gnus-summary-tree)
1997-04-16 22:13:18 +00:00
Fix a bunch of custom types (thank you cus-test.el) * lisp/bookmark.el (bookmark-search-delay): * lisp/cus-start.el (vertical-centering-font-regexp): * lisp/ps-mule.el (ps-mule-font-info-database-default): * lisp/ps-print.el (ps-default-fg, ps-default-bg): * lisp/type-break.el (type-break-good-break-interval): * lisp/whitespace.el (whitespace-indentation-regexp) (whitespace-space-after-tab-regexp): * lisp/emacs-lisp/testcover.el (testcover-1value-functions) (testcover-noreturn-functions, testcover-progn-functions) (testcover-prog1-functions): * lisp/emulation/viper-init.el (viper-emacs-state-cursor-color): * lisp/erc/erc-desktop-notifications.el (erc-notifications-icon): * lisp/eshell/em-glob.el (eshell-glob-translate-alist): * lisp/gnus/gnus-art.el (gnus-article-date-headers, gnus-blocked-images): * lisp/gnus/gnus-async.el (gnus-async-post-fetch-function): * lisp/gnus/gnus-gravatar.el (gnus-gravatar-size, gnus-gravatar-properties): * lisp/gnus/gnus-html.el (gnus-html-image-cache-ttl): * lisp/gnus/gnus-notifications.el (gnus-notifications-timeout): * lisp/gnus/gnus-picon.el (gnus-picon-properties): * lisp/gnus/gnus-util.el (gnus-completion-styles): * lisp/gnus/gnus.el (gnus-other-frame-resume-function): * lisp/gnus/message.el (message-user-organization-file) (message-cite-reply-position): * lisp/gnus/nnir.el (nnir-summary-line-format) (nnir-retrieve-headers-override-function): * lisp/gnus/shr-color.el (shr-color-visible-luminance-min): * lisp/gnus/shr.el (shr-blocked-images): * lisp/gnus/spam-report.el (spam-report-resend-to): * lisp/gnus/spam.el (spam-summary-exit-behavior): * lisp/mh-e/mh-e.el (mh-sortm-args, mh-default-folder-for-message-function): * lisp/play/tetris.el (tetris-tty-colors): * lisp/progmodes/cpp.el (cpp-face-default-list): * lisp/progmodes/flymake.el (flymake-allowed-file-name-masks): * lisp/progmodes/idlw-help.el (idlwave-help-browser-generic-program) (idlwave-help-browser-generic-args): * lisp/progmodes/make-mode.el (makefile-special-targets-list): * lisp/progmodes/python.el (python-shell-virtualenv-path): * lisp/progmodes/verilog-mode.el (verilog-active-low-regexp) (verilog-auto-input-ignore-regexp, verilog-auto-inout-ignore-regexp) (verilog-auto-output-ignore-regexp, verilog-auto-tieoff-ignore-regexp) (verilog-auto-unused-ignore-regexp, verilog-typedef-regexp): * lisp/textmodes/reftex-vars.el (reftex-format-label-function): * lisp/textmodes/remember.el (remember-diary-file): Fix custom types. * lisp/cedet/semantic/db-find.el (semanticdb-find-throttle-custom-list): Fix value. * lisp/gnus/gnus-salt.el (gnus-selected-tree-face): Fix default.
2013-05-09 01:40:20 +00:00
(defcustom gnus-selected-tree-face 'mode-line
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"Face used for highlighting selected articles in the thread tree."
1997-09-24 01:50:24 +00:00
:type 'face
:group 'gnus-summary-tree)
1997-04-16 22:13:18 +00:00
(defvar gnus-tree-brackets '((?\[ . ?\]) (?\( . ?\))
(?\{ . ?\}) (?< . ?>))
"Brackets used in tree nodes.")
(defvar gnus-tree-parent-child-edges '(?- ?\\ ?|)
"Characters used to connect parents with children.")
1997-09-24 01:50:24 +00:00
(defcustom gnus-tree-mode-line-format "Gnus: %%b %S %Z"
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"The format specification for the tree mode line."
1997-09-24 01:50:24 +00:00
:type 'string
:group 'gnus-summary-tree)
1997-04-16 22:13:18 +00:00
1997-09-24 01:50:24 +00:00
(defcustom gnus-generate-tree-function 'gnus-generate-vertical-tree
Remove obsolete leading * from defcustom, defface doc strings. * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el: * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el: * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el: * lisp/cedet/semantic/decorate/include.el: * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el: * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el: * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el: * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el: * lisp/cedet/srecode/fields.el, lisp/ecomplete.el: * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el: * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el: * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el: * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el: * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el: * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el: * lisp/net/starttls.el, lisp/progmodes/cc-vars.el: * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el: Remove obsolete leading * from defcustom, defface doc strings.
2016-06-10 00:13:12 +00:00
"Function for generating a thread tree.
1997-04-16 22:13:18 +00:00
Two predefined functions are available:
1997-09-24 01:50:24 +00:00
`gnus-generate-horizontal-tree' and `gnus-generate-vertical-tree'."
:type '(radio (function-item gnus-generate-vertical-tree)
(function-item gnus-generate-horizontal-tree)
(function :tag "Other" nil))
:group 'gnus-summary-tree)
1997-04-16 22:13:18 +00:00
;;; Internal variables.
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defvar gnus-tmp-name)
(defvar gnus-tmp-from)
(defvar gnus-tmp-number)
(defvar gnus-tmp-open-bracket)
(defvar gnus-tmp-close-bracket)
(defvar gnus-tmp-subject)
1997-04-16 22:13:18 +00:00
(defvar gnus-tree-line-format-alist
Replace insignificant backquotes Replace most insignificant occurrences of '`' with a straight quote, sharp quote or nothing. This includes backquotes in 'pcase' patterns. * admin/admin.el: * lisp/apropos.el: * lisp/arc-mode.el: * lisp/auth-source.el: * lisp/avoid.el: * lisp/bindings.el: * lisp/bs.el: * lisp/calculator.el: * lisp/calendar/todo-mode.el: * lisp/cedet/semantic.el: * lisp/cedet/semantic/analyze/debug.el: * lisp/cedet/semantic/bovine.el: * lisp/cedet/semantic/dep.el: * lisp/cedet/semantic/grammar.el: * lisp/cedet/semantic/wisent/comp.el: * lisp/cedet/semantic/wisent/grammar.el: * lisp/cedet/srecode/mode.el: * lisp/cus-edit.el: * lisp/doc-view.el: * lisp/elec-pair.el: * lisp/electric.el: * lisp/emacs-lisp/autoload.el: * lisp/emacs-lisp/benchmark.el: * lisp/emacs-lisp/byte-opt.el: * lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/cl-extra.el: * lisp/emacs-lisp/cl-generic.el: * lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/copyright.el: * lisp/emacs-lisp/debug.el: * lisp/emacs-lisp/eieio-compat.el: * lisp/emacs-lisp/ert.el: * lisp/emacs-lisp/generator.el: * lisp/emacs-lisp/inline.el: * lisp/emacs-lisp/macroexp.el: * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/package.el: * lisp/emacs-lisp/radix-tree.el: * lisp/emacs-lisp/smie.el: * lisp/epa.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-track.el: * lisp/erc/erc.el: * lisp/eshell/em-ls.el: * lisp/eshell/esh-cmd.el: * lisp/files.el: * lisp/filesets.el: * lisp/font-lock.el: * lisp/frameset.el: * lisp/gnus/gnus-agent.el: * lisp/gnus/gnus-art.el: * lisp/gnus/gnus-cite.el: * lisp/gnus/gnus-group.el: * lisp/gnus/gnus-msg.el: * lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-srvr.el: * lisp/gnus/gnus-sum.el: * lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el: * lisp/gnus/gnus.el: * lisp/gnus/message.el: * lisp/gnus/mm-util.el: * lisp/gnus/mml.el: * lisp/gnus/nnheader.el: * lisp/gnus/nnimap.el: * lisp/gnus/nnmairix.el: * lisp/gnus/spam.el: * lisp/hexl.el: * lisp/hi-lock.el: * lisp/ibuf-ext.el: * lisp/ibuffer.el: * lisp/ido.el: * lisp/info.el: * lisp/international/mule-cmds.el: * lisp/international/mule-util.el: * lisp/json.el: * lisp/jsonrpc.el: * lisp/language/cyrillic.el: * lisp/language/european.el: * lisp/language/georgian.el: * lisp/language/tibetan.el: * lisp/language/utf-8-lang.el: * lisp/language/vietnamese.el: * lisp/ldefs-boot.el: * lisp/mail/mail-extr.el: * lisp/man.el: * lisp/menu-bar.el: * lisp/mh-e/mh-acros.el: * lisp/mh-e/mh-folder.el: * lisp/mh-e/mh-mime.el: * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-speed.el: * lisp/minibuffer.el: * lisp/mpc.el: * lisp/net/ange-ftp.el: * lisp/net/hmac-def.el: * lisp/net/newst-backend.el: * lisp/net/quickurl.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-compat.el: * lisp/notifications.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/xesam.el: * lisp/org/ob-C.el: * lisp/org/ob-core.el: * lisp/org/ob-exp.el: * lisp/org/ob-groovy.el: * lisp/org/ob-haskell.el: * lisp/org/ob-io.el: * lisp/org/ob-lisp.el: * lisp/org/ob-lob.el: * lisp/org/ob-lua.el: * lisp/org/ob-octave.el: * lisp/org/ob-perl.el: * lisp/org/ob-python.el: * lisp/org/ob-ref.el: * lisp/org/ob-ruby.el: * lisp/org/ob-sql.el: * lisp/org/org-agenda.el: * lisp/org/org-capture.el: * lisp/org/org-clock.el: * lisp/org/org-colview.el: * lisp/org/org-duration.el: * lisp/org/org-element.el: * lisp/org/org-entities.el: * lisp/org/org-gnus.el: * lisp/org/org-indent.el: * lisp/org/org-info.el: * lisp/org/org-inlinetask.el: * lisp/org/org-lint.el: * lisp/org/org-list.el: * lisp/org/org-mouse.el: * lisp/org/org-plot.el: * lisp/org/org-src.el: * lisp/org/org-table.el: * lisp/org/org.el: * lisp/org/ox-ascii.el: * lisp/org/ox-html.el: * lisp/org/ox-latex.el: * lisp/org/ox-man.el: * lisp/org/ox-md.el: * lisp/org/ox-org.el: * lisp/org/ox-publish.el: * lisp/org/ox-texinfo.el: * lisp/org/ox.el: * lisp/play/bubbles.el: * lisp/play/gamegrid.el: * lisp/progmodes/autoconf.el: * lisp/progmodes/cc-defs.el: * lisp/progmodes/cc-engine.el: * lisp/progmodes/cc-fonts.el: * lisp/progmodes/cc-langs.el: * lisp/progmodes/cperl-mode.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/elisp-mode.el: * lisp/progmodes/flymake-cc.el: * lisp/progmodes/flymake.el: * lisp/progmodes/fortran.el: * lisp/progmodes/grep.el: * lisp/progmodes/gud.el: * lisp/progmodes/idlwave.el: * lisp/progmodes/js.el: * lisp/progmodes/m4-mode.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/mixal-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/octave.el: * lisp/progmodes/opascal.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/sql.el: * lisp/progmodes/verilog-mode.el: * lisp/ps-mule.el: * lisp/rtree.el: * lisp/ruler-mode.el: * lisp/ses.el: * lisp/simple.el: * lisp/startup.el: * lisp/subr.el: * lisp/term/ns-win.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/conf-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/refill.el: * lisp/textmodes/sgml-mode.el: * lisp/textmodes/tex-mode.el: * lisp/tutorial.el: * lisp/url/url-dav.el: * lisp/url/url-gw.el: * lisp/url/url-http.el: * lisp/url/url-methods.el: * lisp/url/url-privacy.el: * lisp/vc/cvs-status.el: * lisp/vc/diff-mode.el: * lisp/vc/ediff-init.el: * lisp/vc/ediff-ptch.el: * lisp/vc/log-edit.el: * lisp/vc/log-view.el: * lisp/vc/pcvs-info.el: * lisp/vc/pcvs.el: * lisp/vc/smerge-mode.el: * lisp/vc/vc-git.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-rcs.el: * lisp/whitespace.el: * lisp/window.el: * test/lisp/electric-tests.el: * test/lisp/emacs-lisp/cl-lib-tests.el: * test/lisp/emacs-lisp/ert-tests.el: * test/lisp/epg-tests.el: * test/lisp/jsonrpc-tests.el: * test/src/data-tests.el: * test/src/json-tests.el: Replace most insignificant backquotes.
2018-11-05 00:22:15 +00:00
'((?n gnus-tmp-name ?s)
1997-04-16 22:13:18 +00:00
(?f gnus-tmp-from ?s)
(?N gnus-tmp-number ?d)
(?\[ gnus-tmp-open-bracket ?c)
(?\] gnus-tmp-close-bracket ?c)
(?s gnus-tmp-subject ?s)))
(defvar gnus-tree-mode-line-format-alist gnus-summary-mode-line-format-alist)
(defvar gnus-tree-mode-line-format-spec nil)
(defvar gnus-tree-line-format-spec nil)
(defvar gnus-tree-node-length nil)
(defvar gnus-selected-tree-overlay nil)
(defvar gnus-tree-displayed-thread nil)
(defvar gnus-tree-inhibit nil)
1997-04-16 22:13:18 +00:00
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defvar gnus-tree-mode-map
(let ((map (make-keymap)))
(suppress-keymap map)
(gnus-define-keys
map
"\r" gnus-tree-select-article
[mouse-2] gnus-tree-pick-article
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
"\C-?" gnus-tree-read-summary-keys
"h" gnus-tree-show-summary
1997-04-16 22:13:18 +00:00
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
"\C-c\C-i" gnus-info-find-node)
1997-04-16 22:13:18 +00:00
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(substitute-key-definition
'undefined 'gnus-tree-read-summary-keys map)
map))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-make-menu-bar ()
(unless (boundp 'gnus-tree-menu)
(easy-menu-define
gnus-tree-menu gnus-tree-mode-map ""
'("Tree"
["Select article" gnus-tree-select-article t]))))
1997-04-16 22:13:18 +00:00
(define-derived-mode gnus-tree-mode gnus-mode "Tree"
1997-04-16 22:13:18 +00:00
"Major mode for displaying thread trees."
1999-02-20 14:05:57 +00:00
(gnus-set-format 'tree-mode)
(gnus-set-format 'tree t)
1997-04-16 22:13:18 +00:00
(when (gnus-visual-p 'tree-menu 'menu)
(gnus-tree-make-menu-bar))
(gnus-simplify-mode-line)
(buffer-disable-undo)
1997-04-16 22:13:18 +00:00
(setq buffer-read-only t)
(setq truncate-lines t)
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(save-current-buffer
1997-04-16 22:13:18 +00:00
(gnus-set-work-buffer)
(gnus-tree-node-insert (make-mail-header "") nil)
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(setq gnus-tree-node-length (1- (point)))))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
(interactive "P")
(unless gnus-tree-inhibit
(let ((buf (current-buffer))
(gnus-tree-inhibit t)
win)
(set-buffer gnus-article-buffer)
(gnus-article-read-summary-keys arg nil t)
(when (setq win (get-buffer-window buf))
(select-window win)
(when gnus-selected-tree-overlay
[Gnus]: Use overlay functions directly * lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
2015-08-19 09:06:40 +00:00
(goto-char (or (overlay-end gnus-selected-tree-overlay) 1)))
(gnus-tree-minimize)))))
1997-04-16 22:13:18 +00:00
1997-09-24 01:50:24 +00:00
(defun gnus-tree-show-summary ()
"Reconfigure windows to show summary buffer."
(interactive)
(if (not (gnus-buffer-live-p gnus-summary-buffer))
(error "There is no summary buffer for this tree buffer")
(gnus-configure-windows 'article)
(gnus-summary-goto-subject gnus-current-article)))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-select-article (article)
"Select the article under point, if any."
(interactive (list (gnus-tree-article-number)))
(let ((buf (current-buffer)))
(when article
(with-current-buffer gnus-summary-buffer
1997-04-16 22:13:18 +00:00
(gnus-summary-goto-article article))
(select-window (get-buffer-window buf)))))
(defun gnus-tree-pick-article (e)
"Select the article under the mouse pointer."
(interactive "e")
(mouse-set-point e)
(gnus-tree-select-article (gnus-tree-article-number)))
(defun gnus-tree-article-number ()
(get-text-property (point) 'gnus-number))
(defun gnus-tree-article-region (article)
"Return a cons with BEG and END of the article region."
(let ((pos (text-property-any
(point-min) (point-max) 'gnus-number article)))
1997-04-16 22:13:18 +00:00
(when pos
(cons pos (next-single-property-change pos 'gnus-number)))))
(defun gnus-tree-recenter ()
"Center point in the tree window."
(let ((selected (selected-window))
(tree-window (gnus-get-buffer-window gnus-tree-buffer t)))
1997-04-16 22:13:18 +00:00
(when tree-window
(select-window tree-window)
(when gnus-selected-tree-overlay
[Gnus]: Use overlay functions directly * lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
2015-08-19 09:06:40 +00:00
(goto-char (or (overlay-end gnus-selected-tree-overlay) 1)))
1997-04-16 22:13:18 +00:00
(let* ((top (cond ((< (window-height) 4) 0)
((< (window-height) 7) 1)
(t 2)))
(height (1- (window-height)))
(bottom (save-excursion (goto-char (point-max))
(forward-line (- height))
(point))))
;; Set the window start to either `bottom', which is the biggest
1997-04-16 22:13:18 +00:00
;; possible valid number, or the second line from the top,
;; whichever is the least.
(set-window-start
tree-window (min bottom (save-excursion
(forward-line (- top)) (point)))))
(select-window selected))))
(defun gnus-get-tree-buffer ()
"Return the tree buffer properly initialized."
(with-current-buffer (gnus-get-buffer-create gnus-tree-buffer)
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(unless (derived-mode-p 'gnus-tree-mode)
1997-04-16 22:13:18 +00:00
(gnus-tree-mode))
(current-buffer)))
(defun gnus-tree-minimize ()
(when (and gnus-tree-minimize-window
(not (one-window-p)))
(let ((windows 0)
tot-win-height)
gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
2018-03-23 20:13:09 +00:00
(walk-windows (lambda (_window) (cl-incf windows)))
1997-04-16 22:13:18 +00:00
(setq tot-win-height
(- (frame-height)
(* window-min-height (1- windows))
2))
(let* ((window-min-height 2)
(height (count-lines (point-min) (point-max)))
(min (max (1- window-min-height) height))
(tot (if (numberp gnus-tree-minimize-window)
(min gnus-tree-minimize-window min)
min))
(win (get-buffer-window (current-buffer)))
(wh (and win (1- (window-height win)))))
(setq tot (min tot tot-win-height))
(when (and win
(not (eq tot wh)))
(let ((selected (selected-window)))
(when (ignore-errors (select-window win))
(enlarge-window (- tot wh))
(select-window selected))))))))
;;; Generating the tree.
(defun gnus-tree-node-insert (header sparse &optional adopted)
(let* ((dummy (stringp header))
(header (if (vectorp header) header
(progn
(setq header (make-mail-header "*****"))
(setf (mail-header-number header) 0)
(setf (mail-header-lines header) 0)
(setf (mail-header-chars header) 0)
1997-04-16 22:13:18 +00:00
header)))
(gnus-tmp-from (mail-header-from header))
(gnus-tmp-subject (mail-header-subject header))
(gnus-tmp-number (mail-header-number header))
(gnus-tmp-name
(cond
((string-match "(.+)" gnus-tmp-from)
(substring gnus-tmp-from
(1+ (match-beginning 0)) (1- (match-end 0))))
((string-match "<[^>]+> *$" gnus-tmp-from)
(let ((beg (match-beginning 0)))
(or (and (string-match "^\"[^\"]*\"" gnus-tmp-from)
(substring gnus-tmp-from (1+ (match-beginning 0))
(1- (match-end 0))))
(substring gnus-tmp-from 0 beg))))
((memq gnus-tmp-number sparse)
"***")
(t gnus-tmp-from)))
(gnus-tmp-open-bracket
(cond ((memq gnus-tmp-number sparse)
(caadr gnus-tree-brackets))
(dummy (caaddr gnus-tree-brackets))
(adopted (car (nth 3 gnus-tree-brackets)))
(t (caar gnus-tree-brackets))))
(gnus-tmp-close-bracket
(cond ((memq gnus-tmp-number sparse)
(cdadr gnus-tree-brackets))
(adopted (cdr (nth 3 gnus-tree-brackets)))
(dummy
(cdaddr gnus-tree-brackets))
(t (cdar gnus-tree-brackets))))
(buffer-read-only nil)
beg end)
(add-text-properties
1997-04-16 22:13:18 +00:00
(setq beg (point))
(setq end (progn (eval gnus-tree-line-format-spec) (point)))
(list 'gnus-number gnus-tmp-number))
(when (or t (gnus-visual-p 'tree-highlight 'highlight))
(gnus-tree-highlight-node gnus-tmp-number beg end))))
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defmacro gnus--let-eval (bindings evalsym &rest body)
"Build an environment in which to evaluate expressions.
BINDINGS is a `let'-style list of bindings to use for the environment.
EVALSYM is then bound in BODY to a function that takes a sexp and evaluates
it in the environment specified by BINDINGS."
(declare (indent 2) (debug ((&rest (sym form)) sym body)))
(if (ignore-errors (let ((x 3)) (eq (eval '(- x 1) '((x . 4))) x)))
;; Use lexical vars if possible.
`(let* ((env (list ,@(mapcar (lambda (binding)
`(cons ',(car binding) ,(cadr binding)))
bindings)))
(,evalsym (lambda (exp) (eval exp env))))
,@body)
`(let (,@bindings (,evalsym #'eval)) ,@body)))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-highlight-node (article beg end)
"Highlight current line according to `gnus-summary-highlight'."
(let ((list gnus-summary-highlight)
face)
(with-current-buffer gnus-summary-buffer
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(let ((uncached (memq article gnus-newsgroup-undownloaded)))
(gnus--let-eval
((score (or (cdr (assq article gnus-newsgroup-scored))
1997-04-16 22:13:18 +00:00
gnus-summary-default-score 0))
(default gnus-summary-default-score)
(default-high gnus-summary-default-high-score)
(default-low gnus-summary-default-low-score)
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(uncached uncached)
(downloaded (not uncached))
1997-04-16 22:13:18 +00:00
(mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
evalfun
;; Eval the cars of the lists until we find a match.
(while (and list
(not (funcall evalfun (caar list))))
(setq list (cdr list))))))
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
(unless (eq (setq face (cdar list)) (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(gnus-put-text-property-excluding-characters-with-faces
beg end 'face
(if (boundp face) (symbol-value face) face)))))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-indent (level)
(insert (make-string (1- (* (1+ gnus-tree-node-length) level)) ? )))
(defvar gnus-tmp-limit)
(defvar gnus-tmp-sparse)
(defvar gnus-tmp-indent)
(defun gnus-generate-tree (thread)
"Generate a thread tree for THREAD."
(with-current-buffer (gnus-get-tree-buffer)
1997-04-16 22:13:18 +00:00
(let ((buffer-read-only nil)
(gnus-tmp-indent 0))
(erase-buffer)
(funcall gnus-generate-tree-function thread 0)
(gnus-set-mode-line 'tree)
(goto-char (point-min))
(gnus-tree-minimize)
(gnus-tree-recenter)
(let ((selected (selected-window)))
(when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
(select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
1997-04-16 22:13:18 +00:00
(gnus-horizontal-recenter)
(select-window selected))))))
(defun gnus-generate-horizontal-tree (thread level &optional dummyp adopted)
"Generate a horizontal tree."
(let* ((dummy (stringp (car thread)))
(do (or dummy
1997-09-24 01:50:24 +00:00
(and (car thread)
(memq (mail-header-number (car thread))
gnus-tmp-limit))))
1997-04-16 22:13:18 +00:00
col beg)
(if (not do)
;; We don't want this article.
(setq thread (cdr thread))
(if (not (bolp))
;; Not the first article on the line, so we insert a "-".
(insert (car gnus-tree-parent-child-edges))
;; If the level isn't zero, then we insert some indentation.
(unless (zerop level)
(gnus-tree-indent level)
(insert (cadr gnus-tree-parent-child-edges))
(setq col (- (setq beg (point)) (point-at-bol) 1))
1997-04-16 22:13:18 +00:00
;; Draw "|" lines upwards.
(while (progn
(forward-line -1)
(forward-char col)
(eq (char-after) ? ))
1997-04-16 22:13:18 +00:00
(delete-char 1)
(insert (caddr gnus-tree-parent-child-edges)))
(goto-char beg)))
(setq dummyp nil)
;; Insert the article node.
(gnus-tree-node-insert (pop thread) gnus-tmp-sparse adopted))
(if (null thread)
;; End of the thread, so we go to the next line.
(unless (bolp)
(insert "\n"))
;; Recurse downwards in all children of this article.
(while thread
(gnus-generate-horizontal-tree
(pop thread) (if do (1+ level) level)
(or dummyp dummy) dummy)))))
(defsubst gnus-tree-indent-vertical ()
(let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent)
(- (point) (point-at-bol)))))
1997-04-16 22:13:18 +00:00
(when (> len 0)
(insert (make-string len ? )))))
(defsubst gnus-tree-forward-line (n)
gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
2018-03-23 20:13:09 +00:00
(while (>= (cl-decf n) 0)
1997-04-16 22:13:18 +00:00
(unless (zerop (forward-line 1))
(end-of-line)
(insert "\n")))
(end-of-line))
(defun gnus-generate-vertical-tree (thread level &optional dummyp adopted)
"Generate a vertical tree."
(let* ((dummy (stringp (car thread)))
(do (or dummy
(and (car thread)
(memq (mail-header-number (car thread))
gnus-tmp-limit))))
beg)
(if (not do)
;; We don't want this article.
(setq thread (cdr thread))
(if (not (save-excursion (beginning-of-line) (bobp)))
;; Not the first article on the line, so we insert a "-".
(progn
(gnus-tree-indent-vertical)
(insert (make-string (/ gnus-tree-node-length 2) ? ))
(insert (caddr gnus-tree-parent-child-edges))
(gnus-tree-forward-line 1))
;; If the level isn't zero, then we insert some indentation.
(unless (zerop gnus-tmp-indent)
(gnus-tree-forward-line (1- (* 2 level)))
(gnus-tree-indent-vertical)
(delete-char -1)
(insert (cadr gnus-tree-parent-child-edges))
(setq beg (point))
1997-09-24 01:50:24 +00:00
(forward-char -1)
1997-04-16 22:13:18 +00:00
;; Draw "-" lines leftwards.
(while (and (not (bobp))
(eq (char-after (1- (point))) ? ))
1997-09-24 01:50:24 +00:00
(delete-char -1)
(insert (car gnus-tree-parent-child-edges))
(forward-char -1))
1997-04-16 22:13:18 +00:00
(goto-char beg)
(gnus-tree-forward-line 1)))
(setq dummyp nil)
;; Insert the article node.
(gnus-tree-indent-vertical)
(gnus-tree-node-insert (pop thread) gnus-tmp-sparse adopted)
(gnus-tree-forward-line 1))
(if (null thread)
;; End of the thread, so we go to the next line.
(progn
(goto-char (point-min))
(end-of-line)
gnus: replace cl with cl-lib * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el: * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el: * lisp/gnus/gnus-demon.el, lisp/gnus/gnus-group.el: * lisp/gnus/gnus-icalendar.el, lisp/gnus/gnus-logic.el: * lisp/gnus/gnus-msg.el, lisp/gnus/gnus-picon.el: * lisp/gnus/gnus-registry.el, lisp/gnus/gnus-salt.el: * lisp/gnus/gnus-score.el, lisp/gnus/gnus-spec.el: * lisp/gnus/gnus-srvr.el, lisp/gnus/gnus-start.el: * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el: * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el: * lisp/gnus/mail-source.el, lisp/gnus/mm-decode.el: * lisp/gnus/mm-encode.el, lisp/gnus/mm-url.el, lisp/gnus/mm-view.el: * lisp/gnus/mml-smime.el, lisp/gnus/mml.el, lisp/gnus/mml2015.el: * lisp/gnus/nnbabyl.el, lisp/gnus/nndoc.el, lisp/gnus/nneething.el: * lisp/gnus/nnheader.el, lisp/gnus/nnimap.el, lisp/gnus/nnmail.el: * lisp/gnus/nnmaildir.el, lisp/gnus/nnoo.el, lisp/gnus/nnrss.el: * lisp/gnus/nnspool.el, lisp/gnus/nntp.el, lisp/gnus/nnvirtual.el: * lisp/gnus/nnweb.el, lisp/gnus/spam.el: Replace cl with cl-lib. * lisp/gnus/canlock.el, lisp/gnus/gnus-bcklg.el: * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-cloud.el: * lisp/gnus/gnus-draft.el, lisp/gnus/gnus-dup.el: * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-html.el: * lisp/gnus/gnus-int.el, lisp/gnus/gnus-kill.el, lisp/gnus/gnus-ml.el: * lisp/gnus/gnus-mlspl.el, lisp/gnus/gnus-range.el: * lisp/gnus/gnus-undo.el, lisp/gnus/gnus-vm.el: * lisp/gnus/mm-partial.el, lisp/gnus/mm-uu.el, lisp/gnus/mml1991.el: * lisp/gnus/nnagent.el, lisp/gnus/nndiary.el, lisp/gnus/nndir.el: * lisp/gnus/nndraft.el, lisp/gnus/nnfolder.el, lisp/gnus/nngateway.el: * lisp/gnus/nnmairix.el, lisp/gnus/nnmbox.el, lisp/gnus/nnmh.el: * lisp/gnus/nnml.el, lisp/gnus/score-mode.el, lisp/gnus/smiley.el: No need for cl.
2018-03-23 20:13:09 +00:00
(cl-incf gnus-tmp-indent))
1997-04-16 22:13:18 +00:00
;; Recurse downwards in all children of this article.
(while thread
(gnus-generate-vertical-tree
(pop thread) (if do (1+ level) level)
(or dummyp dummy) dummy)))))
;;; Interface functions.
(defun gnus-possibly-generate-tree (article &optional force)
"Generate the thread tree for ARTICLE if it isn't displayed already."
(when (with-current-buffer gnus-summary-buffer
1997-04-16 22:13:18 +00:00
(and gnus-use-trees
gnus-show-threads
(vectorp (gnus-summary-article-header article))))
(save-excursion
(let ((top (with-current-buffer gnus-summary-buffer
1997-04-16 22:13:18 +00:00
(gnus-cut-thread
(gnus-remove-thread
(mail-header-id
(gnus-summary-article-header article))
t))))
(gnus-tmp-limit gnus-newsgroup-limit)
(gnus-tmp-sparse gnus-newsgroup-sparse))
(when (or force
(not (eq top gnus-tree-displayed-thread)))
(gnus-generate-tree top)
(setq gnus-tree-displayed-thread top))))))
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defun gnus-tree-open ()
1997-04-16 22:13:18 +00:00
(gnus-get-tree-buffer))
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open.
2013-09-17 17:22:32 +00:00
(defun gnus-tree-close ()
1999-02-20 14:05:57 +00:00
(gnus-kill-buffer gnus-tree-buffer))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-perhaps-minimize ()
(when (and gnus-tree-minimize-window
(get-buffer gnus-tree-buffer))
(with-current-buffer gnus-tree-buffer
(gnus-tree-minimize))))
1997-04-16 22:13:18 +00:00
(defun gnus-highlight-selected-tree (article)
"Highlight the selected article in the tree."
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
(when (buffer-live-p gnus-tree-buffer)
(let ((buf (current-buffer))
region)
(set-buffer gnus-tree-buffer)
(when (setq region (gnus-tree-article-region article))
(when (not gnus-selected-tree-overlay)
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
;; Create a new overlay.
[Gnus]: Use overlay functions directly * lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
2015-08-19 09:06:40 +00:00
(overlay-put
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
(setq gnus-selected-tree-overlay
[Gnus]: Use overlay functions directly * lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
2015-08-19 09:06:40 +00:00
(make-overlay (point-min) (1+ (point-min))))
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
'face gnus-selected-tree-face))
;; Move the overlay to the article.
[Gnus]: Use overlay functions directly * lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part) (gnus-insert-mime-button, gnus-mime-buttonize-attachments-in-header) (gnus-article-highlight-signature, gnus-article-extend-url-button) (gnus-article-add-button, gnus-insert-prev-page-button) (gnus-insert-next-page-button, gnus-insert-mime-security-button): * lisp/gnus/gnus-cite.el (gnus-cite-delete-overlays) (gnus-cite-add-face): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): * lisp/gnus/gnus-salt.el (gnus-tree-read-summary-keys) (gnus-tree-recenter, gnus-highlight-selected-tree): * lisp/gnus/gnus-sum.el (gnus-summary-show-all-threads) (gnus-summary-show-thread, gnus-summary-hide-thread) (gnus-highlight-selected-summary): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines): * lisp/gnus/message.el (message-fix-before-sending) (message-toggle-image-thumbnails): * lisp/gnus/mm-decode.el (mm-convert-shr-links): * lisp/gnus/sieve.el (sieve-highlight, sieve-insert-scripts): Use overlay functions directly instead of using gnus-overlay-*, message-overlay-*, and sieve-overlay-*. * lisp/gnus/gnus-sum.el (gnus-remove-overlays): * lisp/gnus/gnus.el (gnus-make-overlay, gnus-copy-overlay) (gnus-delete-overlay, gnus-overlay-get, gnus-overlay-put) (gnus-move-overlay, gnus-overlay-buffer, gnus-overlay-start) (gnus-overlay-end, gnus-overlays-at, gnus-overlays-in): * lisp/gnus/message.el (message-delete-overlay, message-make-overlay) (message-overlay-get, message-overlay-put, message-overlays-in): * lisp/gnus/sieve.el (sieve-make-overlay, sieve-overlay-put) (sieve-overlays-at): Remove.
2015-08-19 09:06:40 +00:00
(move-overlay
Merge changes made in Gnus master 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
2012-12-25 22:12:59 +00:00
gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
(gnus-tree-minimize)
(gnus-tree-recenter)
(let ((selected (selected-window)))
(when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
(select-window
(gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
(gnus-horizontal-recenter)
(select-window selected))))
;; If we remove this save-excursion, it updates the wrong mode lines?!?
(with-current-buffer gnus-tree-buffer
(gnus-set-mode-line 'tree))
(set-buffer buf))))
1997-04-16 22:13:18 +00:00
(defun gnus-tree-highlight-article (article face)
;; The save-excursion here is apparently necessary because
;; `set-window-point' somehow manages to alter the buffer position.
(save-excursion
(with-current-buffer (gnus-get-tree-buffer)
(let (region)
(when (setq region (gnus-tree-article-region article))
(put-text-property (car region) (cdr region) 'face face)
(set-window-point
(gnus-get-buffer-window (current-buffer) t) (cdr region)))))))
1997-04-16 22:13:18 +00:00
(provide 'gnus-salt)
;;; gnus-salt.el ends here