diff options
| author | Alan Mackenzie | 2005-12-08 21:58:00 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2005-12-08 21:58:00 +0000 |
| commit | 9e04cba13e0c79ee6f5832fc798cbcc3cec4de84 (patch) | |
| tree | 9180b9f663572cded14cba81de8d15817c2815dd | |
| parent | 46f6048f0b7165f5e119e572e1d41e162a47c89e (diff) | |
| download | emacs-9e04cba13e0c79ee6f5832fc798cbcc3cec4de84.tar.gz emacs-9e04cba13e0c79ee6f5832fc798cbcc3cec4de84.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/ChangeLog | 1202 |
1 files changed, 1202 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 968b8cc3817..c167d1f104b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,1205 @@ | |||
| 1 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 2 | |||
| 3 | CC Mode update to 5.31. | ||
| 4 | |||
| 5 | * progmodes/cc-subword.el: Add a dummy `c-subword-mode' for | ||
| 6 | Emacsen which lack `define-minor-mode'. (Currently Emacs <21. We | ||
| 7 | might do this function properly in the future). | ||
| 8 | |||
| 9 | * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New | ||
| 10 | macros c-sentence-end and c-default-value-sentence end, to cope | ||
| 11 | with Emacs 22's new function `sentence-end'. | ||
| 12 | |||
| 13 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 14 | |||
| 15 | * progmodes/cc-cmds.el (c-show-syntactic-information): Solved the | ||
| 16 | compat issue using `c-put-overlay' and `c-delete-overlay'. | ||
| 17 | |||
| 18 | * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): New | ||
| 19 | compat macros to handle overlays/extents. | ||
| 20 | |||
| 21 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 22 | |||
| 23 | * progmodes/cc-fix.el: Add definitions of the macros push and pop | ||
| 24 | (for GNU Emacs 20.4) | ||
| 25 | |||
| 26 | * progmodes/cc-defs.el: | ||
| 27 | (i) Load cc-fix.elc for `push' and `pop' (for GNU Emacs 20.4) | ||
| 28 | |||
| 29 | * progmodes/cc-cmds.el (c-show-syntactic-information): change the | ||
| 30 | highlighting mechanism so it will work in XEmacs too. | ||
| 31 | |||
| 32 | * progmodes/cc-defs.el: Insert c-int-to-char. | ||
| 33 | |||
| 34 | * progmodes/cc-langs.el (c-nonsymbol-token-char-list): Insert a | ||
| 35 | call to the new macro c-int-to-char. This solves XEmacs's | ||
| 36 | regarding characters as different from integers. | ||
| 37 | |||
| 38 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 39 | |||
| 40 | * progmodes/cc-fonts.el (c-make-syntactic-matcher): New internal | ||
| 41 | helper. | ||
| 42 | |||
| 43 | (c-cpp-matchers, c-basic-matchers-before): Use the `eval' | ||
| 44 | construct to make the indirect face lookup work in XEmacs. | ||
| 45 | |||
| 46 | (c-cpp-matchers): Append the negation char face to the existing | ||
| 47 | fontification, so that the cpp face doesn't disappear. Use | ||
| 48 | `c-make-syntactic-matcher' to avoid negation chars in comments and | ||
| 49 | strings. | ||
| 50 | |||
| 51 | * progmodes/cc-fonts.el (c-negation-char-face-name): New variable | ||
| 52 | to map to `font-lock-negation-char-face' in emacsen where it | ||
| 53 | exists. | ||
| 54 | |||
| 55 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 56 | |||
| 57 | * progmodes/cc-mode.el: Bind c-subword-mode to C-c C-w. | ||
| 58 | |||
| 59 | * progmodes/cc-subword.el, cc-cmds.el, cc-mode.el: Rename | ||
| 60 | "c-subword-move-mode" as "c-subword-mode". | ||
| 61 | |||
| 62 | * progmodes/cc-mode.el: Added tty suitable bindings for C-c | ||
| 63 | <delete> and C-c C-<delete>. (To the c-hungry- delete functions). | ||
| 64 | |||
| 65 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 66 | |||
| 67 | * progmodes/cc-mode.el: Added autoload directive for | ||
| 68 | `c-subword-move-mode' for use in older emacsen. | ||
| 69 | |||
| 70 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 71 | |||
| 72 | * progmodes/cc-mode.el: | ||
| 73 | (i) Insert a binding for C-c C-backspace into | ||
| 74 | c-bind-special-erase-keys which works in TTYs. | ||
| 75 | (ii) Make sure that when file styles are used, any explicitly | ||
| 76 | given style variables take priority over those in the style. Do | ||
| 77 | this by calling `hack-local-variables' a second time. | ||
| 78 | |||
| 79 | * progmodes/cc-vars.el: Add language specific customization | ||
| 80 | widgets for AWK to c-doc-comment-style, c-require-final-newline | ||
| 81 | and c-default-style. Add a defcustom for awk-mode-hook. Give | ||
| 82 | c-syntactic-element and c-syntactic-context doc-strings by | ||
| 83 | directly setting their `variable-documentation' propery. This | ||
| 84 | allows Emacs 22.1 to read these with C-h v. | ||
| 85 | |||
| 86 | * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan | ||
| 87 | Monnier). | ||
| 88 | |||
| 89 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 90 | |||
| 91 | * progmodes/cc-fonts.el, cc-vars.el | ||
| 92 | (gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection, | ||
| 93 | gtkdoc-font-lock-keywords): GtkDoc patterns contributed by | ||
| 94 | Masatake YAMATO. | ||
| 95 | |||
| 96 | (c-doc-comment-style): Made GtkDoc default in C mode. | ||
| 97 | |||
| 98 | * progmodes/cc-mode.el: Fixed key bindings for C-c C-<backspace> | ||
| 99 | and C-c C-<delete>. | ||
| 100 | |||
| 101 | (c-bind-special-erase-keys): New function for use on | ||
| 102 | `normal-erase-is-backspace-hook' to bind C-c C-<delete> correctly. | ||
| 103 | |||
| 104 | * progmodes/cc-cmds.el (c-hungry-delete): New function to fix | ||
| 105 | <delete> key behavior in XEmacs according to `delete-forward-p'. | ||
| 106 | C.f. `c-electric-delete'. | ||
| 107 | |||
| 108 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 109 | |||
| 110 | * progmodes/cc-mode.el: Give c-hungry-backspace and | ||
| 111 | c-hungry-delete-forward permanent key bindings. | ||
| 112 | |||
| 113 | * progmodes/cc-cmds.el (c-electric-semi&comma): Bind | ||
| 114 | c-syntactic-context for calls to "criteria functions", for | ||
| 115 | consistency with other calls to user functions. | ||
| 116 | |||
| 117 | * progmodes/cc-cmds.el (c-indent-command): expunge use of | ||
| 118 | `current-prefix-arg', since this might be the prefix arg to a | ||
| 119 | command which calls c-indent-command as a function. Change the | ||
| 120 | interactive spec from "p" to "P". | ||
| 121 | |||
| 122 | * progmodes/cc-styles.el: Amend the doc-string of c-set-style, in | ||
| 123 | reponse to a report from Joseph Kiniry <kiniry@acm.org> that it | ||
| 124 | was difficult to understand. | ||
| 125 | |||
| 126 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 127 | |||
| 128 | * progmodes/cc-engine.el (c-on-identifier): Fixed bug when at the | ||
| 129 | first char of an identifier. | ||
| 130 | |||
| 131 | * progmodes/cc-engine.el (c-on-identifier): Handle the "operator | ||
| 132 | +" syntax in C++. | ||
| 133 | |||
| 134 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 135 | |||
| 136 | * progmodes/cc-cmds.el (c-mask-paragraph): correct, so that | ||
| 137 | auto-fill doesn't split a c-comment's last word from a hanging | ||
| 138 | "*/" when a space is typed between them after fill-column. | ||
| 139 | |||
| 140 | * progmodes/cc-defs.el: New macro c-delete-and-extract-region. | ||
| 141 | |||
| 142 | * progmodes/cc-styles.el (c-set-style, | ||
| 143 | c-setup-paragraph-variables): Abort the command if we're not in a | ||
| 144 | CC Mode buffer. | ||
| 145 | |||
| 146 | * progmodes/cc-align.el (c-lineup-C-comments): Correct indentation | ||
| 147 | with blank comment-prefix, and a blank line as the comment's | ||
| 148 | second line. | ||
| 149 | |||
| 150 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 151 | |||
| 152 | * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before): | ||
| 153 | Incorporated the patterns added in the Emacs development branch | ||
| 154 | for the new Emacs 22 face `font-lock-negation-char-face'. | ||
| 155 | |||
| 156 | * progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead | ||
| 157 | of "red" since it stands out better in xterms and DOS terminals. | ||
| 158 | |||
| 159 | * progmodes/cc-engine.el (c-literal-faces): Added | ||
| 160 | `font-lock-comment-delimiter-face' which is new in Emacs 22. | ||
| 161 | |||
| 162 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 163 | |||
| 164 | * progmodes/cc-cmds.el: Make C-c C-a (`c-toggle-auto-newline') | ||
| 165 | forcibly enable c-electric-flag. | ||
| 166 | |||
| 167 | * progmodes/cc-vars.el, cc-cmds.el: New clean-up | ||
| 168 | `comment-close-slash' on c-electric-slash: if enabled, typing `/' | ||
| 169 | just after the comment-prefix of a C-style comment will close that | ||
| 170 | comment. | ||
| 171 | |||
| 172 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 173 | |||
| 174 | * progmodes/cc-fonts.el (c-basic-matchers-before, | ||
| 175 | c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used | ||
| 176 | in Pike. | ||
| 177 | |||
| 178 | * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has | ||
| 179 | digraphs. | ||
| 180 | |||
| 181 | * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el | ||
| 182 | (c-cpp-message-directives, c-cpp-include-directives, | ||
| 183 | c-opt-cpp-macro-define, c-opt-cpp-macro-define-start, | ||
| 184 | c-cpp-expr-directives): Introduced new language constants to | ||
| 185 | control cpp syntax in a cleaner way. | ||
| 186 | |||
| 187 | (c-cpp-expr-functions): Renamed from c-cpp-defined-fns. | ||
| 188 | |||
| 189 | (c-cpp-matchers, c-forward-to-cpp-define-body): Use them. | ||
| 190 | |||
| 191 | * progmodes/cc-langs.el, cc-fonts.el (c-string-escaped-newlines, | ||
| 192 | c-multiline-string-start-char): New language constants and | ||
| 193 | variables to specify how newlines in string literals work. | ||
| 194 | |||
| 195 | (c-font-lock-invalid-string): Use them. | ||
| 196 | |||
| 197 | * progmodes/cc-cmds.el (c-try-one-liner): Robustness fix if an | ||
| 198 | unbalanced close brace is entered. Optimization by avoiding going | ||
| 199 | back over arbitrarily large blocks. Removed hints that this | ||
| 200 | function only would be relevant/useful in AWK. | ||
| 201 | |||
| 202 | (c-electric-brace): Indent syntactically after the cleanups since | ||
| 203 | lineup functions might do it differently then. | ||
| 204 | |||
| 205 | * progmodes/cc-engine.el, cc-langs.el | ||
| 206 | (c-opt-op-identifier-prefix): New language constant and variable. | ||
| 207 | |||
| 208 | (c-just-after-func-arglist-p, c-after-special-operator-id, | ||
| 209 | c-search-decl-header-end, c-inside-bracelist-p): Use it. | ||
| 210 | |||
| 211 | * progmodes/cc-align.el, cc-engine.el | ||
| 212 | (c-after-special-operator-id): New helper to handle C++ operator | ||
| 213 | identifiers. | ||
| 214 | |||
| 215 | (c-lineup-topmost-intro-cont, c-just-after-func-arglist-p, | ||
| 216 | c-guess-basic-syntax): Handle C++ operator identifiers in | ||
| 217 | declarations. | ||
| 218 | |||
| 219 | * progmodes/cc-langs.el (c-assignment-operators): Added the | ||
| 220 | trigraph version of ^= too. | ||
| 221 | |||
| 222 | * progmodes/cc-langs.el (c-assignment-operators): Added the | ||
| 223 | trigraph version of |= in C++. | ||
| 224 | |||
| 225 | * progmodes/cc-fonts.el (c-font-lock-declarators): Handle | ||
| 226 | `c-decl-hangon-kwds' after the identifier name. | ||
| 227 | |||
| 228 | * progmodes/cc-engine.el (c-guess-basic-syntax): When deciding | ||
| 229 | whether an arglist is "nonempty", ignore a comment after the open | ||
| 230 | paren if it isn't followed by a non-comment token on the same | ||
| 231 | line. | ||
| 232 | |||
| 233 | * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: Enable | ||
| 234 | heuristics below the point to cope with classes inside special | ||
| 235 | brace lists in Pike. | ||
| 236 | |||
| 237 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 238 | |||
| 239 | * progmodes/cc-cmds.el: Amend c-point-syntax to handle macros. | ||
| 240 | |||
| 241 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 242 | |||
| 243 | * progmodes/cc-guess.el (cc-guess-install): New function to | ||
| 244 | install an already guessed style in another buffer. | ||
| 245 | |||
| 246 | * progmodes/cc-defs.el (c-tentative-buffer-changes): No longer | ||
| 247 | sets `inhibit-read-only' - `c-save-buffer-state' should be used | ||
| 248 | anyway if the change always is undone. | ||
| 249 | |||
| 250 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 251 | |||
| 252 | Implement togglable electricity: | ||
| 253 | |||
| 254 | * progmodes/cc-defs.el: Enhance c-save-buffer-state's doc-string, | ||
| 255 | saying when it should be used. | ||
| 256 | |||
| 257 | * progmodes/cc-engine.el: Add the new buffer-local variable, | ||
| 258 | c-electric-flag. | ||
| 259 | |||
| 260 | * progmodes/cc-langs.el: Change the name of c-toggle-auto-state to | ||
| 261 | c-toggle-auto-newline. | ||
| 262 | |||
| 263 | * progmodes/cc-mode.el: Rename c-toggle-auto-state to | ||
| 264 | c-toggle-auto-newline. Remove the binding for | ||
| 265 | c-toggle-auto-hungry-state. Add the binding C-c C-l for the new | ||
| 266 | c-toggle-electric-state. | ||
| 267 | |||
| 268 | * progmodes/cc-vars.el: Make c-syntactic-indentation buffer local. | ||
| 269 | |||
| 270 | * progmodes/cc-cmds.el: Add `c-bytecomp-defun's for | ||
| 271 | c-\(forward\|backward\)-subword. | ||
| 272 | (c-update-modeline): Add the new modeline flag `l' for | ||
| 273 | `c-electric-flag'. Make the auto-newline flag `a' dependent on | ||
| 274 | `l'. | ||
| 275 | (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. Make | ||
| 276 | the old name an alias of the new name. | ||
| 277 | (c-toggle-electric-state): New function. | ||
| 278 | c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\): | ||
| 279 | Adapt these functions to do electric things only when | ||
| 280 | c-electric-flag is non-nil. | ||
| 281 | (c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these | ||
| 282 | new functions from c-electric-brace. | ||
| 283 | (c-point-syntax): Add a check for "virtual semicolons" in AWK | ||
| 284 | mode, so that the tentative extra newline doesn't change the | ||
| 285 | syntax of the following brace. | ||
| 286 | (c-electric-brace): restructure by extracting the above functions. | ||
| 287 | Tidy up the coding somewhat. | ||
| 288 | (c-electric-semi&comma, c-electric-colon, c-electric-paren): | ||
| 289 | restructure a bit. | ||
| 290 | |||
| 291 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 292 | |||
| 293 | * progmodes/cc-cmds.el (c-show-syntactic-information): Show the | ||
| 294 | anchor position(s) using faces. Thanks to Masatake YAMATO for the | ||
| 295 | idea. | ||
| 296 | |||
| 297 | * progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el | ||
| 298 | (c-submode-indicators): Changed name from `c-auto-hungry-string' | ||
| 299 | since it's now used to track another submode. | ||
| 300 | |||
| 301 | (c-update-modeline): Converted to function and extended to check | ||
| 302 | `c-subword-move-mode'. | ||
| 303 | |||
| 304 | (c-forward-into-nomenclature, c-backward-into-nomenclature): | ||
| 305 | Converted to compat aliases for `c-forward-subword' and | ||
| 306 | `c-backward-subword'. | ||
| 307 | |||
| 308 | * progmodes/cc-subword.el: New functions and minor mode to handle | ||
| 309 | SillyCapsedStyleIndentifiers, contributed by Masatake YAMATO: | ||
| 310 | |||
| 311 | (c-forward-subword, c-backward-subword, c-mark-subword, | ||
| 312 | c-kill-subword, c-backward-kill-subword, c-transpose-subwords, | ||
| 313 | c-capitalize-subword, c-downcase-subword, c-upcase-subword): | ||
| 314 | Functions corresponding to the standard word handling functions. | ||
| 315 | |||
| 316 | (c-subword-move-mode): Minor mode that replaces all the standard | ||
| 317 | word handling functions with their subword equivalences. | ||
| 318 | |||
| 319 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 320 | |||
| 321 | * progmodes/cc-vars.el (c-cleanup-list): Insert a customization | ||
| 322 | entry for one-liner-defun. | ||
| 323 | |||
| 324 | * progmodes/cc-defs.el: Give c-tentative-buffer-changes its own | ||
| 325 | name in its def-edebug-spec. | ||
| 326 | |||
| 327 | * progmodes/cc-cmds.el (c-electric-brace): Make the | ||
| 328 | one-liner-defun clean-up work with empty-defun-braces. o-l-d now | ||
| 329 | compacts space before a comment, if this will make things fit on | ||
| 330 | one line. | ||
| 331 | |||
| 332 | Introduce an "awk" style, mainly for auto-newline and clean-ups. | ||
| 333 | |||
| 334 | * progmodes/cc-align.el: new function c-snug-1line-defun-close | ||
| 335 | |||
| 336 | * progmodes/cc-cmds.el: In c-electric-brace, add code for new | ||
| 337 | clean-up one-liner-defun. | ||
| 338 | |||
| 339 | * progmodes/cc-styles.el: Add the new "awk" style. | ||
| 340 | |||
| 341 | * progmodes/cc-vars.el: Add description of one-liner-defun to | ||
| 342 | c-cleanup-list's doc-string. New user options, | ||
| 343 | c-max-one-liner-length. In c-default-style, set the default style | ||
| 344 | for AWK to "awk". | ||
| 345 | |||
| 346 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 347 | |||
| 348 | * progmodes/cc-engine.el (c-forward-label): Fixed fontification of | ||
| 349 | macros inside labels. | ||
| 350 | |||
| 351 | * progmodes/cc-engine.el (c-looking-at-bos): Obsoleted in favor of | ||
| 352 | `c-at-statement-start-p' and `c-at-expression-start-p'. | ||
| 353 | |||
| 354 | * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an | ||
| 355 | error if the mark isn't set. | ||
| 356 | |||
| 357 | * progmodes/cc-engine.el (c-guess-continued-construct, | ||
| 358 | c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more | ||
| 359 | accurately detect functions inside functions. | ||
| 360 | |||
| 361 | * progmodes/cc-engine.el (c-at-expression-start-p): New function | ||
| 362 | like `c-at-statement-start-p' that additionally recognizes commas | ||
| 363 | and expression parentheses as delimiters. | ||
| 364 | |||
| 365 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): Added flag | ||
| 366 | to avoid heuristics that doesn't work for unclosed blocks. | ||
| 367 | |||
| 368 | (c-at-statement-start-p): New function. | ||
| 369 | |||
| 370 | * progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of | ||
| 371 | Objective-C directives, e.g. directives spanning lines should work | ||
| 372 | reasonably well now. | ||
| 373 | |||
| 374 | (c-put-c-type-property, c-clear-c-type-property): New helpers. | ||
| 375 | |||
| 376 | (c-forward-objc-directive): New function to move over any ObjC | ||
| 377 | directive. | ||
| 378 | |||
| 379 | (c-just-after-func-arglist-p, c-guess-basic-syntax, | ||
| 380 | c-basic-matchers-before): Use it. | ||
| 381 | |||
| 382 | (c-font-lock-objc-iip-decl): Removed. | ||
| 383 | |||
| 384 | * progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement | ||
| 385 | in the template arglist recognition. | ||
| 386 | |||
| 387 | * progmodes/cc-styles.el (c-style-alist): Fixed several | ||
| 388 | inconsistencies in the Whitesmith style. | ||
| 389 | |||
| 390 | * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): New | ||
| 391 | lineup function to get lines after Whitesmith style blocks | ||
| 392 | correctly indented. | ||
| 393 | |||
| 394 | (c-lineup-whitesmith-in-block): Backed out the compensation for | ||
| 395 | opening parens since it's done using `add' lists in the style | ||
| 396 | definition instead. Don't use the anchor position since it varies | ||
| 397 | too much between the syntactic symbols. :P | ||
| 398 | |||
| 399 | * progmodes/cc-vars.el (c-valid-offset): Updated. | ||
| 400 | |||
| 401 | * progmodes/cc-engine.el (c-evaluate-offset): Extended to handle | ||
| 402 | lists where the offsets are combined according to several | ||
| 403 | different methods: `first', `min', `max', and `add'. Report | ||
| 404 | offset evaluation errors with `c-benign-error' so that some kind | ||
| 405 | of reindentation still is done. | ||
| 406 | |||
| 407 | * progmodes/cc-engine.el (c-guess-basic-syntax): Anchor | ||
| 408 | `arglist-intro' the same way as `arglist-cont-nonempty' and | ||
| 409 | `arglist-close'. | ||
| 410 | |||
| 411 | * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed similar | ||
| 412 | situations for `arglist-cont-nonempty' and `arglist-close'. | ||
| 413 | |||
| 414 | * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New | ||
| 415 | constant. | ||
| 416 | |||
| 417 | * progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and | ||
| 418 | cc-bytecomp-boundp' in a number of places. | ||
| 419 | |||
| 420 | * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a | ||
| 421 | macro related issue. | ||
| 422 | |||
| 423 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 424 | |||
| 425 | * progmodes/cc-awk.el: Change the terminology of regexps: A char | ||
| 426 | list is now | ||
| 427 | [asdf], a char class [:alpha:]. Include code for char classes. | ||
| 428 | Set c-awk-NL-prop on lines ending in open strings. (Bug fix.) | ||
| 429 | Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps. | ||
| 430 | |||
| 431 | Remove (nearly all of) the cruft associated with AWK Mode's former | ||
| 432 | concept of "virtual semicolons": | ||
| 433 | |||
| 434 | Adapt c-beginning-of-statement, c-end-of-statement (together with | ||
| 435 | subfunctions) to use the new notion of "virtual semicolon" in | ||
| 436 | place of the old awkward special handling for AWK. There remains | ||
| 437 | much cruft in cc-awk.el, cc-cmds.el and cc-engine.el to clear out. | ||
| 438 | * progmodes/cc-cmds.el: | ||
| 439 | (c-ascertain-adjacent-literal): In the backwards direction, now | ||
| 440 | recognises AWK regexp delimiters as string delimiters. | ||
| 441 | (c-after-statement-terminator-p): Adapt for virtual semicolons; | ||
| 442 | check more rigorously for "end of macro". | ||
| 443 | (c-back-over-illiterals, c-forward-over-illiterals): Adapt for | ||
| 444 | virtual semicolons; | ||
| 445 | (c-beginning-of-statement): Adapt for virtual semicolons; Separate | ||
| 446 | out the code for forward movement into ... | ||
| 447 | (c-end-of-statement): Now contains the code for forward movement, | ||
| 448 | adapted for virtual semicolons. | ||
| 449 | |||
| 450 | * progmodes/cc-engine.el: | ||
| 451 | (c-ws*-string-limit-regexp): new regexp. | ||
| 452 | (c-forward-single-comment, c-backward-single-comment): Comment out | ||
| 453 | the (now redundant) "special" AWK stuff. | ||
| 454 | |||
| 455 | * progmodes/cc-styles.el, cc-vars.el: Change the settings of | ||
| 456 | c-string-par-start, c-string-par-separate to be more like Text | ||
| 457 | Mode than Fundamental Mode. | ||
| 458 | |||
| 459 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 460 | |||
| 461 | * progmodes/cc-fonts.el (c-font-lock-declarations): Always narrow | ||
| 462 | to the fontified region so that fontification doesn't occur | ||
| 463 | outside it | ||
| 464 | (could happen e.g. when fontifying a line with an unfinished | ||
| 465 | declaration). | ||
| 466 | |||
| 467 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 468 | |||
| 469 | * progmodes/cc-awk.el: Regexps for analysing AWK code have been | ||
| 470 | moved to near the start of the file. ^L now separate sections of | ||
| 471 | the file. New defconsts: c-awk-non-eol-esc-pair-re, | ||
| 472 | c-awk-blank-or-comment-line-re, | ||
| 473 | c-awk-one-line-possibly-open-string-re, | ||
| 474 | c-awk-regexp-one-line-possibly-open-char-class-re, | ||
| 475 | c-awk-one-line-possibly-open-regexp-re, | ||
| 476 | c-awk-one-line-non-syn-ws*-re. New functions: c-awk-at-vsemi-p, | ||
| 477 | c-awk-vsemi-status-unknown-p. | ||
| 478 | |||
| 479 | Amend the concept of "virtual semicolons" (in the indentation | ||
| 480 | engine) for languages like AWK, such that they are now | ||
| 481 | conceptually attached to end of the last token of a statement, not | ||
| 482 | the end of the line. (In AWK Mode, however, the pertinent text | ||
| 483 | property is still physically set on the EOL.) Remove the specific | ||
| 484 | tests for awk-mode, thus facilitating the introduction of other | ||
| 485 | language modes where EOLs can end statements. (Note: The | ||
| 486 | funtionality in cc-cmds.el, specifically | ||
| 487 | c-beginning/end-of-statement has yet to be amended.) | ||
| 488 | |||
| 489 | * progmodes/cc-defs.el: New macros c-at-vsemi-p, | ||
| 490 | c-vsemi-status-unknown-p. | ||
| 491 | |||
| 492 | * progmodes/cc-langs.el: Added `#' into AWK Mode's value of | ||
| 493 | c-stmt-delim-chars. New c-lang-defvars: c-at-vsemi-p-fn, | ||
| 494 | c-vsemi-status-unknown-p-fn (in a new page). | ||
| 495 | |||
| 496 | * progmodes/cc-engine.el: In c-beginning-of-statement-1, | ||
| 497 | c-crosses-statement-barrier-p, c-guess-basic-syntax, replace | ||
| 498 | numerous awkward forms like | ||
| 499 | (if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p)) | ||
| 500 | with | ||
| 501 | (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new | ||
| 502 | variable before-ws-ip, the place just after char-before-ip | ||
| 503 | appears. | ||
| 504 | |||
| 505 | * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in | ||
| 506 | a comment. | ||
| 507 | |||
| 508 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 509 | |||
| 510 | * progmodes/cc-cmds.el (c-electric-brace): Cleaned up using | ||
| 511 | `c-tentative-buffer-changes'. | ||
| 512 | |||
| 513 | * progmodes/cc-defs.el (c-region-is-active-p): Simplified and | ||
| 514 | converted to macro to choose between Emacs and XEmacs at compile | ||
| 515 | time. | ||
| 516 | |||
| 517 | (c-set-region-active): New set counterpart to | ||
| 518 | `c-region-is-active-p'. | ||
| 519 | |||
| 520 | (c-tentative-buffer-changes): New macro to handle temporary buffer | ||
| 521 | changes in a convenient way. | ||
| 522 | |||
| 523 | (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers | ||
| 524 | for `c-tentative-buffer-changes'. | ||
| 525 | |||
| 526 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tightened up | ||
| 527 | the checks for paren sexps between the point and the keyword, to | ||
| 528 | avoid some false alarms. | ||
| 529 | |||
| 530 | * progmodes/cc-engine.el, cc-langs.el (c-looking-at-inexpr-block): | ||
| 531 | Fixed a situation where an error could be thrown for unbalanced | ||
| 532 | parens. Changed to make use of c-keyword-member' to avoid some | ||
| 533 | repeated regexp matches. | ||
| 534 | |||
| 535 | (c-opt-lambda-key, c-opt-inexpr-block-key, | ||
| 536 | c-opt-inexpr-class-key): These language variable are no longer | ||
| 537 | necessary. | ||
| 538 | |||
| 539 | (c-block-stmt-kwds): New language constant used by | ||
| 540 | c-looking-at-inexpr-block'. | ||
| 541 | |||
| 542 | (c-guess-basic-syntax): Removed an optional check that looked at | ||
| 543 | the existence of the now removed language variables. | ||
| 544 | |||
| 545 | * progmodes/cc-engine.el (c-fdoc-shift-type-backward, | ||
| 546 | c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style | ||
| 547 | object instantiation expressions as declarations in some contexts. | ||
| 548 | This bug only affected languages where the declarator can't be | ||
| 549 | enclosed in parentheses. | ||
| 550 | |||
| 551 | * progmodes/cc-styles.el (c-style-alist): Fixed the GNU style to | ||
| 552 | insert newlines before and after substatement braces. | ||
| 553 | |||
| 554 | * progmodes/cc-engine.el: Improved the heuristics for recognizing | ||
| 555 | function declaration headers and the handling of C++ style member | ||
| 556 | init lists. | ||
| 557 | |||
| 558 | (c-just-after-func-arglist-p): Rewritten to use | ||
| 559 | `c-forward-decl-or-cast-1'. Now behaves a bit differently too. | ||
| 560 | |||
| 561 | (c-beginning-of-member-init-list): Removed since it isn't used | ||
| 562 | anymore. | ||
| 563 | |||
| 564 | (c-guess-basic-syntax): Case 5B adapted for the new | ||
| 565 | `c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases | ||
| 566 | 5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1 | ||
| 567 | covers all cases now). | ||
| 568 | |||
| 569 | * progmodes/cc-defs.el (c-point): Added 'bosws and 'eosws. | ||
| 570 | |||
| 571 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 572 | |||
| 573 | * progmodes/cc-cmds.el, cc-styles.el, cc-vars.el: New variables | ||
| 574 | c-string-par-start/separate c-sentence-end-with-esc-eol, | ||
| 575 | initialised in c-setup-paragraph-variables, used in string | ||
| 576 | scanning subroutines of c-beginning-of-statement. | ||
| 577 | |||
| 578 | * progmodes/cc-cmds.el (c-electric-brace): don't delete a comment | ||
| 579 | which precedes the newly inserted `{'. | ||
| 580 | |||
| 581 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 582 | |||
| 583 | * progmodes/cc-engine.el, cc-langs.el: Rewrote the recognition | ||
| 584 | function for declaration level blocks. It should now cope with | ||
| 585 | templates better and also be a lot more comprehensible. | ||
| 586 | |||
| 587 | (c-looking-at-decl-block): The new function. | ||
| 588 | |||
| 589 | (c-search-uplist-for-classkey): The old one. It's now a wrapper | ||
| 590 | for compatibility. | ||
| 591 | |||
| 592 | (c-add-class-syntax, c-guess-continued-construct, | ||
| 593 | c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'. | ||
| 594 | |||
| 595 | (c-decl-block-key): Changed to tell apart ambiguous and | ||
| 596 | unambiguous keywords. Pike specials are now handled directly in | ||
| 597 | the code instead. | ||
| 598 | |||
| 599 | (c-block-prefix-disallowed-chars, c-block-prefix-charset): New | ||
| 600 | language constants and variables to make the backward skip in | ||
| 601 | `c-looking-at-decl-block' as tight as possible. | ||
| 602 | |||
| 603 | (c-nonsymbol-token-char-list): New language constant. | ||
| 604 | |||
| 605 | * progmodes/cc-engine.el (c-backward-<>-arglist): New function to | ||
| 606 | find balanced template arglists backwards. | ||
| 607 | |||
| 608 | * progmodes/cc-defs.el (c-make-bare-char-alt): New helper for | ||
| 609 | making char classes for `c-syntactic-skip-backward'. | ||
| 610 | |||
| 611 | * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case | ||
| 612 | 16D - can't be a class-close at that point. | ||
| 613 | |||
| 614 | * progmodes/cc-engine.el (c-guess-basic-syntax, | ||
| 615 | c-add-class-syntax): Don't narrow out the enclosing declaration | ||
| 616 | level. This makes everything a lot easier, and it was actually | ||
| 617 | only four small places that needed it to work. Some places that | ||
| 618 | previously did `widen' are removed now, which has the effect that | ||
| 619 | `c-guess-basic-syntax' never will look at things outside the | ||
| 620 | current narrowment now. The anchor position for `topmost-intro' | ||
| 621 | is affected by this, but it was so bogus it was basically useless | ||
| 622 | before, and now it's equally bogus but in a slightly different | ||
| 623 | way. | ||
| 624 | |||
| 625 | (c-narrow-out-enclosing-class): Gone. | ||
| 626 | |||
| 627 | (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to | ||
| 628 | the narrowed region. | ||
| 629 | |||
| 630 | (c-least-enclosing-brace): Removed silly optional argument. | ||
| 631 | |||
| 632 | * progmodes/cc-engine.el (c-beginning-of-decl-1): Fixed bug where | ||
| 633 | the point could be left directly after an open paren when finding | ||
| 634 | the beginning of the first decl in the block. | ||
| 635 | |||
| 636 | * progmodes/cc-engine.el, cc-fonts.el (c-forward-keyword-clause): | ||
| 637 | Specify which submatch to use. | ||
| 638 | |||
| 639 | * progmodes/cc-langs.el (c-symbol-start): Include '@' in ObjC. | ||
| 640 | |||
| 641 | (c-decl-start-re): No no longer any need for special treatment of | ||
| 642 | ObjC due to the above. | ||
| 643 | |||
| 644 | (c-other-block-decl-kwds): Handle "extern" in ObjC too since it | ||
| 645 | presumably follows C in that regard. | ||
| 646 | |||
| 647 | * progmodes/cc-langs.el (c-identifier-ops, c-after-id-concat-ops): | ||
| 648 | New language constants to specify operator tokens inside | ||
| 649 | identifiers in a more high level way. | ||
| 650 | |||
| 651 | (c-opt-identifier-prefix-key): New internal language constant. | ||
| 652 | |||
| 653 | (c-opt-identifier-concat-key, c-opt-after-id-concat-key, | ||
| 654 | c-identifier-start, c-identifier-key): Now completely calculated | ||
| 655 | from other constants. | ||
| 656 | |||
| 657 | (c-identifier-last-sym-match): Decommissioned since it's no longer | ||
| 658 | used. | ||
| 659 | |||
| 660 | (c-operators): Use `c-identifier-ops'. Documented | ||
| 661 | `postfix-if-paren'. | ||
| 662 | |||
| 663 | * progmodes/cc-engine.el (c-forward-name): Removed the | ||
| 664 | optimization when c-identifier-key is equal to c-symbol-key since | ||
| 665 | it doesn't work in byte compiled files. Don't record empty | ||
| 666 | regions as identifiers. | ||
| 667 | |||
| 668 | * progmodes/cc-langs.el (c-filter-ops): New helper function to | ||
| 669 | simplify access to `c-operators' and its likes. | ||
| 670 | |||
| 671 | (c-operator-list, c-all-op-syntax-tokens, | ||
| 672 | c-nonsymbol-token-regexp, c-<>-multichar-token-regexp, | ||
| 673 | c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds, | ||
| 674 | c-primary-expr-regexp, c-cast-parens): Use it. | ||
| 675 | |||
| 676 | * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without | ||
| 677 | an explicit language in functions. | ||
| 678 | |||
| 679 | * progmodes/cc-defs.el (c-make-keywords-re): Added an appendable | ||
| 680 | variant of adornment. | ||
| 681 | |||
| 682 | * progmodes/cc-langs.el (c-any-class-key): Removed unused language | ||
| 683 | variable. | ||
| 684 | |||
| 685 | (c-type-decl-prefix-key): Removed some now unnecessary cruft from | ||
| 686 | the Pike value. | ||
| 687 | |||
| 688 | * progmodes/cc-engine.el (c-on-identifier, | ||
| 689 | c-simple-skip-symbol-backward): Small fix for handling "-" | ||
| 690 | correctly in `skip-chars-backward'. Affected the operator lfun | ||
| 691 | syntax in Pike. | ||
| 692 | |||
| 693 | * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disabled the | ||
| 694 | diagnostic message about precompiled language vars not being used. | ||
| 695 | |||
| 696 | * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword | ||
| 697 | "__attribute__" is followed by a parenthesis. | ||
| 698 | |||
| 699 | (c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re, | ||
| 700 | c-specifier-key, c-not-decl-init-keywords): Some cleanup using new | ||
| 701 | language constants `c-type-start-kwds' and `c-prefix-spec-kwds'. | ||
| 702 | |||
| 703 | * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal | ||
| 704 | cleanups to properly detect the declared identifiers in various | ||
| 705 | declarations. | ||
| 706 | |||
| 707 | (c-decl-start-kwds): New language constant to recognize | ||
| 708 | declarations that can start anywhere. Used for class declarations | ||
| 709 | in Pike. | ||
| 710 | |||
| 711 | (c-specifier-key, c-not-decl-init-keywords, | ||
| 712 | c-decl-prefix-or-start-re, c-find-decl-prefix-search, | ||
| 713 | c-find-decl-spots): Implement `c-decl-start-kwds'. | ||
| 714 | |||
| 715 | (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds, | ||
| 716 | c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the | ||
| 717 | handling of the compiler specific extension keywords into a new | ||
| 718 | language constant `c-decl-hangon-kwds' that defines keyword | ||
| 719 | clauses to be ignored in declarations. | ||
| 720 | |||
| 721 | (c-forward-id-comma-list, c-forward-keyword-clause): Don't skip | ||
| 722 | past unrecognized tokens when handling `c-colon-type-list-kwds'. | ||
| 723 | Necessary to stop at the declared identifier in e.g. IDL valuetype | ||
| 724 | declarations. | ||
| 725 | |||
| 726 | (c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds, | ||
| 727 | c-prefix-spec-kwds-re, c-postfix-spec-kwds, | ||
| 728 | c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key, | ||
| 729 | c-forward-decl-or-cast-1): Recognize the declared identifier in | ||
| 730 | class and enum declarations as such and not as part of the type. | ||
| 731 | |||
| 732 | (c-forward-decl-or-cast-1, c-forward-label): Relaxed the | ||
| 733 | interpretation of PRECEDING-TOKEN-END when there's no preceding | ||
| 734 | token. | ||
| 735 | |||
| 736 | (c-forward-decl-or-cast-1): Don't disregard sure signs of | ||
| 737 | declarations when there's some syntax error later on. | ||
| 738 | |||
| 739 | (c-complex-decl-matchers): Did away with a reference to | ||
| 740 | `c-specifier-key'. | ||
| 741 | |||
| 742 | * progmodes/cc-engine.el (c-maybe-labelp): Provide no default | ||
| 743 | value - this variable is always dynamically bound. | ||
| 744 | |||
| 745 | * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el, | ||
| 746 | cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el, | ||
| 747 | cc-cmds.el, cc-defs.el: Changed the policy for marking up | ||
| 748 | functions that might do hidden buffer changes: All such internal | ||
| 749 | functions are now marked instead of those that don't. | ||
| 750 | |||
| 751 | (c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments, | ||
| 752 | c-(forward|backward)-single-comment, c-parse-state, c-on-identifier, | ||
| 753 | c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments, | ||
| 754 | c-literal-type): Allow these functions to make hidden buffer changes, | ||
| 755 | so that they are free to use text property caching later on. | ||
| 756 | |||
| 757 | (c-electric-backspace, c-electric-delete-forward, c-electric-pound, | ||
| 758 | c-electric-brace, c-electric-slash, c-electric-star, | ||
| 759 | c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, | ||
| 760 | c-electric-paren, c-electric-continued-statement, c-indent-command, | ||
| 761 | c-indent-region, c-mask-paragraph, c-indent-new-comment-line, | ||
| 762 | c-context-line-break): Added `c-save-buffer-state' calls to comply | ||
| 763 | with the changed semantics of the functions above. | ||
| 764 | |||
| 765 | * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug | ||
| 766 | when macros occur in obscure places. Optimized the sexp movement | ||
| 767 | a bit. | ||
| 768 | |||
| 769 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 770 | |||
| 771 | Enhancements for c-beginning-of-statement to work in AWK Mode: | ||
| 772 | |||
| 773 | * progmodes/cc-awk.el: Supersede c-awk-NL-prop value `;' | ||
| 774 | (completed statement) with `}' (statement completed by closing | ||
| 775 | brace or semicolon) and `$' (statement completed by EOL). | ||
| 776 | |||
| 777 | (c-awk-virtual-semicolon-ends-prev-line-p, | ||
| 778 | c-awk-virtual-semicolon-ends-line-p, | ||
| 779 | c-awk-skip-semantic-ws-forward, c-awk-skip-semantic-ws-backward, | ||
| 780 | c-awk-at-statement-end-p): new functions | ||
| 781 | |||
| 782 | * progmodes/cc-cmds.el: Simplify the structure of functions | ||
| 783 | c-forward-over-illiterals, c-back-over-illiterals. Enhance these | ||
| 784 | two functions and c-beginning-of-statement to handle AWK Mode. | ||
| 785 | |||
| 786 | * progmodes/cc-engine.el: Enhance c-forward-single-comment, | ||
| 787 | c-backward-single-comment for AWK mode. Attempt to clarify their | ||
| 788 | doc-strings. | ||
| 789 | |||
| 790 | * progmodes/cc-mode.el: Put M-a and M-e into awk-mode-map. | ||
| 791 | |||
| 792 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 793 | |||
| 794 | * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the | ||
| 795 | label handling. Labels are now recognized in a uniform and more | ||
| 796 | robust way, regardless of context. Text properties are put on all | ||
| 797 | labels to recognize the following declarations better. Multiword | ||
| 798 | labels are handled both in indentation and fontification for the | ||
| 799 | benefit of language extensions like Qt. For consistency, keywords | ||
| 800 | in labels are now fontified with the label face instead. That | ||
| 801 | also applies to "case" and "default". | ||
| 802 | |||
| 803 | (c-beginning-of-statement-1): Fixed some bugs in the label | ||
| 804 | handling. Disregard `c-nonlabel-token-key' in labels that begin | ||
| 805 | with `c-label-kwds'. | ||
| 806 | |||
| 807 | (c-find-decl-spots): Support that the callback adds more | ||
| 808 | `c-decl-end' spots to find. | ||
| 809 | |||
| 810 | (c-forward-decl-or-cast-1): Don't treat a list of plain | ||
| 811 | identifiers followed by a colon as a declaration. | ||
| 812 | |||
| 813 | (c-forward-label): New function to recognize labels. | ||
| 814 | |||
| 815 | (c-guess-basic-syntax): Replaced uses of `c-label-key' with | ||
| 816 | `c-forward-label'. Moved the label recognition cases (14 and 15) | ||
| 817 | earlier since they aren't so context sensitive now. Handle labels | ||
| 818 | on the top level gracefully. Moved access label recognition to | ||
| 819 | the generic label case (CASE 15) - removed CASE 5E. | ||
| 820 | |||
| 821 | (c-font-lock-declarations): Added recognition of labels in the | ||
| 822 | same round since we need to handle labels in parallell with other | ||
| 823 | declarations to recognize both accurately. It should also improve | ||
| 824 | speed. | ||
| 825 | |||
| 826 | (c-simple-decl-matchers, c-basic-matchers-after): Moved | ||
| 827 | `c-font-lock-labels' so that it only is used on decoration level 2 | ||
| 828 | since `c-font-lock-declarations' handles it otherwise. | ||
| 829 | |||
| 830 | (c-complex-decl-matchers): Removed the simplistic recognition of | ||
| 831 | access labels. | ||
| 832 | |||
| 833 | (c-decl-prefix-re): Removed the kludges that was necessary to cope | ||
| 834 | with labels earlier. | ||
| 835 | |||
| 836 | (c-decl-start-re): New language variable to make | ||
| 837 | `c-font-lock-declarations' stop for the special protection labels | ||
| 838 | in Objective-C that start with '@'. | ||
| 839 | |||
| 840 | (c-label-key): Removed since it's no longer used. | ||
| 841 | |||
| 842 | (c-recognize-colon-labels, c-label-prefix-re): New language | ||
| 843 | constants to support recognition of generic colon-terminated | ||
| 844 | labels. | ||
| 845 | |||
| 846 | (c-type-decl-end-used): `c-decl-end' is now used whenever there | ||
| 847 | are colon terminated labels. | ||
| 848 | |||
| 849 | * progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the | ||
| 850 | first argument starts with a special brace list. | ||
| 851 | |||
| 852 | * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1, | ||
| 853 | c-font-lock-declarations): Broke out the declaration and cast | ||
| 854 | recognition from `c-font-lock-declarations' to a new function, so | ||
| 855 | that it can be used in the indentation engine. | ||
| 856 | |||
| 857 | * progmodes/cc-engine.el (c-find-decl-spots): Fixed bug in backing | ||
| 858 | up to the start of the literal. Fixed bug with the point on the | ||
| 859 | wrong side of the search limit that could happen when the start | ||
| 860 | position is inside a literal. | ||
| 861 | |||
| 862 | * progmodes/cc-engine.el (c-parse-state, | ||
| 863 | c-invalidate-state-cache): Modified the use of `c-state-cache-end' | ||
| 864 | so that it's kept a little bit back to increase the hit rate. | ||
| 865 | |||
| 866 | (c-parse-state): Changed the macro handling and fixed some | ||
| 867 | glitches. Macro context is checked more often than necessary now, | ||
| 868 | but otoh less garbage conses are generated. | ||
| 869 | |||
| 870 | * progmodes/cc-engine.el (c-parse-state, | ||
| 871 | c-invalidate-state-cache): Cache the last position where | ||
| 872 | `c-state-cache' applies. This can speed up refontification quite | ||
| 873 | a bit in blocks where there are many non-brace parens before the | ||
| 874 | point. | ||
| 875 | |||
| 876 | (c-state-cache-end): New variable for this. | ||
| 877 | |||
| 878 | (c-guess-basic-syntax, c-debug-parse-state): Adapted for the new | ||
| 879 | cache variable. | ||
| 880 | |||
| 881 | * progmodes/cc-engine.el (c-find-decl-spots): Take more care to | ||
| 882 | get close initial continue positions when the start position is | ||
| 883 | inside a literal or macro. Do not call the callback for spots | ||
| 884 | before the start position (which can happen e.g. for `c-decl-end' | ||
| 885 | spots inside comments). Optimize better in special cases when the | ||
| 886 | region is a single line inside a literal or macro (typically when | ||
| 887 | the current line is refontified). | ||
| 888 | |||
| 889 | * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified calls | ||
| 890 | to `c-add-stmt-syntax' - there's no need to explicitly whack off | ||
| 891 | entries from the paren state. | ||
| 892 | |||
| 893 | * progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the | ||
| 894 | special case for "else if" clauses. | ||
| 895 | |||
| 896 | * progmodes/cc-engine.el (c-looking-at-inexpr-block, | ||
| 897 | c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. | ||
| 898 | |||
| 899 | * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New | ||
| 900 | language variable to recognize the gcc extension with statement | ||
| 901 | blocks inside expressions. | ||
| 902 | |||
| 903 | * progmodes/cc-engine.el (c-add-stmt-syntax): Restructured to make | ||
| 904 | it somewhat more comprehensible. The argument AT-BLOCK-START is | ||
| 905 | no longer used and hence removed. | ||
| 906 | |||
| 907 | (c-guess-continued-construct, c-guess-basic-syntax): Updated calls | ||
| 908 | to `c-add-stmt-syntax'. | ||
| 909 | |||
| 910 | * progmodes/cc-engine.el (c-backward-to-decl-anchor): Use | ||
| 911 | `c-beginning-of-statement-1' instead of duplicating parts of it. | ||
| 912 | This fixes bogus label recognition. | ||
| 913 | |||
| 914 | * progmodes/cc-engine.el (c-add-type, c-check-type, | ||
| 915 | c-forward-name, c-forward-type): Improved storage of template | ||
| 916 | types in `c-found-types' so that they can be recognized better. | ||
| 917 | |||
| 918 | (c-syntactic-content): Added option to skip past nested parens. | ||
| 919 | |||
| 920 | * progmodes/cc-engine.el (c-forward-name): Set | ||
| 921 | `c-last-identifier-range' all the time. It's less work that way. | ||
| 922 | Handle that there might not be an identifier to store in | ||
| 923 | `c-last-identifier-range'. | ||
| 924 | |||
| 925 | (c-forward-type): Handle that `c-last-identifier-range' might be | ||
| 926 | nil from `c-forward-name'. | ||
| 927 | |||
| 928 | * progmodes/cc-defs.el: (c-safe-scan-lists, | ||
| 929 | c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. | ||
| 930 | |||
| 931 | * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect' | ||
| 932 | to work even if the form fails. | ||
| 933 | |||
| 934 | * progmodes/cc-engine.el (c-parse-state): Speedup when moving far | ||
| 935 | down in a large file in one go. | ||
| 936 | |||
| 937 | (c-get-fallback-start-pos): New helper function for | ||
| 938 | `c-parse-state'. | ||
| 939 | |||
| 940 | * progmodes/cc-align.el (c-lineup-assignments): New lineup | ||
| 941 | function which is like `c-lineup-math' but returns nil instead of | ||
| 942 | `c-basic-offset' when it doesn't match. | ||
| 943 | |||
| 944 | (c-lineup-math): Changed to use `c-lineup-assignments'. | ||
| 945 | |||
| 946 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 947 | |||
| 948 | * progmodes/cc-cmds.el: Fix some bugs in subfunctions of | ||
| 949 | c-beginning-of-statement. New subfunctions | ||
| 950 | c-in-comment-line-prefix-p, c-narrow-to-comment-innards. | ||
| 951 | |||
| 952 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 953 | |||
| 954 | * progmodes/cc-fonts.el, cc-langs.el: Use `c-simple-ws' instead of | ||
| 955 | hardcoded char classes whereever possible. Changed a couple of | ||
| 956 | places to use skip by syntax instead of skip by char class. | ||
| 957 | |||
| 958 | * progmodes/cc-langs.el (c-unterminated-block-comment-regexp): | ||
| 959 | Fixed a bug in the regexp that caused extreme backtracking. | ||
| 960 | |||
| 961 | * progmodes/cc-langs.el (c-block-comment-starter, | ||
| 962 | c-block-comment-ender): New language constants to specify in a | ||
| 963 | single place how block comments look. | ||
| 964 | |||
| 965 | (c-comment-start-regexp, c-block-comment-start-regexp, | ||
| 966 | comment-start, comment-end, comment-start-skip, | ||
| 967 | c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws, | ||
| 968 | c-syntactic-ws, c-nonempty-syntactic-ws, | ||
| 969 | c-single-line-syntactic-ws, c-syntactic-eol): Now built from | ||
| 970 | `c-line-comment-starter', `c-block-comment-starter' and | ||
| 971 | `c-block-comment-ender'. | ||
| 972 | |||
| 973 | (c-block-comment-regexp, c-unterminated-block-comment-regexp): New | ||
| 974 | language constants to break up things a bit. | ||
| 975 | |||
| 976 | (c-simple-ws): New language constant for simple whitespace. | ||
| 977 | |||
| 978 | * progmodes/cc-defs.el (c-concat-separated): New convenience | ||
| 979 | function. | ||
| 980 | |||
| 981 | * progmodes/cc-defs.el (c-make-keywords-re): Added kludge for bug | ||
| 982 | in `regexp-opt' in Emacs 20 and XEmacs when strings contain | ||
| 983 | newlines. Allow and ignore nil elements in the list. | ||
| 984 | |||
| 985 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 986 | |||
| 987 | * progmodes/cc-cmds.el: Comment out a (n almost certainly | ||
| 988 | superfluous) check, (eq here (point-max)) in | ||
| 989 | c-beginning-of-statement. | ||
| 990 | |||
| 991 | * progmodes/cc-cmds.el: Tidy up the comments in | ||
| 992 | c-beginning-of-statement and subfunctions. | ||
| 993 | |||
| 994 | * progmodes/cc-awk.el: Replace calls to put-text-property to the | ||
| 995 | more flexible c-put-char-property and c-clear-char-properties. | ||
| 996 | Add the author's email address. | ||
| 997 | |||
| 998 | * progmodes/cc-langs.el: New variable, | ||
| 999 | c-block-comment-start-regexp. | ||
| 1000 | |||
| 1001 | * progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the | ||
| 1002 | closing "*/" of a block comment. | ||
| 1003 | |||
| 1004 | * progmodes/cc-cmds.el: Tidy c-beginning-of-sentence (and | ||
| 1005 | subfunctions) so that it works at BOB and EOB. | ||
| 1006 | |||
| 1007 | * progmodes/cc-cmds.el, cc-vars.el: More updating of | ||
| 1008 | c-beginning-of-statement, including new variable | ||
| 1009 | c-block-comment-start-regexp. | ||
| 1010 | |||
| 1011 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 1012 | |||
| 1013 | * progmodes/cc-langs.el (c-known-type-key): Optimize simple | ||
| 1014 | symbols from `*-font-lock-extra-types' so that there's no need to | ||
| 1015 | use `regexp-opt' on those lists. | ||
| 1016 | |||
| 1017 | * progmodes/cc-langs.el (c-type-decl-suffix-key): Fix when | ||
| 1018 | `c-type-modifier-kwds' is empty. | ||
| 1019 | |||
| 1020 | * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when | ||
| 1021 | there are several strings on the same line. | ||
| 1022 | |||
| 1023 | * progmodes/cc-engine.el (c-literal-limits): Removed the | ||
| 1024 | compatibility function for older emacsen. `c-literal-limits-fast' | ||
| 1025 | has now taken the place of this function. | ||
| 1026 | |||
| 1027 | * progmodes/cc-vars.el (c-emacs-features): Removed compatibility | ||
| 1028 | with older emacsen: We now require 'pps-extended-state. | ||
| 1029 | |||
| 1030 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 1031 | |||
| 1032 | * progmodes/cc-cmds.el: New function c-beginning-of-sentence, | ||
| 1033 | which obviates the need to hack sentence-end. This now handles | ||
| 1034 | escaped newlines in strings correctly. Correct minor bugs in | ||
| 1035 | c-move-over-sentence and in c-beginning-of-statement. | ||
| 1036 | |||
| 1037 | * progmodes/cc-cmds.el (c-beginning-of-statement (and | ||
| 1038 | subfunctions)): Adapt c-\(back\|forward\)-over-illiterals such | ||
| 1039 | that movement over macros and code are rigorously separated from | ||
| 1040 | eachother. Correct a few incidental bugs. | ||
| 1041 | |||
| 1042 | * progmodes/cc-cmds.el: Restructure c-beginning-of-statement: | ||
| 1043 | Improve its doc-string. Improve the handling of certain specific | ||
| 1044 | cases. | ||
| 1045 | |||
| 1046 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 1047 | |||
| 1048 | * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el | ||
| 1049 | (c-guess-basic-syntax): Changed the way class-level labels are | ||
| 1050 | recognized; they can now contain essentially any symbols. | ||
| 1051 | |||
| 1052 | (c-opt-extra-label-key): New language variable to cope with the | ||
| 1053 | special protection label syntax in Objective-C. | ||
| 1054 | |||
| 1055 | (c-opt-access-key): Removed; this is now handled better by | ||
| 1056 | `c-nonlabel-token-key' and `c-opt-extra-label-key'. | ||
| 1057 | |||
| 1058 | (c-complex-decl-matchers): Update to handle that | ||
| 1059 | `c-opt-access-key' no longer exists. | ||
| 1060 | |||
| 1061 | * progmodes/cc-engine.el (c-guess-basic-syntax): Make use of the | ||
| 1062 | improved label recognition in `c-beginning-of-statement-1'. | ||
| 1063 | |||
| 1064 | * progmodes/cc-engine.el (c-beginning-of-member-init-list): | ||
| 1065 | Recognize bitfields better. | ||
| 1066 | |||
| 1067 | * progmodes/cc-engine.el (c-beginning-of-inheritance-list): | ||
| 1068 | Removed some cruft and fixed a bug that could cause it to go to a | ||
| 1069 | position further down. | ||
| 1070 | |||
| 1071 | * progmodes/cc-langs.el, cc-engine.el | ||
| 1072 | (c-beginning-of-statement-1): Improved detection of labels in | ||
| 1073 | declaration contexts. | ||
| 1074 | |||
| 1075 | (c-beginning-of-decl-1): Use it. | ||
| 1076 | |||
| 1077 | (c-nonlabel-token-key): New language constant and variable needed | ||
| 1078 | by `c-beginning-of-statement-1'. | ||
| 1079 | |||
| 1080 | * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug that | ||
| 1081 | manifested itself due to the correction in `c-forward-sexp'. | ||
| 1082 | |||
| 1083 | * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): Made | ||
| 1084 | these behave as documented when used at the buffer limits. | ||
| 1085 | |||
| 1086 | * progmodes/cc-mode.el, cc-engine.el, cc-langs.el | ||
| 1087 | (c-type-decl-end-used): Made this a language variable. | ||
| 1088 | |||
| 1089 | * progmodes/cc-mode.el (c-after-change): Widen the buffer to work | ||
| 1090 | correctly when `combine-after-change-calls' is used together with | ||
| 1091 | temporary narrowings. | ||
| 1092 | |||
| 1093 | * progmodes/cc-engine.el (c-beginning-of-statement-1): Report | ||
| 1094 | labels correctly when the start point is immediately after the | ||
| 1095 | colon. | ||
| 1096 | |||
| 1097 | * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): Removed | ||
| 1098 | since it isn't used anymore. | ||
| 1099 | |||
| 1100 | * progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle | ||
| 1101 | bracket arglists such as template parens in C++. | ||
| 1102 | |||
| 1103 | * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed a bug | ||
| 1104 | in the last check-in. Some optimization. | ||
| 1105 | |||
| 1106 | * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed bug | ||
| 1107 | where it could stop at the same level in a preceding sexp when | ||
| 1108 | PAREN-LEVEL is set. | ||
| 1109 | |||
| 1110 | * progmodes/cc-mode.el (c-basic-common-init): Turn on syntax-table | ||
| 1111 | text property lookup only when it's needed. | ||
| 1112 | |||
| 1113 | * progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el: | ||
| 1114 | Changed the policy for paren marked angle brackets to be more | ||
| 1115 | persistent; once marked they remain marked even when they're found | ||
| 1116 | to be unbalanced in the searched region. This should keep the | ||
| 1117 | paren syntax around even when individual lines are refontified in | ||
| 1118 | multiline template arglists. | ||
| 1119 | |||
| 1120 | (c-parse-and-markup-<>-arglists): New dynamically bound variable | ||
| 1121 | to control markup so that incorrect angle bracket arglists aren't | ||
| 1122 | marked in contexts where the correct value for | ||
| 1123 | `c-disallow-comma-in-<>-arglists' isn't known. | ||
| 1124 | |||
| 1125 | (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse | ||
| 1126 | argument has become `c-parse-and-markup-<>-arglists'. | ||
| 1127 | |||
| 1128 | (c-remove-<>-arglist-properties): Removed - no longer used. | ||
| 1129 | |||
| 1130 | (c-after-change-check-<>-operators): New function used on | ||
| 1131 | `after-change-functions' to avoid that "<" and ">" characters that | ||
| 1132 | are part of longer operators have paren syntax. | ||
| 1133 | |||
| 1134 | (c-<>-multichar-token-regexp): New language variable used by | ||
| 1135 | `c-after-change-check-<>-operators'. | ||
| 1136 | |||
| 1137 | (c-after-change): Call `c-after-change-check-<>-operators'. | ||
| 1138 | |||
| 1139 | (c-font-lock-<>-arglists): Use the context properties set by | ||
| 1140 | `c-font-lock-declarations' to set | ||
| 1141 | `c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid | ||
| 1142 | markup. | ||
| 1143 | |||
| 1144 | (c-font-lock-declarations): Removed code that undoes the invalid | ||
| 1145 | markup done by `c-font-lock-<>-arglists'. | ||
| 1146 | |||
| 1147 | (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs | ||
| 1148 | after `c-font-lock-declarations'. | ||
| 1149 | |||
| 1150 | * progmodes/cc-engine.el (c-syntactic-skip-backward): Added | ||
| 1151 | paren-level feature. | ||
| 1152 | |||
| 1153 | (c-guess-basic-syntax): Improved the anchor position for | ||
| 1154 | `template-args-cont' in nested template arglists. There's still | ||
| 1155 | much to be desired in this area, though. | ||
| 1156 | |||
| 1157 | 2005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> | ||
| 1158 | |||
| 1159 | * progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el: | ||
| 1160 | Make the "Text Filling and Line Breaking" commands work for AWK | ||
| 1161 | buffers. | ||
| 1162 | |||
| 1163 | 2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> | ||
| 1164 | |||
| 1165 | * progmodes/cc-defs.el, cc-engine.el (c-mode-is-new-awk-p): | ||
| 1166 | Removed; | ||
| 1167 | (c-major-mode-is 'awk-mode) can be used instead now. | ||
| 1168 | |||
| 1169 | * progmodes/cc-mode.el: Always set up AWK mode since emacsen where | ||
| 1170 | it doesn't work no longer are supported. | ||
| 1171 | |||
| 1172 | * progmodes/cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el, | ||
| 1173 | cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now | ||
| 1174 | requires support for the syntax-table' text property, which rules | ||
| 1175 | out Emacs 19 and XEmacs < 21.4. Removed various compatibility | ||
| 1176 | cruft associated with those versions. | ||
| 1177 | |||
| 1178 | * progmodes/cc-defs.el, cc-fix.el: CC Mode now requires support | ||
| 1179 | for the `syntax-table' text property, which rules out Emacs 19 and | ||
| 1180 | XEmacs < 21.4. Removed various compatibility cruft associated | ||
| 1181 | with those versions. | ||
| 1182 | |||
| 1183 | * progmodes/cc-vars.el (c-emacs-features): CC Mode now requires | ||
| 1184 | support for the `syntax-table' text property. | ||
| 1185 | |||
| 1186 | * progmodes/cc-fonts.el (c-nonbreakable-space-face): Remove the | ||
| 1187 | variable and use an extra quoted face name instead. All the | ||
| 1188 | emacsen flavors handle that correctly. | ||
| 1189 | |||
| 1190 | * progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare, | ||
| 1191 | c-font-lock-declarators, c-font-lock-declarations, | ||
| 1192 | c-complex-decl-matchers, c-basic-matchers-after): Use a text | ||
| 1193 | property to mark the items in in declarator lists to handle | ||
| 1194 | refontification inside multiline declarations better. | ||
| 1195 | |||
| 1196 | * progmodes/cc-fonts.el (c-font-lock-declarations): Recognize a | ||
| 1197 | construct like "a * b = c;" as a declaration. | ||
| 1198 | |||
| 1199 | |||
| 1200 | Local Variables: | ||
| 1201 | add-log-mailing-address: "bug-cc-mode@gnu.org" | ||
| 1202 | End: | ||
| 1 | 2005-12-08 Kim F. Storm <storm@cua.dk> | 1203 | 2005-12-08 Kim F. Storm <storm@cua.dk> |
| 2 | 1204 | ||
| 3 | * emulation/cua-rect.el (cua--extract-rectangle): Don't use \s | 1205 | * emulation/cua-rect.el (cua--extract-rectangle): Don't use \s |