comparison lisp/extents.el @ 5264:0d43872986b6

Change (apply 'nconc (mapcar ...)) to (mapcan ...); warn about first form. lisp/ChangeLog addition: 2010-09-16 Aidan Kehoe <kehoea@parhasard.net> * byte-optimize.el (byte-optimize-apply): Transform (apply 'nconc (mapcar ...)) to (mapcan ...); warn about use of the first idiom. * update-elc.el (do-autoload-commands): * packages.el (packages-find-package-library-path): * frame.el (frame-list): * extents.el (extent-descendants): * etags.el (buffer-tag-table-files): * dumped-lisp.el (preloaded-file-list): * device.el (device-list): * bytecomp-runtime.el (proclaim-inline, proclaim-notinline) Use #'mapcan, not (apply #'nconc (mapcar ...) in all these files. * bytecomp-runtime.el (eval-when-compile, eval-and-compile): In passing, mention that these macros also evaluate the body when interpreted.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Sep 2010 13:51:49 +0100
parents abe6d1db359e
children 308d34e9f07d
comparison
equal deleted inserted replaced
5263:0d436a78c514 5264:0d43872986b6
107 "Return a list of all descendants of EXTENT, including EXTENT. 107 "Return a list of all descendants of EXTENT, including EXTENT.
108 This recursively applies `extent-children' to any children of 108 This recursively applies `extent-children' to any children of
109 EXTENT, until no more children can be found." 109 EXTENT, until no more children can be found."
110 (let ((children (extent-children extent))) 110 (let ((children (extent-children extent)))
111 (if children 111 (if children
112 (apply 'nconc (mapcar 'extent-descendants children)) 112 (mapcan 'extent-descendants children)
113 (list extent)))) 113 (list extent))))
114 114
115 (defun set-extent-keymap (extent keymap) 115 (defun set-extent-keymap (extent keymap)
116 "Set EXTENT's `keymap' property to KEYMAP." 116 "Set EXTENT's `keymap' property to KEYMAP."
117 (set-extent-property extent 'keymap keymap)) 117 (set-extent-property extent 'keymap keymap))