:type 'string
:group 'mime-security)
+(defvar idna-program)
+
(defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error))
(mm-coding-system-p 'utf-8)
idna-program
(incf i)))
i))
-(defun article-hide-headers (&optional arg delete)
+(defun article-hide-headers (&optional _arg _delete)
"Hide unwanted headers and possibly sort them as well."
(interactive)
;; This function might be inhibited.
(if (and wash-face-p (memq 'face gnus-article-wash-types))
(gnus-delete-images 'face)
(let ((from (message-fetch-field "from"))
- face faces)
+ faces)
(save-current-buffer
(when (and wash-face-p
(gnus-buffer-live-p gnus-original-article-buffer)
(gnus-delete-images 'xface)
;; Display X-Faces.
(let ((from (message-fetch-field "from"))
- x-faces face)
+ x-faces)
(save-current-buffer
(when (and wash-face-p
(gnus-buffer-live-p gnus-original-article-buffer)
"Find CID content in HANDLES and save it in a file in DIRECTORY.
Return file name."
(save-match-data
- (let (file type)
+ (let (file)
(catch 'found
(dolist (handle handles)
(cond
'hidden
nil)))
-(defun gnus-article-show-hidden-text (type &optional dummy)
+(defun gnus-article-show-hidden-text (type &optional _dummy)
"Show all hidden text of type TYPE.
Originally it is hide instead of DUMMY."
(let ((inhibit-read-only t)
gnus-article-date-headers)
t))
-(defun article-date-ut (&optional type highlight date-position)
+(defun article-date-ut (&optional type _highlight date-position)
"Convert DATE date to TYPE in the current article.
The default type is `ut'. See `gnus-article-date-headers' for
possible values."
(let* ((case-fold-search t)
(inhibit-read-only t)
(inhibit-point-motion-hooks t)
- (first t)
(visible-date (mail-fetch-field "Date"))
pos date bface eface)
(save-excursion
(set dir-var (file-name-directory result)))
result))
-(defun gnus-article-archive-name (group)
+(defun gnus-article-archive-name (_group)
"Return the first instance of an \"Archive-name\" in the current buffer."
(let ((case-fold-search t))
(when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t)
default
(or last-file default))))
-(defun gnus-plain-save-name (newsgroup headers &optional last-file)
+(defun gnus-plain-save-name (newsgroup _headers &optional last-file)
"Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE.
If variable `gnus-use-long-file-name' is non-nil, it is
~/News/news.group. Otherwise, it is like ~/News/news/group/news."
default-directory))
gnus-article-save-directory)))
-(defun gnus-sender-save-name (newsgroup headers &optional last-file)
+(defun gnus-sender-save-name (_newsgroup headers &optional _last-file)
"Generate file name from sender."
(let ((from (mail-header-from headers)))
(expand-file-name
(substitute-key-definition
'undefined 'gnus-article-read-summary-keys gnus-article-mode-map)
+(defvar gnus-article-send-map)
+
(gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map)
"W" gnus-article-wide-reply-with-original)
(if (featurep 'xemacs)
(forward-line line)
(point)))))))
-(defun gnus-article-prepare (article &optional all-headers header)
+(defvar gnus-tmp-internal-hook)
+
+(defun gnus-article-prepare (article &optional all-headers _header)
"Prepare ARTICLE in article mode buffer.
ARTICLE should either be an article number or a Message-ID.
If ARTICLE is an id, HEADER should be the article headers.
If ALL-HEADERS is non-nil, no headers are hidden."
- (save-excursion
+ (save-excursion ;FIXME: Shouldn't that be save-current-buffer?
;; Make sure we start in a summary buffer.
(unless (derived-mode-p 'gnus-summary-mode)
(set-buffer gnus-summary-buffer))
(setq gnus-summary-buffer (current-buffer))
- (let* ((gnus-article (if header (mail-header-number header) article))
- (summary-buffer (current-buffer))
+ (let* ((summary-buffer (current-buffer))
(gnus-tmp-internal-hook gnus-article-internal-prepare-hook)
(group gnus-newsgroup-name)
result)
(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."
General format specifiers can also be used. See Info node
`(gnus)Formatting Variables'.")
+(defvar gnus-tmp-type)
+(defvar gnus-tmp-type-long)
+(defvar gnus-tmp-name)
+(defvar gnus-tmp-description)
+(defvar gnus-tmp-id)
+(defvar gnus-tmp-length)
+(defvar gnus-tmp-dots)
+(defvar gnus-tmp-info)
+(defvar gnus-tmp-pressed-details)
+
(defvar gnus-mime-button-line-format-alist
'((?t gnus-tmp-type ?s)
(?T gnus-tmp-type-long ?s)
The current article has a complicated MIME structure, giving up..."))
(let* ((data (get-text-property (point) 'gnus-data))
(id (get-text-property (point) 'gnus-part))
- param
(handles gnus-article-mime-handles))
(unless file
(setq file
(text-property-any (point-min) (point) 'gnus-data handle)))
(setq handle (get-text-property b 'gnus-data))
b))
- start contents charset coding-system)
+ start)
(when handle
(when (= b (prog1
btn
(setq b btn))
(if (and (not arg) (mm-handle-undisplayer handle))
(mm-remove-part handle)
- (mm-with-unibyte-buffer
- (mm-insert-part handle)
- (setq contents
- (or (mm-decompress-buffer (mm-handle-filename handle) nil t)
- (buffer-string))))
(cond
- ((not arg)
- (unless (setq charset (mail-content-type-get
- (mm-handle-type handle) 'charset))
- (unless (setq coding-system
- (mm-with-unibyte-buffer
- (insert contents)
- (mm-find-buffer-file-coding-system)))
- (setq charset gnus-newsgroup-charset))))
+ ((not arg) nil)
((numberp arg)
(if (mm-handle-undisplayer handle)
- (mm-remove-part handle))
- (setq charset
- (or (cdr (assq arg
- gnus-summary-show-article-charset-alist))
- (mm-read-coding-system "Charset: "))))
+ (mm-remove-part handle)))
((mm-handle-undisplayer handle)
(mm-remove-part handle)))
(goto-char start)
(interactive)
(gnus-article-check-buffer)
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
- (mm-user-display-methods nil)
(mm-inlined-types nil)
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(when gnus-break-pages
(gnus-narrow-to-page))))
-(defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed)
+(defun gnus-insert-mime-button (handle id &optional displayed)
(let ((gnus-tmp-name
(or (mm-handle-filename handle)
(mail-content-type-get (mm-handle-type handle) 'url)
""))
+ (gnus-tmp-id id)
(gnus-tmp-type (mm-handle-media-type handle))
(gnus-tmp-description (or (mm-handle-description handle) ""))
(gnus-tmp-dots
"hide" "show")
(aref gnus-down-mouse-3 0))))))
-(defun gnus-widget-press-button (elems el)
+(defun gnus-widget-press-button (elems _el)
(goto-char (widget-get elems :from))
(gnus-article-press-button))
;; may change the point. So we set the window point.
(set-window-point window point)))
(let ((handles ihandles)
- (inhibit-read-only t)
- handle)
+ (inhibit-read-only t))
(cond (handles)
((setq handles (mm-dissect-buffer nil gnus-article-loose-mime))
(when gnus-article-emulate-mime
(let* ((preferred (or preferred (mm-preferred-alternative handles)))
(ihandles handles)
(point (point))
- handle (inhibit-read-only t) from props begend not-pref)
+ handle (inhibit-read-only t) from begend not-pref)
(save-window-excursion
(save-restriction
(when ibegend
(if header-line-format 1 0)
2)))))))
+(defvar scroll-in-place)
+
(defun gnus-article-next-page-1 (lines)
(condition-case ()
(let ((scroll-in-place nil)
(unless (derived-mode-p 'gnus-article-mode)
(error "Command invoked outside of a Gnus article buffer")))
-(defun gnus-article-read-summary-keys (&optional arg key not-restore-window)
+(defvar gnus-pick-mode)
+
+(defun gnus-article-read-summary-keys (&optional _arg key not-restore-window)
"Read a summary buffer key sequence and execute it from the article buffer."
(interactive "P")
(gnus-article-check-buffer)
"An" "Ap" [?A (meta return)] [?A delete]))
(nosave-in-article
'("AS" "\C-d"))
- (up-to-top
- '("n" "Gn" "p" "Gp"))
keys new-sum-point)
(with-current-buffer gnus-article-current-summary
(let (gnus-pick-mode)
(defvar gnus-agent-summary-mode)
(defvar gnus-draft-mode)
(defvar help-xref-stack-item)
+(defvar help-xref-following)
(defun gnus-article-describe-bindings (&optional prefix)
"Show a list of all defined keys, and their definitions.
(let ((func gnus-article-edit-done-function)
(buf (current-buffer))
(start (window-start))
- (p (point))
(winconf gnus-prev-winconf))
(widen) ;; Widen it in case that users narrowed the buffer.
(funcall func arg)
(gnus-article-add-buttons)
(gnus-article-add-buttons-to-head))
-(defun gnus-article-highlight-some (&optional force)
+(defun gnus-article-highlight-some (&optional _force)
"Highlight current article.
This function calls `gnus-article-highlight-headers',
`gnus-article-highlight-signature', and `gnus-article-add-buttons' to
(error "Unknown news URL syntax"))))
(list scheme server port group message-id articles)))
+(defvar nntp-port-number)
+
(defun gnus-button-handle-news (url)
"Fetch a news URL."
- (destructuring-bind (scheme server port group message-id articles)
+ (destructuring-bind (_scheme server port group message-id _articles)
(gnus-parse-news-url url)
(cond
(message-id
(with-current-buffer gnus-summary-buffer
(gnus-summary-refer-article message-id)))
-(defun gnus-button-fetch-group (address &rest ignore)
+(defun gnus-button-fetch-group (address &rest _ignore)
"Fetch GROUP specified by ADDRESS."
(when (string-match "\\`\\(nntp\\|news\\):\\(//\\)?\\(.*\\)\\'"
address)
(setq url (replace-regexp-in-string "\n" " " url))
(when (string-match "mailto:/*\\(.*\\)" url)
(setq url (substring url (match-beginning 1) nil)))
- (let (to args subject func)
- (setq args (gnus-url-parse-query-string
+ (let* ((args (gnus-url-parse-query-string
(if (string-match "^\\?" url)
(substring url 1)
(if (string-match "^\\([^?]+\\)\\?\\(.*\\)" url)
(concat "to=" (match-string 1 url) "&"
(match-string 2 url))
- (concat "to=" url))))
- subject (cdr-safe (assoc "subject" args)))
+ (concat "to=" url)))))
+ (subject (cdr-safe (assoc "subject" args)))
+ func)
(gnus-msg-mail)
(while args
(setq func (intern-soft (concat "message-goto-" (downcase (caar args)))))
:action 'gnus-button-prev-page
:button-keymap gnus-prev-page-map)))
-(defun gnus-button-next-page (&optional args more-args)
+(defun gnus-button-next-page (&optional _args _more-args)
"Go to the next page."
(interactive)
(let ((win (selected-window)))
(gnus-article-next-page)
(select-window win)))
-(defun gnus-button-prev-page (&optional args more-args)
+(defun gnus-button-prev-page (&optional _args _more-args)
"Go to the prev page."
(interactive)
(let ((win (selected-window)))
:action 'gnus-button-next-page
:button-keymap gnus-next-page-map)))
-(defun gnus-article-button-next-page (arg)
+(defun gnus-article-button-next-page (_arg)
"Go to the next page."
(interactive "P")
(let ((win (selected-window)))
(gnus-article-next-page)
(select-window win)))
-(defun gnus-article-button-prev-page (arg)
+(defun gnus-article-button-prev-page (_arg)
"Go to the prev page."
(interactive "P")
(let ((win (selected-window)))
(defvar gnus-inhibit-article-treatments nil)
-(defun gnus-treat-article (gnus-treat-condition
- &optional part-number total-parts gnus-treat-type)
- (let ((gnus-treat-length (- (point-max) (point-min)))
+;; Dynamic variables.
+(defvar part-number) ;FIXME: Lacks a "gnus-" prefix.
+(defvar total-parts) ;FIXME: Lacks a "gnus-" prefix.
+(defvar gnus-treat-type)
+(defvar gnus-treat-condition)
+(defvar gnus-treat-length)
+
+(defun gnus-treat-article (condition
+ &optional part-num total type)
+ (let ((gnus-treat-condition condition)
+ (part-number part-num)
+ (total-parts total)
+ (gnus-treat-type type)
+ (gnus-treat-length (- (point-max) (point-min)))
(alist gnus-treatment-function-alist)
(article-goto-body-goes-to-point-min-p t)
(treated-type
- (or (not gnus-treat-type)
+ (or (not type)
(catch 'found
(let ((list gnus-article-treat-types))
(while list
- (when (string-match (pop list) gnus-treat-type)
+ (when (string-match (pop list) type)
(throw 'found t)))))))
(highlightp (gnus-visual-p 'article-highlight 'highlight))
- val elem)
+ val)
(gnus-run-hooks 'gnus-part-display-hook)
(dolist (elem alist)
(setq val
(save-restriction
(funcall (cadr elem)))))))
-;; Dynamic variables.
-(defvar part-number)
-(defvar total-parts)
-(defvar gnus-treat-type)
-(defvar gnus-treat-condition)
-(defvar gnus-treat-length)
-
(defun gnus-treat-predicate (val)
(cond
((null val)
(gnus-mime-security-show-details handle)
(gnus-mime-security-verify-or-decrypt handle))))
-(defun gnus-insert-mime-security-button (handle &optional displayed)
+(defun gnus-insert-mime-security-button (handle &optional _displayed)
(let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol))
(gnus-tmp-type
(concat
:action 'gnus-widget-press-button
:button-keymap gnus-mime-security-button-map
:help-echo
- (lambda (widget)
+ (lambda (_widget)
;; Needed to properly clear the message due to a bug in
;; wid-edit (XEmacs only).
(when (boundp 'help-echo-owns-message)