Mercurial > hg > xemacs-beta
annotate man/lispref/locals.texi @ 4995:8431b52e43b1
Move the various map* functions to C; add #'map-into.
src/ChangeLog addition:
2010-01-31 Aidan Kehoe <kehoea@parhasard.net>
Move #'mapcar*, #'mapcan, #'mapc, #'map, #'mapl, #'mapcon to C;
extend #'mapvector, #'mapconcat, #'mapcar to support more
SEQUENCES; have them all error with circular lists.
* fns.c (Fsubseq): Call CHECK_SEQUENCE here; Flength can return
from the debugger if it errors with a non-sequence, leading to a
crash in Fsubseq if sequence really is *not* a sequence.
(mapcarX): Rename mapcar1 to mapcarX; rework it comprehensively to
take an optional lisp output argument, and a varying number of
sequences.
Special-case a single list argument, as we used to, saving its
elements in the stack space for the results before calling
FUNCTION, so FUNCTION can corrupt the list all it
wants. dead_wrong_type_argument() in the other cases if we
encounter a non-cons where we expected a cons.
(Fmapconcat):
Accept further SEQUENCES after separator here. Special-case
the idiom (mapconcat 'identity SEQUENCE), don't even funcall.
(FmapcarX): Rename this from Fmapcar. Accept optional SEQUENCES.
(Fmapvector): Accept optional SEQUENCES.
(Fmapcan, Fmapc, Fmap): Move these here from cl-extra.el.
(Fmap_into): New function, as specified by Common Lisp.
(maplist): New function, the guts of the implementation of
Fmaplist and Fmapl.
(Fmaplist, Fmapl, Fmapcon): Move these from cl-extra.el.
(syms_of_fns):
Add a few needed symbols here, for the type tests
used by #'map. Add the new subrs, with aliases for #'mapc-internal
and #'mapcar.
* general-slots.h: Declare Qcoerce here, now it's used in both
indent.c and fns.c
* indent.c (syms_of_indent): Qcoerce is gone from here.
* lisp.h: Add ARRAYP(), SEQUENCEP(), and the corresponding CHECK_*
macros. Declare Fbit_vector, Fstring, FmapcarX, now other files
need to use them.
* data.c (Farrayp, Fsequencep): Use ARRAYP and SEQUENCEP, just
added to lisp.h
* buffer.c (Fbuffer_list): Now Fmapcar has been renamed FmapcarX
and takes MANY arguments, update this function to reflect that.
lisp/ChangeLog addition:
2010-01-31 Aidan Kehoe <kehoea@parhasard.net>
* cl.el (mapcar*): Delete; this is now in fns.c.
Use #'mapc, not #'mapc-internal in a couple of places.
* cl-macs.el (mapc, mapcar*, map): Delete these compiler macros
now the corresponding functions are in fns.c; there's no run-time
advantage to the macros.
* cl-extra.el (coerce): Extend the possible conversions here a
little; it's not remotely comprehensive yet, though it does allow
running slightly more Common Lisp code than previously.
(cl-mapcar-many): Delete.
(map, maplist, mapc, mapl, mapcan, mapcon): Move these to fns.c.
* bytecomp.el (byte-compile-maybe-mapc):
Use #'mapc itself, not #'mapc-internal, now the former is in C.
(mapcar*): Use #'byte-compile-maybe-mapc as this function's
byte-compile method, now a #'mapc that can take more than one
sequence is in C.
* obsolete.el (cl-mapc): Move this compatibility alias to this file.
* update-elc.el (do-autoload-commands): Use #'mapc, not
#'mapc-internal here.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 31 Jan 2010 18:29:48 +0000 |
parents | 1ccc32a20af4 |
children | 0b4d355771bd |
rev | line source |
---|---|
0 | 1 @c -*-texinfo-*- |
2 @c This is part of the XEmacs Lisp Reference Manual. | |
444 | 3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
0 | 4 @c See the file lispref.texi for copying conditions. |
5 @setfilename ../../info/locals.info | |
6 @node Standard Buffer-Local Variables, Standard Keymaps, Standard Errors, Top | |
7 @appendix Buffer-Local Variables | |
8 @c The title "Standard Buffer-Local Variables" is too long for | |
9 @c smallbook. --rjc 30mar92 | |
10 | |
11 The table below lists the general-purpose Emacs variables that are | |
12 automatically local (when set) in each buffer. Many Lisp packages | |
13 define such variables for their internal use; we don't list them here. | |
14 | |
15 @table @code | |
16 @item abbrev-mode | |
17 @pxref{Abbrevs} | |
18 | |
19 @item auto-fill-function | |
20 @pxref{Auto Filling} | |
21 | |
22 @item buffer-auto-save-file-name | |
23 @pxref{Auto-Saving} | |
24 | |
25 @item buffer-backed-up | |
26 @pxref{Backup Files} | |
27 | |
28 @item buffer-display-table | |
29 @pxref{Display Tables} | |
30 | |
31 @item buffer-file-format | |
32 @pxref{Format Conversion} | |
33 | |
34 @item buffer-file-name | |
35 @pxref{Buffer File Name} | |
36 | |
37 @item buffer-file-number | |
38 @pxref{Buffer File Name} | |
39 | |
40 @item buffer-file-truename | |
41 @pxref{Buffer File Name} | |
42 | |
43 @item buffer-file-type | |
44 @pxref{Files and MS-DOS} | |
45 | |
46 @item buffer-invisibility-spec | |
47 @pxref{Invisible Text} | |
48 | |
49 @item buffer-offer-save | |
50 @pxref{Saving Buffers} | |
51 | |
52 @item buffer-read-only | |
53 @pxref{Read Only Buffers} | |
54 | |
55 @item buffer-saved-size | |
56 @pxref{Point} | |
57 | |
58 @item buffer-undo-list | |
59 @pxref{Undo} | |
60 | |
61 @item cache-long-line-scans | |
62 @pxref{Text Lines} | |
63 | |
64 @item case-fold-search | |
65 @pxref{Searching and Case} | |
66 | |
67 @item ctl-arrow | |
68 @pxref{Usual Display} | |
69 | |
70 @item comment-column | |
446 | 71 @pxref{Comments,,, xemacs, The XEmacs User's Manual} |
0 | 72 |
73 @item default-directory | |
74 @pxref{System Environment} | |
75 | |
76 @item defun-prompt-regexp | |
77 @pxref{List Motion} | |
78 | |
79 @item fill-column | |
80 @pxref{Auto Filling} | |
81 | |
82 @item goal-column | |
446 | 83 @pxref{Moving Point,,, xemacs, The XEmacs User's Manual} |
0 | 84 |
85 @item left-margin | |
86 @pxref{Indentation} | |
87 | |
88 @item local-abbrev-table | |
89 @pxref{Abbrevs} | |
90 | |
91 @item local-write-file-hooks | |
92 @pxref{Saving Buffers} | |
93 | |
94 @item major-mode | |
95 @pxref{Mode Help} | |
96 | |
97 @item mark-active | |
98 @pxref{The Mark} | |
99 | |
100 @item mark-ring | |
101 @pxref{The Mark} | |
102 | |
103 @item minor-modes | |
104 @pxref{Minor Modes} | |
105 | |
106 @item modeline-format | |
107 @pxref{Modeline Data} | |
108 | |
109 @item modeline-buffer-identification | |
110 @pxref{Modeline Variables} | |
111 | |
112 @item modeline-format | |
113 @pxref{Modeline Data} | |
114 | |
115 @item modeline-modified | |
116 @pxref{Modeline Variables} | |
117 | |
118 @item modeline-process | |
119 @pxref{Modeline Variables} | |
120 | |
121 @item mode-name | |
122 @pxref{Modeline Variables} | |
123 | |
124 @item overwrite-mode | |
125 @pxref{Insertion} | |
126 | |
127 @item paragraph-separate | |
128 @pxref{Standard Regexps} | |
129 | |
130 @item paragraph-start | |
131 @pxref{Standard Regexps} | |
132 | |
133 @item point-before-scroll | |
134 Used for communication between mouse commands and scroll-bar commands. | |
135 | |
136 @item require-final-newline | |
137 @pxref{Insertion} | |
138 | |
139 @item selective-display | |
140 @pxref{Selective Display} | |
141 | |
142 @item selective-display-ellipses | |
143 @pxref{Selective Display} | |
144 | |
145 @item tab-width | |
146 @pxref{Usual Display} | |
147 | |
148 @item truncate-lines | |
149 @pxref{Truncation} | |
150 | |
151 @item vc-mode | |
152 @pxref{Modeline Variables} | |
153 @end table |