* lisp/gnus/gnus-group.el (features): Use `dlet`.
(gnus-tmp-level, gnus-tmp-marked, gnus-tmp-group): Declare vars.
(gnus-group-insert-group-line): Bind dynbound vars via `let` rather
than as formal args. Bind `number` as dynbound.
(gnus-visual, gnus-score-find-score-files-function)
(gnus-home-score-file, gnus-apply-kill-hook)
(gnus-summary-expunge-below): Declare vars.
(gnus-group-restart, gnus-group-list-plus): Fix `interactive` spec
since the arg is unused.
* lisp/gnus/mail-source.el (mail-source-bind, mail-source-bind-common):
Use `dlet` and suppress the warnings about the non-prefixed dynbound vars.
(mail-source-set-1): Remove unused var `auth-info`.
(mail-source-call-script): Remove unused var `background`.
(mail-source-fetch-pop, mail-source-check-pop): Bind pop3 vars with `dlet`.
* lisp/gnus/gnus-int.el (mail-source-plugged, gnus-inhibit-demon):
Declare vars.
(gnus-server-opened, gnus-status-message)
(gnus-open-server, gnus-close-server, gnus-request-list)
(gnus-finish-retrieve-group-infos, gnus-retrieve-group-data-early)
(gnus-request-list-newsgroups, gnus-request-newgroups)
(gnus-request-regenerate, gnus-request-compact, gnus-request-group)
(gnus-retrieve-groups, gnus-request-post, gnus-request-expunge-group)
(gnus-request-scan, gnus-request-update-info, gnus-request-marks)
(gnus-request-accept-article, gnus-request-create-group)
(gnus-asynchronous-p, gnus-remove-denial):
Bind `gnus-command-method` via `let` rather than as formal args.
* lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line):
Pass documented vars to eval for `gnus-topic-line-format-spec`.
* lisp/gnus/message.el (message-yank-original): Use `cl-progv` rather
than `eval` to bind the vars from `message-cite-style`.
* lisp/gnus/mml.el (mml-parse-1): Use `apply` instead of `eval`.
(gnus-newsgroup-name, gnus-displaying-mime, gnus-newsgroup-name)
(gnus-article-prepare-hook, gnus-newsgroup-charset)
(gnus-original-article-buffer, gnus-message-buffer)
(message-this-is-news, message-this-is-mail): Declare vars.
* lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): Remove unused
var `cite-marks`.
* lisp/gnus/gnus-art.el (ansi-color-context-region): Declare var.
(gnus-mime-display-attachment-buttons-in-header): Move declaration
before first use.
(gnus-mime-display-alternative): Remove unused var `from`.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused
var `start` `end`.
* lisp/gnus/gnus-cache.el (gnus-article-decode-hook)
(nnml-generate-active-function): Declare var.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Remove unused
var `keywords`.
* lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Remove unused var
`cipher`.
(gnus-cloud-ensure-cloud-group): Remove unused var `method`.
* lisp/gnus/gnus-delay.el (gnus-delay-article): Remove unused var `days`.
* lisp/gnus/gnus-html.el (gnus-html-wash-images): Remove unused vars
`tag`, `string`, and `images`.
(gnus-html-wash-tags): Remove unused vars `string` and `images`.
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Remove unused var `group-name`.
(gnus-group-mail, gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window):
Remove unused vars `group` and `buffer`.
(gnus-configure-posting-styles): Remove unused vars `style` and `attribute`.
* lisp/gnus/gnus-picon.el (gnus-picon-find-face): Remove unused vars
`database`, `directory`, and `instance`.
(gnus-picon-transform-newsgroups): Remove unused var `point`.
* lisp/gnus/gnus-range.el (gnus-range-difference): Remove unused var `safe`.
* lisp/gnus/gnus-score.el (gnus-score-load-file): Remove unused var
`score-fn`.
* lisp/gnus/gnus-sum.el (message-options-set-recipient): Declare var.
* lisp/gnus/gnus-undo.el (gnus-undo): Fix docstring lie.
* lisp/gnus/gnus-util.el (print-string-length)
(iswitchb-make-buflist-hook): Declare vars.
(gnus-emacs-version): Remove unused var `codename`.
(gnus-rename-file): Remove unused vars `old-name` and `new-name`.
* lisp/gnus/gnus-uu.el (gnus-uu-yenc-article): Remove unused var
`start-char`.
(gnus-asynchronous): Declare var.
* lisp/gnus/mm-partial.el (gnus-displaying-mime): Declare var.
(mm-inline-partial): Remove unused var `buffer`.
* lisp/gnus/mm-view.el (w3m-force-redisplay, w3m-safe-url-regexp)
(gnus-displaying-mime, gnus-original-article-buffer)
(gnus-article-prepare-hook): Declare vars.
* lisp/gnus/mml-smime.el (mml-smime-epg-encrypt): Remove unused var
`boundary`.
(mml-smime-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/mml1991.el (pgg-text-mode): Declare var.
* lisp/gnus/mml2015.el (pgg-text-mode): Declare var.
(mml2015-pgg-decrypt): Remove unused var `result`.
(mml2015-epg-key-image-to-string): Remove unused var `error`.
(mml2015-epg-decrypt): Remove unused var `result`.
(mml2015-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/nnbabyl.el (nnml-current-directory): Declare var.
* lisp/gnus/nndiary.el (nndiary-files): Move declaration before first use.
* lisp/gnus/nnfolder.el (nnfolder-request-accept-article):
Remove unused var `buf`.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove unused var `err`.
* lisp/gnus/nnmairix.el (nnmairix-request-group): Remove unused var `args`.
(nnmairix-request-create-group): Remove unused var `info`.
(nnmairix-request-list): Remove unused var `folder`.
(nnmairix-request-set-mark): Remove unused var `propto`.
(nnmairix-request-set-mark): Remove unused vars `number` and `method`.
(nnmairix-close-group): Remove unused var `method`.
(nnmairix-create-search-group-from-message): Remove unused var `cq`.
(nnmairix-create-server-and-default-group): Remove unused var `create`.
(nnmairix-purge-old-groups): Remove unused var `folder`.
(nnmairix-remove-tick-mark-original-article, nnmairix-get-valid-servers):
Remove unused var `cur`.
(nnmairix-replace-group-and-numbers): Remove unused var `header`.
(nnmairix-goto-original-article): Remove unused var `rval`.
(nnmairix-widget-create-query): Remove unused var `allwidgets`.
* lisp/gnus/nnmbox.el (nnml-current-directory): Declare var.
* lisp/gnus/nnmh.el (nnmh-toplev): Move declaration before first use.
(nnmh-request-list-1): Remove unused var `rdir`.
* lisp/gnus/nnml.el (nnml-generate-nov-file): Remove unused var `file`.
* lisp/gnus/nnrss.el (nnrss-request-article): Remove unused var `post`.
(nnrss-request-article): Remove unused var `fn`.
(nnrss-check-group): Remove unused var `rdf-ns`.
* lisp/gnus/nnweb.el (nnweb-request-article): Remove unused var `active`.
(nnweb-google-parse-1): Remove unused var `Score`.
* lisp/gnus/spam-stat.el (spam-stat-error-holder): Remove var.
(spam-stat-buffer-words-with-scores): Remove unused var `word`.
(spam-stat-score-buffer): Remove unused var `spam-stat-error-holder`.
(spam-stat-split-fancy): Use `err` instead of `spam-stat-error-holder`.
* lisp/gnus/spam-wash.el (spam-wash): Remove unused var `handle`.
* lisp/gnus/spam.el (spam-copy-or-move-routine): Remove unused vars
`article` and `mark`.
(spam-register-routine): Remove unused var `article`.
(spam-log-undo-registration): Remove unused var `found`.
(spam-ifile-register-with-ifile): Remove unused var `parameters`.
(spam-check-stat): Remove unused vars `category` and `return`.
(spam-parse-list): Remove unused var `found`.
(spam-filelist-register-routine): Remove unused var `from`.
-;;; canlock.el --- functions for Cancel-Lock feature
+;;; canlock.el --- functions for Cancel-Lock feature -*- lexical-binding: t; -*-
;; Copyright (C) 1998-1999, 2001-2021 Free Software Foundation, Inc.
-;;; deuglify.el --- deuglify broken Outlook (Express) articles
+;;; deuglify.el --- deuglify broken Outlook (Express) articles -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
"Put text from ATTR-START to the end of buffer at the top of the article buffer."
;; FIXME: 1. (*) text/plain ( ) text/html
(let ((inhibit-read-only t)
- (cite-marks gnus-outlook-deuglify-cite-marks))
+ ;; (cite-marks gnus-outlook-deuglify-cite-marks)
+ )
(gnus-with-article-buffer
(article-goto-body)
;; article does not start with attribution
-;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
+;;; gmm-utils.el --- Utility functions for Gnus, Message and MML -*- lexical-binding: t; -*-
;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
-;;; gnus-agent.el --- unplugged support for Gnus
+;;; gnus-agent.el --- unplugged support for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
(condition-case err
(while t
(let ((bgn (point)))
- (eval (read (current-buffer)))
+ (eval (read (current-buffer)) t)
(delete-region bgn (point))))
(end-of-file
(delete-file (gnus-agent-lib-file "flags")))
(point)
(prog1 (1+ (point))
;; Insert the text.
- (eval gnus-category-line-format-spec))
+ (eval gnus-category-line-format-spec t))
(list 'gnus-category gnus-tmp-name))))
(defun gnus-enter-category-buffer ()
-;;; gnus-art.el --- article mode commands for Gnus
+;;; gnus-art.el --- article mode commands for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(message "\
** gnus-treat-display-xface is an obsolete variable;\
use gnus-treat-display-x-face instead")
- (eval (car (get 'gnus-treat-display-xface 'saved-value))))
+ (eval (car (get 'gnus-treat-display-xface 'saved-value)) t))
(t
value)))))
(put 'gnus-treat-display-x-face 'highlight t)
(put-text-property
(point) (1+ (point)) 'face 'underline)))))))))
+(defvar ansi-color-context-region)
+
(defun article-treat-ansi-sequences ()
"Translate ANSI SGR control sequences into overlays or extents."
(interactive)
(t "<br>\n"))))
(goto-char (point-min))
(while (re-search-forward "^[\t ]+" nil t)
- (dotimes (i (prog1
+ (dotimes (_ (prog1
(current-column)
(delete-region (match-beginning 0)
(match-end 0))))
(setq showed t)))))
showed))
+(defvar gnus-mime-display-attachment-buttons-in-header)
+
(defun gnus-article-browse-html-article (&optional arg)
"View \"text/html\" parts of the current article with a WWW browser.
Inline images embedded in a message using the cid scheme, as they are
(gnus-run-hooks 'gnus-article-prepare-hook)
t))))))
-(defvar gnus-mime-display-attachment-buttons-in-header)
-
;;;###autoload
(defun gnus-article-prepare-display ()
"Make the current buffer look like a nice article."
(let* ((preferred (or preferred (mm-preferred-alternative handles)))
(ihandles handles)
(point (point))
- handle (inhibit-read-only t) from begend not-pref)
+ handle (inhibit-read-only t) begend not-pref) ;; from
(save-window-excursion
(save-restriction
(when ibegend
(not (gnus-unbuttonized-mime-type-p
"multipart/alternative")))
(add-text-properties
- (setq from (point))
+ ;; (setq from
+ (point);; )
(progn
(insert (format "%d. " id))
(point))
;; Do the handles
(while (setq handle (pop handles))
(add-text-properties
- (setq from (point))
+ ;; (setq from
+ (point) ;; )
(progn
(insert (format "(%c) %-18s"
(if (equal handle preferred) ?* ? )
(article-goto-body)
(setq beg (point))
(while (setq entry (pop alist))
- (setq regexp (eval (car entry)))
+ (setq regexp (eval (car entry) t))
(goto-char beg)
(while (re-search-forward regexp nil t)
(let ((start (match-beginning (nth 1 entry)))
(end (match-end (nth 1 entry)))
(from (match-beginning 0)))
- (when (and (eval (nth 2 entry))
+ (when (and (eval (nth 2 entry) t)
(not (gnus-button-in-region-p
start end 'gnus-callback)))
;; That optional form returned non-nil, so we add the
(match-beginning 0))
(point-max)))
(goto-char beg)
- (while (re-search-forward (eval (nth 1 entry)) end t)
+ (while (re-search-forward (eval (nth 1 entry) t) end t)
;; Each match within a header.
(let* ((entry (cdr entry))
(start (match-beginning (nth 1 entry)))
(end (match-end (nth 1 entry)))
(form (nth 2 entry)))
(goto-char (match-end 0))
- (when (eval form)
+ (when (eval form t)
(gnus-article-add-button
start end (nth 3 entry)
(buffer-substring (match-beginning (nth 4 entry))
;;; External functions:
-(defun gnus-article-add-button (from to fun &optional data text)
+(defun gnus-article-add-button (from to fun &optional data _text)
"Create a button between FROM and TO with callback FUN and data DATA."
(add-text-properties
from to
(setq indx (match-string 1 indx))
(Info-index indx)
(when comma
- (dotimes (i (with-temp-buffer
+ (dotimes (_ (with-temp-buffer
(insert comma)
;; Note: the XEmacs version of `how-many' takes
;; no optional argument.
-;;; gnus-bcklg.el --- backlog functions for Gnus
+;;; gnus-bcklg.el --- backlog functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
-;;; gnus-bookmark.el --- Bookmarks in Gnus
+;;; gnus-bookmark.el --- Bookmarks in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
(switch-to-buffer (gnus-get-buffer-create "*Gnus Bookmark List*"))
(set-buffer (gnus-get-buffer-create "*Gnus Bookmark List*")))
(let ((inhibit-read-only t)
- alist name start end)
+ alist name) ;; start end
(erase-buffer)
(insert "% Gnus Bookmark\n- --------\n")
(add-text-properties (point-min) (point)
-;;; gnus-cache.el --- cache interface for Gnus
+;;; gnus-cache.el --- cache interface for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(gnus-kill-buffer buffer)
(setq gnus-cache-buffer nil))))
+(defvar gnus-article-decode-hook)
+
(defun gnus-cache-possibly-enter-article
(group article ticked dormant unread &optional force)
(when (and (or force (not (eq gnus-use-cache 'passive)))
(gnus-cache-write-active t)
(gnus-message 5 "Generating the cache active file...done"))))
+(defvar nnml-generate-active-function)
+
;;;###autoload
(defun gnus-cache-generate-nov-databases (dir)
"Generate NOV files recursively starting in DIR."
-;;; gnus-cite.el --- parse citations in articles for Gnus
+;;; gnus-cite.el --- parse citations in articles for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
;; like code? Check for ragged edges on the left.
(< (length columns) 3))))
-(defun gnus-article-hide-citation (&optional arg force)
+(defun gnus-article-hide-citation (&optional arg _force)
"Toggle hiding of all cited text except attribution lines.
See the documentation for `gnus-article-highlight-citation'.
If given a negative prefix, always show; if given a positive prefix,
(progn
(gnus-article-add-button
(point)
- (progn (eval gnus-cited-closed-text-button-line-format-spec)
+ (progn (eval gnus-cited-closed-text-button-line-format-spec t)
(point))
'gnus-article-toggle-cited-text
(list (cons beg end) start))
(progn (eval
(if hidden
gnus-cited-opened-text-button-line-format-spec
- gnus-cited-closed-text-button-line-format-spec))
+ gnus-cited-closed-text-button-line-format-spec)
+ t)
(point))
'gnus-article-toggle-cited-text
args)
;;; Internal functions:
-(defun gnus-cite-parse-maybe (&optional force no-overlay)
+(defun gnus-cite-parse-maybe (&optional _force no-overlay)
"Always parse the buffer."
(gnus-cite-localize)
;;Reset parser information.
(regexp-quote tag) ">"))))
;; Find loose supercite citations after attributions.
(gnus-cite-match-attributions 'small t
- (lambda (prefix tag)
+ (lambda (_prefix tag)
(when tag
(concat "\\<"
(regexp-quote tag)
"\\>"))))
;; Find loose supercite citations anywhere.
(gnus-cite-match-attributions 'small nil
- (lambda (prefix tag)
+ (lambda (_prefix tag)
(when tag
(concat "\\<"
(regexp-quote tag)
"\\>"))))
;; Find nested citations after attributions.
(gnus-cite-match-attributions 'small-if-unique t
- (lambda (prefix tag)
+ (lambda (prefix _tag)
(concat "\\`" (regexp-quote prefix) ".+")))
;; Find nested citations anywhere.
(gnus-cite-match-attributions 'small nil
- (lambda (prefix tag)
+ (lambda (prefix _tag)
(concat "\\`" (regexp-quote prefix) ".+")))
;; Remove loose prefixes with too few lines.
(let ((alist gnus-cite-loose-prefix-alist)
(when (derived-mode-p 'message-mode)
;; FIXME: Use font-lock-add-keywords!
(let ((defaults (car font-lock-defaults))
- default keywords)
+ default) ;; keywords
(while defaults
(setq default (if (consp defaults)
(pop defaults)
-;;; gnus-cloud.el --- storing and retrieving data via IMAP
+;;; gnus-cloud.el --- storing and retrieving data via IMAP -*- lexical-binding: t; -*-
;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
((eq gnus-cloud-storage-method 'epg)
(let ((context (epg-make-context 'OpenPGP))
- cipher)
+ ) ;; cipher
(setf (epg-context-armor context) t)
(setf (epg-context-textmode context) t)
(let ((data (epg-encrypt-string context
(group &optional previous method))
(defun gnus-cloud-ensure-cloud-group ()
- (let ((method (if (stringp gnus-cloud-method)
- (gnus-server-to-method gnus-cloud-method)
- gnus-cloud-method)))
+ ;; (let ((method (if (stringp gnus-cloud-method)
+ ;; (gnus-server-to-method gnus-cloud-method)
+ ;; gnus-cloud-method)))
(unless (or (gnus-active gnus-cloud-group-name)
(gnus-activate-group gnus-cloud-group-name nil nil
gnus-cloud-method))
(and (gnus-request-create-group gnus-cloud-group-name gnus-cloud-method)
(gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method)
- (gnus-subscribe-group gnus-cloud-group-name)))))
+ (gnus-subscribe-group gnus-cloud-group-name)))) ;; )
(defun gnus-cloud-upload-all-data ()
"Upload all data (newsrc and files) to the Gnus Cloud."
-;;; gnus-cus.el --- customization commands for Gnus
+;;; gnus-cus.el --- customization commands for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 1999-2021 Free Software Foundation, Inc.
(buffer-enable-undo)
(goto-char (point-min))))
-(defun gnus-group-customize-done (&rest ignore)
+(defun gnus-group-customize-done (&rest _ignore)
"Apply changes and bury the buffer."
(interactive)
(let ((params (widget-value gnus-custom-params)))
(use-local-map widget-keymap)
(widget-setup)))
-(defun gnus-score-customize-done (&rest ignore)
+(defun gnus-score-customize-done (&rest _ignore)
"Reset the score alist with the present value."
(let ((alist gnus-custom-score-alist)
(value (widget-value gnus-custom-scores)))
(widget-create
'push-button
:notify
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(let* ((info (assq gnus-agent-cat-name gnus-category-alist))
(widgets category-fields))
(while widgets
(let* ((widget (pop widgets))
(value (condition-case nil (widget-value widget) (error))))
(eval `(setf (,(widget-get widget :accessor) ',info)
- ',value)))))
+ ',value)
+ t))))
(gnus-category-write)
(gnus-kill-buffer (current-buffer))
(when (get-buffer gnus-category-buffer)
-;;; gnus-delay.el --- Delayed posting of articles
+;;; gnus-delay.el --- Delayed posting of articles -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
gnus-delay-default-delay)))
;; Allow spell checking etc.
(run-hooks 'message-send-hook)
- (let (num unit days year month day hour minute deadline)
+ (let (num unit year month day hour minute deadline) ;; days
(cond ((string-match
"\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)"
delay)
(message "Delay header missing for article %d" article)))))))
;;;###autoload
-(defun gnus-delay-initialize (&optional no-keymap no-check)
+(defun gnus-delay-initialize (&optional _no-keymap no-check)
"Initialize the gnus-delay package.
This sets up a key binding in `message-mode' to delay a message.
This tells Gnus to look for delayed messages after getting new news.
-;;; gnus-demon.el --- daemonic Gnus behavior
+;;; gnus-demon.el --- daemonic Gnus behavior -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
-;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end
+;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
-;;; gnus-dired.el --- utility functions where gnus and dired meet
+;;; gnus-dired.el --- utility functions where gnus and dired meet -*- lexical-binding: t; -*-
;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc.
-;;; gnus-draft.el --- draft message support for Gnus
+;;; gnus-draft.el --- draft message support for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
-;;; gnus-eform.el --- a mode for editing forms for Gnus
+;;; gnus-eform.el --- a mode for editing forms for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
-;;; gnus-fun.el --- various frivolous extension functions to Gnus
+;;; gnus-fun.el --- various frivolous extension functions to Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
-;;; gnus-group.el --- group mode commands for Gnus
+;;; gnus-group.el --- group mode commands for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(eval-when-compile
(require 'mm-url)
(require 'subr-x)
- (let ((features (cons 'gnus-group features)))
- (require 'gnus-sum)))
+ (with-suppressed-warnings ((lexical features))
+ (dlet ((features (cons 'gnus-group features)))
+ (require 'gnus-sum))))
(defvar gnus-cache-active-hashtb)
(defvar gnus-group-edit-buffer nil)
+(defvar gnus-tmp-group)
+(defvar gnus-tmp-level)
+(defvar gnus-tmp-marked)
(defvar gnus-tmp-news-method)
(defvar gnus-tmp-colon)
(defvar gnus-tmp-news-server)
(gnus-group-get-new-news 0))))
:type 'boolean)
-(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level
- gnus-tmp-marked number
- gnus-tmp-method)
+(defun gnus-group-insert-group-line (group level marked number gnus-tmp-method)
"Insert a group line in the group buffer."
- (let* ((gnus-tmp-method
+ (with-suppressed-warnings ((lexical number))
+ (defvar number)) ;FIXME: Used in `gnus-group-line-format-alist'.
+ (let* ((number number)
+ (gnus-tmp-level level)
+ (gnus-tmp-marked marked)
+ (gnus-tmp-group group)
+ (gnus-tmp-method
(gnus-server-get-method gnus-tmp-group gnus-tmp-method))
(gnus-tmp-active (gnus-active gnus-tmp-group))
(gnus-tmp-number-total
(point)
(prog1 (1+ (point))
;; Insert the text.
- (eval gnus-group-line-format-spec))
+ (eval gnus-group-line-format-spec t))
`(gnus-group ,gnus-tmp-group
gnus-unread ,(if (numberp number)
(string-to-number gnus-tmp-number-of-unread)
(buffer-modified-p gnus-dribble-buffer)
(with-current-buffer gnus-dribble-buffer
(not (zerop (buffer-size))))))
- (mode-string (eval gformat)))
+ (mode-string (eval gformat t)))
;; Say whether the dribble buffer has been modified.
(setq mode-line-modified
(if modified "**" "--"))
(gnus-group-mark-group 1 nil t))
(setq gnus-group-marked (cons group (delete group gnus-group-marked)))))
-(defun gnus-group-universal-argument (arg &optional groups func)
+(defun gnus-group-universal-argument (arg &optional _groups func)
"Perform any command on all groups according to the process/prefix convention."
(interactive "P")
(if (eq (setq func (or func
'undefined)
(gnus-error 1 "Undefined key")
(gnus-group-iterate arg
- (lambda (group)
+ (lambda (_group)
(command-execute func))))
(gnus-group-position-point))
(forward-line -1))
(gnus-group-read-group all t))
+(defvar gnus-visual)
+(defvar gnus-score-find-score-files-function)
+(defvar gnus-home-score-file)
+(defvar gnus-apply-kill-hook)
+(defvar gnus-summary-expunge-below)
+
(defun gnus-group-quick-select-group (&optional all group)
"Select the GROUP \"quickly\".
This means that no highlighting or scoring will be performed. If
(if (stringp id) (setq id (string-to-number id)))
(setq-local debbugs-gnu-bug-number id)))))
-(defun gnus-group-jump-to-group (group &optional prompt)
+(defun gnus-group-jump-to-group (group &optional _prompt)
"Jump to newsgroup GROUP.
If PROMPT (the prefix) is a number, use the prompt specified in
(setq method (copy-tree method))
(let (entry)
(while (setq entry (memq (assq 'eval method) method))
- (setcar entry (eval (cadar entry)))))
+ (setcar entry (eval (cadar entry) t))))
(gnus-group-make-group group method))
(defun gnus-group-make-help-group (&optional noerror)
(interactive "P")
(gnus-save-newsrc-file force))
-(defun gnus-group-restart (&optional arg)
+(defun gnus-group-restart (&optional _arg)
"Force Gnus to read the .newsrc file."
- (interactive "P")
+ (interactive)
(when (gnus-yes-or-no-p
(format "Are you sure you want to restart Gnus? "))
(gnus-save-newsrc-file)
(forward-char 1))
groups))
-(defun gnus-group-list-plus (&optional args)
+(defun gnus-group-list-plus (&optional _args)
"List groups plus the current selection."
- (interactive "P")
+ (interactive)
(let ((gnus-group-listed-groups (gnus-group-listed-groups))
(gnus-group-list-mode gnus-group-list-mode) ;; Save it.
func)
-;;; gnus-html.el --- Render HTML in a buffer.
+;;; gnus-html.el --- Render HTML in a buffer. -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
(defun gnus-html-wash-images ()
"Run through current buffer and replace img tags by images."
- (let (tag parameters string start end images
- inhibit-images blocked-images)
+ (let ( parameters start end ;; tag string images
+ inhibit-images blocked-images)
(if (buffer-live-p gnus-summary-buffer)
(with-current-buffer gnus-summary-buffer
(setq inhibit-images gnus-inhibit-images
(> width 4)))
(gnus-html-display-image url start end alt-text))))))))))
-(defun gnus-html-display-image (url start end &optional alt-text)
+(defun gnus-html-display-image (url _start _end &optional alt-text)
"Display image at URL on text from START to END.
Use ALT-TEXT for the image string."
(or alt-text (setq alt-text "*"))
(gnus-html-put-image (gnus-html-get-image-data url) url alt-text))))
(defun gnus-html-wash-tags ()
- (let (tag parameters string start end images url)
+ (let (tag parameters start end url) ;; string images
(gnus-html-pre-wash)
(gnus-html-wash-images)
-;;; gnus-int.el --- backend interface functions for Gnus
+;;; gnus-int.el --- backend interface functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
"The current method, for the registry.")
-(defun gnus-server-opened (gnus-command-method)
- "Check whether a connection to GNUS-COMMAND-METHOD has been opened."
- (unless (eq (gnus-server-status gnus-command-method)
+(defun gnus-server-opened (command-method)
+ "Check whether a connection to COMMAND-METHOD has been opened."
+ (unless (eq (gnus-server-status command-method)
'denied)
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (inline (gnus-get-function gnus-command-method 'server-opened))
- (nth 1 gnus-command-method))))
-
-(defun gnus-status-message (gnus-command-method)
- "Return the status message from GNUS-COMMAND-METHOD.
-If GNUS-COMMAND-METHOD is a string, it is interpreted as a group
-name. The method this group uses will be queried."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (inline (gnus-get-function gnus-command-method 'server-opened))
+ (nth 1 gnus-command-method)))))
+
+(defun gnus-status-message (command-method)
+ "Return the status message from COMMAND-METHOD.
+If COMMAND-METHOD is a string, it is interpreted as a group name.
+The method this group uses will be queried."
(let ((gnus-command-method
- (if (stringp gnus-command-method)
- (gnus-find-method-for-group gnus-command-method)
- gnus-command-method)))
+ (if (stringp command-method)
+ (gnus-find-method-for-group command-method)
+ command-method)))
(funcall (gnus-get-function gnus-command-method 'status-message)
(nth 1 gnus-command-method))))
type form))
(setq gnus-backend-trace-elapsed (float-time)))))
-(defun gnus-open-server (gnus-command-method)
- "Open a connection to GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
+(defun gnus-open-server (command-method)
+ "Open a connection to COMMAND-METHOD."
(gnus-backend-trace :opening gnus-command-method)
- (let ((elem (assoc gnus-command-method gnus-opened-servers))
- (server (gnus-method-to-server-name gnus-command-method)))
+ (let* ((gnus-command-method (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method))
+ (elem (assoc gnus-command-method gnus-opened-servers))
+ (server (gnus-method-to-server-name gnus-command-method)))
;; If this method was previously denied, we just return nil.
(if (eq (nth 1 elem) 'denied)
(progn
(gnus-backend-trace :opened gnus-command-method)
result)))))
-(defun gnus-close-server (gnus-command-method)
- "Close the connection to GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (prog1
- (funcall (gnus-get-function gnus-command-method 'close-server)
- (nth 1 gnus-command-method)
- (nthcdr 2 gnus-command-method))
- (when-let ((elem (assoc gnus-command-method gnus-opened-servers)))
- (setf (nth 1 elem) 'closed))))
-
-(defun gnus-request-list (gnus-command-method)
- "Request the active file from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-list)
- (nth 1 gnus-command-method)))
+(defun gnus-close-server (command-method)
+ "Close the connection to COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (prog1
+ (funcall (gnus-get-function gnus-command-method 'close-server)
+ (nth 1 gnus-command-method)
+ (nthcdr 2 gnus-command-method))
+ (when-let ((elem (assoc gnus-command-method gnus-opened-servers)))
+ (setf (nth 1 elem) 'closed)))))
+
+(defun gnus-request-list (command-method)
+ "Request the active file from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-list)
+ (nth 1 gnus-command-method))))
(defun gnus-server-get-active (server &optional ignored)
"Return the active list for SERVER.
(forward-line)))))
groups))
-(defun gnus-finish-retrieve-group-infos (gnus-command-method infos data)
- "Read and update infos from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
+(defun gnus-finish-retrieve-group-infos (command-method infos data)
+ "Read and update infos from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
(gnus-backend-trace :finishing gnus-command-method)
(prog1
(funcall (gnus-get-function gnus-command-method
'finish-retrieve-group-infos)
(nth 1 gnus-command-method)
infos data)
- (gnus-backend-trace :finished gnus-command-method)))
-
-(defun gnus-retrieve-group-data-early (gnus-command-method infos)
- "Start early async retrieval of data from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'retrieve-group-data-early)
- (nth 1 gnus-command-method)
- infos))
-
-(defun gnus-request-list-newsgroups (gnus-command-method)
- "Request the newsgroups file from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-list-newsgroups)
- (nth 1 gnus-command-method)))
-
-(defun gnus-request-newgroups (date gnus-command-method)
- "Request all new groups since DATE from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (let ((func (gnus-get-function gnus-command-method 'request-newgroups t)))
- (when func
- (funcall func date (nth 1 gnus-command-method)))))
-
-(defun gnus-request-regenerate (gnus-command-method)
- "Request a data generation from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-regenerate)
- (nth 1 gnus-command-method)))
+ (gnus-backend-trace :finished gnus-command-method))))
+
+(defun gnus-retrieve-group-data-early (command-method infos)
+ "Start early async retrieval of data from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'retrieve-group-data-early)
+ (nth 1 gnus-command-method)
+ infos)))
+
+(defun gnus-request-list-newsgroups (command-method)
+ "Request the newsgroups file from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-list-newsgroups)
+ (nth 1 gnus-command-method))))
+
+(defun gnus-request-newgroups (date command-method)
+ "Request all new groups since DATE from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (let ((func (gnus-get-function gnus-command-method 'request-newgroups t)))
+ (when func
+ (funcall func date (nth 1 gnus-command-method))))))
+
+(defun gnus-request-regenerate (command-method)
+ "Request a data generation from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-regenerate)
+ (nth 1 gnus-command-method))))
(defun gnus-request-compact-group (group)
(let* ((method (gnus-find-method-for-group group))
(nth 1 gnus-command-method) t)))
result))
-(defun gnus-request-compact (gnus-command-method)
- "Request groups compaction from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-compact)
- (nth 1 gnus-command-method)))
+(defun gnus-request-compact (command-method)
+ "Request groups compaction from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-compact)
+ (nth 1 gnus-command-method))))
-(defun gnus-request-group (group &optional dont-check gnus-command-method info)
+(defun gnus-request-group (group &optional dont-check command-method info)
"Request GROUP. If DONT-CHECK, no information is required."
(let ((gnus-command-method
- (or gnus-command-method (inline (gnus-find-method-for-group group)))))
+ (or command-method (inline (gnus-find-method-for-group group)))))
(when (stringp gnus-command-method)
(setq gnus-command-method
(inline (gnus-server-to-method gnus-command-method))))
articles (gnus-group-real-name group)
(nth 1 gnus-command-method))))
-(defun gnus-retrieve-groups (groups gnus-command-method)
- "Request active information on GROUPS from GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'retrieve-groups)
- groups (nth 1 gnus-command-method)))
+(defun gnus-retrieve-groups (groups command-method)
+ "Request active information on GROUPS from COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'retrieve-groups)
+ groups (nth 1 gnus-command-method))))
(defun gnus-request-type (group &optional article)
"Return the type (`post' or `mail') of GROUP (and ARTICLE)."
(delete-region (point-min) (1- (point))))))
res))
-(defun gnus-request-post (gnus-command-method)
- "Post the current buffer using GNUS-COMMAND-METHOD."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-post)
- (nth 1 gnus-command-method)))
+(defun gnus-request-post (command-method)
+ "Post the current buffer using COMMAND-METHOD."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-post)
+ (nth 1 gnus-command-method))))
-(defun gnus-request-expunge-group (group gnus-command-method)
+(defun gnus-request-expunge-group (group command-method)
"Expunge GROUP, which is removing articles that have been marked as deleted."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-expunge-group)
- (gnus-group-real-name group)
- (nth 1 gnus-command-method)))
-
-(defun gnus-request-scan (group gnus-command-method)
- "Request a SCAN being performed in GROUP from GNUS-COMMAND-METHOD.
-If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(let ((gnus-command-method
- (if group (gnus-find-method-for-group group) gnus-command-method))
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-expunge-group)
+ (gnus-group-real-name group)
+ (nth 1 gnus-command-method))))
+
+(defvar mail-source-plugged)
+(defvar gnus-inhibit-demon)
+
+(defun gnus-request-scan (group command-method)
+ "Request a SCAN being performed in GROUP from COMMAND-METHOD.
+If GROUP is nil, all groups on COMMAND-METHOD are scanned."
+ (let ((gnus-command-method
+ (if group (gnus-find-method-for-group group) command-method))
(gnus-inhibit-demon t)
(mail-source-plugged gnus-plugged))
(when (or gnus-plugged
(and group (gnus-group-real-name group))
(nth 1 gnus-command-method)))))
-(defun gnus-request-update-info (info gnus-command-method)
+(defun gnus-request-update-info (info command-method)
(when (gnus-check-backend-function
- 'request-update-info (car gnus-command-method))
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'request-update-info)
- (gnus-group-real-name (gnus-info-group info)) info
- (nth 1 gnus-command-method))))
-
-(defsubst gnus-request-marks (info gnus-command-method)
- "Request that GNUS-COMMAND-METHOD update INFO."
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (when (gnus-check-backend-function
- 'request-marks (car gnus-command-method))
- (let ((group (gnus-info-group info)))
- (and (funcall (gnus-get-function gnus-command-method 'request-marks)
- (gnus-group-real-name group)
- info (nth 1 gnus-command-method))
- ;; If the minimum article number is greater than 1, then all
- ;; smaller article numbers are known not to exist; we'll
- ;; artificially add those to the 'read range.
- (let* ((active (gnus-active group))
- (min (car active)))
- (when (> min 1)
- (let* ((range (if (= min 2) 1 (cons 1 (1- min))))
- (read (gnus-info-read info))
- (new-read (gnus-range-add read (list range))))
- (setf (gnus-info-read info) new-read)))
- info)))))
+ 'request-update-info (car command-method))
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (funcall (gnus-get-function gnus-command-method 'request-update-info)
+ (gnus-group-real-name (gnus-info-group info)) info
+ (nth 1 gnus-command-method)))))
+
+(defsubst gnus-request-marks (info command-method)
+ "Request that COMMAND-METHOD update INFO."
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (when (gnus-check-backend-function
+ 'request-marks (car gnus-command-method))
+ (let ((group (gnus-info-group info)))
+ (and (funcall (gnus-get-function gnus-command-method 'request-marks)
+ (gnus-group-real-name group)
+ info (nth 1 gnus-command-method))
+ ;; If the minimum article number is greater than 1, then all
+ ;; smaller article numbers are known not to exist; we'll
+ ;; artificially add those to the 'read range.
+ (let* ((active (gnus-active group))
+ (min (car active)))
+ (when (> min 1)
+ (let* ((range (if (= min 2) 1 (cons 1 (1- min))))
+ (read (gnus-info-read info))
+ (new-read (gnus-range-add read (list range))))
+ (setf (gnus-info-read info) new-read)))
+ info))))))
(defun gnus-request-expire-articles (articles group &optional force)
(let* ((gnus-command-method (gnus-find-method-for-group group))
(gnus-agent-expire expired-articles group 'force))))
not-deleted))
-(defun gnus-request-move-article (article group server accept-function
+(defun gnus-request-move-article (article group _server accept-function
&optional last move-is-internal)
(let* ((gnus-command-method (gnus-find-method-for-group group))
(result (funcall (gnus-get-function gnus-command-method
(gnus-agent-unfetch-articles group (list article)))
result))
-(defun gnus-request-accept-article (group &optional gnus-command-method last
+(defun gnus-request-accept-article (group &optional command-method last
no-encode)
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (when (and (not gnus-command-method)
- (stringp group))
- (setq gnus-command-method (or (gnus-find-method-for-group group)
- (gnus-group-name-to-method group))))
- (goto-char (point-max))
- ;; Make sure there's a newline at the end of the article.
- (unless (bolp)
- (insert "\n"))
- (unless no-encode
- (let ((message-options message-options))
- (message-options-set-recipient)
- (save-restriction
- (message-narrow-to-head)
- (mail-encode-encoded-word-buffer))
- (message-encode-message-body)))
- (let ((gnus-command-method (or gnus-command-method
- (gnus-find-method-for-group group)))
- (result
- (funcall
- (gnus-get-function gnus-command-method 'request-accept-article)
- (if (stringp group) (gnus-group-real-name group) group)
- (cadr gnus-command-method)
- last)))
- (when (and gnus-agent
- (gnus-agent-method-p gnus-command-method)
- (cdr result))
- (gnus-agent-regenerate-group group (list (cdr result))))
- result))
+ (let ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)))
+ (when (and (not gnus-command-method)
+ (stringp group))
+ (setq gnus-command-method (or (gnus-find-method-for-group group)
+ (gnus-group-name-to-method group))))
+ (goto-char (point-max))
+ ;; Make sure there's a newline at the end of the article.
+ (unless (bolp)
+ (insert "\n"))
+ (unless no-encode
+ (let ((message-options message-options))
+ (message-options-set-recipient)
+ (save-restriction
+ (message-narrow-to-head)
+ (mail-encode-encoded-word-buffer))
+ (message-encode-message-body)))
+ (let ((gnus-command-method (or gnus-command-method
+ (gnus-find-method-for-group group)))
+ (result
+ (funcall
+ (gnus-get-function gnus-command-method 'request-accept-article)
+ (if (stringp group) (gnus-group-real-name group) group)
+ (cadr gnus-command-method)
+ last)))
+ (when (and gnus-agent
+ (gnus-agent-method-p gnus-command-method)
+ (cdr result))
+ (gnus-agent-regenerate-group group (list (cdr result))))
+ result)))
(defun gnus-request-replace-article (article group buffer &optional no-encode)
(unless no-encode
article (gnus-group-real-name group)
(nth 1 gnus-command-method))))
-(defun gnus-request-create-group (group &optional gnus-command-method args)
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (let ((gnus-command-method
- (or gnus-command-method (gnus-find-method-for-group group))))
+(defun gnus-request-create-group (group &optional command-method args)
+ (let* ((gnus-command-method
+ (or (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method)
+ (gnus-find-method-for-group group))))
(funcall (gnus-get-function gnus-command-method 'request-create-group)
- (gnus-group-real-name group) (nth 1 gnus-command-method) args)))
+ (gnus-group-real-name group) (nth 1 gnus-command-method) args)))
(defun gnus-request-delete-group (group &optional force)
(let* ((gnus-command-method (gnus-find-method-for-group group))
"-request-close"))))
(funcall func)))))
-(defun gnus-asynchronous-p (gnus-command-method)
- (let ((func (gnus-get-function gnus-command-method 'asynchronous-p t)))
+(defun gnus-asynchronous-p (command-method)
+ (let ((func (gnus-get-function command-method 'asynchronous-p t)))
(when (fboundp func)
- (funcall func))))
-
-(defun gnus-remove-denial (gnus-command-method)
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (let* ((elem (assoc gnus-command-method gnus-opened-servers))
+ (let ((gnus-command-method command-method))
+ (funcall func)))))
+
+(defun gnus-remove-denial (command-method)
+ (let* ((gnus-command-method
+ (if (stringp command-method)
+ (gnus-server-to-method command-method)
+ command-method))
+ (elem (assoc gnus-command-method gnus-opened-servers))
(status (cadr elem)))
;; If this hasn't been opened before, we add it to the list.
(when (eq status 'denied)
-;;; gnus-kill.el --- kill commands for Gnus
+;;; gnus-kill.el --- kill commands for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(save-excursion
(save-window-excursion
(pop-to-buffer gnus-summary-buffer)
- (eval (car (read-from-string string)))))))
+ (eval (car (read-from-string string)) t)))))
(defun gnus-kill-file-apply-last-sexp ()
"Apply sexp before point in current buffer to current newsgroup."
(save-excursion
(save-window-excursion
(pop-to-buffer gnus-summary-buffer)
- (eval (car (read-from-string string))))))
+ (eval (car (read-from-string string)) t))))
(ding) (gnus-message 2 "No newsgroup is selected.")))
(defun gnus-kill-file-exit ()
(eq (car form) 'gnus-lower))
(progn
(delete-region beg (point))
- (insert (or (eval form) "")))
+ (insert (or (eval form t) "")))
(with-current-buffer gnus-summary-buffer
- (ignore-errors (eval form)))))
+ (ignore-errors (eval form t)))))
(and (buffer-modified-p)
gnus-kill-save-kill-file
(save-buffer))
((functionp form)
(funcall form))
(t
- (eval form)))))
+ (eval form t)))))
;; Search article body.
(let ((gnus-current-article nil) ;Save article pointer.
(gnus-last-article nil)
((functionp form)
(funcall form))
(t
- (eval form)))))))
+ (eval form t)))))))
did-kill)))
(defun gnus-execute (field regexp form &optional backward unread)
-;;; gnus-logic.el --- advanced scoring code for Gnus
+;;; gnus-logic.el --- advanced scoring code for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
-;;; gnus-mh.el --- mh-e interface for Gnus
+;;; gnus-mh.el --- mh-e interface for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
(kill-buffer errbuf))))
(setq gnus-newsgroup-last-folder folder)))
-(defun gnus-Folder-save-name (newsgroup headers &optional last-folder)
+(defun gnus-Folder-save-name (newsgroup _headers &optional last-folder)
"Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER.
If variable `gnus-use-long-file-name' is nil, it is +News.group.
Otherwise, it is like +news/group."
(gnus-capitalize-newsgroup newsgroup)
(gnus-newsgroup-directory-form newsgroup)))))
-(defun gnus-folder-save-name (newsgroup headers &optional last-folder)
+(defun gnus-folder-save-name (newsgroup _headers &optional last-folder)
"Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER.
If variable `gnus-use-long-file-name' is nil, it is +news.group.
Otherwise, it is like +news/group."
-;;; gnus-ml.el --- Mailing list minor mode for Gnus
+;;; gnus-ml.el --- Mailing list minor mode for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
-;;; gnus-mlspl.el --- a group params-based mail splitting mechanism
+;;; gnus-mlspl.el --- a group params-based mail splitting mechanism -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
-;;; gnus-msg.el --- mail and post interface for Gnus
+;;; gnus-msg.el --- mail and post interface for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
switch-action yank-action send-actions return-action))
(let ((buf (current-buffer))
;; Don't use posting styles corresponding to any existing group.
- (group-name gnus-newsgroup-name)
+ ;; (group-name gnus-newsgroup-name)
mail-buf)
(let ((gnus-newsgroup-name ""))
(gnus-setup-message
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
- (let* ((group gnus-newsgroup-name)
+ (let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
- (buffer (current-buffer))
+ ;; (buffer (current-buffer))
(gnus-newsgroup-name
(if arg
(if (= 1 (prefix-numeric-value arg))
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
- (let* ((group gnus-newsgroup-name)
+ (let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
- (buffer (current-buffer))
+ ;; (buffer (current-buffer))
(gnus-newsgroup-name
(if arg
(if (= 1 (prefix-numeric-value arg))
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
- (let* ((group gnus-newsgroup-name)
+ (let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
- (buffer (current-buffer))
+ ;; (buffer (current-buffer))
(gnus-newsgroup-name
(if arg
(if (= 1 (prefix-numeric-value arg))
(interactive "P")
;; We can't `let' gnus-newsgroup-name here, since that leads
;; to local variables leaking.
- (let* ((group gnus-newsgroup-name)
+ (let* (;;(group gnus-newsgroup-name)
;; make sure last viewed article doesn't affect posting styles:
(gnus-article-copy)
- (buffer (current-buffer))
+ ;; (buffer (current-buffer))
(gnus-newsgroup-name
(if arg
(if (= 1 (prefix-numeric-value arg))
(run-hooks 'gnus-article-decode-hook)))))
gnus-article-copy)))
-(defun gnus-post-news (post &optional group header article-buffer yank subject
+(defun gnus-post-news (post &optional group header article-buffer yank _subject
force-news)
(when article-buffer
(gnus-copy-article-buffer))
;; Function.
(funcall (car var) group))
(t
- (eval (car var)))))))
+ (eval (car var) t))))))
(setq var (cdr var)))
result)))
name)
(with-current-buffer gnus-summary-buffer
gnus-posting-styles)
gnus-posting-styles))
- style match attribute value v results matched-string
+ match value v results matched-string ;; style attribute
filep name address element)
;; If the group has a posting-style parameter, add it at the end with a
;; regexp matching everything, to be sure it takes precedence over all
(setq matched-string header)))))))
(t
;; This is a form to be evalled.
- (eval match)))))
+ (eval match t)))))
;; We have a match, so we set the variables.
(dolist (attribute style)
(setq element (pop attribute)
((boundp value)
(symbol-value value))))
((listp value)
- (eval value))))
+ (eval value t))))
;; Translate obsolescent value.
(cond
((eq element 'signature-file)
-;; gnus-notifications.el -- Send notification on new message in Gnus
+;; gnus-notifications.el -- Send notification on new message in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
-;;; gnus-picon.el --- displaying pretty icons in Gnus
+;;; gnus-picon.el --- displaying pretty icons in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(let* ((address (gnus-picon-split-address address))
(user (pop address))
(faddress address)
- database directory result instance base)
+ result base) ;; database directory instance
(catch 'found
(dolist (database gnus-picon-databases)
(dolist (directory directories)
(gnus-article-goto-header header)
(mail-header-narrow-to-field)
(let ((groups (message-tokenize-header (mail-fetch-field header)))
- spec file point)
+ spec file) ;; point
(dolist (group groups)
(unless (setq spec (cdr (assoc group gnus-picon-cache)))
(setq spec (nreverse (split-string group "[.]")))
-;;; gnus-range.el --- range and sequence functions for Gnus
+;;; gnus-range.el --- range and sequence functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(setq range2 (gnus-range-normalize range2))
(let* ((new-range (cons nil (copy-sequence range1)))
(r new-range)
- (safe t))
+ ) ;; (safe t)
(while (cdr r)
(let* ((r1 (cadr r))
(r2 (car range2))
-;;; gnus-rfc1843.el --- HZ (rfc1843) decoding interface functions for Gnus
+;;; gnus-rfc1843.el --- HZ (rfc1843) decoding interface functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
-;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
+;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc.
beg end)
(add-text-properties
(setq beg (point))
- (setq end (progn (eval gnus-tree-line-format-spec) (point)))
+ (setq end (progn (eval gnus-tree-line-format-spec t) (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))))
-;;; gnus-score.el --- scoring code for Gnus
+;;; gnus-score.el --- scoring code for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(let ((mark (car (gnus-score-get 'mark alist)))
(expunge (car (gnus-score-get 'expunge alist)))
(mark-and-expunge (car (gnus-score-get 'mark-and-expunge alist)))
- (score-fn (car (gnus-score-get 'score-fn alist)))
+ ;; (score-fn (car (gnus-score-get 'score-fn alist)))
(files (gnus-score-get 'files alist))
(exclude-files (gnus-score-get 'exclude-files alist))
(orphan (car (gnus-score-get 'orphan alist)))
(if adapt-file (cons adapt-file files)
files)))))
(when (and eval (not global))
- (eval eval))
+ (eval eval t))
;; We then expand any exclude-file directives.
(setq gnus-scores-exclude-files
(nconc
;;; Finding score files.
-(defun gnus-score-score-files (group)
+(defun gnus-score-score-files (_group)
"Return a list of all possible score files."
;; Search and set any global score files.
(when gnus-global-score-files
-;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus
+;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
-;;; gnus-spec.el --- format spec functions for Gnus
+;;; gnus-spec.el --- format spec functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
If PROPS, insert the result."
(let ((form (gnus-parse-format format alist props)))
(if props
- (add-text-properties (point) (progn (eval form) (point)) props)
- (eval form))))
+ (add-text-properties (point) (progn (eval form t) (point)) props)
+ (eval form t))))
(defun gnus-set-format (type &optional insertable)
(set (intern (format "gnus-%s-line-format-spec" type))
-;;; gnus-srvr.el --- virtual server support for Gnus
+;;; gnus-srvr.el --- virtual server support for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(point)
(prog1 (1+ (point))
;; Insert the text.
- (eval gnus-server-line-format-spec))
+ (eval gnus-server-line-format-spec t))
(list 'gnus-server (intern gnus-tmp-name)
'gnus-named-server (intern (gnus-method-to-server method t))))))
(let ((info (gnus-server-to-method server)))
(gnus-edit-form
info "Showing the server."
- (lambda (form)
+ (lambda (_form)
(gnus-server-position-point))
'edit-server)))
;; Copy the global value of the variable.
(symbol-value (car local))
;; Use the value from the list.
- (eval (cdr local)))))
+ (eval (cdr local) t))))
(set (make-local-variable (car local)) global))
;; Simple nil-valued local variable.
(set (make-local-variable local) nil))))
(condition-case ()
(put-text-property
(point)
- (progn (eval gnus-summary-line-format-spec) (point))
+ (progn (eval gnus-summary-line-format-spec t) (point))
'gnus-number gnus-tmp-number)
(error (gnus-message 5 "Error updating the summary line")))
(when (gnus-visual-p 'summary-highlight 'highlight)
(my-format "%b %d '%y"))
(let* ((difference (time-subtract now messy-date))
(templist gnus-user-date-format-alist)
- (top (eval (caar templist))))
+ (top (eval (caar templist) t)))
(while (if (numberp top) (time-less-p top difference) (not top))
(progn
(setq templist (cdr templist))
- (setq top (eval (caar templist)))))
+ (setq top (eval (caar templist) t))))
(if (stringp (cdr (car templist)))
(setq my-format (cdr (car templist)))))
- (format-time-string (eval my-format) messy-date))
+ (format-time-string (eval my-format t) messy-date))
(error " ? ")))
(defun gnus-summary-set-local-parameters (group)
;; buffer-local, whereas just parameters like `gcc-self',
;; `timestamp', etc. should not be bound as variables.
(if (boundp (car elem))
- (set (make-local-variable (car elem)) (eval (nth 1 elem)))
- (eval (nth 1 elem))))))))
+ (set (make-local-variable (car elem)) (eval (nth 1 elem) t))
+ (eval (nth 1 elem) t)))))))
(defun gnus-summary-read-group (group &optional show-all no-article
kill-buffer no-display backward
(setq gnus-tmp-thread thread)
(put-text-property
(point)
- (progn (eval gnus-summary-line-format-spec) (point))
+ (progn (eval gnus-summary-line-format-spec t) (point))
'gnus-number number)
(when gnus-visual-p
(forward-line -1)
""))
bufname-length max-len
gnus-tmp-header) ;; passed as argument to any user-format-funcs
- (setq mode-string (eval mformat))
+ (setq mode-string (eval mformat t))
(setq bufname-length (if (string-match "%b" mode-string)
(- (length
(buffer-name
(switch-to-buffer gnus-group-buffer)
(when group
(gnus-group-jump-to-group group))
- (eval (cadr (assq key keystrokes)))
+ (eval (cadr (assq key keystrokes)) t)
(setq group (gnus-group-group-name))
(switch-to-buffer obuf))
(setq ended nil))
(gnus-set-mode-line 'summary)
not-deleted))
+(defvar message-options-set-recipient)
+
(defun gnus-summary-edit-article (&optional arg)
"Edit the current article.
This will have permanent effect only in mail groups.
;; Form.
(save-restriction
(widen)
- (setq result (eval match)))))
+ (setq result (eval match t)))))
(setq split-name (cdr method))
(cond ((stringp result)
(push (expand-file-name
(nomove "" nil nil ,keystroke)))
(let ((func (gnus-summary-make-marking-command-1
mark (car lway) lway name)))
- (setq func (eval func))
+ (setq func (eval func t))
(define-key map (nth 4 lway) func)))))
(defun gnus-summary-make-marking-command-1 (mark way lway name)
-;;; gnus-topic.el --- a folding minor mode for Gnus group buffers
+;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(add-text-properties
(point)
(prog1 (1+ (point))
- (eval gnus-topic-line-format-spec))
+ (eval gnus-topic-line-format-spec
+ `((indentation . ,indentation)
+ (visible . ,visible)
+ (name . ,name)
+ (level . ,level)
+ (number-of-groups . ,number-of-groups)
+ (total-number-of-articles . ,total-number-of-articles)
+ (entries . ,entries))))
(list 'gnus-topic name
'gnus-topic-level level
'gnus-topic-unread unread
-;;; gnus-undo.el --- minor mode for undoing in Gnus
+;;; gnus-undo.el --- minor mode for undoing in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
;; We are not at a boundary...
(setq gnus-undo-boundary-inhibit t)))
-(defun gnus-undo (n)
+(defun gnus-undo (_n)
"Undo some previous changes in Gnus buffers.
-Repeat this command to undo more changes.
-A numeric argument serves as a repeat count."
+Repeat this command to undo more changes."
+ ;; FIXME: A numeric argument should serve as a repeat count.
(interactive "p")
(unless gnus-undo-mode
(error "Undoing is not enabled in this buffer"))
-;;; gnus-util.el --- utility functions for Gnus
+;;; gnus-util.el --- utility functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(define-key (symbol-value (intern (format "gnus-%s-mode-map" type)))
[menu-bar edit] 'undefined))
+(defvar print-string-length)
+
(defmacro gnus-bind-print-variables (&rest forms)
"Bind print-* variables and evaluate FORMS.
This macro is used with `prin1', `pp', etc. in order to ensure
(setq gnus-info-buffer (current-buffer))
(gnus-configure-windows 'info)))
-(defun gnus-not-ignore (&rest args)
+(defun gnus-not-ignore (&rest _args)
t)
(defvar gnus-directory-sep-char-regexp "/"
(declare-function iswitchb-minibuffer-setup "iswitchb")
(defvar iswitchb-temp-buflist)
(defvar iswitchb-mode)
+(defvar iswitchb-make-buflist-hook)
(defun gnus-iswitchb-completing-read (prompt collection &optional require-match
initial-input history def)
(defvar tool-bar-mode)
-(defun gnus-tool-bar-update (&rest ignore)
+(defun gnus-tool-bar-update (&rest _ignore)
"Update the tool bar."
(when (and (boundp 'tool-bar-mode)
tool-bar-mode)
(if seqs2_n
(let* ((seqs (cons seq1 seqs2_n))
(cnt 0)
- (heads (mapcar (lambda (seq)
+ (heads (mapcar (lambda (_seq)
(make-symbol (concat "head"
(int-to-string
(setq cnt (1+ cnt))))))
((memq 'type lst)
(symbol-name system-type))
(t nil)))
- codename)
+ ) ;; codename
(cond
((not (memq 'emacs lst))
nil)
empty directories from OLD-PATH."
(when (file-exists-p old-path)
(let* ((old-dir (file-name-directory old-path))
- (old-name (file-name-nondirectory old-path))
+ ;; (old-name (file-name-nondirectory old-path))
(new-dir (file-name-directory new-path))
- (new-name (file-name-nondirectory new-path))
+ ;; (new-name (file-name-nondirectory new-path))
temp)
(gnus-make-directory new-dir)
(rename-file old-path new-path t)
-;;; gnus-uu.el --- extract (uu)encoded files in Gnus
+;;; gnus-uu.el --- extract (uu)encoded files in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1985-1987, 1993-1998, 2000-2021 Free Software
;; Foundation, Inc.
(defvar gnus-uu-binhex-end-line
":$")
-(defun gnus-uu-binhex-article (buffer in-state)
+(defun gnus-uu-binhex-article (buffer _in-state)
(let (state start-char)
(with-current-buffer buffer
(widen)
;; yEnc
-(defun gnus-uu-yenc-article (buffer in-state)
+(defun gnus-uu-yenc-article (_buffer _in-state)
(with-current-buffer gnus-original-article-buffer
(widen)
(let ((file-name (yenc-extract-filename))
- state start-char)
+ state) ;; start-char
(when (not file-name)
(setq state (list 'wrong-type)))
;; PostScript
-(defun gnus-uu-decode-postscript-article (process-buffer in-state)
+(defun gnus-uu-decode-postscript-article (process-buffer _in-state)
(let ((state (list 'ok))
start-char end-char file-name)
(with-current-buffer process-buffer
(when dont-unmark-last-article
(setq gnus-uu-has-been-grabbed (list art))))))
+(defvar gnus-asynchronous)
+
;; This function takes a list of articles and a function to apply to
;; each article grabbed.
;;
;; This function returns a list of files decoded if the grabbing and
;; the process-function has been successful and nil otherwise.
(defun gnus-uu-grab-articles (articles process-function
- &optional sloppy limit no-errors)
+ &optional sloppy limit _no-errors)
(require 'gnus-async)
(let ((state 'first)
(gnus-asynchronous nil)
(setq subject (substring subject (match-end 0)))))
(or part "")))
-(defun gnus-uu-uudecode-sentinel (process event)
+(defun gnus-uu-uudecode-sentinel (process _event)
(delete-process (get-process process)))
-(defun gnus-uu-uustrip-article (process-buffer in-state)
+(defun gnus-uu-uustrip-article (process-buffer _in-state)
;; Uudecodes a file asynchronously.
(with-current-buffer process-buffer
(let ((state (list 'wrong-type))
;; This function is used by `gnus-uu-grab-articles' to treat
;; a shared article.
-(defun gnus-uu-unshar-article (process-buffer in-state)
+(defun gnus-uu-unshar-article (process-buffer _in-state)
(let ((state (list 'ok))
start-char)
(with-current-buffer process-buffer
-;;; gnus-vm.el --- vm interface for Gnus
+;;; gnus-vm.el --- vm interface for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
-;;; gnus-win.el --- window configuration functions for Gnus
+;;; gnus-win.el --- window configuration functions for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
;; return a new SPLIT.
(while (and (not (assq (car split) gnus-window-to-buffer))
(symbolp (car split)) (fboundp (car split)))
- (setq split (eval split)))
+ (setq split (eval split t)))
(let* ((type (car split))
(subs (cddr split))
(len (if (eq type 'horizontal) (window-width) (window-height)))
(setq sub (append (pop subs) nil))
(while (and (not (assq (car sub) gnus-window-to-buffer))
(symbolp (car sub)) (fboundp (car sub)))
- (setq sub (eval sub)))
+ (setq sub (eval sub t)))
(when sub
(push sub comp-subs)
(setq size (cadar comp-subs))
;; return a new SPLIT.
(while (and (not (assq (car split) gnus-window-to-buffer))
(symbolp (car split)) (fboundp (car split)))
- (setq split (eval split)))
+ (setq split (eval split t)))
(setq type (elt split 0))
(cond
depth (+ depth 1)))
depth))))
;; Separate foreign select method from group name and collapse.
- ;; If method contains a server, collapse to non-domain server name,
+ ;; If method contains a server, collapse to non-domain server name,
;; otherwise collapse to select method.
(let* ((colon (string-match ":" group))
(server (and colon (substring group 0 colon)))
-;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs
+;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
-;;; gnus-agent.el --- Legacy unplugged support for Gnus
+;;; gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
;; Therefore, hide the default prompt.
(gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t)
-(defun gnus-agent-unhook-expire-days (converting-to)
+(defun gnus-agent-unhook-expire-days (_converting-to)
"Remove every lambda from `gnus-group-prepare-hook' that mention the
symbol `gnus-agent-do-once' in their definition. This should NOT be
necessary as gnus-agent.el no longer adds them. However, it is
-;;; mail-source.el --- functions for fetching mail
+;;; mail-source.el --- functions for fetching mail -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
The variables bound and their default values are described by
the `mail-source-keyword-map' variable."
(declare (indent 1) (debug (sexp body)))
- `(let* ,(mail-source-bind-1 (car type-source))
- (mail-source-set-1 ,(cadr type-source))
- ,@body))
-
+ ;; FIXME: Use lexical vars, i.e. don't initialize the vars inside
+ ;; `mail-source-set-1' via `set'.
+ (let ((bindings (mail-source-bind-1 (car type-source))))
+ `(with-suppressed-warnings ((lexical ,@(mapcar #'car bindings)))
+ (dlet ,bindings
+ (mail-source-set-1 ,(cadr type-source))
+ ,@body))))
(defun mail-source-set-1 (source)
(let* ((type (pop source))
(defaults (cdr (assq type mail-source-keyword-map)))
(search '(:max 1))
- found default value keyword auth-info user-auth pass-auth)
+ found default value keyword user-auth pass-auth) ;; auth-info
;; append to the search the useful info from the source and the defaults:
;; user, host, and port
"Return a `let' form that binds all common variables.
See `mail-source-bind'."
(declare (indent 1) (debug (sexp body)))
- `(let ,(mail-source-bind-common-1)
- (mail-source-set-common-1 ,source)
- ,@body))
+ ;; FIXME: AFAICT this is a Rube Goldberg'esque way to bind and initialize the
+ ;; `plugged` variable.
+ (let ((bindings (mail-source-bind-common-1)))
+ `(with-suppressed-warnings ((lexical ,@(mapcar #'car bindings)))
+ (dlet ,bindings
+ (mail-source-set-common-1 ,source)
+ ,@body))))
(defun mail-source-value (value)
"Return the value of VALUE."
value)
;; Function
((and (listp value) (symbolp (car value)) (fboundp (car value)))
- (eval value))
+ (eval value t))
;; Just return the value.
(t
value)))
(declare-function gnus-get-buffer-create "gnus" (name))
(defun mail-source-call-script (script)
(require 'gnus)
- (let ((background nil)
+ (let (;; (background nil)
(stderr (gnus-get-buffer-create " *mail-source-stderr*"))
result)
(when (string-match "& *$" script)
(setq script (substring script 0 (match-beginning 0))
- background 0))
+ ;; background 0
+ ))
(setq result
(call-process shell-file-name nil stderr nil
shell-command-switch script))
;; The default is to use pop3.el.
(t
(require 'pop3)
- (let ((pop3-password password)
- (pop3-maildrop user)
- (pop3-mailhost server)
- (pop3-port port)
- (pop3-authentication-scheme
- (if (eq authentication 'apop) 'apop 'pass))
- (pop3-stream-type stream)
- (pop3-leave-mail-on-server leave))
+ (dlet ((pop3-password password)
+ (pop3-maildrop user)
+ (pop3-mailhost server)
+ (pop3-port port)
+ (pop3-authentication-scheme
+ (if (eq authentication 'apop) 'apop 'pass))
+ (pop3-stream-type stream)
+ (pop3-leave-mail-on-server leave))
(if (or debug-on-quit debug-on-error)
(save-excursion (pop3-movemail mail-source-crash-box))
(condition-case err
;; The default is to use pop3.el.
(t
(require 'pop3)
- (let ((pop3-password password)
- (pop3-maildrop user)
- (pop3-mailhost server)
- (pop3-port port)
- (pop3-authentication-scheme
- (if (eq authentication 'apop) 'apop 'pass)))
+ (dlet ((pop3-password password)
+ (pop3-maildrop user)
+ (pop3-mailhost server)
+ (pop3-port port)
+ (pop3-authentication-scheme
+ (if (eq authentication 'apop) 'apop 'pass)))
(if (or debug-on-quit debug-on-error)
(save-excursion (pop3-get-message-count))
(condition-case err
((functionp message-signature)
(funcall message-signature))
((listp message-signature)
- (eval message-signature))
+ (eval message-signature t))
(t message-signature)))
signature-file)
(setq signature
prefix, and don't delete any headers."
(interactive "P")
;; eval the let forms contained in message-cite-style
- (eval
- `(let ,(if (symbolp message-cite-style)
- (symbol-value message-cite-style)
- message-cite-style)
- (message--yank-original-internal ',arg))))
+ (let ((bindings (if (symbolp message-cite-style)
+ (symbol-value message-cite-style)
+ message-cite-style)))
+ (cl-progv (mapcar #'car bindings)
+ (mapcar (lambda (binding) (eval (cadr binding) t)) bindings)
+ (message--yank-original-internal arg))))
(defun message-yank-buffer (buffer)
"Insert BUFFER into the current buffer and quote it."
(funcall action))
;; Something to be evalled.
(t
- (eval action))))))
+ (eval action t))))))
(defun message-send-mail-partially ()
"Send mail as message/partial."
;; Insert an extra newline if we need it to work around
;; Sun's bug that swallows newlines.
(goto-char (1+ delimline))
- (when (eval message-mailer-swallows-blank-line)
+ (when (eval message-mailer-swallows-blank-line t)
(newline))
(when message-interactive
(with-current-buffer errbuf
-;;; mm-archive.el --- Functions for parsing archive files as MIME
+;;; mm-archive.el --- Functions for parsing archive files as MIME -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
-;;; mm-bodies.el --- Functions for decoding MIME things
+;;; mm-bodies.el --- Functions for decoding MIME things -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
-;;; mm-encode.el --- Functions for encoding MIME things
+;;; mm-encode.el --- Functions for encoding MIME things -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
-;;; mm-partial.el --- showing message/partial
+;;; mm-partial.el --- showing message/partial -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
(push nhandles phandles))))))))
phandles))
+(defvar gnus-displaying-mime)
+
;;;###autoload
(defun mm-inline-partial (handle &optional no-display)
"Show the partial part of HANDLE.
phandles
(b (point)) (n 1) total
phandle nn ntotal
- gnus-displaying-mime handles buffer)
+ gnus-displaying-mime handles) ;; buffer
(unless (mm-handle-cache handle)
(unless id
(error "Can not find message/partial id"))
-;;; mm-url.el --- a wrapper of url functions/commands for Gnus
+;;; mm-url.el --- a wrapper of url functions/commands for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
form
(prog2
;; Avoid errors...
- (condition-case nil (eval form) (error nil))
+ (condition-case nil (eval form t) (error nil))
;; (message "Failed to eval `%s'" form))
(mm-coding-system-p cs)
(message "Added charset `%s' via `mm-charset-eval-alist'" cs))
-;;; mm-view.el --- functions for viewing MIME objects
+;;; mm-view.el --- functions for viewing MIME objects -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
(equal "multipart" (mm-handle-media-supertype elem)))
(mm-w3m-cid-retrieve-1 url elem)))))
-(defun mm-w3m-cid-retrieve (url &rest args)
+(defun mm-w3m-cid-retrieve (url &rest _args)
"Insert a content pointed by URL if it has the cid: scheme."
(when (string-match "\\`cid:" url)
(or (catch 'found-handle
nil
(message "Failed to find \"Content-ID: %s\"" url)))))
+(defvar w3m-force-redisplay)
+(defvar w3m-safe-url-regexp)
+
(defun mm-inline-text-html-render-with-w3m (handle)
"Render a text/html part using emacs-w3m."
(mm-setup-w3m)
(delete-region ,(copy-marker b t)
,(point-marker)))))))
-(defun mm-inline-audio (handle)
+(defun mm-inline-audio (_handle)
(message "Not implemented"))
(defun mm-view-message ()
(fundamental-mode)
(goto-char (point-min)))
+(defvar gnus-original-article-buffer)
+(defvar gnus-article-prepare-hook)
+(defvar gnus-displaying-mime)
+
(defun mm-inline-message (handle)
(let ((b (point))
(bolp (bolp))
-;;; mml-sec.el --- A package with security functions for MML documents
+;;; mml-sec.el --- A package with security functions for MML documents -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
mml-smime-passphrase-cache-expiry)
mml-secure-passphrase-cache-expiry))))
-(defun mml-secure-passphrase-callback (context key-id standard)
+(defun mml-secure-passphrase-callback (context key-id _standard)
"Ask for passphrase in CONTEXT for KEY-ID for STANDARD.
The passphrase is read and cached."
;; Based on mml2015-epg-passphrase-callback.
(error "No recipient specified")))
recipients))
-(defun mml-secure-epg-encrypt (protocol cont &optional sign)
+(defun mml-secure-epg-encrypt (protocol _cont &optional sign)
;; Based on code appearing inside mml2015-epg-encrypt.
(let* ((context (epg-make-context protocol))
(config (epg-find-configuration 'OpenPGP))
-;;; mml-smime.el --- S/MIME support for MML
+;;; mml-smime.el --- S/MIME support for MML -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
(if func
(funcall func handle ctl))))
-(defun mml-smime-openssl-sign (cont)
+(defun mml-smime-openssl-sign (_cont)
(when (null smime-keys)
(customize-variable 'smime-keys)
(error "No S/MIME keys configured, use customize to add your key"))
(buffer-string) "\n")))))
handle)
-(defun mml-smime-openssl-verify-test (handle ctl)
+(defun mml-smime-openssl-verify-test (_handle _ctl)
smime-openssl-program)
(defvar epg-user-id-alist)
(defun mml-smime-epg-encrypt (cont)
(let* ((inhibit-redisplay t) ;FIXME: Why?
- (boundary (mml-compute-boundary cont))
+ ;; (boundary (mml-compute-boundary cont))
(cipher (mml-secure-epg-encrypt 'CMS cont)))
(delete-region (point-min) (point-max))
(goto-char (point-min))
(defun mml-smime-epg-verify (handle ctl)
(catch 'error
(let ((inhibit-redisplay t)
- context plain signature-file part signature)
+ context part signature) ;; plain signature-file
(when (or (null (setq part (mm-find-raw-part-by-type
ctl (or (mm-handle-multipart-ctl-parameter
ctl 'protocol)
(setq part (replace-regexp-in-string "\n" "\r\n" part)
context (epg-make-context 'CMS))
(condition-case error
- (setq plain (epg-verify-string context (mm-get-part signature) part))
+ ;; (setq plain
+ (epg-verify-string context (mm-get-part signature) part) ;;)
(error
(mm-sec-error 'gnus-info "Failed")
(mm-sec-status 'gnus-details (if (eq (car error) 'quit)
(epg-verify-result-to-string (epg-context-result-for context 'verify)))
handle)))
-(defun mml-smime-epg-verify-test (handle ctl)
+(defun mml-smime-epg-verify-test (_handle _ctl)
t)
(provide 'mml-smime)
-;;; mml.el --- A package for parsing and validating MML documents
+;;; mml.el --- A package for parsing and validating MML documents -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
(list "sign" method "encrypt" method))
(t
(error "Unknown secure mode %s" mode))))
- (eval `(mml-insert-tag ,secure-mode
- ,@tags
- ,(if keyfile "keyfile")
- ,keyfile
- ,@(apply #'append
- (mapcar (lambda (certfile)
- (list "certfile" certfile))
- certfiles))
- ,(if recipients "recipients")
- ,recipients
- ,(if sender "sender")
- ,sender))
+ (apply #'mml-insert-tag
+ secure-mode
+ `(,@tags
+ ,(if keyfile "keyfile")
+ ,keyfile
+ ,@(apply #'append
+ (mapcar (lambda (certfile)
+ (list "certfile" certfile))
+ certfiles))
+ ,(if recipients "recipients")
+ ,recipients
+ ,(if sender "sender")
+ ,sender))
;; restart the parse
(goto-char location)))
((looking-at "<#multipart")
(file-name-nondirectory file)))
(goto-char head))))
-(defun mml-dnd-attach-file (uri action)
+(defun mml-dnd-attach-file (uri _action)
"Attach a drag and drop file.
Ask for type, description or disposition according to
(declare-function message-generate-headers "message" (headers))
(declare-function message-sort-headers "message" ())
+(defvar gnus-newsgroup-name)
+(defvar gnus-displaying-mime)
+(defvar gnus-newsgroup-name)
+(defvar gnus-article-prepare-hook)
+(defvar gnus-newsgroup-charset)
+(defvar gnus-original-article-buffer)
+(defvar gnus-message-buffer)
+(defvar message-this-is-news)
+(defvar message-this-is-mail)
+
(defun mml-preview (&optional raw)
"Display current buffer with Gnus, in a new buffer.
If RAW, display a raw encoded MIME message.
cont)
(let ((alist mml-tweak-sexp-alist))
(while alist
- (if (eval (caar alist))
+ (if (eval (caar alist) t)
(funcall (cdar alist) cont))
(setq alist (cdr alist)))))
cont)
-;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML
+;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
(defvar mml1991-decrypt-function 'mailcrypt-decrypt)
(defvar mml1991-verify-function 'mailcrypt-verify)
-(defun mml1991-mailcrypt-sign (cont)
+(defun mml1991-mailcrypt-sign (_cont)
(let ((text (current-buffer))
headers signature
(result-buffer (get-buffer-create "*GPG Result*")))
(declare-function mc-encrypt-generic "ext:mc-toplev"
(&optional recipients scheme start end from sign))
-(defun mml1991-mailcrypt-encrypt (cont &optional sign)
+(defun mml1991-mailcrypt-encrypt (_cont &optional sign)
(let ((text (current-buffer))
(mc-pgp-always-sign
(or mc-pgp-always-sign
(defvar pgg-default-user-id)
(defvar pgg-errors-buffer)
(defvar pgg-output-buffer)
+(defvar pgg-text-mode)
-(defun mml1991-pgg-sign (cont)
+(defun mml1991-pgg-sign (_cont)
(let ((pgg-text-mode t)
(pgg-default-user-id (or (message-options-get 'mml-sender)
pgg-default-user-id))
(buffer-string)))
t))
-(defun mml1991-pgg-encrypt (cont &optional sign)
+(defun mml1991-pgg-encrypt (_cont &optional sign)
(goto-char (point-min))
(when (re-search-forward "^$" nil t)
(let ((cte (save-restriction
(autoload 'epg-configuration "epg-config")
(autoload 'epg-expand-group "epg-config")
-(defun mml1991-epg-sign (cont)
+(defun mml1991-epg-sign (_cont)
(let ((inhibit-redisplay t)
headers cte)
;; Don't sign headers.
-;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
+;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
(cadr err)
(format "%S" (cdr err))))
-(defun mml2015-mailcrypt-decrypt (handle ctl)
+(defun mml2015-mailcrypt-decrypt (handle _ctl)
(catch 'error
(let (child handles result)
(unless (setq child (mm-find-part-by-type
(defvar pgg-default-user-id)
(defvar pgg-errors-buffer)
(defvar pgg-output-buffer)
+(defvar pgg-text-mode)
(autoload 'pgg-decrypt-region "pgg")
(autoload 'pgg-verify-region "pgg")
(autoload 'pgg-encrypt-region "pgg")
(autoload 'pgg-parse-armor "pgg-parse")
-(defun mml2015-pgg-decrypt (handle ctl)
+(defun mml2015-pgg-decrypt (handle _ctl)
(catch 'error
(let ((pgg-errors-buffer mml2015-result-buffer)
- child handles result decrypt-status)
+ child handles decrypt-status) ;; result
(unless (setq child (mm-find-part-by-type
(cdr handle)
"application/octet-stream" nil t))
(let ((key-image (mml2015-epg-key-image key-id)))
(if (not key-image)
""
- (condition-case error
+ (condition-case nil
(let ((result " "))
(put-text-property
1 2 'display
(defun mml2015-epg-verify-result-to-string (verify-result)
(mapconcat #'mml2015-epg-signature-to-string verify-result "\n"))
-(defun mml2015-epg-decrypt (handle ctl)
+(defun mml2015-epg-decrypt (handle _ctl)
(catch 'error
(let ((inhibit-redisplay t)
- context plain child handles result decrypt-status)
+ context plain child handles) ;; decrypt-status result
(unless (setq child (mm-find-part-by-type
(cdr handle)
"application/octet-stream" nil t))
(defun mml2015-epg-verify (handle ctl)
(catch 'error
(let ((inhibit-redisplay t)
- context plain signature-file part signature)
+ context part signature) ;; plain signature-file
(when (or (null (setq part (mm-find-raw-part-by-type
ctl (or (mm-handle-multipart-ctl-parameter
ctl 'protocol)
signature (mm-get-part signature)
context (epg-make-context))
(condition-case error
- (setq plain (epg-verify-string context signature part))
+ ;; (setq plain
+ (epg-verify-string context signature part) ;;)
(error
(mm-sec-error 'gnus-info "Failed")
(mm-sec-status 'gnus-details (if (eq (car error) 'quit)
handle)))
;;;###autoload
-(defun mml2015-decrypt-test (handle ctl)
+(defun mml2015-decrypt-test (_handle _ctl)
mml2015-use)
;;;###autoload
handle)))
;;;###autoload
-(defun mml2015-verify-test (handle ctl)
+(defun mml2015-verify-test (_handle _ctl)
mml2015-use)
;;;###autoload
-;;; nnagent.el --- offline backend for Gnus
+;;; nnagent.el --- offline backend for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
server dir)
t))))
-(deffoo nnagent-retrieve-groups (groups &optional server)
+(deffoo nnagent-retrieve-groups (_groups &optional _server)
(save-excursion
(cond
((file-exists-p (gnus-agent-lib-file "groups"))
(funcall (gnus-get-function gnus-command-method 'request-type)
(gnus-group-real-name group) article)))))
-(deffoo nnagent-request-newgroups (date server)
+(deffoo nnagent-request-newgroups (_date _server)
nil)
-(deffoo nnagent-request-update-info (group info &optional server)
+(deffoo nnagent-request-update-info (_group _info &optional _server)
nil)
-(deffoo nnagent-request-post (&optional server)
+(deffoo nnagent-request-post (&optional _server)
(gnus-agent-insert-meta-information 'news gnus-command-method)
(gnus-request-accept-article "nndraft:queue" nil t t))
t)
'nov)))
-(deffoo nnagent-request-expire-articles (articles group &optional server force)
+(deffoo nnagent-request-expire-articles (articles _group &optional _server _force)
articles)
(deffoo nnagent-request-group (group &optional server dont-check info)
(nnoo-parent-function 'nnagent 'nnml-request-regenerate
(list (nnagent-server server))))
-(deffoo nnagent-retrieve-group-data-early (server infos)
+(deffoo nnagent-retrieve-group-data-early (_server _infos)
nil)
;; Use nnml functions for just about everything.
-;;; nnbabyl.el --- rmail mbox access for Gnus
+;;; nnbabyl.el --- rmail mbox access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnbabyl)
-(deffoo nnbabyl-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnbabyl-retrieve-headers (articles &optional group server _fetch-old)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let ((number (length articles))
(cons nnbabyl-current-group article)
(nnbabyl-article-group-number)))))))
-(deffoo nnbabyl-request-group (group &optional server dont-check info)
+(deffoo nnbabyl-request-group (group &optional server dont-check _info)
(let ((active (cadr (assoc group nnbabyl-group-alist))))
(save-excursion
(cond
(insert-buffer-substring in-buf)))
(nnmail-save-active nnbabyl-group-alist nnbabyl-active-file))))
-(deffoo nnbabyl-close-group (group &optional server)
+(deffoo nnbabyl-close-group (_group &optional _server)
t)
-(deffoo nnbabyl-request-create-group (group &optional server args)
+(deffoo nnbabyl-request-create-group (group &optional _server _args)
(nnmail-activate 'nnbabyl)
(unless (assoc group nnbabyl-group-alist)
(push (list group (cons 1 0))
(nnmail-save-active nnbabyl-group-alist nnbabyl-active-file))
t)
-(deffoo nnbabyl-request-list (&optional server)
+(deffoo nnbabyl-request-list (&optional _server)
(save-excursion
(nnmail-find-file nnbabyl-active-file)
(setq nnbabyl-group-alist (nnmail-get-active))
t))
-(deffoo nnbabyl-request-newgroups (date &optional server)
+(deffoo nnbabyl-request-newgroups (_date &optional server)
(nnbabyl-request-list server))
-(deffoo nnbabyl-request-list-newsgroups (&optional server)
+(deffoo nnbabyl-request-list-newsgroups (&optional _server)
(nnheader-report 'nnbabyl "nnbabyl: LIST NEWSGROUPS is not implemented."))
+(defvar nnml-current-directory)
+
(deffoo nnbabyl-request-expire-articles
(articles newsgroup &optional server force)
(nnbabyl-possibly-change-newsgroup newsgroup server)
(nconc rest articles))))
(deffoo nnbabyl-request-move-article
- (article group server accept-form &optional last move-is-internal)
+ (article group server accept-form &optional last _move-is-internal)
(let ((buf (gnus-get-buffer-create " *nnbabyl move*"))
result)
(and
"^X-Gnus-Newsgroup:"
(save-excursion (search-forward "\n\n" nil t) (point)) t)
(delete-region (point-at-bol) (progn (forward-line 1) (point))))
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer (current-buffer))
result)
(save-excursion
-;;; nndiary.el --- A diary back end for Gnus
+;;; nndiary.el --- A diary back end for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
(cons (if group-num (car group-num) group)
(string-to-number (file-name-nondirectory path)))))))
-(deffoo nndiary-request-group (group &optional server dont-check info)
+(deffoo nndiary-request-group (group &optional server dont-check _info)
(let ((file-name-coding-system nnmail-pathname-coding-system))
(cond
((not (nndiary-possibly-change-directory group server))
(nndiary-possibly-change-directory group server)
(nnmail-get-new-mail 'nndiary 'nndiary-save-nov nndiary-directory group)))
-(deffoo nndiary-close-group (group &optional server)
+(deffoo nndiary-close-group (_group &optional _server)
(setq nndiary-article-file-alist nil)
t)
-(deffoo nndiary-request-create-group (group &optional server args)
+(deffoo nndiary-request-create-group (group &optional server _args)
(nndiary-possibly-change-directory nil server)
(nnmail-activate 'nndiary)
(cond
t))
))
-(deffoo nndiary-request-list (&optional server)
+(deffoo nndiary-request-list (&optional _server)
(save-excursion
(let ((nnmail-file-coding-system nnmail-active-file-coding-system)
(file-name-coding-system nnmail-pathname-coding-system))
(setq nndiary-group-alist (nnmail-get-active))
t))
-(deffoo nndiary-request-newgroups (date &optional server)
+(deffoo nndiary-request-newgroups (_date &optional server)
(nndiary-request-list server))
-(deffoo nndiary-request-list-newsgroups (&optional server)
+(deffoo nndiary-request-list-newsgroups (&optional _server)
(save-excursion
(nnmail-find-file nndiary-newsgroups-file)))
(nconc rest articles)))
(deffoo nndiary-request-move-article
- (article group server accept-form &optional last move-is-internal)
+ (article group server accept-form &optional last _move-is-internal)
(let ((buf (gnus-get-buffer-create " *nndiary move*"))
result)
(nndiary-possibly-change-directory group server)
nndiary-article-file-alist)
(with-current-buffer buf
(insert-buffer-substring nntp-server-buffer)
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer (current-buffer))
result))
(progn
\f
;;; Interface optional functions ============================================
-(deffoo nndiary-request-update-info (group info &optional server)
+(deffoo nndiary-request-update-info (group info &optional _server)
(nndiary-possibly-change-directory group)
(let ((timestamp (gnus-group-parameter-value (gnus-info-params info)
'timestamp t)))
;; Save the active file.
(nnmail-save-active nndiary-group-alist nndiary-active-file))
+(defvar nndiary-files) ; dynamically bound in nndiary-generate-nov-databases-1
+
(defun nndiary-generate-nov-databases-1 (dir &optional seen no-active)
"Regenerate the NOV database in DIR."
(interactive "DRegenerate NOV in: ")
(unless no-active
(nnmail-save-active nndiary-group-alist nndiary-active-file))))))
-(defvar nndiary-files) ; dynamically bound in nndiary-generate-nov-databases-1
(defun nndiary-generate-active-info (dir)
;; Update the active info for this group.
(let* ((group (nnheader-file-to-group
-;;; nndir.el --- single directory newsgroup access for Gnus
+;;; nndir.el --- single directory newsgroup access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
-;;; nndoc.el --- single file access for Gnus
+;;; nndoc.el --- single file access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nndoc)
-(deffoo nndoc-retrieve-headers (articles &optional newsgroup server fetch-old)
+(deffoo nndoc-retrieve-headers (articles &optional newsgroup server _fetch-old)
(when (nndoc-possibly-change-buffer newsgroup server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(funcall nndoc-article-transform-function article))
t))))))
-(deffoo nndoc-request-group (group &optional server dont-check info)
+(deffoo nndoc-request-group (group &optional server dont-check _info)
"Select news GROUP."
(let (number)
(cond
(nndoc-request-group group server))
t)
-(deffoo nndoc-request-type (group &optional article)
+(deffoo nndoc-request-type (_group &optional article)
(cond ((not article) 'unknown)
(nndoc-post-type nndoc-post-type)
(t 'unknown)))
(setq nndoc-dissection-alist nil)
t)
-(deffoo nndoc-request-list (&optional server)
+(deffoo nndoc-request-list (&optional _server)
t)
-(deffoo nndoc-request-newgroups (date &optional server)
+(deffoo nndoc-request-newgroups (_date &optional _server)
nil)
-(deffoo nndoc-request-list-newsgroups (&optional server)
+(deffoo nndoc-request-list-newsgroups (&optional _server)
nil)
\f
;;; Internal functions.
-(defun nndoc-possibly-change-buffer (group source)
+(defun nndoc-possibly-change-buffer (group _source)
(let (buf)
(cond
;; The current buffer is this group's buffer.
(search-forward "\ncommit " nil t)
(search-forward "\nAuthor: " nil t)))
-(defun nndoc-transform-git-article (article)
+(defun nndoc-transform-git-article (_article)
(goto-char (point-min))
(when (re-search-forward "^Author: " nil t)
(replace-match "From: " t t)))
(re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z\\.-]+/[0-9]+\\|arXiv:\\)" nil t))
t))
-(defun nndoc-transform-lanl-gov-announce (article)
+(defun nndoc-transform-lanl-gov-announce (_article)
(let ((case-fold-search nil))
(goto-char (point-max))
(when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
nil)
(goto-char point))))
-(deffoo nndoc-request-accept-article (group &optional server last)
+(deffoo nndoc-request-accept-article (_group &optional _server _last)
nil)
;;;
-;;; nndraft.el --- draft article access for Gnus
+;;; nndraft.el --- draft article access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
server nndraft-directory)
t)))
-(deffoo nndraft-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nndraft-retrieve-headers (articles &optional group server _fetch-old)
(nndraft-possibly-change-group group)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(nnheader-fold-continuation-lines)
'headers))))
-(deffoo nndraft-request-article (id &optional group server buffer)
+(deffoo nndraft-request-article (id &optional group _server buffer)
(nndraft-possibly-change-group group)
(when (numberp id)
;; We get the newest file of the auto-saved file and the
;;(message-remove-header "date")
t))
-(deffoo nndraft-request-update-info (group info &optional server)
+(deffoo nndraft-request-update-info (group info &optional _server)
(nndraft-possibly-change-group group)
(setf (gnus-info-read info)
(gnus-update-read-articles
'exit 'postpone 'kill)
article))
-(deffoo nndraft-request-group (group &optional server dont-check info)
+(deffoo nndraft-request-group (group &optional server dont-check _info)
(nndraft-possibly-change-group group)
(unless dont-check
(let* ((pathname (nnmail-group-pathname group nndraft-directory))
(list group server dont-check)))
(deffoo nndraft-request-move-article (article group server accept-form
- &optional last move-is-internal)
+ &optional _last _move-is-internal)
(nndraft-possibly-change-group group)
(let ((buf (gnus-get-buffer-create " *nndraft move*"))
result)
(with-current-buffer buf
(erase-buffer)
(insert-buffer-substring nntp-server-buffer)
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer (current-buffer))
result)
(null (nndraft-request-expire-articles (list article) group server 'force))
(nnoo-parent-function 'nndraft 'nnmh-request-replace-article
(list article group buffer))))
-(deffoo nndraft-request-create-group (group &optional server args)
+(deffoo nndraft-request-create-group (group &optional _server _args)
(nndraft-possibly-change-group group)
(if (file-exists-p nndraft-current-directory)
(if (file-directory-p nndraft-current-directory)
-;;; nneething.el --- arbitrary file access for Gnus
+;;; nneething.el --- arbitrary file access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nneething)
-(deffoo nneething-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nneething-retrieve-headers (articles &optional group _server _fetch-old)
(nneething-possibly-change-directory group)
(with-current-buffer nntp-server-buffer
(nnheader-fold-continuation-lines)
'headers))))
-(deffoo nneething-request-article (id &optional group server buffer)
+(deffoo nneething-request-article (id &optional group _server buffer)
(nneething-possibly-change-directory group)
(let ((file (unless (stringp id)
(nneething-file-name id)))
(insert "\n"))
t))))
-(deffoo nneething-request-group (group &optional server dont-check info)
+(deffoo nneething-request-group (group &optional server dont-check _info)
(nneething-possibly-change-directory group server)
(unless dont-check
(nneething-create-mapping)
group)))
t)
-(deffoo nneething-request-list (&optional server dir)
+(deffoo nneething-request-list (&optional _server _dir)
(nnheader-report 'nneething "LIST is not implemented."))
-(deffoo nneething-request-newgroups (date &optional server)
+(deffoo nneething-request-newgroups (_date &optional _server)
(nnheader-report 'nneething "NEWSGROUPS is not implemented."))
-(deffoo nneething-request-type (group &optional article)
+(deffoo nneething-request-type (_group &optional _article)
'unknown)
-(deffoo nneething-close-group (group &optional server)
+(deffoo nneething-close-group (_group &optional _server)
(setq nneething-current-directory nil)
t)
-;;; nnfolder.el --- mail folder access for Gnus
+;;; nnfolder.el --- mail folder access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(point) (point-at-eol)))
-1))))))))
-(deffoo nnfolder-request-group (group &optional server dont-check info)
+(deffoo nnfolder-request-group (group &optional server dont-check _info)
(nnfolder-possibly-change-group group server t)
(save-excursion
(cond ((not (assoc group nnfolder-group-alist))
;; over the buffer again unless we add new mail to it or modify it in some
;; way.
-(deffoo nnfolder-close-group (group &optional server force)
+(deffoo nnfolder-close-group (group &optional _server _force)
;; Make sure we _had_ the group open.
(when (or (assoc group nnfolder-buffer-alist)
(equal group nnfolder-current-group))
nnfolder-current-buffer nil)
t)
-(deffoo nnfolder-request-create-group (group &optional server args)
+(deffoo nnfolder-request-create-group (group &optional server _args)
(nnfolder-possibly-change-group nil server)
(nnmail-activate 'nnfolder)
(cond ((zerop (length group))
(setq nnfolder-group-alist (nnmail-get-active)))
t))
-(deffoo nnfolder-request-newgroups (date &optional server)
+(deffoo nnfolder-request-newgroups (_date &optional server)
(nnfolder-possibly-change-group nil server)
(nnfolder-request-list server))
(let ((newnum (string-to-number (match-string 0))))
(if (nnmail-within-headers-p)
(push newnum numbers))))
- ;; The article numbers are increasing, so this result is sorted.
+ ;; The article numbers are increasing, so this result is sorted.
(nreverse numbers)))))
(autoload 'gnus-request-group "gnus-int")
(declare-function gnus-request-create-group "gnus-int"
(group &optional gnus-command-method args))
+(defvar nnfolder-current-directory)
(deffoo nnfolder-request-expire-articles (articles newsgroup
&optional server force)
(gnus-sorted-difference articles (nreverse deleted-articles)))))
(deffoo nnfolder-request-move-article (article group server accept-form
- &optional last move-is-internal)
+ &optional last _move-is-internal)
(save-excursion
(let ((buf (gnus-get-buffer-create " *nnfolder move*"))
result)
(save-excursion (and (search-forward "\n\n" nil t) (point)))
t)
(gnus-delete-line))
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer buf)
result)
(save-excursion
(save-excursion
(nnfolder-possibly-change-group group server)
(nnmail-check-syntax)
- (let ((buf (current-buffer))
+ (let (;; (buf (current-buffer))
result art-group)
(goto-char (point-min))
(when (looking-at "X-From-Line: ")
-;;; nngateway.el --- posting news via mail gateways
+;;; nngateway.el --- posting news via mail gateways -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
-;;; nnheader.el --- header access macros for Gnus and its backends
+;;; nnheader.el --- header access macros for Gnus and its backends -*- lexical-binding: t; -*-
;; Copyright (C) 1987-1990, 1993-1998, 2000-2021 Free Software
;; Foundation, Inc.
-;;; nnimap.el --- IMAP interface for Gnus
+;;; nnimap.el --- IMAP interface for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
internal-move-group server message-id
nnimap-request-articles-find-limit)))))
;; Move the article to a different method.
- (when-let* ((result (eval accept-form)))
+ (when-let* ((result (eval accept-form t)))
(nnimap-change-group group server)
(nnimap-delete-article article)
result))))))
7 "Article marked for deletion, but not expunged.")
nil))))
-(deffoo nnimap-request-scan (&optional group server)
+(deffoo nnimap-request-scan (&optional _group server)
(when (and (nnimap-change-group nil server)
nnimap-inbox
nnimap-split-methods)
-;;; nnmail.el --- mail support functions for the Gnus mail backends
+;;; nnmail.el --- mail support functions for the Gnus mail backends -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
\f
-(defun nnmail-request-post (&optional server)
+(defun nnmail-request-post (&optional _server)
(mail-send-and-exit nil))
(defvar nnmail-file-coding-system 'raw-text
(let ((buffer (current-buffer))
group-assoc group max min)
(while (not (eobp))
- (condition-case err
+ (condition-case nil
(progn
(narrow-to-region (point) (point-at-eol))
(setq group (read buffer)
(declare-function gnus-activate-group "gnus-start"
(group &optional scan dont-check method dont-sub-check))
-(defun nnmail-do-request-post (accept-func &optional server)
+(defun nnmail-do-request-post (accept-func &optional _server)
"Utility function to directly post a message to an nnmail-derived group.
Calls ACCEPT-FUNC (which should be `nnchoke-request-accept-article')
to actually put the message in the right group."
;; Builtin : operation.
((eq (car split) ':)
(nnmail-log-split split)
- (nnmail-split-it (save-excursion (eval (cdr split)))))
+ (nnmail-split-it (save-excursion (eval (cdr split) t))))
;; Builtin ! operation.
((eq (car split) '!)
(assq 'directory mail-sources)))
(defun nnmail-get-new-mail-1 (method exit-func temp
- group in-group spool-func)
+ group _in-group spool-func)
(let* ((sources mail-sources)
fetching-sources
(i 0)
(cdr group-art))
(gnus-group-mark-article-read target (cdr group-art))))))))
-(defun nnmail-fancy-expiry-target (group)
+(defun nnmail-fancy-expiry-target (_group)
"Return a target expiry group determined by `nnmail-fancy-expiry-targets'."
(let* (header
(case-fold-search nil)
-;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader
+;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
(setq nnmairix-current-server server)
(nnoo-change-server 'nnmairix server definitions))
-(deffoo nnmairix-request-group (group &optional server fast info)
+(deffoo nnmairix-request-group (group &optional server fast _info)
;; Call mairix and request group on back end server
(when server (nnmairix-open-server server))
(let* ((qualgroup (if server
(backendmethod (gnus-server-to-method
(format "%s:%s" (symbol-name nnmairix-backend)
nnmairix-backend-server)))
- rval mfolder folderpath args)
+ rval mfolder folderpath) ;; args
(cond
((not folder)
;; No folder parameter -> error
nil))))))
-(deffoo nnmairix-request-create-group (group &optional server args)
+(deffoo nnmairix-request-create-group (group &optional server _args)
(let ((qualgroup (if server (gnus-group-prefixed-name group (list 'nnmairix server))
group))
(exist t)
(count 0)
- groupname info)
+ groupname) ;; info
(when server (nnmairix-open-server server))
(gnus-group-add-parameter qualgroup '(query . nil))
(gnus-group-add-parameter qualgroup '(threads . nil))
(deffoo nnmairix-request-list (&optional server)
(when server (nnmairix-open-server server))
(if (nnmairix-call-backend "request-list" nnmairix-backend-server)
- (let (cpoint cur qualgroup folder)
+ (let (cpoint cur qualgroup) ;; folder
(with-current-buffer nntp-server-buffer
(goto-char (point-min))
(setq cpoint (point))
(nnmairix-open-server server))
(let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
(propmarks (gnus-group-get-parameter qualgroup 'propmarks))
- (propto (gnus-group-get-parameter qualgroup 'propto t))
+ ;; (propto (gnus-group-get-parameter qualgroup 'propto t))
(corr (nnmairix-get-numcorr group server))
(folder (nnmairix-get-backend-folder group server)))
(save-excursion
(let ((type (nth 1 cur))
(cmdmarks (nth 2 cur))
(range (gnus-uncompress-range (nth 0 cur)))
- mid ogroup number method temp)
+ mid ogroup temp) ;; number method
(when (and corr
(not (zerop (cadr corr))))
(setq range (mapcar (lambda (arg)
(nnmairix-open-server server))
(let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
(propmarks (gnus-group-get-parameter qualgroup 'propmarks))
- method)
+ ) ;; method
(when (and propmarks
nnmairix-marks-cache)
(when (or (eq nnmairix-propagate-marks-upon-close t)
(corr (nnmairix-get-numcorr group server))
(docorr (and corr (not (zerop (cadr corr)))))
(folderinfo `(,group 1 ((1 . 1))))
- readrange marks)
+ ) ;; readrange marks
(when (and propmarks
nnmairix-propagate-marks-to-nnmairix-groups)
;; these groups are not subscribed, so we have to ask the back end directly
(interactive)
(let ((char-header nnmairix-interactive-query-parameters)
(server (nnmairix-backend-to-server gnus-current-select-method))
- query achar header finished group threads cq)
+ query achar header finished group threads) ;; cq
(when (or (not (gnus-buffer-live-p gnus-article-buffer))
(not (gnus-buffer-live-p gnus-summary-buffer)))
(error "No article or summary buffer"))
(setq achar nil)))
(set-buffer gnus-article-buffer)
(setq header nil)
- (when (setq cq (nth 1 (assoc achar char-header)))
+ (when ;; (setq cq
+ (nth 1 (assoc achar char-header)) ;;)
(setq header
(nnmairix-replace-illegal-chars
(gnus-fetch-field (nth 1 (assoc achar char-header))))))
(hidden (and (string-match "^nn\\(imap\\|maildir\\)$" backend)
(y-or-n-p
"Does the back end server work with maildir++ (i.e. hidden directories)? ")))
- create)
+ ) ;; create
(apply (intern (format "%s-%s" backend "open-server"))
(list servername))
(if (nnmairix-open-server (nth 1 server))
(when (nnmairix-call-backend
"request-list" nnmairix-backend-server)
- (let (cur qualgroup folder)
+ (let (cur qualgroup) ;; folder
(with-current-buffer nntp-server-buffer
(goto-char (point-min))
(while (re-search-forward nnmairix-group-regexp (point-max) t)
(error "Not in a nnmairix group"))
(save-excursion
(let ((mid (mail-header-message-id (gnus-summary-article-header)))
- groups cur)
+ groups) ;; cur
(when mid
(setq groups (nnmairix-determine-original-group-from-registry mid))
(unless (or groups
"Return list of valid back end servers for nnmairix groups."
(let ((alist gnus-opened-servers)
(mairixservers (nnmairix-get-nnmairix-servers t))
- server mserver openedserver occ cur)
+ server mserver openedserver occ) ;; cur
;; Get list of all nnmairix backends (i.e. backends which are
;; already occupied)
(dolist (cur mairixservers)
(let ((buf (gnus-get-buffer-create " *nnmairix buffer*"))
(corr (not (zerop numc)))
(name (buffer-name nntp-server-buffer))
- header cur xref)
+ cur xref) ;; header
(with-current-buffer buf
(erase-buffer)
(set-buffer nntp-server-buffer)
(when (not (gnus-buffer-live-p gnus-article-buffer))
(error "No article buffer available"))
(let ((server (nth 1 gnus-current-select-method))
- mid rval group allgroups)
+ mid group allgroups) ;; rval
;; get message id
(with-current-buffer gnus-article-buffer
(gnus-summary-toggle-header 1)
(widget-create 'push-button
:notify
(if mvalues
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(nnmairix-widget-send-query nnmairix-widgets
t))
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(nnmairix-widget-send-query nnmairix-widgets
nil)))
"Send Query")
(widget-create 'push-button
:notify
(if mvalues
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(nnmairix-widget-create-group nnmairix-widgets
t))
- (lambda (&rest ignore)
+ (lambda (&rest _ignore)
(nnmairix-widget-create-group nnmairix-widgets
nil)))
"Create permanent group")
(widget-insert " ")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(kill-buffer nnmairix-customize-query-buffer))
"Cancel")
(use-local-map widget-keymap)
(defun nnmairix-widget-create-query (&optional values)
"Create widgets for creating mairix queries.
Fill in VALUES if based on an article."
- (let (allwidgets)
+ ;;(let (allwidgets)
(when (get-buffer nnmairix-customize-query-buffer)
(kill-buffer nnmairix-customize-query-buffer))
(switch-to-buffer nnmairix-customize-query-buffer)
(when (member 'threads nnmairix-widget-other)
(widget-insert "\n")
(nnmairix-widget-add "Threads" 'checkbox nil))
- (widget-insert " Show full threads\n\n")))
+ (widget-insert " Show full threads\n\n")) ;; )
(defun nnmairix-widget-build-editable-fields (values)
"Build editable field widgets in `nnmairix-widget-fields-list'.
(concat "c" field)
(widget-create 'checkbox
:tag field
- :notify (lambda (widget &rest ignore)
+ :notify (lambda (widget &rest _ignore)
(nnmairix-widget-toggle-activate widget))
nil)))
(list
-;;; nnmbox.el --- mail mbox access for Gnus
+;;; nnmbox.el --- mail mbox access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnmbox)
-(deffoo nnmbox-retrieve-headers (sequence &optional newsgroup server fetch-old)
+(deffoo nnmbox-retrieve-headers (sequence &optional newsgroup server _fetch-old)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let ((number (length sequence))
(cons nnmbox-current-group article)
(nnmbox-article-group-number nil))))))))
-(deffoo nnmbox-request-group (group &optional server dont-check info)
+(deffoo nnmbox-request-group (group &optional server dont-check _info)
(nnmbox-possibly-change-newsgroup nil server)
(let ((active (cadr (assoc group nnmbox-group-alist))))
(cond
(insert-buffer-substring in-buf)))
(nnmbox-save-active nnmbox-group-alist nnmbox-active-file))))
-(deffoo nnmbox-close-group (group &optional server)
+(deffoo nnmbox-close-group (_group &optional _server)
t)
-(deffoo nnmbox-request-create-group (group &optional server args)
+(deffoo nnmbox-request-create-group (group &optional _server _args)
(nnmail-activate 'nnmbox)
(unless (assoc group nnmbox-group-alist)
(push (list group (cons 1 0))
(nnmbox-save-active nnmbox-group-alist nnmbox-active-file))
t)
-(deffoo nnmbox-request-list (&optional server)
+(deffoo nnmbox-request-list (&optional _server)
(save-excursion
(let ((nnmail-file-coding-system
nnmbox-active-file-coding-system))
(setq nnmbox-group-alist (nnmail-get-active))
t))
-(deffoo nnmbox-request-newgroups (date &optional server)
+(deffoo nnmbox-request-newgroups (_date &optional server)
(nnmbox-request-list server))
-(deffoo nnmbox-request-list-newsgroups (&optional server)
+(deffoo nnmbox-request-list-newsgroups (&optional _server)
(nnheader-report 'nnmbox "LIST NEWSGROUPS is not implemented."))
+(defvar nnml-current-directory)
+
(deffoo nnmbox-request-expire-articles
(articles newsgroup &optional server force)
(nnmbox-possibly-change-newsgroup newsgroup server)
(nconc rest articles))))
(deffoo nnmbox-request-move-article
- (article group server accept-form &optional last move-is-internal)
+ (article group server accept-form &optional last _move-is-internal)
(let ((buf (gnus-get-buffer-create " *nnmbox move*"))
result)
(and
"^X-Gnus-Newsgroup:"
(save-excursion (search-forward "\n\n" nil t) (point)) t)
(gnus-delete-line))
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer buf)
result)
(save-excursion
-;;; nnmh.el --- mhspool access for Gnus
+;;; nnmh.el --- mhspool access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnmh)
-(deffoo nnmh-retrieve-headers (articles &optional newsgroup server fetch-old)
+(deffoo nnmh-retrieve-headers (articles &optional newsgroup server _fetch-old)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(let* ((file nil)
(save-excursion (nnmail-find-file file))
(string-to-number (file-name-nondirectory file)))))
-(deffoo nnmh-request-group (group &optional server dont-check info)
+(deffoo nnmh-request-group (group &optional server dont-check _info)
(nnheader-init-server-buffer)
(nnmh-possibly-change-directory group server)
(let ((pathname (nnmail-group-pathname group nnmh-directory))
(nnheader-report 'nnmh "Empty group %s" group)
(nnheader-insert (format "211 0 1 0 %s\n" group))))))))))
-(deffoo nnmh-request-scan (&optional group server)
+(deffoo nnmh-request-scan (&optional group _server)
(nnmail-get-new-mail 'nnmh nil nnmh-directory group))
+(defvar nnmh-toplev)
+
(deffoo nnmh-request-list (&optional server dir)
(nnheader-insert "")
(nnmh-possibly-change-directory nil server)
(setq nnmh-group-alist (nnmail-get-active))
t)
-(defvar nnmh-toplev)
(defun nnmh-request-list-1 (dir)
(setq dir (expand-file-name dir))
;; Recurse down all directories.
(let ((files (nnheader-directory-files dir t nil t))
(max 0)
- min rdir num subdirectoriesp file)
+ min num subdirectoriesp file) ;; rdir
;; Recurse down directories.
(setq subdirectoriesp
;; link number always 1 on MS Windows :(
(or min 1))))))
t)
-(deffoo nnmh-request-newgroups (date &optional server)
+(deffoo nnmh-request-newgroups (_date &optional server)
(nnmh-request-list server))
(deffoo nnmh-request-expire-articles (articles newsgroup
(nnheader-message 5 "")
(nconc rest articles)))
-(deffoo nnmh-close-group (group &optional server)
+(deffoo nnmh-close-group (_group &optional _server)
t)
-(deffoo nnmh-request-move-article (article group server accept-form
- &optional last move-is-internal)
+(deffoo nnmh-request-move-article ( article group server accept-form
+ &optional _last _move-is-internal)
(let ((buf (gnus-get-buffer-create " *nnmh move*"))
result)
(and
(with-current-buffer buf
(erase-buffer)
(insert-buffer-substring nntp-server-buffer)
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer (current-buffer))
result)
(progn
nil (if (nnheader-be-verbose 5) nil 'nomesg))
t)))
-(deffoo nnmh-request-create-group (group &optional server args)
+(deffoo nnmh-request-create-group (group &optional server _args)
(nnheader-init-server-buffer)
(unless (assoc group nnmh-group-alist)
(let (active)
-;;; nnml.el --- mail spool access for Gnus
+;;; nnml.el --- mail spool access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnml)
-(defun nnml-group-pathname (group &optional file server)
+(defun nnml-group-pathname (group &optional file _server)
"Return an absolute file name of FILE for GROUP on SERVER."
(nnmail-group-pathname group nnml-directory file))
(cons (if group-num (car group-num) group)
(string-to-number (file-name-nondirectory path)))))))
-(deffoo nnml-request-group (group &optional server dont-check info)
+(deffoo nnml-request-group (group &optional server dont-check _info)
(let ((file-name-coding-system nnmail-pathname-coding-system))
(cond
((not (nnml-possibly-change-directory group server))
(t
(nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory nil))))
-(deffoo nnml-close-group (group &optional server)
+(deffoo nnml-close-group (_group &optional _server)
(setq nnml-article-file-alist nil)
t)
-(deffoo nnml-request-create-group (group &optional server args)
+(deffoo nnml-request-create-group (group &optional server _args)
(nnml-possibly-change-directory nil server)
(nnmail-activate 'nnml)
(cond
(nnmail-save-active nnml-group-alist nnml-active-file)
t))))
-(deffoo nnml-request-list (&optional server)
+(deffoo nnml-request-list (&optional _server)
(save-excursion
(let ((nnmail-file-coding-system nnmail-active-file-coding-system)
(file-name-coding-system nnmail-pathname-coding-system))
(setq nnml-group-alist (nnmail-get-active))
t))
-(deffoo nnml-request-newgroups (date &optional server)
+(deffoo nnml-request-newgroups (_date &optional server)
(nnml-request-list server))
-(deffoo nnml-request-list-newsgroups (&optional server)
+(deffoo nnml-request-list-newsgroups (&optional _server)
(save-excursion
(nnmail-find-file nnml-newsgroups-file)))
(nconc rest articles)))
(deffoo nnml-request-move-article
- (article group server accept-form &optional last move-is-internal)
+ (article group server accept-form &optional last _move-is-internal)
(let ((buf (gnus-get-buffer-create " *nnml move*"))
(file-name-coding-system nnmail-pathname-coding-system)
result)
nnml-article-file-alist)
(with-current-buffer buf
(insert-buffer-substring nntp-server-buffer)
- (setq result (eval accept-form))
+ (setq result (eval accept-form t))
(kill-buffer (current-buffer))
result))
(progn
(let* ((dir (file-name-as-directory dir))
(nov (concat dir nnml-nov-file-name))
(nov-buffer (gnus-get-buffer-create " *nov*"))
- chars file headers)
+ chars headers) ;; file
(with-current-buffer nov-buffer
;; Init the nov buffer.
(buffer-disable-undo)
-;;; nnnil.el --- empty backend for Gnus
+;;; nnnil.el --- empty backend for Gnus -*- lexical-binding: t; -*-
;; This file is in the public domain.
(defvar nnnil-status-string "")
-(defun nnnil-retrieve-headers (articles &optional group server fetch-old)
+(defun nnnil-retrieve-headers (_articles &optional _group _server _fetch-old)
(with-current-buffer nntp-server-buffer
(erase-buffer))
'nov)
-(defun nnnil-open-server (server &optional definitions)
+(defun nnnil-open-server (_server &optional _definitions)
t)
-(defun nnnil-close-server (&optional server)
+(defun nnnil-close-server (&optional _server)
t)
(defun nnnil-request-close ()
t)
-(defun nnnil-server-opened (&optional server)
+(defun nnnil-server-opened (&optional _server)
t)
-(defun nnnil-status-message (&optional server)
+(defun nnnil-status-message (&optional _server)
nnnil-status-string)
-(defun nnnil-request-article (article &optional group server to-buffer)
+(defun nnnil-request-article (_article &optional _group _server _to-buffer)
(setq nnnil-status-string "No such group")
nil)
-(defun nnnil-request-group (group &optional server fast info)
+(defun nnnil-request-group (_group &optional _server _fast _info)
(let (deactivate-mark)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(setq nnnil-status-string "No such group")
nil)
-(defun nnnil-close-group (group &optional server)
+(defun nnnil-close-group (_group &optional _server)
t)
-(defun nnnil-request-list (&optional server)
+(defun nnnil-request-list (&optional _server)
(with-current-buffer nntp-server-buffer
(erase-buffer))
t)
-(defun nnnil-request-post (&optional server)
+(defun nnnil-request-post (&optional _server)
(setq nnnil-status-string "Read-only server")
nil)
-;;; nnoo.el --- OO Gnus Backends
+;;; nnoo.el --- OO Gnus Backends -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
nnoo-state-alist))
t)
-(defun nnoo-status-message (backend server)
+(defun nnoo-status-message (backend _server)
(nnheader-get-report backend))
(defun nnoo-server-opened (backend server)
-;;; nnregistry.el --- access to articles via Gnus' message-id registry
-;;; -*- coding: utf-8 -*-
+;;; nnregistry.el --- access to articles via Gnus' message-id registry -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
(nnoo-declare nnregistry)
-(deffoo nnregistry-server-opened (server)
+(deffoo nnregistry-server-opened (_server)
gnus-registry-enabled)
-(deffoo nnregistry-close-server (server &optional defs)
+(deffoo nnregistry-close-server (_server &optional _defs)
t)
-(deffoo nnregistry-status-message (server)
+(deffoo nnregistry-status-message (_server)
nil)
-(deffoo nnregistry-open-server (server &optional defs)
+(deffoo nnregistry-open-server (_server &optional _defs)
gnus-registry-enabled)
(defvar nnregistry-within-nnregistry nil)
-(deffoo nnregistry-request-article (id &optional group server buffer)
+(deffoo nnregistry-request-article (id &optional _group _server buffer)
(and (not nnregistry-within-nnregistry)
(let* ((nnregistry-within-nnregistry t)
(group (nth 0 (gnus-registry-get-id-key id 'group)))
-;;; nnrss.el --- interfacing with RSS
+;;; nnrss.el --- interfacing with RSS -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
(setq group (decode-coding-string group 'utf-8))
group))
-(deffoo nnrss-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnrss-retrieve-headers (articles &optional group server _fetch-old)
(setq group (nnrss-decode-group-name group))
(nnrss-possibly-change-group group server)
(let (e)
"\n")))))
'nov)
-(deffoo nnrss-request-group (group &optional server dont-check info)
+(deffoo nnrss-request-group (group &optional server dont-check _info)
(setq group (nnrss-decode-group-name group))
(nnheader-message 6 "nnrss: Requesting %s..." group)
(nnrss-possibly-change-group group server)
t))
(nnheader-message 6 "nnrss: Requesting %s...done" group)))
-(deffoo nnrss-close-group (group &optional server)
+(deffoo nnrss-close-group (_group &optional _server)
t)
(deffoo nnrss-request-article (article &optional group server buffer)
(nnrss-possibly-change-group group server)
(let ((e (assq article nnrss-group-data))
(nntp-server-buffer (or buffer nntp-server-buffer))
- post err)
+ err) ;; post
(when e
(with-current-buffer nntp-server-buffer
(erase-buffer)
(cons '("Newsgroups" . utf-8)
rfc2047-header-encoding-alist)
rfc2047-header-encoding-alist))
- rfc2047-encode-encoded-words body fn)
+ rfc2047-encode-encoded-words body) ;; fn
(when (or text link enclosure comments)
(insert "\n")
(insert "<#multipart type=alternative>\n"
;; we return the article number.
(cons nnrss-group (car e))))))
-(deffoo nnrss-open-server (server &optional defs connectionless)
+(deffoo nnrss-open-server (server &optional defs _connectionless)
(nnrss-read-server-data server)
(nnoo-change-server 'nnrss server defs)
t)
(nnrss-save-group-data group server))
not-expirable))
-(deffoo nnrss-request-delete-group (group &optional force server)
+(deffoo nnrss-request-delete-group (group &optional _force server)
(setq group (nnrss-decode-group-name group))
(nnrss-possibly-change-group group server)
(let (elem)
;;; URL interface
-(defun nnrss-no-cache (url)
+(defun nnrss-no-cache (_url)
"")
(defun nnrss-insert (url)
(defun nnrss-check-group (group server)
(let (file xml subject url extra changed author date feed-subject
- enclosure comments rss-ns rdf-ns content-ns dc-ns
+ enclosure comments rss-ns content-ns dc-ns ;; rdf-ns
hash-index)
(if (and nnrss-use-local
(file-exists-p (setq file (expand-file-name
(setq changed t))
(setq xml (nnrss-fetch url)))
(setq dc-ns (nnrss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/")
- rdf-ns (nnrss-get-namespace-prefix xml "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
+ ;; rdf-ns (nnrss-get-namespace-prefix xml "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
rss-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/")
content-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/modules/content/"))
(dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml)))
-;;; nnspool.el --- spool access for GNU Emacs
+;;; nnspool.el --- spool access for GNU Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1988-1990, 1993-1998, 2000-2021 Free Software
;; Foundation, Inc.
(nnoo-define-basics nnspool)
-(deffoo nnspool-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnspool-retrieve-headers (articles &optional group _server fetch-old)
"Retrieve the headers of ARTICLES."
(with-current-buffer nntp-server-buffer
(erase-buffer)
server nnspool-spool-directory)
t)))
-(deffoo nnspool-request-article (id &optional group server buffer)
+(deffoo nnspool-request-article (id &optional group _server buffer)
"Select article by message ID (or number)."
(nnspool-possibly-change-directory group)
(let ((nntp-server-buffer (or buffer nntp-server-buffer))
(cons nnspool-current-group id)
ag))))
-(deffoo nnspool-request-body (id &optional group server)
+(deffoo nnspool-request-body (id &optional group _server)
"Select article body by message ID (or number)."
(nnspool-possibly-change-directory group)
(let ((res (nnspool-request-article id)))
(delete-region (point-min) (point)))
res))))
-(deffoo nnspool-request-head (id &optional group server)
+(deffoo nnspool-request-head (id &optional group _server)
"Select article head by message ID (or number)."
(nnspool-possibly-change-directory group)
(let ((res (nnspool-request-article id)))
(nnheader-fold-continuation-lines)))
res))
-(deffoo nnspool-request-group (group &optional server dont-check info)
+(deffoo nnspool-request-group (group &optional _server dont-check _info)
"Select news GROUP."
(let ((pathname (nnspool-article-pathname group))
dir)
(nnheader-report 'nnspool "Empty group %s" group)
(nnheader-insert "211 0 0 0 %s\n" group))))))
-(deffoo nnspool-request-type (group &optional article)
+(deffoo nnspool-request-type (_group &optional _article)
'news)
-(deffoo nnspool-close-group (group &optional server)
+(deffoo nnspool-close-group (_group &optional _server)
t)
-(deffoo nnspool-request-list (&optional server)
+(deffoo nnspool-request-list (&optional _server)
"List active newsgroups."
(save-excursion
(or (nnspool-find-file nnspool-active-file)
(nnheader-report 'nnspool (nnheader-file-error nnspool-active-file)))))
-(deffoo nnspool-request-list-newsgroups (&optional server)
+(deffoo nnspool-request-list-newsgroups (&optional _server)
"List newsgroups (defined in NNTP2)."
(save-excursion
(or (nnspool-find-file nnspool-newsgroups-file)
(nnheader-report 'nnspool (nnheader-file-error
nnspool-newsgroups-file)))))
-(deffoo nnspool-request-list-distributions (&optional server)
+(deffoo nnspool-request-list-distributions (&optional _server)
"List distributions (defined in NNTP2)."
(save-excursion
(or (nnspool-find-file nnspool-distributions-file)
nnspool-distributions-file)))))
;; Suggested by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
-(deffoo nnspool-request-newgroups (date &optional server)
+(deffoo nnspool-request-newgroups (date &optional _server)
"List groups created after DATE."
(if (nnspool-find-file nnspool-active-times-file)
(save-excursion
t)
nil))
-(deffoo nnspool-request-post (&optional server)
+(deffoo nnspool-request-post (&optional _server)
"Post a new news in current buffer."
(save-excursion
(let* ((process-connection-type nil) ; t bugs out on Solaris
\f
;;; Internal functions.
-(defun nnspool-inews-sentinel (proc status)
+(defun nnspool-inews-sentinel (proc _status)
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
(if (or (zerop (buffer-size))
(dolist (entry nntp-server-action-alist)
(when (string-match (car entry) nntp-server-type)
(if (not (functionp (cadr entry)))
- (eval (cadr entry))
+ (eval (cadr entry) t)
(funcall (cadr entry)))))))
(defun nntp-async-wait (process wait-for buffer decode callback)
-;;; nnvirtual.el --- virtual newsgroups access for Gnus
+;;; nnvirtual.el --- virtual newsgroups access for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnvirtual)
-(deffoo nnvirtual-retrieve-headers (articles &optional newsgroup
- server fetch-old)
+(deffoo nnvirtual-retrieve-headers (articles &optional _newsgroup
+ server _fetch-old)
(when (nnvirtual-possibly-change-server server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(defvoo nnvirtual-last-accessed-component-group nil)
-(deffoo nnvirtual-request-article (article &optional group server buffer)
+(deffoo nnvirtual-request-article (article &optional _group server buffer)
(when (nnvirtual-possibly-change-server server)
(if (stringp article)
;; This is a fetch by Message-ID.
t)))
-(deffoo nnvirtual-request-group (group &optional server dont-check info)
+(deffoo nnvirtual-request-group (group &optional server dont-check _info)
(nnvirtual-possibly-change-server server)
(setq nnvirtual-component-groups
(delete (nnvirtual-current-group) nnvirtual-component-groups))
nnvirtual-mapping-len nnvirtual-mapping-len group))))
-(deffoo nnvirtual-request-type (group &optional article)
+(deffoo nnvirtual-request-type (_group &optional article)
(if (not article)
'unknown
(if (numberp article)
(gnus-request-type
nnvirtual-last-accessed-component-group nil))))
-(deffoo nnvirtual-request-update-mark (group article mark)
+(deffoo nnvirtual-request-update-mark (_group article mark)
(let* ((nart (nnvirtual-map-article article))
(cgroup (car nart)))
(when (and nart
mark)
-(deffoo nnvirtual-close-group (group &optional server)
+(deffoo nnvirtual-close-group (_group &optional server)
(when (and (nnvirtual-possibly-change-server server)
(not (gnus-ephemeral-group-p (nnvirtual-current-group))))
(nnvirtual-update-read-and-marked t t))
t)
-(deffoo nnvirtual-request-newgroups (date &optional server)
+(deffoo nnvirtual-request-newgroups (_date &optional _server)
(nnheader-report 'nnvirtual "NEWGROUPS is not supported."))
-(deffoo nnvirtual-request-list-newsgroups (&optional server)
+(deffoo nnvirtual-request-list-newsgroups (&optional _server)
(nnheader-report 'nnvirtual "LIST NEWSGROUPS is not implemented."))
-(deffoo nnvirtual-request-update-info (group info &optional server)
+(deffoo nnvirtual-request-update-info (_group info &optional server)
(when (and (nnvirtual-possibly-change-server server)
(not nnvirtual-info-installed))
;; Install the precomputed lists atomically, so the virtual group
t))
-(deffoo nnvirtual-catchup-group (group &optional server all)
+(deffoo nnvirtual-catchup-group (_group &optional server all)
(when (and (nnvirtual-possibly-change-server server)
(not (gnus-ephemeral-group-p (nnvirtual-current-group))))
;; copy over existing marks first, in case they set anything
(gnus-group-catchup-current nil all)))))
-(deffoo nnvirtual-find-group-art (group article)
+(deffoo nnvirtual-find-group-art (_group article)
"Return the real group and article for virtual GROUP and ARTICLE."
(nnvirtual-map-article article))
-(deffoo nnvirtual-request-post (&optional server)
+(deffoo nnvirtual-request-post (&optional _server)
(if (not gnus-message-group-art)
(nnheader-report 'nnvirtual "Can't post to an nnvirtual group")
(let ((group (car (nnvirtual-find-group-art
(gnus-request-post (gnus-find-method-for-group group)))))
-(deffoo nnvirtual-request-expire-articles (articles group
- &optional server force)
+(deffoo nnvirtual-request-expire-articles ( _articles _group
+ &optional server _force)
(nnvirtual-possibly-change-server server)
(setq nnvirtual-component-groups
(delete (nnvirtual-current-group) nnvirtual-component-groups))
-;;; nnweb.el --- retrieving articles via web search engines
+;;; nnweb.el --- retrieving articles via web search engines -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
(nnoo-define-basics nnweb)
-(deffoo nnweb-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnweb-retrieve-headers (articles &optional group server _fetch-old)
(nnweb-possibly-change-server group server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(nnweb-write-active)
(nnweb-write-overview group)))
-(deffoo nnweb-request-group (group &optional server dont-check info)
+(deffoo nnweb-request-group (group &optional server dont-check _info)
(nnweb-possibly-change-server group server)
(unless (or nnweb-ephemeral-p
dont-check
(let ((fetch (nnweb-definition 'id))
(art (when (string-match "^<\\(.*\\)>$" article)
(match-string 1 article)))
- active)
+ ) ;; active
(when (and fetch art)
(setq url (format fetch
(mm-url-form-encode-xwfu art)))
(nnmail-generate-active (list (assoc server nnweb-group-alist)))
t))
-(deffoo nnweb-request-update-info (group info &optional server))
+(deffoo nnweb-request-update-info (_group _info &optional _server))
(deffoo nnweb-asynchronous-p ()
nil)
-(deffoo nnweb-request-create-group (group &optional server args)
+(deffoo nnweb-request-create-group (group &optional server _args)
(nnweb-possibly-change-server nil server)
(nnweb-request-delete-group group)
(push `(,group ,(cons 1 0)) nnweb-group-alist)
(nnweb-write-active)
t)
-(deffoo nnweb-request-delete-group (group &optional force server)
+(deffoo nnweb-request-delete-group (group &optional _force server)
(nnweb-possibly-change-server group server)
(gnus-alist-pull group nnweb-group-alist t)
(nnweb-write-active)
(let ((i 0)
(case-fold-search t)
(active (cadr (assoc nnweb-group nnweb-group-alist)))
- Subject Score Date Newsgroups From
+ Subject Date Newsgroups From
map url mid)
(unless active
(push (list nnweb-group (setq active (cons 1 0)))
-;;; score-mode.el --- mode for editing Gnus score files
+;;; score-mode.el --- mode for editing Gnus score files -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
-;;; smiley.el --- displaying smiley faces
+;;; smiley.el --- displaying smiley faces -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
-;;; spam-report.el --- Reporting spam
+;;; spam-report.el --- Reporting spam -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
-;;; spam-stat.el --- detecting spam based on statistics
+;;; spam-stat.el --- detecting spam based on statistics -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
(defvar spam-stat-nbad 0
"The number of bad mails in the dictionary.")
-(defvar spam-stat-error-holder nil
- "A holder for condition-case errors while scoring buffers.")
-
(defsubst spam-stat-good (entry)
"Return the number of times this word belongs to good mails."
(aref entry 0))
These are the words whose spam-stat differs the most from 0.5.
The list returned contains elements of the form \(WORD SCORE DIFF),
where DIFF is the difference between SCORE and 0.5."
- (let (result word score)
- (maphash (lambda (word ignore)
+ (let (result score) ;; word
+ (maphash (lambda (word _ignore)
(setq score (spam-stat-score-word word)
result (cons (list word score (abs (- score 0.5)))
result)))
(/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x))
probs)))))
(score1s
- (condition-case
- spam-stat-error-holder
+ (condition-case nil
(spam-stat-score-buffer-user score0)
(error nil)))
(ans
Use this function on `nnmail-split-fancy'. If you are interested in
the raw data used for the last run of `spam-stat-score-buffer',
check the variable `spam-stat-score-data'."
- (condition-case spam-stat-error-holder
+ (condition-case err
(progn
(set-buffer spam-stat-buffer)
(goto-char (point-min))
(push entry nnmail-split-trace))
spam-stat-score-data))
spam-stat-split-fancy-spam-group))
- (error (message "Error in spam-stat-split-fancy: %S" spam-stat-error-holder)
+ (error (message "Error in spam-stat-split-fancy: %S" err)
nil)))
;; Testing
-;;; spam-wash.el --- wash spam before analysis
+;;; spam-wash.el --- wash spam before analysis -*- lexical-binding: t; -*-
;; Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc.
(handles (or (mm-dissect-buffer nil gnus-article-loose-mime)
(and gnus-article-emulate-mime
(mm-uu-dissect))))
- handle)
+ ) ;; handle
(when gnus-article-mime-handles
(mm-destroy-parts gnus-article-mime-handles)
(setq gnus-article-mime-handle-alist nil))
-;;; spam.el --- Identifying spam
+;;; spam.el --- Identifying spam -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
(gnus-check-backend-function
'request-move-article gnus-newsgroup-name))
(respool-method (gnus-find-method-for-group gnus-newsgroup-name))
- article mark deletep respool valid-move-destinations)
+ deletep respool valid-move-destinations) ;; article mark
(when (member 'respool groups)
(setq respool t) ; boolean for later
(log-function (if unregister
'spam-log-undo-registration
'spam-log-processing-to-registry))
- article articles)
+ articles) ;; article
(when run-function
;; make list of articles, using specific-articles if given
;; undo a ham- or spam-processor registration (the group is not used)
(defun spam-log-undo-registration (id type classification backend
- &optional group)
+ &optional _group)
(when (and spam-log-to-registry
(spam-log-unregistration-needed-p id type classification backend))
(if (and (stringp id)
(spam-classification-valid-p classification)
(spam-backend-valid-p backend))
(let ((cell-list (gnus-registry-get-id-key id type))
- new-cell-list found)
+ new-cell-list) ;; found
(dolist (cell cell-list)
(unless (and (eq classification (nth 0 cell))
(eq backend (nth 1 cell)))
(declare-function bbdb-create-internal "bbdb-com" (&rest spec))
;; when the BBDB changes, we want to clear out our cache
-(defun spam-clear-cache-BBDB (&rest immaterial)
+(defun spam-clear-cache-BBDB (&rest _immaterial)
(spam-clear-cache 'spam-use-BBDB))
(when (featurep 'bbdb-com)
(let ((category (or category gnus-newsgroup-name))
(add-or-delete-option (if unregister "-d" "-i"))
(db (spam-get-ifile-database-parameter))
- parameters)
+ ) ;; parameters
(with-temp-buffer
(dolist (article articles)
(let ((article-string (spam-get-article-as-string article)))
"Check the spam-stat backend for the classification of this message."
(let ((spam-stat-split-fancy-spam-group spam-split-group) ; override
(spam-stat-buffer (buffer-name)) ; stat the current buffer
- category return)
+ ) ;; category return
(spam-stat-split-fancy)))
(defun spam-stat-register-spam-routine (articles &optional unregister)
(defun spam-from-listed-p (type)
(let ((from (message-fetch-field "from"))
- found)
+ ) ;; found
(spam-filelist-check-cache type from)))
(defun spam-filelist-register-routine (articles blacklist &optional unregister)
(if blacklist 'spam-enter-blacklist 'spam-enter-whitelist))
(remove-function
(if blacklist 'spam-enter-whitelist 'spam-enter-blacklist))
- from addresses unregister-list article-unregister-list)
+ addresses unregister-list article-unregister-list) ;; from
(dolist (article articles)
(let ((from (spam-fetch-field-from-fast article))
(id (spam-fetch-field-message-id-fast article))
(defun spam-spamoracle-learn-ham (articles &optional unregister)
(spam-spamoracle-learn articles nil unregister))
-(defun spam-spamoracle-unlearn-ham (articles &optional unregister)
+(defun spam-spamoracle-unlearn-ham (articles &optional _unregister)
(spam-spamoracle-learn-ham articles t))
(defun spam-spamoracle-learn-spam (articles &optional unregister)
(spam-spamoracle-learn articles t unregister))
-(defun spam-spamoracle-unlearn-spam (articles &optional unregister)
+(defun spam-spamoracle-unlearn-spam (articles &optional _unregister)
(spam-spamoracle-learn-spam articles t))
;;}}}