Mercurial > emacs
comparison lisp/ChangeLog @ 51714:bc91cbf50c24
Updated CC Mode to version 5.30.
author | Martin Stjernholm <mast@lysator.liu.se> |
---|---|
date | Thu, 03 Jul 2003 12:30:59 +0000 |
parents | 380202c09939 |
children | dad40750b182 |
comparison
equal
deleted
inserted
replaced
51713:205602055b5f | 51714:bc91cbf50c24 |
---|---|
1 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
2 | |
3 * progmodes/cc-menus.el (cc-imenu-init): Do not set | |
4 `imenu-create-index-function' if the second argument is left | |
5 out. This bug broke the imenu support in C, C++ and Java | |
6 modes. | |
7 | |
8 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
9 | |
10 * progmodes/cc-engine.el, progmodes/cc-align.el | |
11 (c-add-stmt-syntax, c-lineup-arglist, | |
12 c-lineup-arglist-close-under-paren): Fixes to cope with | |
13 special brace lists in Pike. | |
14 | |
15 2003-07-03 Alan Mackenzie <bug-cc-mode@gnu.org> | |
16 | |
17 * progmodes/cc-mode.el: awk-mode: Call c-awk-after-change to | |
18 ensure syntax-table props at loading. | |
19 | |
20 * progmodes/cc-fonts.el: Put (cc-require-when-compile 'cc-awk) | |
21 to eliminate compile-time errors. | |
22 | |
23 2003-07-03 Alan Mackenzie <bug-cc-mode@gnu.org> | |
24 | |
25 * progmodes/cc-awk.el, progmodes/cc-engine.el: Added code to | |
26 analyze AWK top-level forms properly (c-guess-basic-syntax | |
27 CASE 5P), c-awk-backward-syntactic-ws. | |
28 | |
29 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
30 | |
31 * progmodes/cc-fix.el: cc-mode-19.el has been renamed to | |
32 progmodes/cc-fix.el since it now contains compatibility stuff | |
33 for later versions than (X)Emacs 19. | |
34 | |
35 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
36 | |
37 * progmodes/cc-langs.el (c-paren-nontype-kwds): New language | |
38 constant. | |
39 | |
40 (c-other-decl-kwds, c-postfix-decl-spec-kwds): Added compiler | |
41 specific declspec keywords: __attribute__ for gcc and | |
42 __declspec for msvc. | |
43 | |
44 * progmodes/cc-fonts.el (c-font-lock-declarations, | |
45 c-complex-decl-matchers): Support specifiers in a couple more | |
46 contexts to cope with msvc '__declspec'. | |
47 | |
48 * progmodes/cc-engine.el (c-forward-keyword-clause): Support | |
49 `c-paren-nontype-kwds'. | |
50 | |
51 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
52 | |
53 * progmodes/cc-langs.el (c-primary-expr-regexp): Don't match a | |
54 bare period as a float. | |
55 | |
56 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
57 | |
58 * progmodes/cc-bytecomp.el (cc-bytecomp-setup-environment): Do | |
59 not cover functions that have been bound. | |
60 | |
61 (cc-external-require): New macro to use for requiring external | |
62 packages, to handle the environment correctly. | |
63 | |
64 * progmodes/cc-defs.el, progmodes/cc-fix.el, | |
65 progmodes/cc-fonts.el, progmodes/cc-mode.el: Replaced external | |
66 require's with `cc-external-require'. | |
67 | |
68 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
69 | |
70 * progmodes/cc-engine.el (c-beginning-of-member-init-list, | |
71 c-guess-basic-syntax): Fixes in handling of bitfields. | |
72 | |
73 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
74 | |
75 * progmodes/cc-langs.el (comment-end): Put a space in front of | |
76 the comment ender in C, as it was before the move from | |
77 progmodes/cc-mode.el. | |
78 | |
79 2003-07-03 Alan Mackenzie <bug-cc-mode@gnu.org> | |
80 | |
81 * progmodes/cc-fonts.el: Do not load progmodes/cc-awk.elc or | |
82 awk-font-lock-keywords unless there is an AWK Mode buffer. | |
83 | |
84 2003-07-03 Alan Mackenzie <bug-cc-mode@gnu.org> | |
85 | |
86 * progmodes/cc-awk.el: New file that implements AWK support, | |
87 superseding the old separate derived mode in awk-mode.el. | |
88 | |
89 * progmodes/cc-vars.el, cc-mode-19.el, progmodes/cc-langs.el, | |
90 progmodes/cc-mode.el, progmodes/cc-defs.el, | |
91 progmodes/cc-engine.el, progmodes/cc-fonts.el: Changes for the | |
92 new AWK support. | |
93 | |
94 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
95 | |
96 * progmodes/cc-engine.el, progmodes/cc-langs.el | |
97 (c-decl-block-key, c-search-uplist-for-classkey): Check that | |
98 the modifier is followed by "{" in Pike before considering it | |
99 to start a class-like block. | |
100 | |
101 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
102 | |
103 * progmodes/cc-mode.el (c-initialize-cc-mode): Added some | |
104 compatibility to make this function behave somewhat more as | |
105 documented for derived modes. It's still not enough to make | |
106 the old AWK mode behave reasonably, but it's been like this a | |
107 long time now so fixing it more might cause trouble | |
108 elsewhere. :P | |
109 | |
110 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
111 | |
112 * progmodes/cc-fonts.el (c-remove-font-lock-face): New macro | |
113 to remove a font lock face properly (especially in XEmacs). | |
114 | |
115 * progmodes/cc-bytecomp.el (cc-bytecomp-obsolete-fun): Added | |
116 the same kludge as in `cc-bytecomp-obsolete-var' to avoid a | |
117 confused compiler warning. | |
118 | |
119 * progmodes/cc-engine.el (c-forward-type): Fixed a bug in the | |
120 handling of concatenated types when the component types are | |
121 known. | |
122 | |
123 * progmodes/cc-fonts.el (c-constant-face-name): Added face name variable to | |
124 avoid the use of `font-lock-constant-face' for constants in | |
125 emacsen that doesn't have it. | |
126 | |
127 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
128 | |
129 * progmodes/cc-styles.el, progmodes/cc-vars.el, | |
130 progmodes/cc-cmds.el: Fixes for the syntactic symbols for | |
131 module and composition blocks. | |
132 | |
133 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
134 | |
135 * progmodes/cc-mode.el (c-basic-common-init): Use | |
136 `open-paren-in-column-0-is-defun-start' if it exists and | |
137 works. | |
138 | |
139 * progmodes/cc-vars.el (c-emacs-features): Added `col-0-paren' | |
140 to detect when `open-paren-in-column-0-is-defun-start' exists | |
141 and actually works. | |
142 | |
143 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
144 | |
145 * progmodes/cc-align.el (c-lineup-argcont, | |
146 c-lineup-gcc-asm-reg): Don't quote nil in docstrings. | |
147 | |
148 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
149 | |
150 * progmodes/cc-vars.el, progmodes/cc-langs.el | |
151 (c-primitive-type-kwds, c-font-lock-extra-types): "complex" | |
152 and "imaginary" aren't keywords in C99, only macros that | |
153 expand to the keywords "_Complex" and "_Imaginary", so make | |
154 the former a bit less hardcoded by putting it on | |
155 `c-font-lock-extra-types' instead. There are also "bool" and | |
156 "_Bool" that work the same way. | |
157 | |
158 (c-constant-kwds): "false" and "true" are standard constant | |
159 macros in C99. | |
160 | |
161 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
162 | |
163 * progmodes/cc-menus.el, progmodes/cc-langs.el, | |
164 progmodes/cc-engine.el, progmodes/cc-fonts.el, | |
165 progmodes/cc-cmds.el: Fixed various regexps to use POSIX char | |
166 classes when that is supported. | |
167 | |
168 * progmodes/cc-defs.el (c-alpha, c-alnum, c-digit, c-upper, | |
169 c-lower): New constants to make it easier to create regexps | |
170 that use POSIX char classes in emacsen that support them. | |
171 | |
172 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
173 | |
174 * progmodes/cc-vars.el (c-emacs-features): Detect in the | |
175 regexp engine understands POSIX char classes. | |
176 | |
177 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
178 | |
179 * progmodes/cc-mode.el (c-after-change): Added kludge for bug | |
180 where this function sometimes gets positions outside the | |
181 buffer range. | |
182 | |
183 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
184 | |
185 * progmodes/cc-engine.el (c-beginning-of-member-init-list): | |
186 Better handling of paretheses in unexpected places. | |
187 | |
188 * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Fixed a | |
189 regexp match order problem that could cause empty template | |
190 args on the form "<>" to be missed. | |
191 | |
192 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
193 | |
194 * progmodes/cc-engine.el (c-parse-state): Added kludge to | |
195 avoid an infinite loop when Emacs' open-paren-in-column-zero | |
196 rule kicks in and causes the sexp functions to misbehave. | |
197 | |
198 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
199 | |
200 * progmodes/cc-engine.el (c-beginning-of-member-init-list): | |
201 Fixed bug when C++-like code is encountered in non-C++ mode. | |
202 | |
203 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
204 | |
205 * progmodes/cc-defs.el (c-make-keywords-re): Added option to | |
206 specify the language to look up `c-nonsymbol-key' in. | |
207 | |
208 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
209 | |
210 * progmodes/cc-cmds.el, progmodes/cc-engine.el | |
211 (c-auto-newline-analysis): New dynamically bound variable to | |
212 turn off the topmost-intro-cont/statement-cont kludge for | |
213 brace lists during the analysis for the auto newline feature. | |
214 This fixes some cases where the setting for `brace-list-open' | |
215 on `c-hanging-braces-alist' didn't have any effect. | |
216 | |
217 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
218 | |
219 * progmodes/cc-langs.el (c-literal-start-regexp): Yet another | |
220 language variable. | |
221 | |
222 * progmodes/cc-fonts.el (c-font-lock-doc-comments, | |
223 c-find-invalid-doc-markup, javadoc-font-lock-keywords): Fixed | |
224 fontification of the markup in Javadoc comments. | |
225 | |
226 * progmodes/cc-engine.el: Fixes in face handling to cope with | |
227 doc comments. | |
228 | |
229 (c-find-decl-spots): More failsafe skipping of comments and | |
230 strings that only have been partially fontified. | |
231 | |
232 * progmodes/cc-defs.el (c-got-face-at): New subst to test | |
233 faces at positions easier. | |
234 | |
235 * progmodes/cc-defs.el (c-safe-scan-lists): New wrapper macro | |
236 to avoid the warnings with too many args to `scan-lists' in | |
237 Emacs. | |
238 | |
239 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
240 | |
241 * progmodes/cc-engine.el (c-syntactic-skip-backward): New | |
242 function to make syntactic searches in the backward direction | |
243 easier. | |
244 | |
245 (c-beginning-of-statement-1): Optimized skipping over large paren | |
246 sexps somewhat. | |
247 | |
248 (c-safe-position): Removed the odd macro handling which was | |
249 centered around the point instead of the passed position. | |
250 | |
251 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
252 | |
253 * progmodes/cc-engine.el (c-in-knr-argdecl): Do not trip up on | |
254 initialization expressions. | |
255 | |
256 * progmodes/cc-align.el (c-lineup-arglist, | |
257 c-lineup-close-paren, c-lineup-arglist-close-under-paren): | |
258 Tuned the "macro block" heuristics to work better in nested | |
259 arglist situations. | |
260 | |
261 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
262 | |
263 * progmodes/cc-styles.el (c-set-offset): Don't find a default | |
264 syntactic element through syntactic analysis if called outside | |
265 a CC Mode buffer. | |
266 | |
267 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
268 | |
269 * progmodes/cc-mode.el (c-basic-common-init): Install | |
270 `c-fill-paragraph' on `fill-paragraph-function'. Although | |
271 it's not the normal way to call it in a CC Mode buffer it | |
272 makes a direct call to `fill-paragraph' work better. | |
273 | |
274 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
275 | |
276 * progmodes/cc-vars.el, progmodes/cc-mode.el | |
277 (c-require-final-newline): Made this variable an alist to | |
278 specify a value for each language. The default value causes | |
279 `require-final-newline' to be set to t only in languages where | |
280 the standard requires a final newline. | |
281 | |
282 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
283 | |
284 * progmodes/cc-mode.el, progmodes/cc-vars.el | |
285 (c-require-final-newline): Added a variable to make the | |
286 initialization of `require-final-newline' more configurable. | |
287 | |
288 * progmodes/cc-vars.el (c-mode-common-hook): Do not change the | |
289 format string to "CC Mode Common Hook" since that causes | |
290 confusion (although it is a more accurate name). | |
291 | |
292 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
293 | |
294 * progmodes/cc-fonts.el (javadoc-font-lock-keywords, | |
295 autodoc-font-lock-keywords): Support for Javadoc and Pike | |
296 Autodoc doc comments. | |
297 | |
298 * progmodes/cc-vars.el (c-doc-comment-style): New variable to | |
299 control the fontification of documentation comments on top of | |
300 the normal mode font lock. | |
301 | |
302 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
303 | |
304 * progmodes/cc-langs.el, progmodes/cc-fonts.el | |
305 (c-primary-expr-regexp, c-font-lock-declarations): Avoid false | |
306 recognition of parens as casts when they are followed by an | |
307 operator that is both prefix and infix. | |
308 | |
309 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
310 | |
311 * progmodes/cc-cmds.el (c-guess-fill-prefix): Tuned the | |
312 heuristics of when to use `c-block-comment-prefix' for an | |
313 unclosed block comment. | |
314 | |
315 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
316 | |
317 * progmodes/cc-engine.el, progmodes/cc-langs.el | |
318 (c-nonsymbol-sexp-kwds, c-forward-keyword-clause): Handle | |
319 keywords like "extern" that can be followed by e.g. a string | |
320 literal. | |
321 | |
322 * progmodes/cc-defs.el (c-make-keywords-re): Make a regexp | |
323 correctly with one submatch when adorn is set and the list is | |
324 empty. | |
325 | |
326 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
327 | |
328 * progmodes/cc-fonts.el (c-font-lock-declarations): Fixed a | |
329 search that could go far past the relevant region and cause | |
330 slowness. Do not limit the declaration detection to the | |
331 fontified region since that can cause misfontification in | |
332 multiline declarations. | |
333 | |
334 * progmodes/cc-engine.el (c-find-decl-spots): Added limit | |
335 argument to handle declarations spanning the fontification | |
336 limit better. | |
337 | |
338 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
339 | |
340 * progmodes/cc-engine.el (c-in-literal, c-literal-limits, | |
341 c-literal-limits-fast, c-beginning-of-inheritance-list): Use | |
342 the paren cache instead of the impaired ad hoc in | |
343 `beginning-of-defun', so that these functions doesn't trip up | |
344 on "{" in the first column inside strings or comments. | |
345 | |
346 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
347 | |
348 * progmodes/cc-vars.el (c-hanging-braces-alist): Added | |
349 `statement-cont' and made it auto newline free by default. | |
350 | |
351 * progmodes/cc-cmds.el (c-electric-brace): Added | |
352 `statement-cont' to the list of syntactic symbols to consider | |
353 for auto newlines since it can be used for in-statement brace | |
354 lists. | |
355 | |
356 * progmodes/cc-vars.el (c-emacs-features): There's no need to | |
357 have this constant autoloaded. | |
358 | |
359 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
360 | |
361 * progmodes/cc-fonts.el (c-font-lock-declarations): Use | |
362 `c-recognize-typeless-decls' to avoid fontifying some macro | |
363 constructs as declarations in languages where a preceding type | |
364 is mandatory. | |
365 | |
366 * progmodes/cc-langs.el (c-recognize-typeless-decls): New | |
367 language variable. | |
368 | |
369 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
370 | |
371 * progmodes/cc-align.el (c-lineup-close-paren): Use | |
372 `c-syntactic-eol' when checking if the open paren ends its | |
373 line. | |
374 | |
375 * progmodes/cc-langs.el (c-syntactic-eol): Handle a line | |
376 continuation backslash. | |
377 | |
378 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
379 | |
380 * progmodes/cc-align.el (c-snug-do-while): Compatibility fix | |
381 for changed structure in `c-syntactic-context'. | |
382 | |
383 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
384 | |
385 * progmodes/cc-engine.el (c-parse-state): Filter angle bracket | |
386 arglist parens in a better way than disabling the syntax table | |
387 properties completely. | |
388 | |
389 * progmodes/cc-fonts.el (c-cpp-matchers): Handle line | |
390 continuations in cpp expressions. Do not fontify symbols after | |
391 #ifdef etc as variables since that isn't consistent with how | |
392 the face is used elsewhere (i.e. only for the definition of | |
393 the symbol). | |
394 | |
395 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
396 | |
397 * progmodes/cc-mode.el: Added autoload directives for the | |
398 interface functions in cc-langs. | |
399 | |
400 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
401 | |
402 * progmodes/cc-fonts.el (c-font-lock-declarations): Added a | |
403 property to handle refontication in multiline declaration | |
404 arglists better. | |
405 | |
406 (c-font-lock-<>-arglists): Fix to handle recursive template | |
407 arglists better. (As a side effect this will make | |
408 fontification work better in older emacsen too.) | |
409 | |
410 * progmodes/cc-engine.el (c-forward-<>-arglist, | |
411 c-remove-<>-arglist-properties): Use a common text property | |
412 `c-type' for all sorts of CC Mode char classification, to | |
413 avoid cases when then same char is given conflicting types. | |
414 | |
415 (c-forward-<>-arglist): New reparse argument to control that | |
416 aspect explicitly. | |
417 | |
418 (c-forward-name, c-forward-type): Changes in the handling of | |
419 recursive template arglists. Fixes to cope with the new 'known | |
420 type classification. | |
421 | |
422 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
423 | |
424 * progmodes/cc-mode.el (c-basic-common-init): Added the new | |
425 char property `c-type' to `text-property-default-nonsticky'. | |
426 | |
427 * progmodes/cc-defs.el (c-put-char-property, | |
428 c-get-char-property, c-clear-char-property, | |
429 c-clear-char-properties): Generalized `c-put-char-syntax' and | |
430 `c-get-char-syntax' to handle any property. | |
431 | |
432 * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fixed bug that | |
433 caused existing function definitions to be overridden by | |
434 phonies when the bytecomp environment is restored. | |
435 | |
436 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
437 | |
438 * progmodes/cc-cmds.el (c-mask-paragraph): Masking is | |
439 necessary in normal code too to avoid getting a fill prefix | |
440 from a nearby comment. Changed the name from `c-mask-comment' | |
441 to a more accurate one. | |
442 | |
443 * progmodes/cc-defs.el, progmodes/cc-mode.el: Changed the | |
444 auto-load-alist strategy to not add entries on package load, | |
445 to be defensive in the case that autoloads are updated in | |
446 older emacsen. The bug that would occur in that case would | |
447 probably be rather nasty for the average user. | |
448 | |
449 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
450 | |
451 * progmodes/cc-fonts.el (c-font-lock-declarations): Fine | |
452 tuning of the decision tree that tells declarations from | |
453 expressions to produce better results in some ambiguous cases. | |
454 | |
455 * progmodes/cc-fonts.el (c-font-lock-syntactic-face-function): | |
456 Removed since it doesn't give the control we want. | |
457 | |
458 (c-font-lock-invalid-string): Replacement for | |
459 `c-font-lock-syntactic-face-function' that puts the error face | |
460 on the string opener only, to avoid the annoying excessive use | |
461 of the error face while a string literal is being written. | |
462 | |
463 (c-basic-matchers-before): Use `c-font-lock-invalid-string'. | |
464 | |
465 * progmodes/cc-engine.el (c-string-syntax, | |
466 c-string-limit-regexp): Added constants to use when handling | |
467 string limits, since not all old emacsen react well to the "|" | |
468 syntax class. | |
469 | |
470 (c-literal-limits, c-literal-limits-fast, c-literal-type): Use | |
471 `c-string-syntax' and `c-string-limit-regexp'. Replaced some | |
472 hardcoded comment start regexps with `c-comment-start-regexp'. | |
473 | |
474 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
475 | |
476 * progmodes/cc-mode.el: Added an association for pike-mode on | |
477 `intepreter-mode-alist'. | |
478 | |
479 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
480 | |
481 * progmodes/cc-mode.el: Add the `auto-mode-alist' entries to | |
482 the end instead of the start of the list, to avoid overriding | |
483 user additions that are made before this file is loaded when | |
484 the entries don't correspond to any already on | |
485 `auto-mode-alist'. | |
486 | |
487 This is done through the third append argument to | |
488 `auto-mode-alist'. That doesn't exist in older (X)Emacsen, so | |
489 the function is adviced in cc-defs. However, that advice | |
490 doesn't help if the autoloads are updated in an old (X)Emacs | |
491 with this version of CC Mode, but I believe it's unlikely that | |
492 anyone does that when CC Mode isn't distributed with with it. | |
493 | |
494 * progmodes/cc-defs.el (add-to-list): Added advice to get the | |
495 optional third append argument in older (X)Emacsen. | |
496 | |
497 * progmodes/cc-langs.el (c-keywords-obarray): Kludge for | |
498 strange bug in Emacs that gives so odd errors that I frankly | |
499 don't even muster to begin trying to narrow it down. If | |
500 someone is so inclined, restore the commented code, byte | |
501 compile, and try to open a C++ file or something in font lock | |
502 mode. | |
503 | |
504 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
505 | |
506 * progmodes/cc-langs.el: Updated the IDL support from the | |
507 specs. This also adds the keywords for the variants PSDL and | |
508 CIDL. (This is mostly done from reading the grammars only; | |
509 very lightly tested.) | |
510 | |
511 * progmodes/cc-langs.el (c-type-list-kwds): Added "new" in | |
512 Java. | |
513 | |
514 * progmodes/cc-fonts.el: Made sure that | |
515 `parse-sexp-lookup-properties' is properly insulated from | |
516 clobbering by the font-lock package at all relevant entry | |
517 points. | |
518 | |
519 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
520 | |
521 * progmodes/cc-langs.el (c-opt-after-id-concat-key): New | |
522 language constant to make the recognition of identifier | |
523 qualifiers more flexible. Recognize the identifier before | |
524 ".*" as a qualifier in Java. | |
525 | |
526 (c-identifier-key): Recognize "::*" inside identifiers in C++. | |
527 Recognize identifiers ending with ".*" in Java for the sake of | |
528 import directives. | |
529 | |
530 (c-type-list-kwds, c-ref-list-kwds): Recognize "import" and | |
531 "package" declarations in Java. | |
532 | |
533 * progmodes/cc-vars.el (c-doc-face, c-doc-marker-face, | |
534 c-doc-markup-face): Removed since they aren't used (and | |
535 probably won't be). | |
536 | |
537 * progmodes/cc-langs.el (c-ref-list-kwds): New language | |
538 constant to specify keywords followed by references. | |
539 | |
540 (c-last-identifier-range): New variable to avoid going back to | |
541 search for the identifier to font lock after a call to | |
542 `c-forward-name'. | |
543 | |
544 (c-type-prefix-kwds, c-type-list-kwds): Fixed classification of | |
545 "@interface" etc in Objective-C. | |
546 | |
547 * progmodes/cc-engine.el (c-forward-keyword-clause): Fixed | |
548 handling of keyword prefixes in `c-type-list-kwds' and | |
549 `c-colon-type-list-kwds' clauses. | |
550 | |
551 (c-keyword-sym, c-keyword-member): New functions to lookup and | |
552 categorize keywords. | |
553 | |
554 (c-forward-keyword-clause): New function to move over a keyword | |
555 and its associated clause according to `c-<>-arglist-kwds' etc. | |
556 | |
557 * progmodes/cc-langs.el (c-typeless-decl-kwds, | |
558 c-type-list-kwds, c-colon-type-list-kwds, | |
559 c-colon-type-list-re, c-paren-type-kwds): New language | |
560 constants and variables to generalize the recognition of | |
561 various language constructs. | |
562 | |
563 (c-keywords): Did away with the list of `*-kwds' constants. It's | |
564 now built through macro expansion. | |
565 | |
566 (c-keywords-obarray): New language variable which contains each | |
567 keyword as a symbol, to make fast reverse lookup of keywords to | |
568 the `*-kwds' lists they come from. | |
569 | |
570 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
571 | |
572 * progmodes/cc-defs.el (c-lang-defconst-eval-immediately): | |
573 Added macro to be able to do direct evaluation in | |
574 `c-lang-defconst' forms. | |
575 | |
576 * progmodes/cc-engine.el (c-syntactic-re-search-forward): | |
577 Fixed a bug which could cause the point to end up outside the | |
578 containing sexp if PAREN-LEVEL was used. | |
579 | |
580 * progmodes/cc-engine.el, progmodes/cc-fonts.el, | |
581 progmodes/cc-langs.el: Generalized the C++ template arglist | |
582 support to handle angle bracket arglists in any language. | |
583 | |
584 (c-recognize-<>-arglists, c-<>-arglist-kwds, | |
585 c-opt-<>-arglist-start): New language variables to control | |
586 angle bracket arglists. | |
587 | |
588 (c-opt-type-suffix-key): Use `c-recognize-<>-arglists' in | |
589 Objective-C instead of matching a protocol reference list as a | |
590 type suffix. | |
591 | |
592 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
593 | |
594 * progmodes/cc-align.el (c-gnu-impose-minimum): Fixed a missing | |
595 `save-excursion' that caused the point to jump around. | |
596 | |
597 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
598 | |
599 * progmodes/cc-mode.el, progmodes/cc-menus.el (objc-mode, | |
600 cc-imenu-init): Fixed initialization bug that has made the | |
601 Objective-C support inoperational since 5.26. | |
602 | |
603 (cc-imenu-objc-generic-expression): Updated submatch indices | |
604 due to changes in `cc-imenu-c++-generic-expression'. | |
605 | |
606 (cc-imenu-objc-function): Don't add an empty "C" menu since | |
607 imenu doesn't like that. | |
608 | |
609 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
610 | |
611 * progmodes/cc-align.el (c-lineup-arglist, | |
612 c-lineup-arglist-close-under-paren, c-lineup-close-paren): | |
613 Added DWIM to the functions that line up at or after the | |
614 arglist open paren to avoid that if there are brace blocks | |
615 inside, e.g. when a macro contains a code block. | |
616 | |
617 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
618 | |
619 * progmodes/cc-vars.el (objc-font-lock-extra-types): Changed | |
620 default to treat identifiers starting with capital letters as | |
621 types, according to Objective-C naming conventions. The types | |
622 previously on the list is part of the language and therefore | |
623 on `c-primitive-type-kwds' instead. | |
624 | |
625 * progmodes/cc-fonts.el: Fixed font locking in Objective-C. | |
626 Be more careful about returning nil from functions used | |
627 directly as font-lock matchers. | |
628 | |
629 * progmodes/cc-mode.el (c-font-lock-init): Made the syntax | |
630 table modification element of `font-lock-defaults' | |
631 parameterized over the languages. | |
632 | |
633 * progmodes/cc-langs.el: Updated the Objective-C constants | |
634 according to the language spec. The "@" chars that start | |
635 directives are now considered part of the keywords to make | |
636 things easier. | |
637 | |
638 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
639 | |
640 * progmodes/cc-defs.el: (c-(up|down)-list-(forward|backward)): | |
641 Made the position optional and added docstrings. | |
642 | |
643 (c-go-(up|down)-list-(forward|backward)): Added variants of the | |
644 above that move point and return successfulness instead. | |
645 | |
646 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
647 | |
648 * progmodes/cc-fonts.el (c-font-lock-<>-arglists): New | |
649 function to fontify all occurrences of template arglists in | |
650 C++. | |
651 | |
652 * progmodes/cc-engine.el (c-disallow-comma-in-<>-arglists): | |
653 New variable to be able to avoid false recognition of template | |
654 arglists in some cases. | |
655 | |
656 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
657 | |
658 * progmodes/cc-fonts.el, progmodes/cc-langs.el | |
659 (c-decl-prefix-re, c-font-lock-declarations): Match template | |
660 open brackets to get a declaration in the first template | |
661 argument. | |
662 | |
663 (c-complex-decl-matchers): Fontify the second type in a "class | |
664 X = Y" expression in C++. | |
665 | |
666 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
667 | |
668 * progmodes/cc-engine.el (c-forward-<>-arglist): Broke out the | |
669 recursive part to a new function to improve efficiency when a | |
670 nested template arglist search turns out to be futile. | |
671 | |
672 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
673 | |
674 * progmodes/cc-menus.el (cc-imenu-java-generic-expression): | |
675 Improved to avoid false matches on e.g. "else if (foo)". | |
676 | |
677 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
678 | |
679 * progmodes/cc-engine.el (c-forward-token-2, | |
680 c-backward-token-2): New functions that work like the -1 | |
681 variants but that handles multicharacter operator tokens. | |
682 | |
683 * progmodes/cc-engine.el (c-inside-bracelist-p, | |
684 c-guess-basic-syntax): Did away with the hardcoded regexps to | |
685 recognize "typedef" declaration prefixes, "extern" and | |
686 "namespace" blocks, "enum"-style brace list declarations and | |
687 Java-style array initializers with "new". | |
688 | |
689 * progmodes/cc-langs.el (c-brace-list-decl-kwds, | |
690 c-brace-list-key, c-inexpr-brace-list-kwds, | |
691 c-opt-inexpr-brace-list-key): New language constants and | |
692 variables to parameterize some more of the hardcoded regexps | |
693 in cc-engine. | |
694 | |
695 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
696 | |
697 * progmodes/cc-align.el (c-lineup-cascaded-calls): Do not | |
698 allow cascaded call lists containing both "->" and ".". | |
699 | |
700 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
701 | |
702 * progmodes/cc-align.el, progmodes/cc-cmds.el, | |
703 progmodes/cc-defs.el, progmodes/cc-engine.el, | |
704 progmodes/cc-fonts.el, progmodes/cc-langs.el, | |
705 progmodes/cc-mode.el, progmodes/cc-styles.el: New language | |
706 variable system to make it easier to set up optimized language | |
707 variables and to extend them in third party derived modes. | |
708 cc-langs is no longer required at runtime. | |
709 | |
710 * progmodes/cc-mode.el (c-basic-common-init): No longer | |
711 initializes the language variables. It's necessary that the | |
712 caller does that directly since the evaluated values for them | |
713 now get compiled in directly. | |
714 | |
715 (c-font-lock-init, c-common-init): Separated the font-lock | |
716 initialization from `c-common-init'. | |
717 | |
718 * progmodes/cc-mode.el (c-define-abbrev-table): Do not | |
719 override an existing abbrev table. | |
720 | |
721 (c-Java-defun-prompt-regexp): Moved here from cc-langs since | |
722 cc-langs isn't always loaded at runtime. | |
723 | |
724 * progmodes/cc-langs.el (c-make-init-lang-vars-fun, | |
725 c-init-language-vars): Changed to allow language variable | |
726 initialization from derived modes. | |
727 | |
728 (c-mode-menu): New language variable for the mode menu. | |
729 | |
730 (c-make-mode-syntax-table, c-mode-syntax-table, | |
731 make-c++-template-syntax-table): New language variables for syntax | |
732 tables. The code that initializes them has been moved to cc-mode | |
733 to make it possible to avoid loading cc-langs at runtime. | |
734 | |
735 * progmodes/cc-engine.el, progmodes/cc-langs.el | |
736 (c-hungry-delete-key, c-auto-newline, c-auto-hungry-string): | |
737 Moved these state variables from cc-langs to cc-engine to make | |
738 it possible to avoid loading cc-langs at runtime. | |
739 | |
740 * progmodes/cc-defs.el (c-lang-defconst, c-lang-const): Moved | |
741 from cc-langs and rewritten to make the language constant | |
742 system usable from derived modes. | |
743 | |
744 (c-add-language): New function intended for use from derived modes | |
745 that add new C-like languages. | |
746 | |
747 * progmodes/cc-defs.el, progmodes/cc-vars.el | |
748 (c-buffer-is-cc-mode): Moved from cc-vars to cc-defs to define | |
749 it during compilation. | |
750 | |
751 * progmodes/cc-bytecomp.el (cc-require-when-compile): New | |
752 support macro for compile time `require's. | |
753 | |
754 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
755 | |
756 * progmodes/cc-defs.el, progmodes/cc-mode.el (c-version): | |
757 Moved from cc-mode to cc-defs to make it accessible to the | |
758 other components. | |
759 | |
760 * progmodes/cc-engine.el (c-forward-token-1, | |
761 c-backward-token-1): Compatibility fix for emacsen that | |
762 doesn't understand generic string delimiters. | |
763 | |
764 * progmodes/cc-vars.el (c-emacs-features): Added detection of | |
765 generic string and comment delimiters. | |
766 | |
767 * progmodes/cc-defs.el, progmodes/cc-langs.el | |
768 (c-make-keywords-re): Changed interface to make it more | |
769 extensible. | |
770 | |
771 * progmodes/cc-langs.el, progmodes/cc-defs.el (c-regexp-opt, | |
772 c-regexp-opt-depth, c-make-keywords-re): Moved from cc-langs | |
773 to cc-defs since they are generally useful. | |
774 | |
775 * progmodes/cc-bytecomp.el, progmodes/cc-defs.el | |
776 (cc-eval-when-compile): Moved from cc-bytecomp to cc-defs to | |
777 allow use at runtime. | |
778 | |
779 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
780 | |
781 * progmodes/cc-bytecomp.el (cc-eval-when-compile): Workaround | |
782 for a bug with nested `eval-when-compile' in XEmacs 21. | |
783 | |
784 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
785 | |
786 * progmodes/cc-mode.el: Added autoloaded forms to install the | |
787 appropriate file suffixes on `auto-mode-alist'. Necessary in | |
788 XEmacs 21.5, and it can be useful elsewhere too. | |
789 | |
790 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
791 | |
792 * progmodes/cc-align.el (c-lineup-cascaded-calls): Handle "." | |
793 too, for use in Java. | |
794 | |
795 * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Do | |
796 not handle cpp directives in languages that doesn't have any. | |
797 | |
798 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
799 | |
800 * progmodes/cc-langs.el (c-operators): Added a high level | |
801 description of all operators, along with their precedence and | |
802 associativity. | |
803 | |
804 * progmodes/cc-align.el (c-lineup-multi-inher): Fixed bug | |
805 where the position of the point and not the beginning of the | |
806 line was used to calculate the indentation. | |
807 | |
808 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
809 | |
810 * progmodes/cc-defs.el, progmodes/cc-engine.el | |
811 (c-backward-single-comment, c-backward-comments): Added kludge | |
812 for the bug in `forward-comment' in most (X)Emacs versions | |
813 where it moves back over the "*/" of a block comment if | |
814 there's no matching "/*". This has become more important now | |
815 since it can cause incorrect caching by `c-backward-sws'. | |
816 | |
817 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
818 | |
819 * progmodes/cc-cmds.el (c-hungry-backspace, | |
820 c-hungry-delete-forward): New functions to do hungry deletion | |
821 regardless of hungry-delete mode. Contributed by Kevin Ryde. | |
822 | |
823 * progmodes/cc-engine.el (c-forward-sws, c-backward-sws, | |
824 c-invalidate-sws-region): Use text properties to cache regions | |
825 with complex syntactic whitespace. This helps a lot in | |
826 improving responsiveness when there are lots of comments and | |
827 cpp directives before point. | |
828 | |
829 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
830 | |
831 * progmodes/cc-guess.el, progmodes/cc-langs.el, | |
832 progmodes/cc-menus.el, progmodes/cc-mode.el, | |
833 progmodes/cc-styles.el, progmodes/cc-vars.el, | |
834 progmodes/cc-engine.el, progmodes/cc-fonts.el, | |
835 progmodes/cc-cmds.el, progmodes/cc-defs.el: Introduced a | |
836 classification of functions into those that make "hidden | |
837 buffer changes" and those who don't. This is prompted by the | |
838 increasing use of text properties for various things, to | |
839 correctly cover the silly buffer modifications that is caused | |
840 by text property changes. | |
841 | |
842 (c-save-buffer-state): New macro that's put around any code that | |
843 can manipulate text properties. | |
844 | |
845 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
846 | |
847 * progmodes/cc-mode.el (c-basic-common-init): Setup | |
848 `text-property-default-nonsticky' to avoid messing with the | |
849 rear-nonsticky property on each character in Emacs 21. | |
850 | |
851 * progmodes/cc-defs.el (c-clear-char-syntax, | |
852 c-put-char-syntax): Macros that sets and removes the | |
853 syntax-table property on a single character and makes the | |
854 property nonsticky in both directions in a suitable way for | |
855 each (X)Emacs flavor. | |
856 | |
857 * progmodes/cc-vars.el, progmodes/cc-defs.el, | |
858 progmodes/cc-engine.el, progmodes/cc-mode.el: Use | |
859 `lookup-syntax-properties' in XEmacs to control whether the | |
860 syntax-table property has any effect or not. | |
861 | |
862 (c-parse-sexp-lookup-properties): New macro that expands to either | |
863 `parse-sexp-lookup-properties' or `lookup-syntax-properties'. | |
864 | |
865 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
866 | |
867 * progmodes/cc-defs.el, progmodes/cc-engine.el, | |
868 progmodes/cc-fonts.el: Put the faces into the buffer in the | |
869 same way as the font-lock package does. This fixes a | |
870 compatibility problem with XEmacs which sets an extra | |
871 font-lock property. | |
872 | |
873 * progmodes/cc-fonts.el (c-put-font-lock-face): A macro that | |
874 finds out the right way to put font lock faces at compile | |
875 time. We're definitely not byte code portable between Emacs | |
876 and XEmacs now. | |
877 | |
878 * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): | |
879 Implemented a cache for the last large skipped over syntactic | |
880 whitespace. This also has most effect after many macros. | |
881 | |
882 * progmodes/cc-engine.el, progmodes/cc-defs.el | |
883 (c-forward-syntactic-ws, c-backward-syntactic-ws): Utilize the | |
884 limit better when one is passed. These are now macros to | |
885 avoid a little overhead when no limit is given. | |
886 | |
887 (c-forward-sws, c-backward-sws): New functions called by the | |
888 macros above to do the unbounded search. | |
889 | |
890 * progmodes/cc-fonts.el (c-font-lock-declarations): | |
891 Implemented a cache for the first backward search for a | |
892 preceding `c-decl-prefix-re' match. This typically speeds up | |
893 interactive refontification a lot on the top level of macro | |
894 heavy header files. | |
895 | |
896 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
897 | |
898 * progmodes/cc-vars.el (c-emacs-features): Added check for | |
899 syntax text properties. | |
900 | |
901 * progmodes/cc-mode.el (c-basic-common-init): Turn on | |
902 `parse-sexp-lookup-properties' if it's supported. Define the | |
903 variable in any case since it's used at runtime to check on | |
904 this. | |
905 | |
906 * progmodes/cc-langs.el (c-identifier-key): Support C++ | |
907 destructor names. | |
908 | |
909 (c-identifier-start, c-op-token-regexp, c-type-modifier-kwds, | |
910 c-opt-type-modifier-key, c-opt-type-component-key, | |
911 c-typedef-specifier-kwds, c-typedef-specifier-key, | |
912 c-paren-stmt-kwds, c-paren-stmt-key, c-syntactic-ws-start): A | |
913 bunch of new language constants and variables to support the | |
914 improved handling of names and types. | |
915 | |
916 * progmodes/cc-fonts.el (c-font-lock-declarators, | |
917 c-font-lock-declarations): Handle C++ template declarations | |
918 and template references. Fontify complex types and names more | |
919 accurately by delegating it to `c-forward-type' and | |
920 `c-forward-name'. Fontify the identifiers in typedef | |
921 declarations as types. | |
922 | |
923 * progmodes/cc-engine.el (c-forward-<>-arglist): New function | |
924 to move forward over a C++ template arglist. It also marks | |
925 the '<' and '>' chars with paren syntax using the syntax-table | |
926 property, to speed up later calls in emacsen that support | |
927 syntax text properties (Emacs >= 20 and (undocumented) XEmacs | |
928 21). | |
929 | |
930 This also has the very interesting effect that if font locking | |
931 is used with decoration level 3 or higher in these emacsen | |
932 then template arglists will behave just like paren sexps with | |
933 the various sexp movement commands. | |
934 | |
935 (c-forward-name): New function to move over a name. Simple in | |
936 most languages except C++ where a name can contain template | |
937 arglists and therefore almost arbitrary expressions. | |
938 | |
939 (c-on-identifier): Fix for Pike operator identifiers. | |
940 | |
941 (c-simple-skip-symbol-backward, c-syntactic-content, | |
942 c-remove-<>-paren-properties): New helper functions. | |
943 | |
944 * progmodes/cc-defs.el: (c-clear-char-syntax, | |
945 c-mark-paren-open, c-mark-paren-close): New support functions | |
946 to handle syntactic properties on C++ template arglist | |
947 brackets. | |
948 | |
949 (c-put-type-face, c-put-reference-face): Helpers to put faces on | |
950 regions, since there are a bit of that inside `c-forward-name' etc | |
951 in progmodes/cc-engine.el. | |
952 | |
953 * progmodes/cc-engine.el, progmodes/cc-fonts.el, | |
954 progmodes/cc-langs.el: Fixed the names on a number of regexp | |
955 language variables to conform to the nomenclature and | |
956 shortened some names. | |
957 | |
958 * progmodes/cc-align.el, progmodes/cc-cmds.el, | |
959 progmodes/cc-fonts.el, progmodes/cc-engine.el | |
960 (c-syntactic-re-search-forward): Removed the COUNT argument | |
961 since it's never used. Added an argument to tell which | |
962 subexpression whose end should be tested for syntactic | |
963 relevance. Using this also removes some optimizations, so | |
964 that it's possible to use a look behind subexpression that | |
965 matches the end of a literal or a close paren when PAREN-LEVEL | |
966 is used. | |
967 | |
968 (c-guess-continued-construct): Don't match <<= or >>= for the | |
969 stream-op syntactic element. | |
970 | |
971 * progmodes/cc-defs.el (c-paren-re, c-identifier-re): Removed | |
972 these helper macros since better and more correct tools are | |
973 now available in progmodes/cc-langs.el. | |
974 | |
975 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
976 | |
977 * progmodes/cc-align.el (c-lineup-string-cont): New lineup | |
978 function to line up string literals that will be concatenated. | |
979 | |
980 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
981 | |
982 * progmodes/cc-langs.el (c-populate-syntax-table): XEmacs | |
983 classifies the hard space character as a symbol character but | |
984 it's better to let it be in the punctuation class so that it's | |
985 always highlighted with the inverted invalid face. It can | |
986 perhaps be argued that that character is allowed in | |
987 identifiers in some languages (haven't checked), but using it | |
988 would still be extremely confusing. | |
989 | |
990 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
991 | |
992 * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a | |
993 case when a labeled substatement caused incorrect association | |
994 of the following continuation clause. | |
995 | |
996 * progmodes/cc-engine.el (c-syntactic-re-search-forward): | |
997 Handle the case when the syntactic match position is in the | |
998 middle of a comment starter. | |
999 | |
1000 (c-guess-continued-construct): Analyze the "K&R region" of a | |
1001 function nested inside a function as func-decl-cont and not | |
1002 statement-cont. New case E. Also cleaned up case C (stream-op | |
1003 recognition) a bit. | |
1004 | |
1005 * progmodes/cc-engine.el (c-parse-state, c-check-state-cache): | |
1006 Moved the check on `c-state-cache-start' from | |
1007 `c-check-state-cache' to `c-parse-state' so that the state | |
1008 cache isn't zapped if `c-check-state-cache' but not | |
1009 `c-parse-state' is called during a temporary narrowing. This | |
1010 fixes a performance problem that could occur when | |
1011 `fill-paragraph' is used in font lock mode on a comment at the | |
1012 end of a large class or function. | |
1013 | |
1014 (c-state-cache-start): Fixed buffer localness. | |
1015 | |
1016 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1017 | |
1018 * progmodes/cc-langs.el: Updates from the C99 standard (or | |
1019 actually from the latest web accessible draft of it). | |
1020 | |
1021 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1022 | |
1023 * progmodes/cc-langs.el: Updated the keywords and operator | |
1024 tokens from the latest C++ and Java standards. Some other | |
1025 multichar token corrections. | |
1026 | |
1027 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1028 | |
1029 * progmodes/cc-cmds.el, progmodes/cc-engine.el, | |
1030 progmodes/cc-vars.el (c-syntactic-context, | |
1031 c-syntactic-element): Do not bind any values to these | |
1032 variables globally since they should always be dynamically | |
1033 bound. This makes it much easier to debug cases when they've | |
1034 gotten global values somehow. | |
1035 | |
1036 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1037 | |
1038 * progmodes/cc-langs.el (c-regexp-opt): Fix to work around the | |
1039 non-greedy behavior that the regexp engine sometimes exposes. | |
1040 This bug only shows in (X)Emacs 19 where there's no regexp-opt | |
1041 package. | |
1042 | |
1043 * progmodes/cc-engine.el (c-syntactic-re-search-forward): | |
1044 Added a feature to filter out matches in the middle of tokens. | |
1045 Changed the comment to a docstring since I consider this | |
1046 function generally useful. | |
1047 | |
1048 * progmodes/cc-defs.el (c-mode-symbol): Broke out a part of | |
1049 `c-mode-var'. | |
1050 | |
1051 * progmodes/cc-align.el (c-lineup-cascaded-calls, | |
1052 c-lineup-gcc-asm-reg): Cope with that `c-most-enclosing-brace' | |
1053 might return nil. | |
1054 | |
1055 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1056 | |
1057 * progmodes/cc-engine.el (c-found-types, c-clear-found-types, | |
1058 c-add-type, c-check-type, c-add-complex-type, | |
1059 c-list-found-types, c-forward-type): Added a sort of symbol | |
1060 table for types: If a name is recognized as a type in a | |
1061 declaration it's added in an obarray to be able to recognize | |
1062 it in other ambiguous declarations. | |
1063 | |
1064 (c-remove-ws): New helper function to canonicalize fully | |
1065 qualified identifiers for `c-found-types'. | |
1066 | |
1067 * progmodes/cc-defs.el (c-mode-var): New defsubst to access | |
1068 mode prefixed variables uniformly. | |
1069 | |
1070 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1071 | |
1072 * progmodes/cc-align.el (c-lineup-arglist-close-under-paren): | |
1073 Work correctly with nested arglist-cont-nonempty symbols. | |
1074 | |
1075 (c-lineup-arglist-operators): New lineup function to line up infix | |
1076 operators under the open paren of the surrounding sexp. | |
1077 | |
1078 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1079 | |
1080 * progmodes/cc-engine.el (c-forward-syntactic-ws): Fixed a bug | |
1081 that could cause an infinite loop if something that looks like | |
1082 a macro begins in the middle of a line. | |
1083 | |
1084 (c-parse-state): Fixed a bug that could cause `c-state-cache' | |
1085 to contain two conses in sequence when there's an unbalanced | |
1086 open paren in a macro. | |
1087 | |
1088 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1089 | |
1090 * progmodes/cc-defs.el (c-face-name-p): A defsubst to | |
1091 recognize the name of a face in a way that works also in | |
1092 XEmacs. | |
1093 | |
1094 * progmodes/cc-engine.el (c-forward-type): New function to | |
1095 move past a type spec. | |
1096 | |
1097 * progmodes/cc-engine.el (c-syntactic-re-search-forward): | |
1098 Fixed behavior when the limit is reached inside a comment, | |
1099 string, or a macro. | |
1100 | |
1101 * progmodes/cc-align.el, progmodes/cc-cmds.el, | |
1102 progmodes/cc-engine.el (c-forward-single-comment, | |
1103 c-forward-comments, c-backward-single-comment, | |
1104 c-backward-comments): New replacements for `c-forward-comment' | |
1105 that wraps `forward-comment' more efficiently in each of the | |
1106 four different cases it's actually used. These replacements | |
1107 also treats line continuations as whitespace. | |
1108 | |
1109 (c-forward-comment): Removed. The four different cases above | |
1110 are basically different, so it's better to make them into | |
1111 separate functions than choose between them at runtime using | |
1112 the argument. | |
1113 | |
1114 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1115 | |
1116 * progmodes/cc-align.el (c-gnu-impose-minimum): Fixed bug due | |
1117 to the new placement of cpp-macro and comment-intro in the | |
1118 syntactic context, as pointed out by Kevin Ryde. Changed the | |
1119 method that decides whether point is inside a top-level | |
1120 construct to one that doesn't depend on the set of syntactic | |
1121 elements so much. | |
1122 | |
1123 * progmodes/cc-defs.el (c-point): Use the functions | |
1124 `line-beginning-position' and `line-end-position' in emacsen | |
1125 that have them (currently Emacs 20 and later). | |
1126 | |
1127 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1128 | |
1129 * progmodes/cc-cmds.el (c-mask-comment): Fixed a bug that | |
1130 sometimes caused code after a closed block comment to be taken | |
1131 into account when the fill prefix is calculated. | |
1132 | |
1133 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1134 | |
1135 * progmodes/cc-align.el (c-lineup-arglist, c-lineup-argcont, | |
1136 c-lineup-math, c-lineup-cascaded-calls, c-lineup-gcc-asm-reg): | |
1137 Fixes to cope correctly with nested arglists for the lineups | |
1138 that can be used with arglist-cont-nonempty. | |
1139 | |
1140 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1141 | |
1142 * progmodes/cc-engine.el (c-add-stmt-syntax, | |
1143 c-guess-basic-syntax): Changed the anchor position of | |
1144 arglist-cont-nonempty and arglist-close so that a relative | |
1145 indentation like + can be used with consistent results. Prior | |
1146 to this, the indentation engine more or less assumed that | |
1147 arglist-cont-nonempty always used `c-lineup-arglist'. Those | |
1148 two syntax symbols also get the opening paren as an extra | |
1149 position, to make it possible for `c-lineup-arglist' to | |
1150 continue to do a proper job. | |
1151 | |
1152 * progmodes/cc-engine.el (c-get-syntactic-indentation): A | |
1153 vector with an absolute indentation column now only overrides | |
1154 the indentation for surrounding structures, i.e. those whose | |
1155 syntactic elements are earlier in the `c-syntactic-context' | |
1156 list, but not nested ones. This so that | |
1157 e.g. `c-lineup-arglist' can reliably line up with the first | |
1158 argument but still allow relative indentation changes for | |
1159 nested things, e.g. the arglist-close of a nested argument | |
1160 list. This change means that the order in | |
1161 `c-syntactic-context' has become more essential. | |
1162 | |
1163 (c-guess-basic-syntax): Changes to make the nesting order of the | |
1164 returned syntax list correct. | |
1165 | |
1166 Compatibility note: This change means that `c-lineup-dont-change' | |
1167 now (again) isn't absolutely sure to keep the current indentation. | |
1168 However, I believe that most people use it for comments, macros | |
1169 and string literals, and since those are nested innermost it won't | |
1170 matter. | |
1171 | |
1172 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1173 | |
1174 * progmodes/cc-align.el, progmodes/cc-defs.el, | |
1175 progmodes/cc-engine.el, progmodes/cc-vars.el | |
1176 (c-guess-basic-syntax, c-calc-offset, | |
1177 c-get-syntactic-indentation, c-syntactic-context): Extended | |
1178 the representation of the syntactic context: Previously it was | |
1179 a list containing cons cells of the found syntactic symbols | |
1180 and their relpos values. Now each element is instead a list | |
1181 containing the syntactic symbol in the first element and the | |
1182 relpos (if any) in the second. After that there might be more | |
1183 elements, depending on the syntactic symbol. The line-up | |
1184 functions get these additional elements as extra arguments. | |
1185 | |
1186 This change is slightly incompatible. Although the calling | |
1187 convention for line-up functions is strictly extended, the format | |
1188 of the `c-syntactic-context' variable has changed slightly. It's | |
1189 believed that this incompatibility is minor, though; not a single | |
1190 line-up function distributed with CC Mode needed to be changed, | |
1191 for instance. | |
1192 | |
1193 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1194 | |
1195 * progmodes/cc-styles.el (c-set-style, c-set-style-1): Added | |
1196 another state for the `dont-override' flag where it only keeps | |
1197 globally set variables. | |
1198 | |
1199 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1200 | |
1201 * progmodes/cc-mode.el (c-postprocess-file-styles): Do nothing | |
1202 except in CC Mode modes. | |
1203 | |
1204 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1205 | |
1206 * progmodes/cc-vars.el, progmodes/cc-fonts.el, | |
1207 progmodes/cc-langs.el, progmodes/cc-mode.el: Added font lock | |
1208 support. | |
1209 | |
1210 * progmodes/cc-engine.el (c-beginning-of-syntax): New function | |
1211 to be used for font-lock-beginning-of-syntax-function. It | |
1212 uses the state cache to quickly find a good position. | |
1213 | |
1214 * progmodes/cc-defs.el (c-major-mode-is): Allow a list of | |
1215 modes. Made it a macro ensure that it's optimized to either | |
1216 eq or memq for constant arguments. | |
1217 | |
1218 * progmodes/cc-mode.el (c-common-init): Did away with the | |
1219 hardcoded setting of `comment-column'; it's a user variable | |
1220 that we have no business meddling with. Since the default | |
1221 value for it is 32 in all supported (X)Emacs versions, it's | |
1222 also safe from a compatibility perspective. | |
1223 | |
1224 * progmodes/cc-mode.el (c-basic-common-init): New function | |
1225 that contains only the syntax and line breaking/filling | |
1226 initialization. It's intended for use by other modes that | |
1227 embed CC Mode. | |
1228 | |
1229 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1230 | |
1231 * progmodes/cc-engine.el (c-add-stmt-syntax): Fixed some cases | |
1232 of wrong anchoring, e.g. for else-if compounds. | |
1233 | |
1234 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1235 | |
1236 * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed anchor | |
1237 position for defun-open in K&R style functions. | |
1238 | |
1239 * progmodes/cc-engine.el (c-in-knr-argdecl): Don't trip up on | |
1240 macros. | |
1241 | |
1242 (c-search-decl-header-end): Handle C++ template arguments more | |
1243 correctly. | |
1244 | |
1245 (c-beginning-of-decl-1): Fix when the declaration is first in a | |
1246 macro. | |
1247 | |
1248 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1249 | |
1250 * progmodes/cc-engine.el (c-beginning-of-decl-1): Better way | |
1251 to handle protection labels, one which doesn't get confused by | |
1252 inherit colons. | |
1253 | |
1254 (c-end-of-decl-1): Don't treat functions that have "class" or | |
1255 "struct" in the return type as classes or structs. | |
1256 | |
1257 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1258 | |
1259 * progmodes/cc-langs.el (c-make-keywords-re): Fixed the | |
1260 keyword adornment so that it works when a keyword ends with | |
1261 "_". | |
1262 | |
1263 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1264 | |
1265 * progmodes/cc-cmds.el (c-mask-comment): More fixes when used | |
1266 from `c-do-auto-fill' and point is at or near the limit of the | |
1267 comment. Fixed bug when the prefix from `c-guess-fill-prefix' | |
1268 is longer than the text on the first line of the comment when | |
1269 it's masked. | |
1270 | |
1271 2003-07-03 Martin Stjernholm <bug-cc-mode@gnu.org> | |
1272 | |
1273 * progmodes/cc-cmds.el (c-mask-comment): Fixed bug where point | |
1274 was moved to the following line when it was at the first line | |
1275 of a block comment where comment-start-skip matched to eol. | |
1276 | |
1 2003-07-01 Luc Teirlinck <teirllm@mail.auburn.edu> | 1277 2003-07-01 Luc Teirlinck <teirllm@mail.auburn.edu> |
2 | 1278 |
3 * info.el (Info-fontify-menu-headers): Only fontify `* Menu:' at | 1279 * info.el (Info-fontify-menu-headers): Only fontify `* Menu:' at |
4 the beginning of a line. | 1280 the beginning of a line. |
5 (Info-extract-menu-node-name): Correctly initialize while loop. | 1281 (Info-extract-menu-node-name): Correctly initialize while loop. |