diff options
author | Mario Lang <mlang@delysid.org> | 2016-07-10 01:18:47 +0200 |
---|---|---|
committer | Mario Lang <mlang@delysid.org> | 2016-07-10 01:18:47 +0200 |
commit | 466ee1b3ea76425d201b5d59950e88251870c836 (patch) | |
tree | e9fffa1695adbabcaba923e3dfe0bb928f57008a /lisp/net/pop3.el | |
parent | c3223dd505ba0ecde57371eae7e9a59637a852e4 (diff) | |
download | emacs-466ee1b3ea76425d201b5d59950e88251870c836.tar.gz emacs-466ee1b3ea76425d201b5d59950e88251870c836.tar.bz2 emacs-466ee1b3ea76425d201b5d59950e88251870c836.zip |
An efficient built-in mapcan
A built-in version of `mapcan' avoids consing up (and GC'ing) the
intermediate list.
* src/fns.c (Fmapcan): New built-in.
(syms_of_fns): Define.
* lisp/emacs-lisp/cl.el (mapcan): Remove defalias.
* lisp/emacs-lisp/cl-extra.el (cl-mapcan): Use built-in `mapcan'
if only one sequence is provided.
* lisp/progmodes/hideif.el (hif-delimit):
* lisp/dired-aux.el (dired-do-find-regexp):
* lisp/woman.el (woman-parse-colon-path): Use `mapcan' instead of
`cl-mapcan'.
* lisp/woman.el (eval-when-compile): Require 'cl-lib only when
compiling.
* lisp/mouse.el (mouse-buffer-menu-map):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/progmodes/gud.el (gud-jdb-build-source-files-list):
* lisp/cedet/semantic/db-find.el (semanticdb-fast-strip-find-results):
* lisp/cedet/semantic/symref/grep.el (semantic-symref-derive-find-filepatterns):
* lisp/gnus/nnmail.el (nnmail-split-it):
* lisp/gnus/gnus-sum.el (gnus-articles-in-thread):
* lisp/gnus/gnus-registry.el (gnus-registry-sort-addresses):
* lisp/gnus/gnus-util.el (gnus-mapcar): Use `mapcan'.
Diffstat (limited to 'lisp/net/pop3.el')
-rw-r--r-- | lisp/net/pop3.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index d09c1d00fad..3964288fd23 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el @@ -402,8 +402,7 @@ Return non-nil if it is necessary to update the local UIDL file." (push uidl new)) (decf i))) (pop3-uidl - (setq new (apply 'nconc (mapcar (lambda (elt) (list elt ctime)) - pop3-uidl))))) + (setq new (mapcan (lambda (elt) (list elt ctime)) pop3-uidl)))) (when new (setq mod t)) ;; List expirable messages and delete them from the data to be saved. (setq ctime (when (numberp pop3-leave-mail-on-server) |