To get better warnings, try and use #' to quote function names.
* lisp/gnus/canlock.el:
* lisp/gnus/deuglify.el:
* lisp/gnus/gmm-utils.el:
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-bookmark.el:
* lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-cus.el:
* lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-diary.el:
* lisp/gnus/gnus-dired.el:
* lisp/gnus/gnus-draft.el:
* lisp/gnus/gnus-fun.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-html.el:
* lisp/gnus/gnus-int.el:
* lisp/gnus/gnus-kill.el:
* lisp/gnus/gnus-mlspl.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-notifications.el:
* lisp/gnus/gnus-picon.el:
* lisp/gnus/gnus-registry.el:
* lisp/gnus/gnus-rfc1843.el:
* lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-score.el:
* lisp/gnus/gnus-search.el:
* lisp/gnus/gnus-sieve.el:
* lisp/gnus/gnus-srvr.el:
* lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-undo.el:
* lisp/gnus/gnus-util.el:
* lisp/gnus/gnus-uu.el:
* lisp/gnus/gnus.el:
* lisp/gnus/mail-source.el:
* lisp/gnus/message.el:
* lisp/gnus/mm-archive.el:
* lisp/gnus/mm-decode.el:
* lisp/gnus/mm-url.el:
* lisp/gnus/mm-util.el:
* lisp/gnus/mm-view.el:
* lisp/gnus/mml-sec.el:
* lisp/gnus/mml-smime.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnagent.el:
* lisp/gnus/nndiary.el:
* lisp/gnus/nndoc.el:
* lisp/gnus/nndraft.el:
* lisp/gnus/nnfolder.el:
* lisp/gnus/nnheader.el:
* lisp/gnus/nnmail.el:
* lisp/gnus/nnmaildir.el:
* lisp/gnus/nnmairix.el:
* lisp/gnus/nnmh.el:
* lisp/gnus/nnml.el:
* lisp/gnus/nnrss.el:
* lisp/gnus/nnselect.el:
* lisp/gnus/nnspool.el:
* lisp/gnus/nnvirtual.el:
* lisp/gnus/nnweb.el:
* lisp/gnus/smiley.el:
* lisp/gnus/smime.el:
* lisp/gnus/spam-report.el:
* lisp/gnus/spam-stat.el:
* lisp/gnus/spam-wash.el:
* lisp/gnus/spam.el:
;; Key) header in a news article by using a hook which will be evaluated
;; just before sending an article as follows:
;;
-;; (add-hook '*e**a*e-header-hook 'canlock-insert-header t)
+;; (add-hook '*e**a*e-header-hook #'canlock-insert-header t)
;;
;; Verifying Cancel-Lock is mainly a function of news servers, however,
;; you can verify your own article using the command `canlock-verify' in
;; To automatically invoke deuglification on every article you read,
;; put something like that in your .gnus:
;;
-;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-unwrap-lines)
+;; (add-hook 'gnus-article-decode-hook #'gnus-article-outlook-unwrap-lines)
;;
;; or _one_ of the following lines:
;;
;; ;; repair broken attribution lines
-;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-repair-attribution)
+;; (add-hook 'gnus-article-decode-hook #'gnus-article-outlook-repair-attribution)
;;
;; ;; repair broken attribution lines and citations
-;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-rearrange-citation)
+;; (add-hook 'gnus-article-decode-hook #'gnus-article-outlook-rearrange-citation)
;;
;; Note that there always may be some false positives, so I suggest
;; using the manual invocation. After deuglification you may want to
7 - not very important messages on stuff
9 - messages inside loops."
(if (<= level gmm-verbose)
- (apply 'message args)
+ (apply #'message args)
;; We have to do this format thingy here even if the result isn't
;; shown - the return value has to be the same as the return value
;; from `message'.
- (apply 'format args)))
+ (apply #'format args)))
;;;###autoload
(defun gmm-error (level &rest args)
"Beep an error if LEVEL is equal to or less than `gmm-verbose'.
ARGS are passed to `message'."
(when (<= (floor level) gmm-verbose)
- (apply 'message args)
+ (apply #'message args)
(ding)
(let (duration)
(when (and (floatp level)
;; The dummy `gmm-ignore', see `gmm-tool-bar-item'
;; widget. Suppress tooltip by adding `:enable nil'.
(if (fboundp 'tool-bar-local-item)
- (apply 'tool-bar-local-item icon nil nil
+ (apply #'tool-bar-local-item icon nil nil
map :enable nil props)
;; (tool-bar-local-item ICON DEF KEY MAP &rest PROPS)
;; (tool-bar-add-item ICON DEF KEY &rest PROPS)
- (apply 'tool-bar-add-item icon nil nil :enable nil props)))
+ (apply #'tool-bar-add-item icon nil nil :enable nil props)))
((equal fmap t) ;; Not a menu command
- (apply 'tool-bar-local-item
+ (apply #'tool-bar-local-item
icon command
(intern icon) ;; reuse icon or fmap here?
map props))
(t ;; A menu command
- (apply 'tool-bar-local-item-from-menu
+ (apply #'tool-bar-local-item-from-menu
;; (apply 'tool-bar-local-item icon def key
;; tool-bar-map props)
command icon map (symbol-value fmap)
(gnus-agent-read-servers)
(gnus-category-read)
(gnus-agent-create-buffer)
- (add-hook 'gnus-group-mode-hook 'gnus-agent-mode)
- (add-hook 'gnus-summary-mode-hook 'gnus-agent-mode)
- (add-hook 'gnus-server-mode-hook 'gnus-agent-mode))
+ (add-hook 'gnus-group-mode-hook #'gnus-agent-mode)
+ (add-hook 'gnus-summary-mode-hook #'gnus-agent-mode)
+ (add-hook 'gnus-server-mode-hook #'gnus-agent-mode))
(defun gnus-agent-create-buffer ()
(if (gnus-buffer-live-p gnus-agent-overview-buffer)
(message-narrow-to-headers)
(let* ((gcc (mail-fetch-field "gcc" nil t))
(methods (and gcc
- (mapcar 'gnus-inews-group-method
+ (mapcar #'gnus-inews-group-method
(message-unquote-tokens
(message-tokenize-header
gcc " ,")))))
(let* ((alist (gnus-agent-load-alist gnus-newsgroup-name))
(headers (sort (mapcar (lambda (h)
(mail-header-number h))
- gnus-newsgroup-headers) '<))
+ gnus-newsgroup-headers)
+ #'<))
(cached (and gnus-use-cache gnus-newsgroup-cached))
(undownloaded (list nil))
(tail-undownloaded undownloaded)
(when gnus-newsgroup-processable
(setq gnus-newsgroup-downloadable
(let* ((dl gnus-newsgroup-downloadable)
- (processable (sort (copy-tree gnus-newsgroup-processable) '<))
+ (processable (sort (copy-tree gnus-newsgroup-processable) #'<))
(gnus-newsgroup-downloadable processable))
(gnus-agent-summary-fetch-group)
(dolist (arts (gnus-info-marks (gnus-get-info group)))
(unless (memq (car arts) '(seen recent killed cache))
(setq articles (gnus-range-add articles (cdr arts)))))
- (setq articles (sort (gnus-uncompress-sequence articles) '<)))
+ (setq articles (sort (gnus-uncompress-sequence articles) #'<)))
;; At this point, I have the list of articles to consider for
;; fetching. This is the list that I'll return to my caller. Some
alist (cdr alist))
(while sequence
(push (cons (pop sequence) state) uncomp)))
- (setq alist (sort uncomp 'car-less-than-car)))
+ (setq alist (sort uncomp #'car-less-than-car)))
(setq changed-version (not (= 2 gnus-agent-article-alist-save-format)))))
(when changed-version
(let ((gnus-agent-article-alist alist))
(setq marked-articles (nconc (gnus-uncompress-range arts)
marked-articles))
))))
- (setq marked-articles (sort marked-articles '<))
+ (setq marked-articles (sort marked-articles #'<))
;; Fetch any new articles from the server
(setq articles (gnus-agent-fetch-headers group))
;; Merge new articles with marked
- (setq articles (sort (append marked-articles articles) '<))
+ (setq articles (sort (append marked-articles articles) #'<))
(when articles
;; Parse them and see which articles we want to fetch.
(gnus-uncompress-range
(cons (caar alist)
(caar (last alist))))
- (sort articles '<)))))
+ (sort articles #'<)))))
(marked ;; More articles that are excluded from the
;; expiration process
(cond (gnus-agent-expire-all
(string-to-number name)))
(directory-files
dir nil "\\`[0-9]+\\'" t)))
- '>)
+ #'>)
(progn (gnus-make-directory dir) nil)))
nov-arts
alist header
(path (gnus-agent-group-pathname group))
(entry (gethash path gnus-agent-total-fetched-hashtb)))
(if entry
- (apply '+ entry)
+ (apply #'+ entry)
(let ((gnus-agent-inhibit-update-total-fetched-for (not no-inhibit)))
(+
(gnus-agent-update-view-total-fetched-for group nil method path)
:group 'gnus-article
:type 'boolean)
-(defcustom gnus-blocked-images 'gnus-block-private-groups
+(defcustom gnus-blocked-images #'gnus-block-private-groups
"Images that have URLs matching this regexp will be blocked.
Note that the main reason external images are included in HTML
emails (these days) is to allow tracking whether you've read the
(when tmp-file
(add-to-list 'gnus-article-browse-html-temp-list tmp-file))
(add-hook 'gnus-summary-prepare-exit-hook
- 'gnus-article-browse-delete-temp-files)
+ #'gnus-article-browse-delete-temp-files)
(add-hook 'gnus-exit-gnus-hook
(lambda ()
(gnus-article-browse-delete-temp-files t)))
(gnus-bookmark-maybe-load-default-file)
(let* ((bookmark (or bmk-name
(gnus-completing-read "Jump to bookmarked article"
- (mapcar 'car gnus-bookmark-alist))))
+ (mapcar #'car gnus-bookmark-alist))))
(bmk-record (cadr (assoc bookmark gnus-bookmark-alist)))
(group (cdr (assoc 'group bmk-record)))
(message-id (cdr (assoc 'message-id bmk-record))))
(setq articles
(sort (mapcar (lambda (name) (string-to-number name))
(directory-files dir nil "\\`[0-9]+\\'" t))
- '<))
+ #'<))
;; Update the cache active file, just to synch more.
(if articles
(progn
(push (string-to-number (file-name-nondirectory (pop files))) nums)
(push (pop files) alphs)))
;; If we have nums, then this is probably a valid group.
- (when (setq nums (sort nums '<))
+ (when (setq nums (sort nums #'<))
(puthash group
(cons (car nums) (car (last nums)))
gnus-cache-active-hashtb))
(setq gnus-cache-total-fetched-hashtb (gnus-make-hashtable 1000)))
(let* ((entry (gethash group gnus-cache-total-fetched-hashtb)))
(if entry
- (apply '+ entry)
+ (apply #'+ entry)
(let ((gnus-cache-inhibit-update-total-fetched-for (not no-inhibit)))
(+
(gnus-cache-update-overview-total-fetched-for group nil)
(gnus-article-search-signature)
(push (cons (point-marker) "") marks)
;; Sort the marks.
- (setq marks (sort marks 'car-less-than-car))
+ (setq marks (sort marks #'car-less-than-car))
(let ((omarks marks))
(setq marks nil)
(while (cdr omarks)
cites (cdr cites)
candidate (car cite)
numbers (cdr cite)
- first (apply 'min numbers)
+ first (apply #'min numbers)
compare (if size (length candidate) first))
(and (> first limit)
regexp
"Search for a cited line and set match data accordingly.
Returns nil if there is no such line before LIMIT, t otherwise."
(when (re-search-forward gnus-message-cite-prefix-regexp limit t)
- (let ((cdepth (min (length (apply 'concat
+ (let ((cdepth (min (length (apply #'concat
(split-string
(match-string-no-properties 0)
"[\t [:alnum:]]+")))
(setq tmp (cdr tmp))))
(setq gnus-custom-params
- (apply 'widget-create 'group
+ (apply #'widget-create 'group
:value values
(delq nil
(list `(set :inline t
The optional arg NO-KEYMAP is ignored.
Checking delayed messages is skipped if optional arg NO-CHECK is non-nil."
(unless no-check
- (add-hook 'gnus-get-new-news-hook 'gnus-delay-send-queue)))
+ (add-hook 'gnus-get-new-news-hook #'gnus-delay-send-queue)))
(provide 'gnus-delay)
(gnus-diary-update-group-parameters group)))
(add-hook 'nndiary-request-create-group-functions
- 'gnus-diary-update-group-parameters)
+ #'gnus-diary-update-group-parameters)
;; Now that we have `gnus-subscribe-newsgroup-functions', this is not needed
;; anymore. Maybe I should remove this completely.
(add-hook 'nndiary-request-update-info-functions
- 'gnus-diary-update-group-parameters)
+ #'gnus-diary-update-group-parameters)
(add-hook 'gnus-subscribe-newsgroup-functions
- 'gnus-diary-maybe-update-group-parameters)
+ #'gnus-diary-maybe-update-group-parameters)
;; Diary Message Checking ===================================================
header ": ")))
(setq value
(if (listp (nth 1 head))
- (gnus-completing-read prompt (cons "*" (mapcar 'car (nth 1 head)))
+ (gnus-completing-read prompt (cons "*" (mapcar #'car (nth 1 head)))
t value
'gnus-diary-header-value-history)
(read-string prompt value
;; following in your ~/.gnus:
;; (require 'gnus-dired) ;, isn't needed due to autoload cookies
-;; (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
+;; (add-hook 'dired-mode-hook #'turn-on-gnus-dired-mode)
;; Note that if you visit dired buffers before your ~/.gnus file has
;; been read, those dired buffers won't have the keybindings in
;; Set up the menu.
(when (gnus-visual-p 'draft-menu 'menu)
(gnus-draft-make-menu-bar))
- (add-hook 'gnus-summary-prepare-exit-hook 'gnus-draft-clear-marks t t))))
+ (add-hook 'gnus-summary-prepare-exit-hook #'gnus-draft-clear-marks t t))))
;;; Commands
'xface
(gnus-put-image
(if (gnus-image-type-available-p 'xface)
- (apply 'gnus-create-image (concat "X-Face: " data) 'xface t
+ (apply #'gnus-create-image (concat "X-Face: " data) 'xface t
(cdr (assq 'xface gnus-face-properties-alist)))
- (apply 'gnus-create-image pbm 'pbm t
+ (apply #'gnus-create-image pbm 'pbm t
(cdr (assq 'pbm gnus-face-properties-alist))))
nil 'xface))
(gnus-add-wash-type 'xface))))))
(dotimes (i 255)
(push (format format i i i i i i)
values))
- (mapconcat 'identity values " ")))
+ (mapconcat #'identity values " ")))
(defun gnus-funcall-no-warning (function &rest args)
(when (fboundp function)
(and (>= level gnus-level-zombie)
(<= lowest gnus-level-zombie)))
(gnus-group-prepare-flat-list-dead
- (setq gnus-zombie-list (sort gnus-zombie-list 'string<))
+ (setq gnus-zombie-list (sort gnus-zombie-list #'string<))
gnus-level-zombie ?Z
regexp))
(when not-in-list
(gnus-group-prepare-flat-list-dead
(cl-union
not-in-list
- (setq gnus-killed-list (sort gnus-killed-list 'string<))
+ (setq gnus-killed-list (sort gnus-killed-list #'string<))
:test 'equal)
gnus-level-killed ?K regexp))
(cons 'unread (if (numberp (car entry)) (car entry) 0))
(cons 'total (if active (1+ (- (cdr active) (car active))) 0))
(cons 'mailp (apply
- 'append
+ #'append
(mapcar
(lambda (x)
(memq x (assoc
"Unmark all groups."
(interactive)
(save-excursion
- (mapc 'gnus-group-remove-mark gnus-group-marked))
+ (mapc #'gnus-group-remove-mark gnus-group-marked))
(gnus-group-position-point))
(defun gnus-group-mark-region (unmark beg end)
"Create one of the groups described in `gnus-useful-groups'."
(interactive
(let ((entry (assoc (gnus-completing-read "Create group"
- (mapcar 'car gnus-useful-groups)
+ (mapcar #'car gnus-useful-groups)
t)
gnus-useful-groups)))
(list (cadr entry)
(read-from-minibuffer "Title: "
(gnus-newsgroup-savable-name
(mapconcat
- 'identity
+ #'identity
(split-string
(or (cdr (assoc 'title
feedinfo))
" ")))))
(desc (read-from-minibuffer "Description: "
(mapconcat
- 'identity
+ #'identity
(split-string
(or (cdr (assoc 'description
feedinfo))
(pop-to-buffer "*Gnus Help*")
(buffer-disable-undo)
(erase-buffer)
- (setq groups (sort groups 'string<))
+ (setq groups (sort groups #'string<))
(while groups
;; Groups may be entered twice into the list of groups.
(when (not (string= (car groups) prev))
(interactive
(list (let ((how (gnus-completing-read
"Which back end"
- (mapcar 'car (append gnus-valid-select-methods
+ (mapcar #'car (append gnus-valid-select-methods
gnus-server-alist))
t (cons "nntp" 0) 'gnus-method-history)))
;; We either got a back end name or a virtual server name.
(setcdr m (gnus-compress-sequence articles t)))
(setcdr m (gnus-compress-sequence
(sort (nconc (gnus-uncompress-range (cdr m))
- (copy-sequence articles)) '<) t))))))
+ (copy-sequence articles))
+ #'<)
+ t))))))
(declare-function gnus-summary-add-mark "gnus-sum" (article type))
;; Cache active file might use "."
;; instead of ":".
(gethash
- (mapconcat 'identity
+ (mapconcat #'identity
(split-string group ":")
".")
gnus-cache-active-hashtb))))
(push n gnus-newsgroup-unselected))
(setq n (1+ n)))
(setq gnus-newsgroup-unselected
- (sort gnus-newsgroup-unselected '<)))))
+ (sort gnus-newsgroup-unselected #'<)))))
(gnus-activate-group group)
(gnus-group-make-articles-read group (list article))
(when (and (gnus-group-auto-expirable-p group)
(replace-match "" t t))
(mm-url-decode-entities)))
-(defun gnus-html-insert-image (&rest args)
+(defun gnus-html-insert-image (&rest _args)
"Fetch and insert the image under point."
(interactive)
- (apply 'gnus-html-display-image (get-text-property (point) 'gnus-image)))
+ (apply #'gnus-html-display-image (get-text-property (point) 'gnus-image)))
(defun gnus-html-show-alt-text ()
"Show the ALT text of the image under point."
article-number)
;; Clean up the new summary and propagate the error
(error (when group-is-new (gnus-summary-exit))
- (apply 'signal err)))))
+ (apply #'signal err)))))
(defun gnus-simplify-group-name (group)
"Return the simplest representation of the name of GROUP.
(let* ((gnus-newsrc-options-n
(gnus-newsrc-parse-options
(concat "options -n "
- (mapconcat 'identity command-line-args-left " "))))
+ (mapconcat #'identity command-line-args-left " "))))
(gnus-expert-user t)
(mail-sources nil)
(gnus-use-dribble-file nil)
(concat
"\\("
(mapconcat
- 'identity
+ #'identity
(append
(and to-address (list (regexp-quote to-address)))
(and to-list (list (regexp-quote to-list)))
(and extra-aliases
(if (listp extra-aliases)
- (mapcar 'regexp-quote extra-aliases)
+ (mapcar #'regexp-quote extra-aliases)
(list extra-aliases)))
(and split-regexp (list split-regexp)))
"\\|")
(symbol-value (car elem))))
(throw 'found (cons (cadr elem) (caddr elem)))))))))
+(declare-function gnus-agent-possibly-do-gcc "gnus-agent" ())
+(declare-function gnus-cache-possibly-remove-article "gnus-cache"
+ (article ticked dormant unread &optional force))
+
(defun gnus-inews-add-send-actions (winconf buffer article
&optional config yanked
winconf-name)
- (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
- 'gnus-inews-do-gcc) nil t)
+ (add-hook 'message-sent-hook (if gnus-agent #'gnus-agent-possibly-do-gcc
+ #'gnus-inews-do-gcc)
+ nil t)
(when gnus-agent
- (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
+ (add-hook 'message-header-hook #'gnus-agent-possibly-save-gcc nil t))
(setq message-post-method
`(lambda (&optional arg)
(gnus-post-method arg ,gnus-newsgroup-name)))
gnus-post-method
(list gnus-post-method)))
gnus-secondary-select-methods
- (mapcar 'cdr gnus-server-alist)
- (mapcar 'car gnus-opened-servers)
+ (mapcar #'cdr gnus-server-alist)
+ (mapcar #'car gnus-opened-servers)
(list gnus-select-method)
(list group-method)))
method-alist post-methods method)
;; Just use the last value.
gnus-last-posting-server
(gnus-completing-read
- "Posting method" (mapcar 'car method-alist) t
+ "Posting method" (mapcar #'car method-alist) t
(cons (or gnus-last-posting-server "") 0))))
method-alist))))
;; Override normal method.
self))
"\n"))
((null self)
- (insert "Gcc: " (mapconcat 'identity gcc ", ") "\n"))
+ (insert "Gcc: " (mapconcat #'identity gcc ", ") "\n"))
((eq self 'no-gcc-self)
(when (setq gcc (delete
gnus-newsgroup-name
(delete (concat "\"" gnus-newsgroup-name "\"")
gcc)))
- (insert "Gcc: " (mapconcat 'identity gcc ", ") "\n")))))))
+ (insert "Gcc: " (mapconcat #'identity gcc ", ") "\n")))))))
(defun gnus-summary-resend-message (address n &optional no-select)
"Resend the current article to ADDRESS.
(setq user-mail-address tem))))
;; `gnus-summary-resend-message-insert-gcc' must run last.
(add-hook 'message-header-setup-hook
- 'gnus-summary-resend-message-insert-gcc t)
+ #'gnus-summary-resend-message-insert-gcc t)
(add-hook 'message-sent-hook
`(lambda ()
(let ((rfc2047-encode-encoded-words nil))
(add-hook 'message-setup-hook
(cond
((eq 'eval (car result))
- 'ignore)
+ #'ignore)
((eq 'body (car result))
`(lambda ()
(save-excursion
(setq-local message-signature nil)
(setq-local message-signature-file nil)
(if (not (cdr result))
- 'ignore
+ #'ignore
`(lambda ()
(save-excursion
(let ((message-signature ,(cdr result)))
;; This implements notifications using `notifications-notify' on new
;; messages received.
-;; Use (add-hook 'gnus-after-getting-new-news-hook 'gnus-notifications)
+;; Use (add-hook 'gnus-after-getting-new-news-hook #'gnus-notifications)
;; to get notifications just after getting the new news.
;;; Code:
base (expand-file-name directory database))
(while address
(when (setq result (gnus-picon-find-image
- (concat base "/" (mapconcat 'downcase
+ (concat base "/" (mapconcat #'downcase
(reverse address)
"/")
"/" (downcase user) "/")))
(defun gnus-picon-create-glyph (file)
(or (cdr (assoc file gnus-picon-glyph-alist))
- (cdar (push (cons file (apply 'gnus-create-image
+ (cdar (push (cons file (apply #'gnus-create-image
file nil nil
gnus-picon-properties))
gnus-picon-glyph-alist))))
(gnus-picon-find-face
(concat "unknown@"
(mapconcat
- 'identity (cdr spec) "."))
+ #'identity (cdr spec) "."))
gnus-picon-user-directories)))
(setcar spec (cons (gnus-picon-create-glyph file)
(car spec))))
(when (setq file (gnus-picon-find-face
(concat "unknown@"
(mapconcat
- 'identity (nthcdr (1+ i) spec) "."))
+ #'identity (nthcdr (1+ i) spec) "."))
gnus-picon-domain-directories t))
(setcar (nthcdr (1+ i) spec)
(cons (gnus-picon-create-glyph file)
(cl-case gnus-picon-style
(right
(when (= (length addresses) 1)
- (setq len (apply '+ (mapcar (lambda (x)
- (condition-case nil
- (car (image-size (car x)))
- (error 0))) spec)))
+ (setq len (apply #'+ (mapcar (lambda (x)
+ (condition-case nil
+ (car (image-size (car x)))
+ (error 0)))
+ spec)))
(when (> len 0)
(goto-char (point-at-eol))
(insert (propertize
(when (setq file (gnus-picon-find-face
(concat "unknown@"
(mapconcat
- 'identity (nthcdr i spec) "."))
+ #'identity (nthcdr i spec) "."))
gnus-picon-news-directories t))
(setcar (nthcdr i spec)
(cons (gnus-picon-create-glyph file)
(defun gnus-registry-sort-addresses (&rest addresses)
"Return a normalized and sorted list of ADDRESSES."
- (sort (mapcan #'gnus-registry-extract-addresses addresses) 'string-lessp))
+ (sort (mapcan #'gnus-registry-extract-addresses addresses) #'string-lessp))
(defun gnus-registry-simplify-subject (subject)
(if (stringp subject)
(defun rfc1843-gnus-setup ()
"Setup HZ decoding for Gnus."
- (add-hook 'gnus-article-decode-hook 'rfc1843-decode-article-body t)
+ (add-hook 'gnus-article-decode-hook #'rfc1843-decode-article-body t)
(setq gnus-decode-encoded-word-function
- 'gnus-multi-decode-encoded-word-string
+ #'gnus-multi-decode-encoded-word-string
gnus-decode-header-function
- 'gnus-multi-decode-header
+ #'gnus-multi-decode-header
gnus-decode-encoded-word-methods
(nconc gnus-decode-encoded-word-methods
(list
((not (derived-mode-p 'gnus-summary-mode)) (setq gnus-pick-mode nil))
((not gnus-pick-mode)
;; FIXME: a buffer-local minor mode removing globally from a hook??
- (remove-hook 'gnus-message-setup-hook 'gnus-pick-setup-message))
+ (remove-hook 'gnus-message-setup-hook #'gnus-pick-setup-message))
(t
;; Make sure that we don't select any articles upon group entry.
(setq-local gnus-auto-select-first nil)
(gnus-update-format-specifications nil 'summary)
(gnus-update-summary-mark-positions)
;; FIXME: a buffer-local minor mode adding globally to a hook??
- (add-hook 'gnus-message-setup-hook 'gnus-pick-setup-message)
+ (add-hook 'gnus-message-setup-hook #'gnus-pick-setup-message)
(setq-local gnus-summary-goto-unread 'never)
;; Set up the menu.
(when (gnus-visual-p 'pick-menu 'menu)
(and gnus-extra-headers
(equal (nth 1 entry) "extra")
(intern ; need symbol
- (let ((collection (mapcar 'symbol-name gnus-extra-headers)))
+ (let ((collection (mapcar #'symbol-name gnus-extra-headers)))
(gnus-completing-read
"Score extra header" ; prompt
collection ; completion list
EXTRA is the possible non-standard header."
(interactive (list (gnus-completing-read "Header"
(mapcar
- 'car
+ #'car
(seq-filter
(lambda (x) (fboundp (nth 2 x)))
gnus-header-index))
;; We do not respect eval and files atoms from global score
;; files.
(when (and files (not global))
- (setq lists (apply 'append lists
- (mapcar 'gnus-score-load-file
+ (setq lists (apply #'append lists
+ (mapcar #'gnus-score-load-file
(if adapt-file (cons adapt-file files)
files)))))
(when (and eval (not global))
(setq gnus-scores-exclude-files
(nconc
(apply
- 'nconc
+ #'nconc
(mapcar
(lambda (sfile)
(list
(setq entry (pop entries)
header (nth 0 entry)
gnus-score-index (nth 1 (assoc header gnus-header-index)))
- (when (< 0 (apply 'max (mapcar
- (lambda (score)
- (length (gnus-score-get header score)))
- scores)))
+ (when (< 0 (apply #'max (mapcar
+ (lambda (score)
+ (length (gnus-score-get header score)))
+ scores)))
(when (if (and gnus-inhibit-slow-scoring
(or (eq gnus-inhibit-slow-scoring t)
(and (stringp gnus-inhibit-slow-scoring)
;; Run score-fn
(if (eq header 'score-fn)
(setq new (gnus-score-func scores trace))
- ;; Call the scoring function for this type of "header".
- (setq new (funcall (nth 2 entry) scores header
- now expire trace))))
+ ;; Call the scoring function for this type of "header".
+ (setq new (funcall (nth 2 entry) scores header
+ now expire trace))))
(push new news))))
(when (gnus-buffer-live-p gnus-summary-buffer)
gnus-newsgroup-name gnus-adaptive-file-suffix))))
(setq gnus-scores-articles (sort gnus-scores-articles
- 'gnus-score-string<)
+ #'gnus-score-string<)
articles gnus-scores-articles)
(erase-buffer)
;; We cannot string-sort the extra headers list. *sigh*
(if (= gnus-score-index 9)
gnus-scores-articles
- (sort gnus-scores-articles 'gnus-score-string<))
+ (sort gnus-scores-articles #'gnus-score-string<))
articles gnus-scores-articles)
(erase-buffer)
(abbreviate-file-name file))))
(insert
(format "\nTotal score: %d"
- (apply '+ (mapcar
- (lambda (s)
- (or (caddr s)
- gnus-score-interactive-default-score))
- trace))))
+ (apply #'+ (mapcar
+ (lambda (s)
+ (or (caddr s)
+ gnus-score-interactive-default-score))
+ trace))))
(insert
"\n\nQuick help:
(mapcar (lambda (group)
(gnus-score-file-name group gnus-adaptive-file-suffix))
(setq all (nreverse all)))
- (mapcar 'gnus-score-file-name all)))
+ (mapcar #'gnus-score-file-name all)))
(if (equal prefix "")
all
(mapcar
(lambda (file)
(cons (inline (gnus-score-file-rank file)) file))
files)))
- (mapcar 'cdr (sort alist 'car-less-than-car)))))
+ (mapcar #'cdr (sort alist #'car-less-than-car)))))
(defun gnus-score-find-alist (group)
"Return list of score files for GROUP.
"No directory found in definition of server %s"
server))))
(apply
- 'vconcat
+ #'vconcat
(mapcar (lambda (x)
(let ((group x)
artlist)
"Cannot locate directory for group")))
(save-excursion
(apply
- 'call-process "find" nil t
+ #'call-process "find" nil t
"find" group "-maxdepth" "1" "-type" "f"
"-name" "[0-9]*" "-exec"
(slot-value engine 'grep-program)
(let* ((path (split-string
(buffer-substring
(point)
- (line-end-position)) "/" t))
+ (line-end-position))
+ "/" t))
(art (string-to-number (car (last path)))))
(while (string= "." (car path))
(setq path (cdr path)))
\(gnus-sieve-string-list \\='(\"to\" \"cc\"))
=> \"[\\\"to\\\", \\\"cc\\\"]\"
"
- (concat "[\"" (mapconcat 'identity list "\", \"") "\"]"))
+ (concat "[\"" (mapconcat #'identity list "\", \"") "\"]"))
(defun gnus-sieve-test-list (list)
"Convert an elisp test list to a Sieve test list.
For example:
\(gnus-sieve-test-list \\='((address \"sender\" \"boss@company.com\") (size :over 4K)))
=> \"(address \\\"sender\\\" \\\"boss@company.com\\\", size :over 4K)\""
- (concat "(" (mapconcat 'gnus-sieve-test list ", ") ")"))
+ (concat "(" (mapconcat #'gnus-sieve-test list ", ") ")"))
;; FIXME: do proper quoting
(defun gnus-sieve-test-token (token)
(size :over 100K))))
=> \"anyof (header :contains [\\\"to\\\", \\\"cc\\\"] \\\"my@address.com\\\",
size :over 100K)\""
- (mapconcat 'gnus-sieve-test-token test " "))
+ (mapconcat #'gnus-sieve-test-token test " "))
(defun gnus-sieve-script (&optional method crosspost)
"Generate a Sieve script based on groups with select method METHOD
"\tstop;\n")
"}")
script)))))
- (mapconcat 'identity script "\n")))
+ (mapconcat #'identity script "\n")))
(provide 'gnus-sieve)
(defun gnus-server-add-server (how where)
(interactive
(list (intern (gnus-completing-read "Server method"
- (mapcar 'car gnus-valid-select-methods)
+ (mapcar #'car gnus-valid-select-methods)
t))
(read-string "Server name: ")))
(when (assq where gnus-server-alist)
(defun gnus-server-goto-server (server)
"Jump to a server line."
(interactive
- (list (gnus-completing-read "Goto server" (mapcar 'car gnus-server-alist) t)))
+ (list (gnus-completing-read "Goto server"
+ (mapcar #'car gnus-server-alist) t)))
(let ((to (text-property-any (point-min) (point-max)
'gnus-server (intern server))))
(when to
regexp))
(defcustom gnus-ignored-newsgroups
- (mapconcat 'identity
+ (mapconcat #'identity
'("^to\\." ; not "real" groups
"^[0-9. \t]+\\( \\|$\\)" ; all digits in name
"^[\"][\"#'()]" ; bogus characters
;; For subscribing new newsgroup
(defun gnus-subscribe-hierarchical-interactive (groups)
- (let ((groups (sort groups 'string<))
+ (let ((groups (sort groups #'string<))
prefixes prefix start ans group starts)
(while groups
(setq prefixes (list "^"))
"Declare back end NAME with ABILITIES as a Gnus back end."
(setq gnus-valid-select-methods
(nconc gnus-valid-select-methods
- (list (apply 'list name abilities))))
+ (list (apply #'list name abilities))))
(gnus-redefine-select-method-widget))
(defun gnus-set-default-directory ()
(setq topology gnus-topic-topology
gnus-tmp-topics nil))
(push (caar topology) gnus-tmp-topics)
- (mapc 'gnus-topic-list (cdr topology))
+ (mapc #'gnus-topic-list (cdr topology))
gnus-tmp-topics)
;;; Topic parameter jazz
;; We probably have lots of nil elements here, so we remove them.
;; Probably faster than doing this "properly".
(delq nil (cons group-params-list
- (mapcar 'gnus-topic-parameters
+ (mapcar #'gnus-topic-parameters
(gnus-current-topics topic)))))
param out params)
;; Now we have all the parameters, so we go through them
(and (>= level gnus-level-zombie)
(<= lowest gnus-level-zombie)))
(gnus-group-prepare-flat-list-dead
- (setq gnus-zombie-list (sort gnus-zombie-list 'string<))
+ (setq gnus-zombie-list (sort gnus-zombie-list #'string<))
gnus-level-zombie ?Z
regexp))
(and (>= level gnus-level-killed)
(<= lowest gnus-level-killed)))
(gnus-group-prepare-flat-list-dead
- (setq gnus-killed-list (sort gnus-killed-list 'string<))
+ (setq gnus-killed-list (sort gnus-killed-list #'string<))
gnus-level-killed ?K regexp)
(when not-in-list
(unless gnus-killed-hashtb
(pop topics)))
;; Go through all living groups and make sure that
;; they belong to some topic.
- (let* ((tgroups (apply 'append (mapcar 'cdr gnus-topic-alist)))
+ (let* ((tgroups (apply #'append (mapcar #'cdr gnus-topic-alist)))
(entry (last (assoc (caar gnus-topic-topology) gnus-topic-alist)))
(groups (cdr gnus-group-list)))
(dolist (group groups)
(when (gnus-visual-p 'topic-menu 'menu)
(gnus-topic-make-menu-bar))
(gnus-set-format 'topic t)
- (add-hook 'gnus-group-catchup-group-hook 'gnus-topic-update-topic)
+ (add-hook 'gnus-group-catchup-group-hook #'gnus-topic-update-topic)
(setq-local gnus-group-prepare-function
- 'gnus-group-prepare-topics)
+ #'gnus-group-prepare-topics)
(setq-local gnus-group-get-parameter-function
- 'gnus-group-topic-parameters)
+ #'gnus-group-topic-parameters)
(setq-local gnus-group-goto-next-group-function
- 'gnus-topic-goto-next-group)
+ #'gnus-topic-goto-next-group)
(setq-local gnus-group-indentation-function
- 'gnus-topic-group-indentation)
+ #'gnus-topic-group-indentation)
(setq-local gnus-group-update-group-function
- 'gnus-topic-update-topics-containing-group)
- (setq-local gnus-group-sort-alist-function 'gnus-group-sort-topic)
- (setq gnus-group-change-level-function 'gnus-topic-change-level)
- (setq gnus-goto-missing-group-function 'gnus-topic-goto-missing-group)
- (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist
+ #'gnus-topic-update-topics-containing-group)
+ (setq-local gnus-group-sort-alist-function #'gnus-group-sort-topic)
+ (setq gnus-group-change-level-function #'gnus-topic-change-level)
+ (setq gnus-goto-missing-group-function #'gnus-topic-goto-missing-group)
+ (add-hook 'gnus-check-bogus-groups-hook #'gnus-topic-clean-alist
nil 'local)
(setq gnus-topology-checked-p nil)
;; We check the topology.
(gnus-topic-check-topology)))
;; Remove topic infestation.
(unless gnus-topic-mode
- (remove-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic)
+ (remove-hook 'gnus-summary-exit-hook #'gnus-topic-update-topic)
(setq gnus-group-change-level-function nil)
- (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist)
- (setq gnus-group-prepare-function 'gnus-group-prepare-flat)
- (setq gnus-group-sort-alist-function 'gnus-group-sort-flat))
+ (remove-hook 'gnus-check-bogus-groups-hook #'gnus-topic-clean-alist)
+ (setq gnus-group-prepare-function #'gnus-group-prepare-flat)
+ (setq gnus-group-sort-alist-function #'gnus-group-sort-flat))
(when (called-interactively-p 'any)
(gnus-group-list-groups))))
(inhibit-read-only t)
(gnus-group-marked groups))
(gnus-group-catchup-current)
- (mapcar 'gnus-topic-update-topics-containing-group groups)))))
+ (mapcar #'gnus-topic-update-topics-containing-group groups)))))
(defun gnus-topic-read-group (&optional all no-article group)
"Read news in this newsgroup.
If COPYP, copy the groups instead."
(interactive
(list current-prefix-arg
- (gnus-completing-read "Move to topic" (mapcar 'car gnus-topic-alist) t
+ (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t
nil 'gnus-topic-history)))
(let ((use-marked (and (not n) (not (and transient-mark-mode mark-active))
gnus-group-marked t))
(interactive
(list current-prefix-arg
(gnus-completing-read
- "Copy to topic" (mapcar 'car gnus-topic-alist) t)))
+ "Copy to topic" (mapcar #'car gnus-topic-alist) t)))
(gnus-topic-move-group n topic t))
(defun gnus-topic-kill-group (&optional n discard)
(let ((topic
(gnus-topic-find-topology
(gnus-completing-read "Show topic"
- (mapcar 'car gnus-topic-alist) t))))
+ (mapcar #'car gnus-topic-alist) t))))
(setcar (cddr (cadr topic)) nil)
(setcar (cdr (cadr topic)) 'visible)
(gnus-group-list-groups)))))
(nreverse
(list
(setq topic (gnus-completing-read "Move to topic"
- (mapcar 'car gnus-topic-alist) t))
+ (mapcar #'car gnus-topic-alist) t))
(read-string (format "Move to %s (regexp): " topic))))))
(gnus-group-mark-regexp regexp)
(gnus-topic-move-group nil topic copyp))
If REVERSE, reverse the sorting order."
(interactive
(list (gnus-completing-read "Sort topics in"
- (mapcar 'car gnus-topic-alist) t
+ (mapcar #'car gnus-topic-alist) t
(gnus-current-topic))
current-prefix-arg))
(let ((topic-topology (or (and topic (cdr (gnus-topic-find-topology topic)))
(interactive
(list
(gnus-group-topic-name)
- (gnus-completing-read "Move to topic" (mapcar 'car gnus-topic-alist) t)))
+ (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t)))
(unless (and current to)
(error "Can't find topic"))
(let ((current-top (cdr (gnus-topic-find-topology current)))
;; Set up the menu.
(when (gnus-visual-p 'undo-menu 'menu)
(gnus-undo-make-menu-bar))
- (add-hook 'post-command-hook 'gnus-undo-boundary nil t)))
+ (add-hook 'post-command-hook #'gnus-undo-boundary nil t)))
;;; Interface functions.
(unless gnus-undo-mode
(error "Undoing is not enabled in this buffer"))
(message "%s" last-command)
- (when (or (not (eq last-command 'gnus-undo))
- (not gnus-undo-last))
+ (unless (and (eq last-command 'gnus-undo)
+ gnus-undo-last)
(setq gnus-undo-last gnus-undo-actions))
(let ((action (pop gnus-undo-last)))
(unless action
(error "Nothing further to undo"))
(setq gnus-undo-actions (delq action gnus-undo-actions))
(setq gnus-undo-boundary t)
- (mapc 'funcall action)))
+ (mapc #'funcall action)))
(provide 'gnus-undo)
`(let (str time)
(cond ((eq gnus-add-timestamp-to-message 'log)
(setq str (let (message-log-max)
- (apply 'message ,format-string ,args)))
+ (apply #'message ,format-string ,args)))
(when (and message-log-max
(> message-log-max 0)
(/= (length str) 0))
(message "%s" (concat ,timestamp str))
str))
(t
- (apply 'message ,format-string ,args)))))))
+ (apply #'message ,format-string ,args)))))))
(defvar gnus-action-message-log nil)
(if (<= level gnus-verbose)
(let ((message
(if gnus-add-timestamp-to-message
- (apply 'gnus-message-with-timestamp args)
- (apply 'message args))))
+ (apply #'gnus-message-with-timestamp args)
+ (apply #'message args))))
(when (and (consp gnus-action-message-log)
(<= level 3))
(push message gnus-action-message-log))
"Beep an error if LEVEL is equal to or less than `gnus-verbose'.
ARGS are passed to `message'."
(when (<= (floor level) gnus-verbose)
- (apply 'message args)
+ (apply #'message args)
(ding)
(let (duration)
(when (and (floatp level)
(defun gnus-run-hooks (&rest funcs)
"Does the same as `run-hooks', but saves the current buffer."
(save-current-buffer
- (apply 'run-hooks funcs)))
+ (apply #'run-hooks funcs)))
(defun gnus-run-hook-with-args (hook &rest args)
"Does the same as `run-hook-with-args', but saves the current buffer."
(save-current-buffer
- (apply 'run-hook-with-args hook args)))
+ (apply #'run-hook-with-args hook args)))
(defun gnus-run-mode-hooks (&rest funcs)
"Run `run-mode-hooks', saving the current buffer."
- (save-current-buffer (apply 'run-mode-hooks funcs)))
+ (save-current-buffer (apply #'run-mode-hooks funcs)))
;;; Various
`(,spec elem))
((listp spec)
(if (memq (car spec) '(or and not))
- `(,(car spec) ,@(mapcar 'gnus-make-predicate-1 (cdr spec)))
+ `(,(car spec) ,@(mapcar #'gnus-make-predicate-1 (cdr spec)))
(error "Invalid predicate specifier: %s" spec)))))
(defun gnus-completing-read (prompt collection &optional require-match
(setq props (plist-put props :foreground (face-foreground face)))
(setq props (plist-put props :background (face-background face))))
(ignore-errors
- (apply 'create-image file type data-p props))))
+ (apply #'create-image file type data-p props))))
(defun gnus-put-image (glyph &optional string category)
(let ((point (point)))
(defun gnus-uu-decode-uu (&optional n)
"Uudecodes the current article."
(interactive "P")
- (gnus-uu-decode-with-method 'gnus-uu-uustrip-article n))
+ (gnus-uu-decode-with-method #'gnus-uu-uustrip-article n))
(defun gnus-uu-decode-uu-and-save (n dir)
"Decodes and saves the resulting file."
(read-directory-name "Uudecode and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
- (gnus-uu-decode-with-method 'gnus-uu-uustrip-article n dir nil nil t))
+ (gnus-uu-decode-with-method #'gnus-uu-uustrip-article n dir nil nil t))
(defun gnus-uu-decode-unshar (&optional n)
"Unshars the current article."
(interactive "P")
- (gnus-uu-decode-with-method 'gnus-uu-unshar-article n nil nil 'scan t))
+ (gnus-uu-decode-with-method #'gnus-uu-unshar-article n nil nil 'scan t))
(defun gnus-uu-decode-unshar-and-save (n dir)
"Unshars and saves the current article."
(read-directory-name "Unshar and save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
- (gnus-uu-decode-with-method 'gnus-uu-unshar-article n dir nil 'scan t))
+ (gnus-uu-decode-with-method #'gnus-uu-unshar-article n dir nil 'scan t))
(defun gnus-uu-decode-save (n file)
"Saves the current article."
(read-file-name
"Save article in file: " gnus-uu-default-dir gnus-uu-default-dir))))
(setq gnus-uu-saved-article-name file)
- (gnus-uu-decode-with-method 'gnus-uu-save-article n nil t))
+ (gnus-uu-decode-with-method #'gnus-uu-save-article n nil t))
(defun gnus-uu-decode-binhex (n dir)
"Unbinhexes the current article."
(gnus-uu-initialize)
(setq gnus-uu-binhex-article-name
(make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
- (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
+ (gnus-uu-decode-with-method #'gnus-uu-binhex-article n dir))
(defun gnus-uu-decode-yenc (n dir)
"Decode the yEnc-encoded current article."
gnus-uu-default-dir
gnus-uu-default-dir))))
(setq gnus-uu-yenc-article-name nil)
- (gnus-uu-decode-with-method 'gnus-uu-yenc-article n dir nil t))
+ (gnus-uu-decode-with-method #'gnus-uu-yenc-article n dir nil t))
(defun gnus-uu-decode-uu-view (&optional n)
"Uudecodes and views the current article."
(defun gnus-uu-decode-postscript (&optional n)
"Gets PostScript of the current article."
(interactive "P")
- (gnus-uu-decode-with-method 'gnus-uu-decode-postscript-article n))
+ (gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article n))
(defun gnus-uu-decode-postscript-view (&optional n)
"Gets and views the current article."
(read-directory-name "Save in dir: "
gnus-uu-default-dir
gnus-uu-default-dir t))))
- (gnus-uu-decode-with-method 'gnus-uu-decode-postscript-article
+ (gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article
n dir nil nil t))
(defun gnus-uu-decode-postscript-and-save-view (n dir)
;; Expand numbers, sort, and return the list of article
;; numbers.
- (mapcar 'cdr
+ (mapcar #'cdr
(sort (gnus-uu-expand-numbers
list-of-subjects
(not do-not-translate))
- 'gnus-uu-string<))))))
+ #'gnus-uu-string<))))))
(defun gnus-uu-expand-numbers (string-list &optional translate)
;; Takes a list of strings and "expands" all numbers in all the
;; Initializing
-(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-clean-up)
-(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-delete-work-dir)
+(add-hook 'gnus-summary-prepare-exit-hook #'gnus-uu-clean-up)
+(add-hook 'gnus-summary-prepare-exit-hook #'gnus-uu-delete-work-dir)
\f
(while (setq info (pop alist))
(when (gnus-server-equal (gnus-info-method info) server)
(push (gnus-info-group info) groups)))
- (sort groups 'string<)))
+ (sort groups #'string<)))
(defun gnus-group-foreign-p (group)
"Say whether a group is foreign or not."
(cond
((and
(eq keyword :user)
- (setq user-auth (plist-get
- ;; cache the search result in `found'
- (or found
- (setq found (nth 0 (apply 'auth-source-search
- search))))
- :user)))
+ (setq user-auth
+ (plist-get
+ ;; cache the search result in `found'
+ (or found
+ (setq found (nth 0 (apply #'auth-source-search
+ search))))
+ :user)))
user-auth)
((and
(eq keyword :password)
- (setq pass-auth (plist-get
- ;; cache the search result in `found'
- (or found
- (setq found (nth 0 (apply 'auth-source-search
- search))))
- :secret)))
+ (setq pass-auth
+ (plist-get
+ ;; cache the search result in `found'
+ (or found
+ (setq found (nth 0 (apply #'auth-source-search
+ search))))
+ :secret)))
;; maybe set the password to the return of the :secret function
(if (functionp pass-auth)
(setq pass-auth (funcall pass-auth))
;; find "our" movemail in exec-directory.
;; Bug#31737
(apply
- 'call-process
+ #'call-process
(append
(list
mail-source-movemail-program
#'mail-source-start-idle-timer))
;; When you get new mail, clear "Mail" from the mode line.
(add-hook 'nnmail-post-get-new-mail-hook
- 'display-time-event-handler)
+ #'display-time-event-handler)
(message "Mail check enabled"))
(setq display-time-mail-function nil)
(remove-hook 'nnmail-post-get-new-mail-hook
- 'display-time-event-handler)
+ #'display-time-event-handler)
(message "Mail check disabled"))))
(defun mail-source-fetch-maildir (source callback)
(require 'gnus-sum) ; for gnus-list-identifiers
(let ((regexp (if (stringp gnus-list-identifiers)
gnus-list-identifiers
- (mapconcat 'identity gnus-list-identifiers " *\\|"))))
+ (mapconcat #'identity gnus-list-identifiers " *\\|"))))
(if (and (not (equal regexp ""))
(string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
- " *\\)\\)+\\(Re: +\\)?\\)") subject))
+ " *\\)\\)+\\(Re: +\\)?\\)")
+ subject))
(concat (substring subject 0 (match-beginning 1))
(or (match-string 3 subject)
(match-string 5 subject))
(defun message-setup-fill-variables ()
"Setup message fill variables."
- (setq-local fill-paragraph-function 'message-fill-paragraph)
+ (setq-local fill-paragraph-function #'message-fill-paragraph)
(make-local-variable 'adaptive-fill-first-line-regexp)
(let ((quote-prefix-regexp
;; User should change message-cite-prefix-regexp if
(concat quote-prefix-regexp "\\|"
adaptive-fill-first-line-regexp)))
(setq-local auto-fill-inhibit-regexp nil)
- (setq-local normal-auto-fill-function 'message-do-auto-fill))
+ (setq-local normal-auto-fill-function #'message-do-auto-fill))
\f
;; Insert a blank line if it is peeled off.
(insert "\n"))))
(goto-char start)
- (mapc 'funcall functions)
+ (mapc #'funcall functions)
(when message-citation-line-function
(unless (bolp)
(insert "\n"))
(and message-bogus-addresses
(let ((re
(if (listp message-bogus-addresses)
- (mapconcat 'identity
+ (mapconcat #'identity
message-bogus-addresses
"\\|")
message-bogus-addresses)))
(let* ((default-directory "/")
(coding-system-for-write message-send-coding-system)
(cpr (apply
- 'call-process-region
+ #'call-process-region
(append
(list (point-min) (point-max) sendmail-program
nil errbuf nil "-oi")
(pcase
(let ((coding-system-for-write message-send-coding-system))
(apply
- 'call-process-region (point-min) (point-max)
+ #'call-process-region (point-min) (point-max)
message-qmail-inject-program nil nil nil
;; qmail-inject's default behavior is to look for addresses on the
;; command line; if there're none, it scans the headers.
"Really use %s possibly unknown group%s: %s? "
(if (= (length errors) 1) "this" "these")
(if (= (length errors) 1) "" "s")
- (mapconcat 'identity errors ", "))))
+ (mapconcat #'identity errors ", "))))
;; There were no errors.
((not errors)
t)
(cc (message-fetch-field "cc"))
(msg-recipients (concat to (and to cc ", ") cc))
(recipients
- (mapcar 'mail-strip-quoted-names
+ (mapcar #'mail-strip-quoted-names
(message-tokenize-header msg-recipients)))
(file-regexps
(if message-subscribed-address-file
(if re (setq re (concat re "\\|" item))
(setq re (concat "\\`\\(" item))))
(and re (list (concat re "\\)\\'"))))))))
- (mft-regexps (apply 'append message-subscribed-regexps
- (mapcar 'regexp-quote
+ (mft-regexps (apply #'append message-subscribed-regexps
+ (mapcar #'regexp-quote
message-subscribed-addresses)
file-regexps
- (mapcar 'funcall
+ (mapcar #'funcall
message-subscribed-address-functions))))
(save-match-data
(let ((list
(dolist (rhs
(delete-dups
(mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
- (mapcar 'downcase
+ (mapcar #'downcase
(mapcar
(lambda (elem)
(or (cadr elem)
(if to
(concat " to "
(or (car (mail-extract-address-components to))
- to) "")
+ to))
"")
(if (and group (not (string= group ""))) (concat " on " group) "")
"*")))
(if to
(concat " to "
(or (car (mail-extract-address-components to))
- to) "")
+ to))
"")
(if (and group (not (string= group ""))) (concat " on " group) "")
"*")))
(cons (string-to-number (or (match-string 1 b) "1"))
b)))
(buffer-list)))
- 'car-less-than-car)))
+ #'car-less-than-car)))
new)))))
(defun message-pop-to-buffer (name &optional switch-function)
(message-fetch-field "original-to")))
cc (message-fetch-field "cc")
extra (when message-extra-wide-headers
- (mapconcat 'identity
- (mapcar 'message-fetch-field
+ (mapconcat #'identity
+ (mapcar #'message-fetch-field
message-extra-wide-headers)
", "))
mct (message-fetch-field "mail-copies-to")
(setq recipients
(cond ((functionp message-dont-reply-to-names)
(mapconcat
- 'identity
+ #'identity
(delq nil
(mapcar (lambda (mail)
(unless (funcall message-dont-reply-to-names
;; Remove hierarchical lists that are contained within each other,
;; if message-hierarchical-addresses is defined.
(when message-hierarchical-addresses
- (let ((plain-addrs (mapcar 'car recipients))
+ (let ((plain-addrs (mapcar #'car recipients))
subaddrs recip)
(while plain-addrs
(setq subaddrs (assoc (car plain-addrs)
(with-output-to-temp-buffer " *MESSAGE information message*"
(with-current-buffer " *MESSAGE information message*"
(fundamental-mode)
- (mapc 'princ text)
+ (mapc #'princ text)
(goto-char (point-min))))
(funcall ask question))
(funcall ask question)))
(write-region (point-min) (point-max) file nil 'silent)
(setq decoder (copy-sequence decoder))
(setcar (member "%f" decoder) file)
- (apply 'call-process (car decoder) nil nil nil
+ (apply #'call-process (car decoder) nil nil nil
(append (cdr decoder) (list dir)))
(delete-file file))
- (apply 'call-process-region (point-min) (point-max) (car decoder)
+ (apply #'call-process-region (point-min) (point-max) (car decoder)
nil (gnus-get-buffer-create "*tnef*")
nil (append (cdr decoder) (list dir)))))
`("multipart/mixed"
(defvar gnus-current-window-configuration)
-(add-hook 'gnus-exit-gnus-hook 'mm-destroy-postponed-undisplay-list)
-(add-hook 'gnus-exit-gnus-hook 'mm-temp-files-delete)
+(add-hook 'gnus-exit-gnus-hook #'mm-destroy-postponed-undisplay-list)
+(add-hook 'gnus-exit-gnus-hook #'mm-temp-files-delete)
(defgroup mime-display ()
"Display of MIME in mail and news articles."
(if fails
;; Schedule the deletion of the files left at the next time.
(with-file-modes #o600
- (write-region (concat (mapconcat 'identity (nreverse fails) "\n")
+ (write-region (concat (mapconcat #'identity (nreverse fails) "\n")
"\n")
nil cache-file nil 'silent))
(when (file-exists-p cache-file)
(string= total "\"%s\""))
(setq uses-stdin nil)
(push (shell-quote-argument
- (gnus-map-function mm-path-name-rewrite-functions file)) out))
+ (gnus-map-function mm-path-name-rewrite-functions file))
+ out))
((string= total "%t")
(push (shell-quote-argument (car type-list)) out))
(t
(push (shell-quote-argument
(gnus-map-function mm-path-name-rewrite-functions file))
out))
- (mapconcat 'identity (nreverse out) "")))
+ (mapconcat #'identity (nreverse out) "")))
(defun mm-remove-parts (handles)
"Remove the displayed MIME parts represented by HANDLES."
args (append (cdr item) (list url))))
(setq program mm-url-program
args (append mm-url-arguments (list url))))
- (unless (eq 0 (apply 'call-process program nil t nil args))
+ (unless (eq 0 (apply #'call-process program nil t nil args))
(error "Couldn't fetch %s" url))))
(defvar mm-url-timeout 30
"Return the MIME charset corresponding to the given Mule CHARSET."
(let ((css (sort (sort-coding-systems
(find-coding-systems-for-charsets (list charset)))
- 'mm-sort-coding-systems-predicate))
+ #'mm-sort-coding-systems-predicate))
cs mime)
(while (and (not mime)
css)
(let ((systems (find-coding-systems-region b e)))
(when mm-coding-system-priorities
(setq systems
- (sort systems 'mm-sort-coding-systems-predicate)))
+ (sort systems #'mm-sort-coding-systems-predicate)))
(setq systems (delq 'compound-text systems))
(unless (equal systems '(undecided))
(while systems
(insert-buffer-substring cur)
(condition-case err
(progn
- (unless (memq (apply 'call-process-region
+ (unless (memq (apply #'call-process-region
(point-min) (point-max)
prog t (list t err-file) nil args)
jka-compr-acceptable-retval-list)
(write-region (point-min) (point-max) file nil 'silent))
(delete-region (point-min) (point-max))
(unwind-protect
- (apply 'call-process cmd nil t nil (mapcar 'eval args))
+ (apply #'call-process cmd nil t nil (mapcar (lambda (e) (eval e t)) args))
(delete-file file))
(and post-func (funcall post-func))))
(defun mm-inline-wash-with-stdin (post-func cmd &rest args)
(let ((coding-system-for-write 'binary))
- (apply 'call-process-region (point-min) (point-max)
+ (apply #'call-process-region (point-min) (point-max)
cmd t t nil args))
(and post-func (funcall post-func)))
handle
(mm-with-unibyte-buffer
(insert source)
- (apply 'mm-inline-wash-with-file post-func cmd args)
+ (apply #'mm-inline-wash-with-file post-func cmd args)
(buffer-string)))))
(defun mm-inline-render-with-stdin (handle post-func cmd &rest args)
handle
(mm-with-unibyte-buffer
(insert source)
- (apply 'mm-inline-wash-with-stdin post-func cmd args)
+ (apply #'mm-inline-wash-with-stdin post-func cmd args)
(buffer-string)))))
(defun mm-inline-render-with-function (handle func &rest args)
(defun mm-inline-text-html (handle)
(if (stringp (car handle))
- (mapcar 'mm-inline-text-html (cdr handle))
+ (mapcar #'mm-inline-text-html (cdr handle))
(let* ((func mm-text-html-renderer)
(entry (assq func mm-text-html-renderer-alist))
(inhibit-read-only t))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n") nil t))
(goto-char (match-end 0))
- (apply 'mml-insert-tag 'part (cons (if sign 'sign 'encrypt)
+ (apply #'mml-insert-tag 'part (cons (if sign 'sign 'encrypt)
(cons method tags))))
(t (error "The message is corrupted. No mail header separator"))))))
(concat "^" (regexp-quote mail-header-separator) "\n") nil t)
(goto-char (setq insert-loc (match-end 0)))
(unless (looking-at "<#secure")
- (apply 'mml-insert-tag
- 'secure 'method method 'mode mode tags)))
+ (apply #'mml-insert-tag
+ 'secure 'method method 'mode mode tags)))
(t (error
"The message is corrupted. No mail header separator"))))
(when (eql insert-loc (point))
(cl-assert keys)
(let* ((usage-prefs (mml-secure-cust-usage-lookup context usage))
(curr-fprs (cdr (assoc name (cdr usage-prefs))))
- (key-fprs (mapcar 'mml-secure-fingerprint keys))
+ (key-fprs (mapcar #'mml-secure-fingerprint keys))
(new-fprs (cl-union curr-fprs key-fprs :test 'equal)))
(if curr-fprs
(setcdr (assoc name (cdr usage-prefs)) new-fprs)
outdated or multiple keys."
(let* ((nname (mml-secure-normalize-cust-name name))
(fprs (mml-secure-cust-fpr-lookup context usage nname))
- (usable-fprs (mapcar 'mml-secure-fingerprint keys)))
+ (usable-fprs (mapcar #'mml-secure-fingerprint keys)))
(if fprs
(if (gnus-subsetp fprs usable-fprs)
(mml-secure-filter-keys keys fprs)
(and from (smime-get-key-by-email from)))
(smime-get-key-by-email
(gnus-completing-read "Sign this part with what signature"
- (mapcar 'car smime-keys) nil nil nil
+ (mapcar #'car smime-keys) nil nil nil
(and (listp (car-safe smime-keys))
(caar smime-keys))))))))
(point-min) (point))
addresses)))
(delete-region (point-min) (point)))
- (setq addresses (mapcar 'downcase addresses))))
+ (setq addresses (mapcar #'downcase addresses))))
(if (not (member (downcase (or (mm-handle-multipart-from ctl) ""))
addresses))
(mm-sec-error 'gnus-info "Sender address forged")
(concat "Sender claimed to be: " (mm-handle-multipart-from ctl) "\n"
(if addresses
(concat "Addresses in certificate: "
- (mapconcat 'identity addresses ", "))
+ (mapconcat #'identity addresses ", "))
"No addresses found in certificate. (Requires OpenSSL 0.9.6 or later.)")
"\n" "\n"
"OpenSSL output:\n"
(defun mml-destroy-buffers ()
(let (kill-buffer-hook)
- (mapc 'kill-buffer mml-buffer-list)
- (setq mml-buffer-list nil)))
+ (mapc #'kill-buffer (prog1 mml-buffer-list
+ (setq mml-buffer-list nil)))))
(defun mml-parse ()
"Parse the current buffer as an MML document."
content-type)
(setcdr (assq 'type (cdr (car cont))) content-type))
(when (fboundp 'libxml-parse-html-region)
- (setq cont (mapcar 'mml-expand-all-html-into-multipart-related cont)))
+ (setq cont (mapcar #'mml-expand-all-html-into-multipart-related cont)))
(prog1
(with-temp-buffer
(set-buffer-multibyte nil)
(cl-incf mml-multipart-number)))
(throw 'not-unique nil))))
((eq (car cont) 'multipart)
- (mapc 'mml-compute-boundary-1 (cddr cont))))
+ (mapc #'mml-compute-boundary-1 (cddr cont))))
t)
(defun mml-make-boundary (number)
(goto-char (point-max))
(insert "<#/mml>\n"))
((stringp (car handle))
- (mapc 'mml-insert-mime (cdr handle))
+ (mapc #'mml-insert-mime (cdr handle))
(insert "<#/multipart>\n"))
(textp
(let ((charset (mail-content-type-get
group action server)))
nil)
-(deffoo nnagent-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnagent-retrieve-headers (articles &optional group _server fetch-old)
(let ((file (gnus-agent-article-name ".overview" group))
arts n first)
(save-excursion
(gnus-agent-load-alist group)
(setq arts (gnus-sorted-difference
- articles (mapcar 'car gnus-agent-article-alist)))
+ articles (mapcar #'car gnus-agent-article-alist)))
;; Assume that articles with smaller numbers than the first one
;; Agent knows are gone.
(setq first (caar gnus-agent-article-alist))
(nndiary-possibly-change-directory group server)
(let ((articles (nnheader-directory-articles nndiary-current-directory)))
(when articles
- (setcar active (apply 'min articles))
- (setcdr active (apply 'max articles))))
+ (setcar active (apply #'min articles))
+ (setcdr active (apply #'max articles))))
(nnmail-save-active nndiary-group-alist nndiary-active-file)
(run-hook-with-args 'nndiary-request-create-group-functions
(gnus-group-prefixed-name group
(let ((active (nth 1 (assoc group nndiary-group-alist))))
(when active
(setcar active (or (and active-articles
- (apply 'min active-articles))
+ (apply #'min active-articles))
(1+ (cdr active)))))
(nnmail-save-active nndiary-group-alist nndiary-active-file))
(nndiary-save-nov)
(setq nndiary-article-file-alist
(sort
(nnheader-article-to-file-alist nndiary-current-directory)
- 'car-less-than-car)))
+ #'car-less-than-car)))
(setq active
(if nndiary-article-file-alist
(cons (caar nndiary-article-file-alist)
(nndiary-generate-nov-databases-1 dir seen))))
;; Do this directory.
(let ((nndiary-files (sort (nnheader-article-to-file-alist dir)
- 'car-less-than-car)))
+ #'car-less-than-car)))
(if (not nndiary-files)
(let* ((group (nnheader-file-to-group
(directory-file-name dir) nndiary-directory))
(defun nndiary-unflatten (spec)
;; opposite of flatten: build ranges if possible
- (setq spec (sort spec '<))
+ (setq spec (sort spec #'<))
(let (min max res)
(while (setq min (pop spec))
(setq max min)
(apply #'encode-time 0 0 0 1 1 (nthcdr 5 date-elts))
(* (car reminder) 400861056))))
res))
- (sort res 'time-less-p)))
+ (sort res #'time-less-p)))
(defun nndiary-last-occurrence (sched)
;; Returns the last occurrence of schedule SCHED as an Emacs time struct, or
;; bored in finding a good algorithm for doing that ;-)
;; ### FIXME: remove identical entries.
(let ((dom-list (nth 2 sched))
- (month-list (sort (nndiary-flatten (nth 3 sched) 1 12) '>))
- (year-list (sort (nndiary-flatten (nth 4 sched) 1971) '>))
+ (month-list (sort (nndiary-flatten (nth 3 sched) 1 12) #'>))
+ (year-list (sort (nndiary-flatten (nth 4 sched) 1971) #'>))
(dow-list (nth 5 sched)))
;; Special case: an asterisk in one of the days specifications means
;; that only the other should be taken into account. If both are
(setq day (+ 7 day))))
;; Finally, if we have some days, they are valid
(when days
- (sort days '>)
+ (sort days #'>)
(throw 'found
(encode-time 0 minute hour
(car days) month year time-zone)))
(this-day (decoded-time-day today))
(this-month (decoded-time-month today))
(this-year (decoded-time-year today))
- (minute-list (sort (nndiary-flatten (nth 0 sched) 0 59) '<))
- (hour-list (sort (nndiary-flatten (nth 1 sched) 0 23) '<))
+ (minute-list (sort (nndiary-flatten (nth 0 sched) 0 59) #'<))
+ (hour-list (sort (nndiary-flatten (nth 1 sched) 0 23) #'<))
(dom-list (nth 2 sched))
- (month-list (sort (nndiary-flatten (nth 3 sched) 1 12) '<))
+ (month-list (sort (nndiary-flatten (nth 3 sched) 1 12) #'<))
(years (if (nth 4 sched)
- (sort (nndiary-flatten (nth 4 sched) 1971) '<)
+ (sort (nndiary-flatten (nth 4 sched) 1971) #'<)
t))
(dow-list (nth 5 sched))
(year (1- this-year))
;; Aaaaaaall right. Now we have a valid list of DAYS for
;; this month and this year.
(when days
- (setq days (sort days '<))
+ (setq days (sort days #'<))
;; Remove past days for this year and this month.
(and (= year this-year)
(= month this-month)
(setq result nil))))
(unless (or result results)
(error "Document is not of any recognized type"))
- (if result
- (car entry)
- (cadar (last (sort results 'car-less-than-car))))))
+ (car (if result
+ entry
+ (cdar (last (sort results #'car-less-than-car)))))))
;;;
;;; Built-in type predicates and functions
(setq buffer-file-name (expand-file-name file)
buffer-auto-save-file-name (make-auto-save-file-name))
(clear-visited-file-modtime)
- (add-hook 'write-contents-functions 'nndraft-generate-headers nil t)
- (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t)
+ (add-hook 'write-contents-functions #'nndraft-generate-headers nil t)
+ (add-hook 'after-save-hook #'nndraft-update-unread-articles nil t)
(message-add-action '(nndraft-update-unread-articles)
'exit 'postpone 'kill)
article))
(nnheader-concat nndraft-directory group))))
(defun nndraft-article-filename (article &rest args)
- (apply 'concat
+ (apply #'concat
(file-name-as-directory nndraft-current-directory)
(int-to-string article)
args))
"Return the list of messages in the group."
(gnus-make-directory nndraft-current-directory)
(sort
- (mapcar 'string-to-number
+ (mapcar #'string-to-number
(directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t))
- '<))
+ #'<))
(nnoo-import nndraft
(nnmh
'nov
(setq articles (gnus-sorted-intersection
;; Is ARTICLES sorted?
- (sort articles '<)
+ (sort articles #'<)
(nnfolder-existing-articles)))
(while (setq article (pop articles))
(set-buffer nnfolder-current-buffer)
(defun nnheader-write-overview-file (file headers)
"Write HEADERS to FILE."
(with-temp-file file
- (mapcar 'nnheader-insert-nov headers)))
+ (mapcar #'nnheader-insert-nov headers)))
(defun nnheader-insert-header (header)
(insert
(defun nnheader-directory-files-safe (&rest args)
"Execute `directory-files' twice and returns the longer result."
- (let ((first (apply 'directory-files args))
- (second (apply 'directory-files args)))
+ (let ((first (apply #'directory-files args))
+ (second (apply #'directory-files args)))
(if (> (length first) (length second))
first
second)))
(defun nnheader-directory-articles (dir)
"Return a list of all article files in directory DIR."
- (mapcar 'nnheader-file-to-number
+ (mapcar #'nnheader-file-to-number
(if nnheader-directory-files-is-safe
(directory-files
dir nil nnheader-numerical-short-files t)
(set (intern (format "%s-status-string" backend))
(if (< (length args) 2)
(car args)
- (apply 'format args)))
+ (apply #'format args)))
nil)
(defun nnheader-get-report-string (backend)
(with-current-buffer nntp-server-buffer
(erase-buffer)
(if (string-match "%" format)
- (insert (apply 'format format args))
- (apply 'insert format args))
+ (insert (apply #'format format args))
+ (apply #'insert format args))
t))
(defsubst nnheader-replace-chars-in-string (string from to)
(defun nnheader-message (level &rest args)
"Message if the Gnus backends are talkative."
- (if (or (not (numberp gnus-verbose-backends))
- (<= level gnus-verbose-backends))
- (if gnus-add-timestamp-to-message
- (apply 'gnus-message-with-timestamp args)
- (apply 'message args))
- (apply 'format args)))
+ (apply (cond
+ ((and (numberp gnus-verbose-backends)
+ (> level gnus-verbose-backends))
+ #'format)
+ (gnus-add-timestamp-to-message #'gnus-message-with-timestamp)
+ (t #'message))
+ args))
(defun nnheader-be-verbose (level)
"Return whether the backends should be verbose on LEVEL."
(defun nnheader-concat (dir &rest files)
"Concat DIR as directory to FILES."
- (apply 'concat (file-name-as-directory dir) files))
+ (apply #'concat (file-name-as-directory dir) files))
(defun nnheader-ms-strip-cr ()
"Strip ^M from the end of all lines."
(setq path (cdr path))))
(if (or first (not (cdr results)))
(car results)
- (car (sort results 'file-newer-than-file-p)))))
+ (car (sort results #'file-newer-than-file-p)))))
(defvar ange-ftp-path-format)
(defvar efs-path-regexp)
"Open a file with some variables bound.
See `find-file-noselect' for the arguments."
(cl-letf* ((format-alist nil)
- (auto-mode-alist (mm-auto-mode-alist))
- ((default-value 'major-mode) 'fundamental-mode)
- (enable-local-variables nil)
- (after-insert-file-functions nil)
- (enable-local-eval nil)
- (coding-system-for-read nnheader-file-coding-system)
- (version-control 'never)
- (find-file-hook nil))
- (apply 'find-file-noselect args)))
+ (auto-mode-alist (mm-auto-mode-alist))
+ ((default-value 'major-mode) 'fundamental-mode)
+ (enable-local-variables nil)
+ (after-insert-file-functions nil)
+ (enable-local-eval nil)
+ (coding-system-for-read nnheader-file-coding-system)
+ (version-control 'never)
+ (find-file-hook nil))
+ (apply #'find-file-noselect args)))
(defun nnheader-directory-regular-files (dir)
"Return a list of all regular files in DIR."
(defun nnheader-directory-files (&rest args)
"Same as `directory-files', but prune \".\" and \"..\"."
- (let ((files (apply 'directory-files args))
+ (let ((files (apply #'directory-files args))
out)
(while files
(unless (member (file-name-nondirectory (car files)) '("." ".."))
(let ((now (current-time)))
(when (time-less-p 1 (time-subtract now nnheader-last-message-time))
(setq nnheader-last-message-time now)
- (apply 'nnheader-message args))))
+ (apply #'nnheader-message args))))
(make-obsolete-variable 'nnheader-load-hook
"use `with-eval-after-load' instead." "28.1")
"Remove list identifiers from Subject headers."
(let ((regexp
(if (consp nnmail-list-identifiers)
- (mapconcat 'identity nnmail-list-identifiers " *\\|")
+ (mapconcat #'identity nnmail-list-identifiers " *\\|")
nnmail-list-identifiers)))
(when regexp
(goto-char (point-min))
(when (re-search-forward "^\\(In-Reply-To:[^\n]+\\)\n[ \t]+" nil t)
(replace-match "\\1" t))))
-(defalias 'nnmail-fix-eudora-headers 'nnmail-ignore-broken-references)
-(make-obsolete 'nnmail-fix-eudora-headers 'nnmail-ignore-broken-references "Emacs 23.1")
+(defalias 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references)
+(make-obsolete 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references "Emacs 23.1")
(custom-add-option 'nnmail-prepare-incoming-header-hook
'nnmail-ignore-broken-references)
expanded))))
(setq pos (1+ pos)))
(if did-expand
- (apply 'concat (nreverse expanded))
+ (apply #'concat (nreverse expanded))
newtext)))
;; Activate a backend only if it isn't already activated.
(gnus-methods-equal-p gnus-command-method
(nnmail-cache-primary-mail-backend)))
(let ((regexp (if (consp nnmail-cache-ignore-groups)
- (mapconcat 'identity nnmail-cache-ignore-groups
+ (mapconcat #'identity nnmail-cache-ignore-groups
"\\|")
nnmail-cache-ignore-groups)))
(unless (and regexp (string-match regexp grp))
(defvar nnmail-fetched-sources nil)
(defun nnmail-get-value (&rest args)
- (let ((sym (intern (apply 'format args))))
+ (let ((sym (intern (apply #'format args))))
(when (boundp sym)
(symbol-value sym))))
(new-flags
(concat (gnus-delete-duplicates
;; maildir flags must be sorted
- (sort (cons flag flags-as-list) '<)))))
+ (sort (cons flag flags-as-list) #'<)))))
(concat ":2," new-flags)))
(defun nnmaildir--remove-flag (flag suffix)
(write-region "" nil file nil 'no-message))
(defun nnmaildir--delete-dir-files (dir ls)
(when (file-attributes dir)
- (mapc 'delete-file (funcall ls dir 'full "\\`[^.]" 'nosort))
+ (mapc #'delete-file (funcall ls dir 'full "\\`[^.]" 'nosort))
(delete-directory dir)))
(defun nnmaildir--group-maxnum (server group)
file))
files)
files (delq nil files)
- files (mapcar 'nnmaildir--parse-filename files)
- files (sort files 'nnmaildir--sort-files))
+ files (mapcar #'nnmaildir--parse-filename files)
+ files (sort files #'nnmaildir--sort-files))
(dolist (file files)
(setq file (if (consp file) file (aref file 3))
x (make-nnmaildir--art :prefix (car file) :suffix (cdr file)))
always-marks (nnmaildir--param pgname 'always-marks)
never-marks (nnmaildir--param pgname 'never-marks)
existing (nnmaildir--grp-nlist group)
- existing (mapcar 'car existing)
+ existing (mapcar #'car existing)
existing (nreverse existing)
existing (gnus-compress-sequence existing 'always-list)
missing (list (cons 1 (nnmaildir--group-maxnum
;; get mark names from mark dirs and from flag
;; mappings
(append
- (mapcar 'cdr nnmaildir-flag-mark-mapping)
- (mapcar 'intern (funcall ls dir nil "\\`[^.]" 'nosort))))
+ (mapcar #'cdr nnmaildir-flag-mark-mapping)
+ (mapcar #'intern (funcall ls dir nil "\\`[^.]" 'nosort))))
new-mmth (make-hash-table :size (length all-marks))
old-mmth (nnmaildir--grp-mmth group))
(dolist (mark all-marks)
(let ((article (nnmaildir--flist-art flist prefix)))
(when article
(push (nnmaildir--art-num article) article-list))))))
- (setq ranges (gnus-add-to-range ranges (sort article-list '<)))))
+ (setq ranges (gnus-add-to-range ranges (sort article-list #'<)))))
(if (eq mark 'read) (setq read ranges)
(if ranges (setq marks (cons (cons mark ranges) marks)))))
(setf (gnus-info-read info) (gnus-range-add read missing))
;; get mark names from mark dirs and from flag
;; mappings
(append
- (mapcar 'cdr nnmaildir-flag-mark-mapping)
- (mapcar 'intern all-marks))))
+ (mapcar #'cdr nnmaildir-flag-mark-mapping)
+ (mapcar #'intern all-marks))))
(dolist (action actions)
(setq ranges (car action)
todo-marks (caddr action))
(define-key gnus-summary-mode-map
(kbd "G G u") 'nnmairix-remove-tick-mark-original-article))
-(add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook)
-(add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook)
+(add-hook 'gnus-group-mode-hook #'nnmairix-group-mode-hook)
+(add-hook 'gnus-summary-mode-hook #'nnmairix-summary-mode-hook)
;; ;;;###autoload
;; (defun nnmairix-initialize (&optional force)
;; (if (not (or (file-readable-p "~/.mairixrc")
;; force))
;; (message "No file `~/.mairixrc', skipping nnmairix setup")
-;; (add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook)
-;; (add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook)))
+;; (add-hook 'gnus-group-mode-hook #'nnmairix-group-mode-hook)
+;; (add-hook 'gnus-summary-mode-hook #'nnmairix-summary-mode-hook)))
;; Customizable stuff
(setq finished (not (y-or-n-p "Add another search query? "))
achar nil))
(nnmairix-search
- (mapconcat 'identity query " ")
+ (mapconcat #'identity query " ")
(car (nnmairix-get-server))
(y-or-n-p "Include whole threads? "))))
(setq group (read-string "Group name: "))
(set-buffer gnus-summary-buffer)
(message "Creating group %s on server %s with query %s." group
- (gnus-method-to-server server) (mapconcat 'identity query " "))
+ (gnus-method-to-server server) (mapconcat #'identity query " "))
(nnmairix-create-search-group server group query threads)))
(defun nnmairix-create-server-and-default-group ()
(if (eq (car method) 'nnmairix)
(progn
(when (listp oldquery)
- (setq oldquery (mapconcat 'identity oldquery " ")))
+ (setq oldquery (mapconcat #'identity oldquery " ")))
(setq query (or query
(read-string "New query: " oldquery)))
(when (stringp query)
(if (> (length commandsplit) 1)
(setq args (append args (cdr commandsplit) nnmairix-mairix-update-options))
(setq args (append args nnmairix-mairix-update-options)))
- (apply 'call-process args)
+ (apply #'call-process args)
(nnheader-message 7 "Updating mairix database for %s... done" cur))
(progn
(setq args (append (list cur (get-buffer nnmairix-mairix-output-buffer)
(if (> (length commandsplit) 1)
(setq args (append args (cdr commandsplit) nnmairix-mairix-update-options))
(setq args (append args nnmairix-mairix-update-options)))
- (set-process-sentinel (apply 'start-process args)
+ (set-process-sentinel (apply #'start-process args)
'nnmairix-sentinel-mairix-update-finished))))))
(defun nnmairix-group-delete-recreate-this-group ()
(setq args (append args '("-c"))))
(when threads
(setq args (append args '("-t"))))
- (apply 'call-process
+ (apply #'call-process
(append args (list "-o" folder) searchquery)))))
(defun nnmairix-call-mairix-binary-raw (command query)
(when (> (length command) 1)
(setq args (append args (cdr command))))
(setq args (append args '("-r")))
- (apply 'call-process
+ (apply #'call-process
(append args query)))))
(defun nnmairix-get-server ()
nnmairix with nnml backends."
(let* ((files
(sort
- (mapcar 'string-to-number
+ (mapcar #'string-to-number
(directory-files path nil "[0-9]+" t))
- '<))
+ #'<))
(lastplusone (car files))
(path (file-name-as-directory path)))
(dolist (cur files)
(let* ((commandsplit (split-string nnmairix-mairix-command))
(args (append (list (car commandsplit))
'(nil t nil) (cdr commandsplit) '("-V"))))
- (apply 'call-process args)
+ (apply #'call-process args)
(goto-char (point-min))
(re-search-forward "mairix.*")
(match-string 0))))
(when (not (zerop (length flag)))
(push (concat "F:" flag) query)))
;; return query string
- (mapconcat 'identity query " ")))
+ (mapconcat #'identity query " ")))
(defun nnmairix-widget-create-query (&optional values)
"Add a widget NAME with optional ARGS."
(push
(list name
- (apply 'widget-create args))
+ (apply #'widget-create args))
nnmairix-widgets))
(defun nnmairix-widget-toggle-activate (widget)
(nnheader-re-read-dir pathname)
(setq dir
(sort
- (mapcar 'string-to-number
+ (mapcar #'string-to-number
(directory-files pathname nil "\\`[0-9]+\\'" t))
- '<))
+ #'<))
(cond
(dir
(setq nnmh-group-alist
nnmh-group-alist)
(nnmh-possibly-create-directory group)
(nnmh-possibly-change-directory group server)
- (let ((articles (mapcar 'string-to-number
+ (let ((articles (mapcar #'string-to-number
(directory-files
nnmh-current-directory nil "\\`[0-9]+\\'"))))
(when articles
- (setcar active (apply 'min articles))
- (setcdr active (apply 'max articles))))))
+ (setcar active (apply #'min articles))
+ (setcdr active (apply #'max articles))))))
t)
(deffoo nnmh-request-delete-group (group &optional force server)
(gnus-make-directory dir))
;; Find the highest number in the group.
(let ((files (sort
- (mapcar 'string-to-number
+ (mapcar #'string-to-number
(directory-files dir nil "\\`[0-9]+\\'"))
- '>)))
+ #'>)))
(when files
(setcdr active (car files)))))
(setcdr active (1+ (cdr active)))
;; articles in this folder. The articles that are "new" will be
;; marked as unread by Gnus.
(let* ((dir nnmh-current-directory)
- (files (sort (mapcar 'string-to-number
+ (files (sort (mapcar #'string-to-number
(directory-files nnmh-current-directory
nil "\\`[0-9]+\\'" t))
- '<))
+ #'<))
(nnmh-file (concat dir ".nnmh-articles"))
new articles)
;; Load the .nnmh-articles file.
(when new
(gnus-make-articles-unread
(gnus-group-prefixed-name group (list 'nnmh ""))
- (setq new (sort new '<))))
+ (setq new (sort new #'<))))
;; Sort the article list with highest numbers first.
(setq articles (sort articles (lambda (art1 art2)
(> (car art1) (car art2)))))
(let* ((file-name-coding-system nnmail-pathname-coding-system)
(articles (nnml-directory-articles nnml-current-directory)))
(when articles
- (setcar active (apply 'min articles))
- (setcdr active (apply 'max articles))))
+ (setcar active (apply #'min articles))
+ (setcdr active (apply #'max articles))))
(nnmail-save-active nnml-group-alist nnml-active-file)
t))))
article rest mod-time number target)
(nnmail-activate 'nnml)
- (setq active-articles (sort active-articles '<))
+ (setq active-articles (sort active-articles #'<))
;; Articles not listed in active-articles are already gone,
;; so don't try to expire them.
(setq articles (gnus-sorted-intersection articles active-articles))
(let ((active (nth 1 (assoc-string group nnml-group-alist))))
(when active
(setcar active (or (and active-articles
- (apply 'min active-articles))
+ (apply #'min active-articles))
(1+ (cdr active)))))
(nnmail-save-active nnml-group-alist nnml-active-file))
(nnml-save-nov)
(setq nnml-article-file-alist
(sort
(nnml-current-group-article-to-file-alist)
- 'car-less-than-car)))
+ #'car-less-than-car)))
(setq active
(if nnml-article-file-alist
(cons (caar nnml-article-file-alist)
(nnml-generate-nov-databases-directory dir seen)))
;; Do this directory.
(let ((nnml-files (sort (nnheader-article-to-file-alist dir)
- 'car-less-than-car)))
+ #'car-less-than-car)))
(if (not nnml-files)
(let* ((group (nnheader-file-to-group
(directory-file-name dir) nnml-directory))
(unless nnml-article-file-alist
(setq nnml-article-file-alist
(sort (nnml-current-group-article-to-file-alist)
- 'car-less-than-car)))
+ #'car-less-than-car)))
(if (not nnml-article-file-alist)
;; The group is empty: do nothing but return t
t
(defun nnrss-node-just-text (node)
(if (and node (listp node))
- (mapconcat 'nnrss-node-just-text (cddr node) " ")
+ (mapconcat #'nnrss-node-just-text (cddr node) " ")
node))
(defun nnrss-find-el (tag data &optional found-list)
"Compress ARTLIST."
(let (selection)
(pcase-dolist (`(,artgroup . ,arts)
- (nnselect-categorize artlist 'nnselect-artitem-group))
+ (nnselect-categorize artlist #'nnselect-artitem-group))
(let (list)
(pcase-dolist (`(,rsv . ,articles)
(nnselect-categorize
- arts 'nnselect-artitem-rsv 'nnselect-artitem-number))
- (push (cons rsv (gnus-compress-sequence (sort articles '<)))
+ arts #'nnselect-artitem-rsv #'nnselect-artitem-number))
+ (push (cons rsv (gnus-compress-sequence (sort articles #'<)))
list))
(push (cons artgroup list) selection)))
selection))
(define-inline ids-by-group (articles)
(inline-quote
- (nnselect-categorize ,articles 'nnselect-article-group
- 'nnselect-article-id)))
+ (nnselect-categorize ,articles #'nnselect-article-group
+ #'nnselect-article-id)))
(define-inline numbers-by-group (articles &optional type)
(inline-quote
(cond
((eq ,type 'range)
(nnselect-categorize (gnus-uncompress-range ,articles)
- 'nnselect-article-group 'nnselect-article-number))
+ #'nnselect-article-group #'nnselect-article-number))
((eq ,type 'tuple)
(nnselect-categorize ,articles
#'(lambda (elem)
(nnselect-article-group (car elem)))
#'(lambda (elem)
(cons (nnselect-article-number
- (car elem)) (cdr elem)))))
+ (car elem))
+ (cdr elem)))))
(t
(nnselect-categorize ,articles
- 'nnselect-article-group 'nnselect-article-number)))))
+ #'nnselect-article-group
+ #'nnselect-article-number)))))
(defmacro nnselect-add-prefix (group)
"Ensures that the GROUP has an nnselect prefix."
headers)
(with-current-buffer nntp-server-buffer
(pcase-dolist (`(,artgroup . ,artids) gartids)
- (let ((artlist (sort (mapcar 'cdr artids) '<))
+ (let ((artlist (sort (mapcar #'cdr artids) #'<))
(gnus-override-method (gnus-find-method-for-group artgroup))
(fetch-old
(or
(list
(gnus-method-to-server
(gnus-find-method-for-group
- (nnselect-article-group x)))) servers :test 'equal)))
+ (nnselect-article-group x))))
+ servers :test 'equal)))
(gnus-articles-in-thread thread)))))
(setq servers (list (list server))))
(setq artlist
(if force
(let (not-expired)
(pcase-dolist (`(,artgroup . ,artids) (ids-by-group articles))
- (let ((artlist (sort (mapcar 'cdr artids) '<)))
+ (let ((artlist (sort (mapcar #'cdr artids) #'<)))
(unless (gnus-check-backend-function 'request-expire-articles
artgroup)
(error "Group %s does not support article expiration" artgroup))
(gnus-request-expire-articles
artlist artgroup force)))
not-expired)))
- (sort (delq nil not-expired) '<))
+ (sort (delq nil not-expired) #'<))
articles))
(mapcar
(lambda (artgroup)
(list (car artgroup)
- (gnus-compress-sequence (sort (cdr artgroup) '<))
+ (gnus-compress-sequence (sort (cdr artgroup) #'<))
action marks))
(numbers-by-group range 'range))))
actions)
- 'car 'cdr)))
+ #'car #'cdr)))
(deffoo nnselect-request-update-info (group info &optional _server)
(let* ((group (nnselect-add-prefix group))
new-nnselect-artlist)
(setq headers
(gnus-fetch-headers
- (append (sort old-arts '<)
- (number-sequence first last)) nil t))
+ (append (sort old-arts #'<)
+ (number-sequence first last))
+ nil t))
(gnus-group-set-parameter
group
'nnselect-artlist
(gnus-remove-from-range
old-unread
(cdr (assoc artgroup select-reads)))
- (sort (cdr (assoc artgroup select-unreads)) '<))))
+ (sort (cdr (assoc artgroup select-unreads)) #'<))))
(gnus-get-unread-articles-in-group
group-info (gnus-active artgroup) t)
(gnus-group-update-group artgroup t t)))))))
;; Yes, completely empty spool directories *are* possible.
;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu>
(when (setq dir (directory-files pathname nil "\\`[0-9]+\\'" t))
- (setq dir (sort (mapcar 'string-to-number dir) '<)))
+ (setq dir (sort (mapcar #'string-to-number dir) #'<)))
(if dir
(nnheader-insert
"211 %d %d %d %s\n" (length dir) (car dir)
(buf (current-buffer))
(proc
(condition-case err
- (apply 'start-process "*nnspool inews*" inews-buffer
+ (apply #'start-process "*nnspool inews*" inews-buffer
nnspool-inews-program nnspool-inews-switches)
(error
(nnheader-report 'nnspool "inews error: %S" err)))))
(<= last (car arts)))
(pop arts))
;; The articles in `arts' are missing from the buffer.
- (mapc 'nnspool-insert-nov-head arts)
+ (mapc #'nnspool-insert-nov-head arts)
t))))))))))
(defun nnspool-insert-nov-head (article)
group article))
(gnus-uncompress-range
(gnus-group-expire-articles-1 group))))))
- (sort (delq nil unexpired) '<)))
+ (sort (delq nil unexpired) #'<)))
\f
;;; Internal functions.
(let* ((dependencies (make-hash-table :test #'equal))
(headers (gnus-get-newsgroup-headers dependencies)))
(erase-buffer)
- (mapc 'nnheader-insert-nov headers))))
+ (mapc #'nnheader-insert-nov headers))))
(defun nnvirtual-update-xref-header (group article prefix sysname)
"Merge many sorted lists of numbers."
(if (null (cdr lists))
(car lists)
- (sort (apply 'nconc lists) '<)))
+ (sort (apply #'nconc lists) #'<)))
;; We map between virtual articles and real articles in a manner
the result."
(when (numberp (cdr-safe articles))
(setq articles (list articles)))
- (let ((carticles (mapcar 'list nnvirtual-component-groups))
+ (let ((carticles (mapcar #'list nnvirtual-component-groups))
a i j article entry)
(while (setq a (pop articles))
(if (atom a)
;; Now that the mapping tables are generated, we can convert
;; and combine the separate component unreads and marks lists
;; into single lists of virtual article numbers.
- (setq unreads (apply 'nnvirtual-merge-sorted-lists
+ (setq unreads (apply #'nnvirtual-merge-sorted-lists
(mapcar (lambda (x)
(nnvirtual-reverse-map-sequence
(car x) (cdr x)))
(cons (cdr type)
(gnus-compress-sequence
(apply
- 'nnvirtual-merge-sorted-lists
+ #'nnvirtual-merge-sorted-lists
(mapcar (lambda (x)
(nnvirtual-reverse-map-sequence
(car x)
;; Return the articles in the right order.
(nnheader-message 7 "Searching google...done")
(setq nnweb-articles
- (sort nnweb-articles 'car-less-than-car))))))
+ (sort nnweb-articles #'car-less-than-car))))))
(defun nnweb-google-search (search)
(mm-url-insert
(forward-line 1)))
(nnheader-message 7 "Searching Gmane...done")
(setq nnweb-articles
- (sort (nconc nnweb-articles map) 'car-less-than-car)))))
+ (sort (nconc nnweb-articles map) #'car-less-than-car)))))
(defun nnweb-gmane-wash-article ()
(let ((case-fold-search t))
(nth 1 parse)
" "))
(insert ">\n")
- (mapc 'nnweb-insert-html (nth 2 parse))
+ (mapc #'nnweb-insert-html (nth 2 parse))
(insert "</" (symbol-name (car parse)) ">\n")))
(defun nnweb-parse-find (type parse &optional maxdepth)
(set-default symbol value)
(setq smiley-data-directory (smiley-directory))
(smiley-update-cache))
- :initialize 'custom-initialize-default
- :version "23.1" ;; No Gnus
- :group 'smiley)
+ :initialize #'custom-initialize-default
+ :version "23.1") ;; No Gnus
;; For compatibility, honor the variable `smiley-data-directory' if the user
;; has set it.
:set (lambda (symbol value)
(set-default symbol value)
(smiley-update-cache))
- :initialize 'custom-initialize-default
- :type 'directory
- :group 'smiley)
+ :initialize #'custom-initialize-default
+ :type 'directory)
(defcustom smiley-emoji-regexp-alist
'(("\\(;-)\\)\\W" 1 "😉")
:set (lambda (symbol value)
(set-default symbol value)
(smiley-update-cache))
- :initialize 'custom-initialize-default
- :group 'smiley)
+ :initialize #'custom-initialize-default)
;; The XEmacs version has a baroque, if not rococo, set of these.
(defcustom smiley-regexp-alist
:set (lambda (symbol value)
(set-default symbol value)
(smiley-update-cache))
- :initialize 'custom-initialize-default
- :group 'smiley)
+ :initialize #'custom-initialize-default)
(defcustom gnus-smiley-file-types
(let ((types (list "pbm")))
types)
"List of suffixes on smiley file names to try."
:version "24.1"
- :type '(repeat string)
- :group 'smiley)
+ :type '(repeat string))
(defvar smiley-cached-regexp-alist nil)
(setenv "GNUS_SMIME_PASSPHRASE" passphrase))
(prog1
(when (prog1
- (apply 'smime-call-openssl-region b e (list buffer tmpfile)
+ (apply #'smime-call-openssl-region b e (list buffer tmpfile)
"smime" "-sign" "-signer" (expand-file-name keyfile)
(append
(smime-make-certfiles certfiles)
(tmpfile (make-temp-file "smime")))
(prog1
(when (prog1
- (apply 'smime-call-openssl-region b e (list buffer tmpfile)
+ (apply #'smime-call-openssl-region b e (list buffer tmpfile)
"smime" "-encrypt" smime-encrypt-cipher
- (mapcar 'expand-file-name certfiles))
+ (mapcar #'expand-file-name certfiles))
(with-current-buffer smime-details-buffer
(insert-file-contents tmpfile)
(delete-file tmpfile)))
(with-temp-buffer
(let ((result-buffer (current-buffer)))
(with-current-buffer input-buffer
- (if (apply 'smime-call-openssl-region b e (list result-buffer
+ (if (apply #'smime-call-openssl-region b e (list result-buffer
smime-details-buffer)
"smime" "-verify" "-out" "-" CAs)
(with-current-buffer result-buffer
Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'."
(smime-new-details-buffer)
- (if (apply 'smime-call-openssl-region b e (list smime-details-buffer t)
+ (if (apply #'smime-call-openssl-region b e (list smime-details-buffer t)
"smime" "-verify" "-noverify" "-out" `(,null-device))
t
(insert-buffer-substring smime-details-buffer)
(if passphrase
(setenv "GNUS_SMIME_PASSPHRASE" passphrase))
(if (prog1
- (apply 'smime-call-openssl-region b e
+ (apply #'smime-call-openssl-region b e
(list buffer tmpfile)
"smime" "-decrypt" "-recip" (expand-file-name keyfile)
(if passphrase
the Agent is unplugged, and will be submitted in a batch when the
Agent is plugged."
(interactive)
- (add-hook 'gnus-agent-plugged-hook 'spam-report-plug-agent)
- (add-hook 'gnus-agent-unplugged-hook 'spam-report-unplug-agent))
+ (add-hook 'gnus-agent-plugged-hook #'spam-report-plug-agent)
+ (add-hook 'gnus-agent-unplugged-hook #'spam-report-unplug-agent))
;;;###autoload
(defun spam-report-deagentize ()
Spam reports will be queued with the method used when
\\[spam-report-agentize] was run."
(interactive)
- (remove-hook 'gnus-agent-plugged-hook 'spam-report-plug-agent)
- (remove-hook 'gnus-agent-unplugged-hook 'spam-report-unplug-agent))
+ (remove-hook 'gnus-agent-plugged-hook #'spam-report-plug-agent)
+ (remove-hook 'gnus-agent-unplugged-hook #'spam-report-unplug-agent))
(defun spam-report-plug-agent ()
"Adjust spam report settings for plugged state.
Add user supplied modifications if supplied."
(interactive) ; helps in debugging.
(setq spam-stat-score-data (spam-stat-buffer-words-with-scores))
- (let* ((probs (mapcar 'cadr spam-stat-score-data))
+ (let* ((probs (mapcar #'cadr spam-stat-score-data))
(prod (apply #'* probs))
(score0
(/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x))
"Install the spam-stat function hooks."
(interactive)
(add-hook 'nnmail-prepare-incoming-message-hook
- 'spam-stat-store-current-buffer)
+ #'spam-stat-store-current-buffer)
(add-hook 'gnus-select-article-hook
- 'spam-stat-store-gnus-article-buffer))
+ #'spam-stat-store-gnus-article-buffer))
(defun spam-stat-unload-hook ()
"Uninstall the spam-stat function hooks."
(interactive)
(remove-hook 'nnmail-prepare-incoming-message-hook
- 'spam-stat-store-current-buffer)
+ #'spam-stat-store-current-buffer)
(remove-hook 'gnus-select-article-hook
- 'spam-stat-store-gnus-article-buffer))
+ #'spam-stat-store-gnus-article-buffer))
-(add-hook 'spam-stat-unload-hook 'spam-stat-unload-hook)
+(add-hook 'spam-stat-unload-hook #'spam-stat-unload-hook)
(provide 'spam-stat)
(defun spam-treat-parts (handle)
(if (stringp (car handle))
- (mapcar 'spam-treat-parts (cdr handle))
+ (mapcar #'spam-treat-parts (cdr handle))
(if (bufferp (car handle))
(save-restriction
(narrow-to-region (point) (point))
(string-match "text" (car (mm-handle-type handle))))
(mm-insert-part handle))
(goto-char (point-max)))
- (mapcar 'spam-treat-parts handle))))
+ (mapcar #'spam-treat-parts handle))))
(provide 'spam-wash)
"Clear the `spam-caches' entry for a check."
(remhash symbol spam-caches))
-(define-obsolete-function-alias 'spam-xor 'xor "27.1")
+(define-obsolete-function-alias 'spam-xor #'xor "27.1")
(defun spam-set-difference (list1 list2)
"Return a set difference of LIST1 and LIST2.
(let* ((marks (spam-group-ham-marks group spam))
(marks (if (symbolp mark)
marks
- (mapcar 'symbol-value marks))))
+ (mapcar #'symbol-value marks))))
(memq mark marks))))
(defun spam-group-spam-mark-p (group mark)
;;{{{ backend installations
(spam-install-checkonly-backend 'spam-use-blackholes
- 'spam-check-blackholes)
+ #'spam-check-blackholes)
(spam-install-checkonly-backend 'spam-use-hashcash
- 'spam-check-hashcash)
+ #'spam-check-hashcash)
(spam-install-checkonly-backend 'spam-use-spamassassin-headers
- 'spam-check-spamassassin-headers)
+ #'spam-check-spamassassin-headers)
(spam-install-checkonly-backend 'spam-use-bogofilter-headers
- 'spam-check-bogofilter-headers)
+ #'spam-check-bogofilter-headers)
(spam-install-checkonly-backend 'spam-use-bsfilter-headers
- 'spam-check-bsfilter-headers)
+ #'spam-check-bsfilter-headers)
(spam-install-checkonly-backend 'spam-use-gmane-xref
- 'spam-check-gmane-xref)
+ #'spam-check-gmane-xref)
(spam-install-checkonly-backend 'spam-use-regex-headers
- 'spam-check-regex-headers)
+ #'spam-check-regex-headers)
(spam-install-statistical-checkonly-backend 'spam-use-regex-body
- 'spam-check-regex-body)
+ #'spam-check-regex-body)
;; TODO: NOTE: spam-use-ham-copy is now obsolete, use (ham spam-use-copy)
(spam-install-mover-backend 'spam-use-move
nil)
(spam-install-nocheck-backend 'spam-use-copy
- 'spam-copy-ham-routine
- 'spam-copy-spam-routine
+ #'spam-copy-ham-routine
+ #'spam-copy-spam-routine
nil
nil)
(spam-install-nocheck-backend 'spam-use-gmane
- 'spam-report-gmane-unregister-routine
- 'spam-report-gmane-register-routine
- 'spam-report-gmane-register-routine
- 'spam-report-gmane-unregister-routine)
+ #'spam-report-gmane-unregister-routine
+ #'spam-report-gmane-register-routine
+ #'spam-report-gmane-register-routine
+ #'spam-report-gmane-unregister-routine)
(spam-install-nocheck-backend 'spam-use-resend
- 'spam-report-resend-register-ham-routine
- 'spam-report-resend-register-routine
+ #'spam-report-resend-register-ham-routine
+ #'spam-report-resend-register-routine
nil
nil)
(spam-install-backend 'spam-use-BBDB
- 'spam-check-BBDB
- 'spam-BBDB-register-routine
+ #'spam-check-BBDB
+ #'spam-BBDB-register-routine
nil
- 'spam-BBDB-unregister-routine
+ #'spam-BBDB-unregister-routine
nil)
(spam-install-backend-alias 'spam-use-BBDB 'spam-use-BBDB-exclusive)
(spam-install-backend 'spam-use-blacklist
- 'spam-check-blacklist
+ #'spam-check-blacklist
nil
- 'spam-blacklist-register-routine
+ #'spam-blacklist-register-routine
nil
- 'spam-blacklist-unregister-routine)
+ #'spam-blacklist-unregister-routine)
(spam-install-backend 'spam-use-whitelist
- 'spam-check-whitelist
- 'spam-whitelist-register-routine
+ #'spam-check-whitelist
+ #'spam-whitelist-register-routine
nil
- 'spam-whitelist-unregister-routine
+ #'spam-whitelist-unregister-routine
nil)
(spam-install-statistical-backend 'spam-use-ifile
- 'spam-check-ifile
- 'spam-ifile-register-ham-routine
- 'spam-ifile-register-spam-routine
- 'spam-ifile-unregister-ham-routine
- 'spam-ifile-unregister-spam-routine)
+ #'spam-check-ifile
+ #'spam-ifile-register-ham-routine
+ #'spam-ifile-register-spam-routine
+ #'spam-ifile-unregister-ham-routine
+ #'spam-ifile-unregister-spam-routine)
(spam-install-statistical-backend 'spam-use-spamoracle
- 'spam-check-spamoracle
- 'spam-spamoracle-learn-ham
- 'spam-spamoracle-learn-spam
- 'spam-spamoracle-unlearn-ham
- 'spam-spamoracle-unlearn-spam)
+ #'spam-check-spamoracle
+ #'spam-spamoracle-learn-ham
+ #'spam-spamoracle-learn-spam
+ #'spam-spamoracle-unlearn-ham
+ #'spam-spamoracle-unlearn-spam)
(spam-install-statistical-backend 'spam-use-stat
- 'spam-check-stat
- 'spam-stat-register-ham-routine
- 'spam-stat-register-spam-routine
- 'spam-stat-unregister-ham-routine
- 'spam-stat-unregister-spam-routine)
+ #'spam-check-stat
+ #'spam-stat-register-ham-routine
+ #'spam-stat-register-spam-routine
+ #'spam-stat-unregister-ham-routine
+ #'spam-stat-unregister-spam-routine)
(spam-install-statistical-backend 'spam-use-spamassassin
- 'spam-check-spamassassin
- 'spam-spamassassin-register-ham-routine
- 'spam-spamassassin-register-spam-routine
- 'spam-spamassassin-unregister-ham-routine
- 'spam-spamassassin-unregister-spam-routine)
+ #'spam-check-spamassassin
+ #'spam-spamassassin-register-ham-routine
+ #'spam-spamassassin-register-spam-routine
+ #'spam-spamassassin-unregister-ham-routine
+ #'spam-spamassassin-unregister-spam-routine)
(spam-install-statistical-backend 'spam-use-bogofilter
- 'spam-check-bogofilter
- 'spam-bogofilter-register-ham-routine
- 'spam-bogofilter-register-spam-routine
- 'spam-bogofilter-unregister-ham-routine
- 'spam-bogofilter-unregister-spam-routine)
+ #'spam-check-bogofilter
+ #'spam-bogofilter-register-ham-routine
+ #'spam-bogofilter-register-spam-routine
+ #'spam-bogofilter-unregister-ham-routine
+ #'spam-bogofilter-unregister-spam-routine)
(spam-install-statistical-backend 'spam-use-bsfilter
- 'spam-check-bsfilter
- 'spam-bsfilter-register-ham-routine
- 'spam-bsfilter-register-spam-routine
- 'spam-bsfilter-unregister-ham-routine
- 'spam-bsfilter-unregister-spam-routine)
+ #'spam-check-bsfilter
+ #'spam-bsfilter-register-ham-routine
+ #'spam-bsfilter-register-spam-routine
+ #'spam-bsfilter-unregister-ham-routine
+ #'spam-bsfilter-unregister-spam-routine)
(spam-install-statistical-backend 'spam-use-crm114
- 'spam-check-crm114
- 'spam-crm114-register-ham-routine
- 'spam-crm114-register-spam-routine
- 'spam-crm114-unregister-ham-routine
- 'spam-crm114-unregister-spam-routine)
+ #'spam-check-crm114
+ #'spam-crm114-register-ham-routine
+ #'spam-crm114-register-spam-routine
+ #'spam-crm114-unregister-ham-routine
+ #'spam-crm114-unregister-spam-routine)
;;}}}
;;{{{ scoring and summary formatting
(if (or (null first-method)
(equal first-method 'default))
(spam-split)
- (apply 'spam-split methods))))))
+ (apply #'spam-split methods))))))
(if (equal split-return 'spam)
(gnus-summary-mark-article article gnus-spam-mark))
(defun spam-reverse-ip-string (ip)
(when (stringp ip)
- (mapconcat 'identity
+ (mapconcat #'identity
(nreverse (split-string ip "\\."))
".")))
(let ((temp-buffer-name (buffer-name))
(db-param (spam-get-ifile-database-parameter)))
(with-current-buffer article-buffer-name
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max) spam-ifile-program
nil temp-buffer-name nil "-c"
(if db-param `(,db-param "-q") '("-q"))))
(let ((article-string (spam-get-article-as-string article)))
(when (stringp article-string)
(insert article-string))))
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max) spam-ifile-program
nil nil nil
add-or-delete-option category
;;{{{ Spam-report glue (gmane and resend reporting)
(defun spam-report-gmane-register-routine (articles)
(when articles
- (apply 'spam-report-gmane-spam articles)))
+ (apply #'spam-report-gmane-spam articles)))
(defun spam-report-gmane-unregister-routine (articles)
(when articles
- (apply 'spam-report-gmane-ham articles)))
+ (apply #'spam-report-gmane-ham articles)))
(defun spam-report-resend-register-ham-routine (articles)
(spam-report-resend-register-routine articles t))
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
(with-current-buffer article-buffer-name
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-bogofilter-program
nil temp-buffer-name nil
(with-temp-buffer
(insert article-string)
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-bogofilter-program
nil nil nil switch
(let ((temp-buffer-name (buffer-name)))
(with-current-buffer article-buffer-name
(let ((status
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-spamoracle-binary
nil temp-buffer-name nil
"-spam"
"-good"))
(status
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-spamoracle-binary
nil temp-buffer-name nil
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
(with-current-buffer article-buffer-name
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max) spam-assassin-program
nil temp-buffer-name nil spam-spamassassin-arguments))
;; check the return now (we're back in the temp buffer)
(insert article-string)
(insert "\n"))))
;; call sa-learn on all messages at the same time
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-sa-learn-program
nil nil nil "--mbox"
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
(with-current-buffer article-buffer-name
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-bsfilter-program
nil temp-buffer-name nil
(when (stringp article-string)
(with-temp-buffer
(insert article-string)
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-bsfilter-program
nil nil nil switch
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
(with-current-buffer article-buffer-name
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-crm114-program
nil temp-buffer-name nil
(with-temp-buffer
(insert article-string)
- (apply 'call-process-region
+ (apply #'call-process-region
(point-min) (point-max)
spam-crm114-program
nil nil nil
(push '((eq mark gnus-spam-mark) . spam)
gnus-summary-highlight)
;; Add hooks for loading and saving the spam stats
- (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
- (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
- (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load)
- (add-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit)
- (add-hook 'gnus-summary-prepare-hook 'spam-summary-prepare)
- (add-hook 'gnus-get-new-news-hook 'spam-setup-widening)
- (add-hook 'gnus-summary-prepared-hook 'spam-find-spam)
+ (add-hook 'gnus-save-newsrc-hook #'spam-maybe-spam-stat-save)
+ (add-hook 'gnus-get-top-new-news-hook #'spam-maybe-spam-stat-load)
+ (add-hook 'gnus-startup-hook #'spam-maybe-spam-stat-load)
+ (add-hook 'gnus-summary-prepare-exit-hook #'spam-summary-prepare-exit)
+ (add-hook 'gnus-summary-prepare-hook #'spam-summary-prepare)
+ (add-hook 'gnus-get-new-news-hook #'spam-setup-widening)
+ (add-hook 'gnus-summary-prepared-hook #'spam-find-spam)
;; Don't install things more than once.
(setq spam-install-hooks nil)))
"Uninstall the spam.el hooks."
(interactive)
(spam-teardown-widening)
- (remove-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
- (remove-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
- (remove-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load)
- (remove-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit)
- (remove-hook 'gnus-summary-prepare-hook 'spam-summary-prepare)
- (remove-hook 'gnus-get-new-news-hook 'spam-setup-widening)
- (remove-hook 'gnus-summary-prepare-hook 'spam-find-spam))
-
-(add-hook 'spam-unload-hook 'spam-unload-hook)
+ (remove-hook 'gnus-save-newsrc-hook #'spam-maybe-spam-stat-save)
+ (remove-hook 'gnus-get-top-new-news-hook #'spam-maybe-spam-stat-load)
+ (remove-hook 'gnus-startup-hook #'spam-maybe-spam-stat-load)
+ (remove-hook 'gnus-summary-prepare-exit-hook #'spam-summary-prepare-exit)
+ (remove-hook 'gnus-summary-prepare-hook #'spam-summary-prepare)
+ (remove-hook 'gnus-get-new-news-hook #'spam-setup-widening)
+ (remove-hook 'gnus-summary-prepare-hook #'spam-find-spam))
+
+(add-hook 'spam-unload-hook #'spam-unload-hook)
;;}}}