comparison lisp/update-elc.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 99f8ebc082d9
children ed5d4f081fa9 308d34e9f07d
comparison
equal deleted inserted replaced
5263:0d436a78c514 5264:0d43872986b6
365 ;; the .elc versions to recompile everything else (so we won't 365 ;; the .elc versions to recompile everything else (so we won't
366 ;; be waiting until the cows come home). we need to set 366 ;; be waiting until the cows come home). we need to set
367 ;; load-ignore-elc-files because byte-optimize gets autoloaded 367 ;; load-ignore-elc-files because byte-optimize gets autoloaded
368 ;; from bytecomp. 368 ;; from bytecomp.
369 (let ((recompile-bc-bootstrap 369 (let ((recompile-bc-bootstrap
370 (apply #'nconc 370 (mapcan
371 (mapcar 371 #'(lambda (arg)
372 #'(lambda (arg) 372 (when (member arg update-elc-files-to-compile)
373 (when (member arg update-elc-files-to-compile) 373 (append '("-f" "batch-byte-compile-one-file")
374 (append '("-f" "batch-byte-compile-one-file") 374 (list arg))))
375 (list arg)))) 375 bc-bootstrap))
376 bc-bootstrap)))
377 (recompile-bootstrap-other 376 (recompile-bootstrap-other
378 (apply #'nconc 377 (mapcan
379 (mapcar 378 #'(lambda (arg)
380 #'(lambda (arg) 379 (when (member arg update-elc-files-to-compile)
381 (when (member arg update-elc-files-to-compile) 380 (append '("-f" "batch-byte-compile-one-file")
382 (append '("-f" "batch-byte-compile-one-file") 381 (list arg))))
383 (list arg)))) 382 bootstrap-other)))
384 bootstrap-other))))
385 (mapc 383 (mapc
386 #'(lambda (arg) 384 #'(lambda (arg)
387 (setq update-elc-files-to-compile 385 (setq update-elc-files-to-compile
388 (delete arg update-elc-files-to-compile))) 386 (delete arg update-elc-files-to-compile)))
389 (append bc-bootstrap bootstrap-other)) 387 (append bc-bootstrap bootstrap-other))