Mercurial > hg > xemacs-beta
comparison lisp/device.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 | aa5ed11f473b |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5263:0d436a78c514 | 5264:0d43872986b6 |
---|---|
43 | 43 |
44 ;;; Functions | 44 ;;; Functions |
45 | 45 |
46 (defun device-list () | 46 (defun device-list () |
47 "Return a list of all devices." | 47 "Return a list of all devices." |
48 (apply 'nconc (mapcar 'console-device-list (console-list)))) | 48 (mapcan 'console-device-list (console-list))) |
49 | 49 |
50 (defun device-type (&optional device) | 50 (defun device-type (&optional device) |
51 "Return the type of the specified device (e.g. `x' or `tty'). | 51 "Return the type of the specified device (e.g. `x' or `tty'). |
52 This is equivalent to the type of the device's console. | 52 This is equivalent to the type of the device's console. |
53 Value is `tty' for a tty device (a character-only terminal), | 53 Value is `tty' for a tty device (a character-only terminal), |