Mercurial > hg > xemacs-beta
comparison lisp/frame.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 | 5502045ec510 |
children | 8b70d37ab80e 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5263:0d436a78c514 | 5264:0d43872986b6 |
---|---|
859 | 859 |
860 ; This is in C in Emacs | 860 ; This is in C in Emacs |
861 (defun frame-list () | 861 (defun frame-list () |
862 "Return a list of all frames on all devices/consoles." | 862 "Return a list of all frames on all devices/consoles." |
863 ;; Lists are copies, so nconc is safe here. | 863 ;; Lists are copies, so nconc is safe here. |
864 (apply 'nconc (mapcar 'device-frame-list (device-list)))) | 864 (mapcan #'device-frame-list (device-list))) |
865 | 865 |
866 (defun frame-type (&optional frame) | 866 (defun frame-type (&optional frame) |
867 "Return the type of the specified frame (e.g. `x' or `tty'). | 867 "Return the type of the specified frame (e.g. `x' or `tty'). |
868 This is equivalent to the type of the frame's device. | 868 This is equivalent to the type of the frame's device. |
869 Value is `tty' for a tty frame (a character-only terminal), | 869 Value is `tty' for a tty frame (a character-only terminal), |