diff options
| author | Stefan Monnier | 2002-04-29 04:02:22 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-04-29 04:02:22 +0000 |
| commit | dc864d6e59c5bb76daccef16e56627e2823317b5 (patch) | |
| tree | d604597b7efd049f830af5c23b98ef0d248a4cb1 | |
| parent | 33ceea4f0e295fe3c831a2e36728e9976ce3ce1b (diff) | |
| download | emacs-dc864d6e59c5bb76daccef16e56627e2823317b5.tar.gz emacs-dc864d6e59c5bb76daccef16e56627e2823317b5.zip | |
(fill-context-prefix): Fix last change with yet-another-approach.
| -rw-r--r-- | lisp/ChangeLog | 369 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 57 |
2 files changed, 200 insertions, 226 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d3de96d41d..7cbd99b8cb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2002-04-29 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * textmodes/fill.el (fill-context-prefix): Fix last change with | ||
| 4 | yet-another-approach. | ||
| 5 | |||
| 1 | 2002-04-28 Markus Rost <rost@math.ohio-state.edu> | 6 | 2002-04-28 Markus Rost <rost@math.ohio-state.edu> |
| 2 | 7 | ||
| 3 | * net/ange-ftp.el (ange-ftp-passive-host-alist) | 8 | * net/ange-ftp.el (ange-ftp-passive-host-alist) |
| 4 | (ange-ftp-bs2000-additional-pubsets): Fix custom type. | 9 | (ange-ftp-bs2000-additional-pubsets): Fix custom type. |
| 5 | 10 | ||
| 6 | * files.el (small-temporary-file-directory): Fix custom type. | 11 | * files.el (small-temporary-file-directory): Fix custom type. |
| @@ -10,14 +15,14 @@ | |||
| 10 | * progmodes/f90.el (f90-xemacs-flag): New variable. | 15 | * progmodes/f90.el (f90-xemacs-flag): New variable. |
| 11 | (f90-mark-subprogram-overlay): New variable. | 16 | (f90-mark-subprogram-overlay): New variable. |
| 12 | (f90-mark-subprogram): Now it highlights the subprogram. | 17 | (f90-mark-subprogram): Now it highlights the subprogram. |
| 13 | (f90-font-lock-keywords-1, f90-font-lock-keywords-2): Fix | 18 | (f90-font-lock-keywords-1, f90-font-lock-keywords-2): |
| 14 | highlighting of various "type" forms. | 19 | Fix highlighting of various "type" forms. |
| 15 | 20 | ||
| 16 | 2002-04-28 Colin Walters <walters@verbum.org> | 21 | 2002-04-28 Colin Walters <walters@verbum.org> |
| 17 | 22 | ||
| 18 | * ibuffer.el (ibuffer-mode): Additional documentation on filter | 23 | * ibuffer.el (ibuffer-mode): Additional documentation on filter |
| 19 | groups. | 24 | groups. |
| 20 | 25 | ||
| 21 | 2002-04-28 John Paul Wallington <jpw@shootybangbang.com> | 26 | 2002-04-28 John Paul Wallington <jpw@shootybangbang.com> |
| 22 | 27 | ||
| 23 | * ibuf-ext.el (ibuffer-set-filter-groups-by-mode): Don't make an | 28 | * ibuf-ext.el (ibuffer-set-filter-groups-by-mode): Don't make an |
| @@ -41,9 +46,9 @@ | |||
| 41 | Use occur-engine-add-prefix instead. | 46 | Use occur-engine-add-prefix instead. |
| 42 | Rename `l' to `lines' and `c' to `matches'. | 47 | Rename `l' to `lines' and `c' to `matches'. |
| 43 | 48 | ||
| 44 | * replace.el (occur-engine, occur-mode-mouse-goto) | 49 | * replace.el (occur-engine, occur-mode-mouse-goto) |
| 45 | (occur-mode-find-occurrence, occur-mode-goto-occurrence) | 50 | (occur-mode-find-occurrence, occur-mode-goto-occurrence) |
| 46 | (occur-mode-goto-occurrence-other-window) | 51 | (occur-mode-goto-occurrence-other-window) |
| 47 | (occur-mode-display-occurrence): A position is just a marker, | 52 | (occur-mode-display-occurrence): A position is just a marker, |
| 48 | not a list. | 53 | not a list. |
| 49 | 54 | ||
| @@ -91,8 +96,8 @@ | |||
| 91 | 96 | ||
| 92 | 2002-04-26 Andrew Choi <akochoi@shaw.ca> | 97 | 2002-04-26 Andrew Choi <akochoi@shaw.ca> |
| 93 | 98 | ||
| 94 | * term/mac-win.el: Don't call ediff-toggle-multiframe. Set | 99 | * term/mac-win.el: Don't call ediff-toggle-multiframe. |
| 95 | default directory. Set process-connection-type to nil. | 100 | Set default directory. Set process-connection-type to nil. |
| 96 | 101 | ||
| 97 | 2002-04-26 Richard M. Stallman <rms@gnu.org> | 102 | 2002-04-26 Richard M. Stallman <rms@gnu.org> |
| 98 | 103 | ||
| @@ -164,16 +169,15 @@ | |||
| 164 | 169 | ||
| 165 | * replace.el (multi-occur-by-filename-regexp): Doc fix. | 170 | * replace.el (multi-occur-by-filename-regexp): Doc fix. |
| 166 | (occur-engine): Go to `point-min'. Make nlines argument actually | 171 | (occur-engine): Go to `point-min'. Make nlines argument actually |
| 167 | mean number of context lines. Handle it. Pad digits to the | 172 | mean number of context lines. Handle it. Pad digits to the right. |
| 168 | right. | ||
| 169 | 173 | ||
| 170 | * ibuf-ext.el (ibuffer-filtering-groups): Renamed to | 174 | * ibuf-ext.el (ibuffer-filtering-groups): Renamed to |
| 171 | `ibuffer-filter-groups'. All users updated. | 175 | `ibuffer-filter-groups'. All users updated. |
| 172 | (ibuffer-show-empty-filter-groups): New variable. | 176 | (ibuffer-show-empty-filter-groups): New variable. |
| 173 | (ibuffer-saved-filter-groups): New variable. | 177 | (ibuffer-saved-filter-groups): New variable. |
| 174 | (ibuffer-maybe-save-stuff): Renamed from | 178 | (ibuffer-maybe-save-stuff): Renamed from |
| 175 | `ibuffer-maybe-save-saved-filters'. Callers updated. Handle | 179 | `ibuffer-maybe-save-saved-filters'. Callers updated. |
| 176 | `ibuffer-saved-filter-groups'. | 180 | Handle `ibuffer-saved-filter-groups'. |
| 177 | (ibuffer-hidden-filtering-groups): Renamed to | 181 | (ibuffer-hidden-filtering-groups): Renamed to |
| 178 | `ibuffer-hidden-filter-groups'. | 182 | `ibuffer-hidden-filter-groups'. |
| 179 | (ibuffer-filter-group-kill-ring): New variable. | 183 | (ibuffer-filter-group-kill-ring): New variable. |
| @@ -192,8 +196,8 @@ | |||
| 192 | specific mark, and marking on a specific group. | 196 | specific mark, and marking on a specific group. |
| 193 | 197 | ||
| 194 | * ibuffer.el (ibuffer-formats): Doc fix. | 198 | * ibuffer.el (ibuffer-formats): Doc fix. |
| 195 | (ibuffer-mode-map): Bind <up> to `ibuffer-backward-line'. Bind | 199 | (ibuffer-mode-map): Bind <up> to `ibuffer-backward-line'. |
| 196 | new functions from ibuf-ext.el. Add menu entries for them. | 200 | Bind new functions from ibuf-ext.el. Add menu entries for them. |
| 197 | Remove superfluous tooltips. | 201 | Remove superfluous tooltips. |
| 198 | (ibuffer-toggle-marks): If on a group name, then toggle marks just | 202 | (ibuffer-toggle-marks): If on a group name, then toggle marks just |
| 199 | in that group. | 203 | in that group. |
| @@ -203,8 +207,7 @@ | |||
| 203 | (ibuffer-mark-for-delete-backwards): Update docs. | 207 | (ibuffer-mark-for-delete-backwards): Update docs. |
| 204 | (ibuffer-current-filter-groups): Moved to ibuf-ext.el, and renamed | 208 | (ibuffer-current-filter-groups): Moved to ibuf-ext.el, and renamed |
| 205 | to `ibuffer-current-filter-groups-with-position'. | 209 | to `ibuffer-current-filter-groups-with-position'. |
| 206 | (ibuffer-redisplay-engine): Handle | 210 | (ibuffer-redisplay-engine): Handle `ibuffer-show-empty-filter-groups'. |
| 207 | `ibuffer-show-empty-filter-groups'. | ||
| 208 | (ibuffer-mode): Add some documentation about filter groups. | 211 | (ibuffer-mode): Add some documentation about filter groups. |
| 209 | 212 | ||
| 210 | 2002-04-25 Andreas Schwab <schwab@suse.de> | 213 | 2002-04-25 Andreas Schwab <schwab@suse.de> |
| @@ -274,13 +277,12 @@ | |||
| 274 | functions; also, bind the arrow keys to the movement functions. | 277 | functions; also, bind the arrow keys to the movement functions. |
| 275 | (ibuffer-mode-filter-group-map): New. | 278 | (ibuffer-mode-filter-group-map): New. |
| 276 | (ibuffer-mouse-toggle-mark): Handle group names. | 279 | (ibuffer-mouse-toggle-mark): Handle group names. |
| 277 | (ibuffer-mouse-visit-buffer): Error if the current buffer is | 280 | (ibuffer-mouse-visit-buffer): Error if the current buffer is killed. |
| 278 | killed. | ||
| 279 | (ibuffer-skip-properties): New function. | 281 | (ibuffer-skip-properties): New function. |
| 280 | (ibuffer-backward-line, ibuffer-forward-line): Optionally skip | 282 | (ibuffer-backward-line, ibuffer-forward-line): Optionally skip |
| 281 | group names. Also, handle new properties. | 283 | group names. Also, handle new properties. |
| 282 | (ibuffer-visit-buffer, ibuffer-visit-buffer-other-window): Move | 284 | (ibuffer-visit-buffer, ibuffer-visit-buffer-other-window): |
| 283 | error handling to `ibuffer-current-buffer'. | 285 | Move error handling to `ibuffer-current-buffer'. |
| 284 | (ibuffer-visit-buffer-other-frame, ibuffer-bury-buffer): Ditto. | 286 | (ibuffer-visit-buffer-other-frame, ibuffer-bury-buffer): Ditto. |
| 285 | (ibuffer-visit-tags-table, ibuffer-do-view-1): Ditto. | 287 | (ibuffer-visit-tags-table, ibuffer-do-view-1): Ditto. |
| 286 | (ibuffer-toggle-marks): Add optional group argument. | 288 | (ibuffer-toggle-marks): Add optional group argument. |
| @@ -295,13 +297,12 @@ | |||
| 295 | (ibuffer-insert-filter-group): New function. | 297 | (ibuffer-insert-filter-group): New function. |
| 296 | (ibuffer-redisplay-engine): Renamed from | 298 | (ibuffer-redisplay-engine): Renamed from |
| 297 | `ibuffer-insert-buffers-and-marks'. Handle new filtering groups. | 299 | `ibuffer-insert-buffers-and-marks'. Handle new filtering groups. |
| 298 | (ibuffer): Add filter-groups argument. Handle it. Use | 300 | (ibuffer): Add filter-groups argument. Handle it. |
| 299 | `save-selected-window'. | 301 | Use `save-selected-window'. |
| 300 | (ibuffer-mode): Make `ibuffer-filtering-groups' and | 302 | (ibuffer-mode): Make `ibuffer-filtering-groups' and |
| 301 | `ibuffer-hidden-filtering-groups' buffer-local. | 303 | `ibuffer-hidden-filtering-groups' buffer-local. |
| 302 | 304 | ||
| 303 | * ibuf-macs.el (ibuffer-save-marks): Call | 305 | * ibuf-macs.el (ibuffer-save-marks): Call `ibuffer-redisplay-engine'. |
| 304 | `ibuffer-redisplay-engine'. | ||
| 305 | 306 | ||
| 306 | 2002-04-24 Richard M. Stallman <rms@gnu.org> | 307 | 2002-04-24 Richard M. Stallman <rms@gnu.org> |
| 307 | 308 | ||
| @@ -378,10 +379,8 @@ | |||
| 378 | (ibuffer-occur-match-face): Delete. | 379 | (ibuffer-occur-match-face): Delete. |
| 379 | (ibuffer-occur-props, ibuffer-occur-mode): Delete. | 380 | (ibuffer-occur-props, ibuffer-occur-mode): Delete. |
| 380 | (ibuffer-occur-mouse-display-occurence): Delete. | 381 | (ibuffer-occur-mouse-display-occurence): Delete. |
| 381 | (ibuffer-occur-goto-occurence, ibuffer-occur-display-occurence): | 382 | (ibuffer-occur-goto-occurence, ibuffer-occur-display-occurence) |
| 382 | Delete. | 383 | (ibuffer-do-occur-1, ibuffer-occur-revert-buffer-function): Delete. |
| 383 | (ibuffer-do-occur-1, ibuffer-occur-revert-buffer-function): | ||
| 384 | Delete. | ||
| 385 | (ibuffer-occur-engine): Moved to replace.el. | 384 | (ibuffer-occur-engine): Moved to replace.el. |
| 386 | (ibuffer-do-occur): Simply call `occur-1'. | 385 | (ibuffer-do-occur): Simply call `occur-1'. |
| 387 | 386 | ||
| @@ -440,13 +439,12 @@ | |||
| 440 | 439 | ||
| 441 | * tmm.el (tmm-completion-prompt): Doc fix. | 440 | * tmm.el (tmm-completion-prompt): Doc fix. |
| 442 | 441 | ||
| 443 | * hilit-chg.el (global-highlight-changes): Capitalize status | 442 | * hilit-chg.el (global-highlight-changes): Capitalize status texts. |
| 444 | texts. | ||
| 445 | 443 | ||
| 446 | 2002-04-22 Edward M. Reingold <reingold@emr.cs.iit.edu> | 444 | 2002-04-22 Edward M. Reingold <reingold@emr.cs.iit.edu> |
| 447 | 445 | ||
| 448 | * diary-lib.el (include-other-diary-files): Allow modifying | 446 | * diary-lib.el (include-other-diary-files): Allow modifying |
| 449 | included buffer, to turn off selective display. | 447 | included buffer, to turn off selective display. |
| 450 | 448 | ||
| 451 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 449 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 452 | 450 | ||
| @@ -458,8 +456,8 @@ | |||
| 458 | 456 | ||
| 459 | * progmodes/cc-align.el, progmodes/cc-engine.el, | 457 | * progmodes/cc-align.el, progmodes/cc-engine.el, |
| 460 | progmodes/cc-styles.el, progmodes/cc-vars.el | 458 | progmodes/cc-styles.el, progmodes/cc-vars.el |
| 461 | (c-guess-basic-syntax, c-lineup-topmost-intro-cont): Find | 459 | (c-guess-basic-syntax, c-lineup-topmost-intro-cont): |
| 462 | correct anchor for statement-cont in top level constructs. | 460 | Find correct anchor for statement-cont in top level constructs. |
| 463 | Analyze variable initializations in top level constructs as | 461 | Analyze variable initializations in top level constructs as |
| 464 | topmost-intro-cont instead of statement-cont. That is an | 462 | topmost-intro-cont instead of statement-cont. That is an |
| 465 | incompatible change but it gives better consistency. The new | 463 | incompatible change but it gives better consistency. The new |
| @@ -478,28 +476,28 @@ | |||
| 478 | 476 | ||
| 479 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 477 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 480 | 478 | ||
| 481 | * progmodes/cc-engine.el (c-guess-basic-syntax): Detect | 479 | * progmodes/cc-engine.el (c-guess-basic-syntax): |
| 482 | variable declarations after class and struct declarations | 480 | Detect variable declarations after class and struct declarations |
| 483 | correctly. Fixed limit error when finding the anchor for | 481 | correctly. Fixed limit error when finding the anchor for |
| 484 | template-args-cont and topmost-intro-cont. | 482 | template-args-cont and topmost-intro-cont. |
| 485 | 483 | ||
| 486 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 484 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 487 | 485 | ||
| 488 | * progmodes/cc-cmds.el (c-beginning-of-defun, | 486 | * progmodes/cc-cmds.el (c-beginning-of-defun) |
| 489 | c-declaration-limits): Find the "line oriented" declaration | 487 | (c-declaration-limits): Find the "line oriented" declaration |
| 490 | start too, just like the "line oriented" end is found. | 488 | start too, just like the "line oriented" end is found. |
| 491 | 489 | ||
| 492 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 490 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 493 | 491 | ||
| 494 | * progmodes/cc-vars.el (c-offsets-alist): A more sane default | 492 | * progmodes/cc-vars.el (c-offsets-alist): A more sane default |
| 495 | for `inexpr-statement'. This is not compatible, though. I | 493 | for `inexpr-statement'. This is not compatible, though. |
| 496 | think the benefit of a good default style outweights that in | 494 | I think the benefit of a good default style outweights that in |
| 497 | this case. Besides, `inexpr-statement' is not very common. | 495 | this case. Besides, `inexpr-statement' is not very common. |
| 498 | 496 | ||
| 499 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 497 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 500 | 498 | ||
| 501 | * progmodes/cc-cmds.el (c-electric-delete-forward): Fixed | 499 | * progmodes/cc-cmds.el (c-electric-delete-forward): |
| 502 | silly bug that caused it to delete backwards in hungry delete | 500 | Fix silly bug that caused it to delete backwards in hungry delete |
| 503 | mode. (It's amazing that this bug hasn't been reported.) | 501 | mode. (It's amazing that this bug hasn't been reported.) |
| 504 | 502 | ||
| 505 | * progmodes/cc-cmds.el (c-declaration-limits, c-mark-function): | 503 | * progmodes/cc-cmds.el (c-declaration-limits, c-mark-function): |
| @@ -517,24 +515,22 @@ | |||
| 517 | 515 | ||
| 518 | * progmodes/cc-cmds.el, progmodes/cc-engine.el | 516 | * progmodes/cc-cmds.el, progmodes/cc-engine.el |
| 519 | (c-beginning-of-defun, c-end-of-defun, c-mark-function): | 517 | (c-beginning-of-defun, c-end-of-defun, c-mark-function): |
| 520 | Rewritten to detect the declaration limits better. Now | 518 | Rewritten to detect the declaration limits better. |
| 521 | handles K&R argdecls, class definitions followed by variables | 519 | Now handles K&R argdecls, class definitions followed by variables etc. |
| 522 | etc. | ||
| 523 | 520 | ||
| 524 | (c-in-knr-argdecl): Broke out the K&R argdecl test in | 521 | (c-in-knr-argdecl): Broke out the K&R argdecl test in |
| 525 | `c-beginning-of-decl-1' to this new function. | 522 | `c-beginning-of-decl-1' to this new function. |
| 526 | 523 | ||
| 527 | (c-end-of-statement-1, c-end-of-decl-1): Replaced | 524 | (c-end-of-statement-1, c-end-of-decl-1): |
| 528 | `c-end-of-statement-1' with `c-end-of-decl-1', which correctly | 525 | Replace `c-end-of-statement-1' with `c-end-of-decl-1', which correctly |
| 529 | handles declarations that continue after the block. | 526 | handles declarations that continue after the block. |
| 530 | 527 | ||
| 531 | * progmodes/cc-engine.el (c-syntactic-re-search-forward): | 528 | * progmodes/cc-engine.el (c-syntactic-re-search-forward): |
| 532 | Added an option to restrict matching to the top level of the | 529 | Added an option to restrict matching to the top level of the |
| 533 | current paren sexp. | 530 | current paren sexp. |
| 534 | 531 | ||
| 535 | * progmodes/cc-langs.el (c-opt-block-decls-with-vars-key): New | 532 | * progmodes/cc-langs.el (c-opt-block-decls-with-vars-key): |
| 536 | regexp to recognize declarations that continue after the | 533 | New regexp to recognize declarations that continue after the block. |
| 537 | block. | ||
| 538 | 534 | ||
| 539 | (c-syntactic-eol): New regexp to match a "syntactic" eol. | 535 | (c-syntactic-eol): New regexp to match a "syntactic" eol. |
| 540 | 536 | ||
| @@ -544,8 +540,8 @@ | |||
| 544 | that often caused the backward limit to be lost at the top | 540 | that often caused the backward limit to be lost at the top |
| 545 | level. This improves performance a bit. | 541 | level. This improves performance a bit. |
| 546 | 542 | ||
| 547 | * progmodes/cc-engine.el (c-syntactic-re-search-forward): New | 543 | * progmodes/cc-engine.el (c-syntactic-re-search-forward): |
| 548 | function that works like `re-search-forward' but only returns | 544 | New function that works like `re-search-forward' but only returns |
| 549 | matches in syntactically significant text. | 545 | matches in syntactically significant text. |
| 550 | 546 | ||
| 551 | * progmodes/cc-engine.el: Fixed a faster and more accurate way | 547 | * progmodes/cc-engine.el: Fixed a faster and more accurate way |
| @@ -573,8 +569,8 @@ | |||
| 573 | 569 | ||
| 574 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 570 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 575 | 571 | ||
| 576 | * progmodes/cc-cmds.el (c-indent-line-or-region): Call | 572 | * progmodes/cc-cmds.el (c-indent-line-or-region): |
| 577 | `c-indent-line' directly instead of through | 573 | Call `c-indent-line' directly instead of through |
| 578 | `indent-according-to-mode' so that this function always | 574 | `indent-according-to-mode' so that this function always |
| 579 | indents syntactically. | 575 | indents syntactically. |
| 580 | 576 | ||
| @@ -589,8 +585,8 @@ | |||
| 589 | progmodes/cc-engine.el, progmodes/cc-vars.el: Fixes so that | 585 | progmodes/cc-engine.el, progmodes/cc-vars.el: Fixes so that |
| 590 | the context sensitive analysis inside macros is restricted to | 586 | the context sensitive analysis inside macros is restricted to |
| 591 | the bodies of #define's; other things, like #if expressions, | 587 | the bodies of #define's; other things, like #if expressions, |
| 592 | never have anything in common with their surroundings. The | 588 | never have anything in common with their surroundings. |
| 593 | old `cpp-macro-cont' syntax is now used in situations where | 589 | The old `cpp-macro-cont' syntax is now used in situations where |
| 594 | the syntactic analysis isn't applicable, and a new syntactic | 590 | the syntactic analysis isn't applicable, and a new syntactic |
| 595 | element `cpp-define-intro' is used to add indentation in | 591 | element `cpp-define-intro' is used to add indentation in |
| 596 | #define bodies. | 592 | #define bodies. |
| @@ -599,19 +595,16 @@ | |||
| 599 | better reflect its use. | 595 | better reflect its use. |
| 600 | 596 | ||
| 601 | * progmodes/cc-engine.el (c-guess-basic-syntax): Ignore line | 597 | * progmodes/cc-engine.el (c-guess-basic-syntax): Ignore line |
| 602 | continuation backslashes in the detection of | 598 | continuation backslashes in the detection of `arglist-cont-nonempty'. |
| 603 | `arglist-cont-nonempty'. | ||
| 604 | 599 | ||
| 605 | * progmodes/cc-align.el: Use the vector form in the return | 600 | * progmodes/cc-align.el: Use the vector form in the return |
| 606 | value in all cases where lineup functions return absolute | 601 | value in all cases where lineup functions return absolute columns. |
| 607 | columns. | ||
| 608 | 602 | ||
| 609 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 603 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 610 | 604 | ||
| 611 | * progmodes/cc-engine.el (c-add-stmt-syntax, | 605 | * progmodes/cc-engine.el (c-add-stmt-syntax) |
| 612 | c-guess-basic-syntax): Anchor `brace-list-intro' and | 606 | (c-guess-basic-syntax): Anchor `brace-list-intro' and |
| 613 | `bracec-list-close' better for brace lists nested inside | 607 | `bracec-list-close' better for brace lists nested inside expressions. |
| 614 | expressions. | ||
| 615 | 608 | ||
| 616 | * progmodes/cc-engine.el, progmodes/cc-langs.el, | 609 | * progmodes/cc-engine.el, progmodes/cc-langs.el, |
| 617 | progmodes/cc-mode.el, progmodes/cc-styles.el: Cleaned up the | 610 | progmodes/cc-mode.el, progmodes/cc-styles.el: Cleaned up the |
| @@ -625,24 +618,22 @@ | |||
| 625 | original CC Mode mode. | 618 | original CC Mode mode. |
| 626 | 619 | ||
| 627 | (c-major-mode-is): Compare against the buffer local variable | 620 | (c-major-mode-is): Compare against the buffer local variable |
| 628 | `c-buffer-is-cc-mode', which is faster than using | 621 | `c-buffer-is-cc-mode', which is faster than using `derived-mode-class'. |
| 629 | `derived-mode-class'. | ||
| 630 | 622 | ||
| 631 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 623 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 632 | 624 | ||
| 633 | * progmodes/cc-engine.el (c-forward-syntactic-ws, | 625 | * progmodes/cc-engine.el (c-forward-syntactic-ws) |
| 634 | c-backward-syntactic-ws, c-forward-token-1, | 626 | (c-backward-syntactic-ws, c-forward-token-1) |
| 635 | c-backward-token-1, c-in-literal, c-literal-limits, | 627 | (c-backward-token-1, c-in-literal, c-literal-limits) |
| 636 | c-collect-line-comments, c-literal-type, c-on-identifier, | 628 | (c-collect-line-comments, c-literal-type, c-on-identifier) |
| 637 | c-guess-basic-syntax): These functions are now considered part | 629 | (c-guess-basic-syntax): These functions are now considered part |
| 638 | of the "CC Mode API" and may be used by other code. That's | 630 | of the "CC Mode API" and may be used by other code. |
| 639 | signified by making their documentation into docstrings. | 631 | That's signified by making their documentation into docstrings. |
| 640 | 632 | ||
| 641 | (c-whack-state, c-hack-state, c-skip-case-statement-forward): | 633 | (c-whack-state, c-hack-state, c-skip-case-statement-forward): |
| 642 | Removed these internal functions since they aren't used. | 634 | Removed these internal functions since they aren't used. |
| 643 | 635 | ||
| 644 | (c-forward-to-cpp-expression): Classified this function as | 636 | (c-forward-to-cpp-expression): Classified this function as internal. |
| 645 | internal. | ||
| 646 | 637 | ||
| 647 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 638 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 648 | 639 | ||
| @@ -693,8 +684,8 @@ | |||
| 693 | outside their intended use, and they generally do the right | 684 | outside their intended use, and they generally do the right |
| 694 | thing when they kick in. | 685 | thing when they kick in. |
| 695 | 686 | ||
| 696 | * progmodes/cc-engine.el (c-guess-continued-construct, | 687 | * progmodes/cc-engine.el (c-guess-continued-construct) |
| 697 | c-guess-basic-syntax): Handle nested functions in all | 688 | (c-guess-basic-syntax): Handle nested functions in all |
| 698 | languages, not just Pike. In C and C++ there's a gcc | 689 | languages, not just Pike. In C and C++ there's a gcc |
| 699 | extension for this, and it also gives better treatment of | 690 | extension for this, and it also gives better treatment of |
| 700 | macros that are followed by blocks. | 691 | macros that are followed by blocks. |
| @@ -754,8 +745,8 @@ | |||
| 754 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 745 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 755 | 746 | ||
| 756 | * progmodes/cc-engine.el, progmodes/cc-langs.el | 747 | * progmodes/cc-engine.el, progmodes/cc-langs.el |
| 757 | (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): New | 748 | (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): |
| 758 | variables containing the character sets used to recognize | 749 | New variables containing the character sets used to recognize |
| 759 | statement/declaration boundaries. These variables might help | 750 | statement/declaration boundaries. These variables might help |
| 760 | to support languages like javascript and awk, where newlines | 751 | to support languages like javascript and awk, where newlines |
| 761 | sometimes delimits statements. | 752 | sometimes delimits statements. |
| @@ -766,26 +757,23 @@ | |||
| 766 | 757 | ||
| 767 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 758 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 768 | 759 | ||
| 769 | * progmodes/cc-engine.el (c-looking-at-bos, | 760 | * progmodes/cc-engine.el (c-looking-at-bos) |
| 770 | c-looking-at-inexpr-block, c-add-stmt-syntax, | 761 | (c-looking-at-inexpr-block, c-add-stmt-syntax) |
| 771 | c-guess-basic-syntax): Treat blocks directly inside function | 762 | (c-guess-basic-syntax): Treat blocks directly inside function |
| 772 | calls like "bare" statements inside function calls, and not | 763 | calls like "bare" statements inside function calls, and not |
| 773 | like in-expression statements. This to make indentation of | 764 | like in-expression statements. This to make indentation of |
| 774 | such blocks consistent with other statements inside macro | 765 | such blocks consistent with other statements inside macro calls. |
| 775 | calls. | ||
| 776 | 766 | ||
| 777 | * progmodes/cc-engine.el (c-guess-basic-syntax): Made | 767 | * progmodes/cc-engine.el (c-guess-basic-syntax): |
| 778 | arglist-cont anchor correctly in arglists that contain | 768 | Made arglist-cont anchor correctly in arglists that contain statements. |
| 779 | statements. | ||
| 780 | 769 | ||
| 781 | * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed | 770 | * progmodes/cc-engine.el (c-guess-basic-syntax): |
| 782 | consistent anchoring of defun-block-intro in defuns in code | 771 | Fixed consistent anchoring of defun-block-intro in defuns in code |
| 783 | blocks (can only occur in Pike). | 772 | blocks (can only occur in Pike). |
| 784 | 773 | ||
| 785 | * progmodes/cc-engine.el (c-looking-at-inexpr-block, | 774 | * progmodes/cc-engine.el (c-looking-at-inexpr-block) |
| 786 | c-looking-at-inexpr-block-backward): Changed the arguments to | 775 | (c-looking-at-inexpr-block-backward): Changed the arguments to |
| 787 | require containing sexps and paren state, for better | 776 | require containing sexps and paren state, for better efficiency. |
| 788 | efficiency. | ||
| 789 | 777 | ||
| 790 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 778 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 791 | 779 | ||
| @@ -793,13 +781,12 @@ | |||
| 793 | progmodes/cc-vars.el: Improved anchoring of statement and | 781 | progmodes/cc-vars.el: Improved anchoring of statement and |
| 794 | handling of labels in front of substatements. | 782 | handling of labels in front of substatements. |
| 795 | 783 | ||
| 796 | (c-guess-continued-construct, c-guess-basic-syntax): Improved | 784 | (c-guess-continued-construct, c-guess-basic-syntax): |
| 797 | and unified anchoring at statements. Statements beginning | 785 | Improved and unified anchoring at statements. Statements beginning |
| 798 | with comments or labels are now avoided, by going out of | 786 | with comments or labels are now avoided, by going out of |
| 799 | blocks and containing statements if necessary. This nesting | 787 | blocks and containing statements if necessary. This nesting |
| 800 | handling also fixes the case when there's a statement after a | 788 | handling also fixes the case when there's a statement after a |
| 801 | block open brace. Added the syntactic symbol | 789 | block open brace. Added the syntactic symbol `substatement-label'. |
| 802 | `substatement-label'. | ||
| 803 | 790 | ||
| 804 | (c-electric-colon): Map the new `substatement-label' to | 791 | (c-electric-colon): Map the new `substatement-label' to |
| 805 | `label' when consulting `c-hanging-colons-alist'. | 792 | `label' when consulting `c-hanging-colons-alist'. |
| @@ -808,8 +795,8 @@ | |||
| 808 | comments for the new anchoring positions at statements. | 795 | comments for the new anchoring positions at statements. |
| 809 | 796 | ||
| 810 | * progmodes/cc-engine.el (c-guess-basic-syntax): Use more sane | 797 | * progmodes/cc-engine.el (c-guess-basic-syntax): Use more sane |
| 811 | anchor points for knr-argdecl-intro and access-label. They | 798 | anchor points for knr-argdecl-intro and access-label. |
| 812 | used to refer to some point on the same line, a bug which was | 799 | They used to refer to some point on the same line, a bug which was |
| 813 | neutralized by a kludge in `c-get-syntactic-indentation' which | 800 | neutralized by a kludge in `c-get-syntactic-indentation' which |
| 814 | ignored such anchor points. | 801 | ignored such anchor points. |
| 815 | 802 | ||
| @@ -826,13 +813,13 @@ | |||
| 826 | * progmodes/cc-engine.el (c-looking-at-bos): Added optional | 813 | * progmodes/cc-engine.el (c-looking-at-bos): Added optional |
| 827 | limit arg for backward searches. | 814 | limit arg for backward searches. |
| 828 | 815 | ||
| 829 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): Anchor | 816 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): |
| 830 | gcc in-expression statements at the surrounding open | 817 | Anchor gcc in-expression statements at the surrounding open |
| 831 | parenthesis. Treat a class body as an in-expression class if | 818 | parenthesis. Treat a class body as an in-expression class if |
| 832 | it's used in an object clone expression in Pike. | 819 | it's used in an object clone expression in Pike. |
| 833 | 820 | ||
| 834 | * progmodes/cc-engine.el (c-get-offset, | 821 | * progmodes/cc-engine.el (c-get-offset) |
| 835 | c-get-syntactic-indentation): Allow several anchor positions | 822 | (c-get-syntactic-indentation): Allow several anchor positions |
| 836 | in the list of syntactic symbols. Only the first is used as | 823 | in the list of syntactic symbols. Only the first is used as |
| 837 | the base for the offset calculation. | 824 | the base for the offset calculation. |
| 838 | 825 | ||
| @@ -848,8 +835,8 @@ | |||
| 848 | 835 | ||
| 849 | * progmodes/cc-engine.el (c-end-of-macro): New function. | 836 | * progmodes/cc-engine.el (c-end-of-macro): New function. |
| 850 | 837 | ||
| 851 | * progmodes/cc-engine.el (c-least-enclosing-brace): Rewritten | 838 | * progmodes/cc-engine.el (c-least-enclosing-brace): |
| 852 | to not be destructive. | 839 | Rewritten to not be destructive. |
| 853 | 840 | ||
| 854 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 841 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 855 | 842 | ||
| @@ -885,37 +872,36 @@ | |||
| 885 | any reasonably sane style. Also introduced a noerror flag. | 872 | any reasonably sane style. Also introduced a noerror flag. |
| 886 | 873 | ||
| 887 | (c-beginning-of-closest-statement): Removed; | 874 | (c-beginning-of-closest-statement): Removed; |
| 888 | c-beginning-of-statement-1 now avoids the problem this one | 875 | c-beginning-of-statement-1 now avoids the problem this one solved. |
| 889 | solved. | ||
| 890 | 876 | ||
| 891 | * progmodes/cc-engine.el (c-guess-continued-construct, | 877 | * progmodes/cc-engine.el (c-guess-continued-construct) |
| 892 | c-guess-basic-syntax): Better and more uniform anchor points | 878 | (c-guess-basic-syntax): Better and more uniform anchor points |
| 893 | for 'statement-cont and 'substatement. The effect is | 879 | for 'statement-cont and 'substatement. The effect is |
| 894 | noticeable mostly when there's a label on the same line as the | 880 | noticeable mostly when there's a label on the same line as the |
| 895 | beginning of the statement, or when there are more stuff | 881 | beginning of the statement, or when there are more stuff |
| 896 | before the start of the statement. | 882 | before the start of the statement. |
| 897 | 883 | ||
| 898 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): Added | 884 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): |
| 899 | flag to disable looking at the type of the surrounding paren | 885 | Added flag to disable looking at the type of the surrounding paren |
| 900 | since that confuses c-beginning-of-statement-1 and a couple of | 886 | since that confuses c-beginning-of-statement-1 and a couple of |
| 901 | other places. | 887 | other places. |
| 902 | 888 | ||
| 903 | * progmodes/cc-engine.el (c-guess-basic-syntax): Avoid | 889 | * progmodes/cc-engine.el (c-guess-basic-syntax): |
| 904 | stepping to the previous statement in case 18. Improvements | 890 | Avoid stepping to the previous statement in case 18. |
| 905 | in recognition of statement blocks on the top level. | 891 | Improvements in recognition of statement blocks on the top level. |
| 906 | 892 | ||
| 907 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 893 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 908 | 894 | ||
| 909 | * progmodes/cc-engine.el (c-beginning-of-statement-1, | 895 | * progmodes/cc-engine.el (c-beginning-of-statement-1) |
| 910 | c-crosses-statement-barrier-p): Rewritten to get a well | 896 | (c-crosses-statement-barrier-p): Rewritten to get a well |
| 911 | defined and documented behavior. This fixes some tricky cases | 897 | defined and documented behavior. This fixes some tricky cases |
| 912 | in recognition of do-while constructs. | 898 | in recognition of do-while constructs. |
| 913 | 899 | ||
| 914 | (c-backward-to-start-of-do, c-backward-to-start-of-if): | 900 | (c-backward-to-start-of-do, c-backward-to-start-of-if): |
| 915 | Removed; use c-beginning-of-statement-1 instead. | 901 | Removed; use c-beginning-of-statement-1 instead. |
| 916 | 902 | ||
| 917 | (c-guess-continued-construct, c-guess-basic-syntax): Various | 903 | (c-guess-continued-construct, c-guess-basic-syntax): |
| 918 | fixes to not depend on the bugs previously in | 904 | Various fixes to not depend on the bugs previously in |
| 919 | c-beginning-of-statement-1. Cleanups in cases 18 and 17 to | 905 | c-beginning-of-statement-1. Cleanups in cases 18 and 17 to |
| 920 | use the new behavior of c-beginning-of-statement-1 better. | 906 | use the new behavior of c-beginning-of-statement-1 better. |
| 921 | Fixed recognition of catch blocks inside macros. | 907 | Fixed recognition of catch blocks inside macros. |
| @@ -932,10 +918,10 @@ | |||
| 932 | 918 | ||
| 933 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 919 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 934 | 920 | ||
| 935 | * progmodes/cc-engine.el (c-guess-basic-syntax): Improved | 921 | * progmodes/cc-engine.el (c-guess-basic-syntax): |
| 936 | recognition of statements: They are now recognized in contexts | 922 | Improved recognition of statements: They are now recognized in |
| 937 | where they normally can't occur, e.g. on the top level or in | 923 | contexts where they normally can't occur, e.g. on the top level or |
| 938 | function call arguments. This is mainly useful to recognize | 924 | in function call arguments. This is mainly useful to recognize |
| 939 | statements in macros at the top level, and in arguments to | 925 | statements in macros at the top level, and in arguments to |
| 940 | macros. The cases has been moved around quite a bit, and case | 926 | macros. The cases has been moved around quite a bit, and case |
| 941 | 10 has been copied to case 18. (The cases has not been | 927 | 10 has been copied to case 18. (The cases has not been |
| @@ -944,9 +930,9 @@ | |||
| 944 | (c-guess-continued-construct): New function which has the | 930 | (c-guess-continued-construct): New function which has the |
| 945 | rules which are common between cases 10 and 18. | 931 | rules which are common between cases 10 and 18. |
| 946 | 932 | ||
| 947 | * progmodes/cc-engine.el (c-beginning-of-statement-1, | 933 | * progmodes/cc-engine.el (c-beginning-of-statement-1) |
| 948 | c-backward-to-start-of-do, c-backward-to-start-of-if): Fixes | 934 | (c-backward-to-start-of-do, c-backward-to-start-of-if): |
| 949 | so that they really obey the passed limits. | 935 | Fixes so that they really obey the passed limits. |
| 950 | 936 | ||
| 951 | (c-safe-position): Return nil if the state doesn't contain a | 937 | (c-safe-position): Return nil if the state doesn't contain a |
| 952 | suitable position. | 938 | suitable position. |
| @@ -955,11 +941,11 @@ | |||
| 955 | to c-beginning-of-statement-1. Some fixes for top level | 941 | to c-beginning-of-statement-1. Some fixes for top level |
| 956 | analysis in ObjC mode. | 942 | analysis in ObjC mode. |
| 957 | 943 | ||
| 958 | * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed | 944 | * progmodes/cc-engine.el (c-beginning-of-statement-1): |
| 959 | bug in do-while statements where the body is not a block. | 945 | Fixed bug in do-while statements where the body is not a block. |
| 960 | 946 | ||
| 961 | * progmodes/cc-styles.el (c-set-style): Reset | 947 | * progmodes/cc-styles.el (c-set-style): |
| 962 | c-special-indent-hook to its global value if in override mode. | 948 | Reset c-special-indent-hook to its global value if in override mode. |
| 963 | Fixes problem where functions on that hook remained after | 949 | Fixes problem where functions on that hook remained after |
| 964 | style switch. | 950 | style switch. |
| 965 | 951 | ||
| @@ -980,8 +966,8 @@ | |||
| 980 | (c-in-literal): No longer recognizes macros as literals by | 966 | (c-in-literal): No longer recognizes macros as literals by |
| 981 | default. An extra flag argument is required to do that. | 967 | default. An extra flag argument is required to do that. |
| 982 | 968 | ||
| 983 | (c-macro-start, c-query-macro-start, | 969 | (c-macro-start, c-query-macro-start) |
| 984 | c-query-and-set-macro-start): Added a cache for the macro | 970 | (c-query-and-set-macro-start): Added a cache for the macro |
| 985 | start position. | 971 | start position. |
| 986 | 972 | ||
| 987 | (c-forward-syntactic-ws, c-backward-syntactic-ws): Fixes for | 973 | (c-forward-syntactic-ws, c-backward-syntactic-ws): Fixes for |
| @@ -992,8 +978,8 @@ | |||
| 992 | (c-lineup-macro-cont): Improved behavior when | 978 | (c-lineup-macro-cont): Improved behavior when |
| 993 | c-syntactic-indentation-in-macros is nil. | 979 | c-syntactic-indentation-in-macros is nil. |
| 994 | 980 | ||
| 995 | (c-syntactic-indentation-in-macros, c-backslash-max-column, | 981 | (c-syntactic-indentation-in-macros, c-backslash-max-column) |
| 996 | c-auto-align-backslashes): New customization variables to | 982 | (c-auto-align-backslashes): New customization variables to |
| 997 | control macro handling. | 983 | control macro handling. |
| 998 | 984 | ||
| 999 | * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): | 985 | * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): |
| @@ -1007,8 +993,7 @@ | |||
| 1007 | (c-benign-error): New macro to report errors that doesn't need | 993 | (c-benign-error): New macro to report errors that doesn't need |
| 1008 | to interrupt the operation. | 994 | to interrupt the operation. |
| 1009 | 995 | ||
| 1010 | * progmodes/cc-defs.el (c-point): Added eonl and eopl | 996 | * progmodes/cc-defs.el (c-point): Added eonl and eopl positions. |
| 1011 | positions. | ||
| 1012 | 997 | ||
| 1013 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 998 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1014 | 999 | ||
| @@ -1026,8 +1011,7 @@ | |||
| 1026 | `c-check-state-cache'. This gives a considerable performance | 1011 | `c-check-state-cache'. This gives a considerable performance |
| 1027 | boost when editing large functions or classes. | 1012 | boost when editing large functions or classes. |
| 1028 | 1013 | ||
| 1029 | * progmodes/cc-engine.el (c-whack-state-after): Slight | 1014 | * progmodes/cc-engine.el (c-whack-state-after): Slight optimization. |
| 1030 | optimization. | ||
| 1031 | 1015 | ||
| 1032 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1016 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1033 | 1017 | ||
| @@ -1044,8 +1028,8 @@ | |||
| 1044 | (c-forward-to-cpp-expression): New function to aid in | 1028 | (c-forward-to-cpp-expression): New function to aid in |
| 1045 | syntactic analysis inside macros. | 1029 | syntactic analysis inside macros. |
| 1046 | 1030 | ||
| 1047 | (c-beginning-of-statement-1, c-backward-syntactic-ws): Fixes | 1031 | (c-beginning-of-statement-1, c-backward-syntactic-ws): |
| 1048 | to work better inside macros. | 1032 | Fixes to work better inside macros. |
| 1049 | 1033 | ||
| 1050 | (c-forward-syntactic-ws): Whitespace between the # and the | 1034 | (c-forward-syntactic-ws): Whitespace between the # and the |
| 1051 | command should be allowed in preprocessor directives. | 1035 | command should be allowed in preprocessor directives. |
| @@ -1058,24 +1042,24 @@ | |||
| 1058 | 1042 | ||
| 1059 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1043 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1060 | 1044 | ||
| 1061 | * progmodes/cc-engine.el (c-beginning-of-statement-1, | 1045 | * progmodes/cc-engine.el (c-beginning-of-statement-1) |
| 1062 | c-forward-syntactic-ws): Fixes to handle continued lines. | 1046 | (c-forward-syntactic-ws): Fixes to handle continued lines. |
| 1063 | 1047 | ||
| 1064 | (c-backward-to-start-of-if, c-guess-basic-syntax): Do | 1048 | (c-backward-to-start-of-if, c-guess-basic-syntax): |
| 1065 | syntactic analysis inside macros. | 1049 | Do syntactic analysis inside macros. |
| 1066 | 1050 | ||
| 1067 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1051 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1068 | 1052 | ||
| 1069 | * progmodes/cc-cmds.el (c-indent-region): Did a speedup made | 1053 | * progmodes/cc-cmds.el (c-indent-region): Did a speedup made |
| 1070 | possible by the more flexible state cache. | 1054 | possible by the more flexible state cache. |
| 1071 | 1055 | ||
| 1072 | * progmodes/cc-engine.el (c-parse-state, c-whack-state-before, | 1056 | * progmodes/cc-engine.el (c-parse-state, c-whack-state-before) |
| 1073 | c-whack-state-after, c-hack-state, | 1057 | (c-whack-state-after, c-hack-state) |
| 1074 | c-narrow-out-enclosing-class, c-guess-basic-syntax): Improved | 1058 | (c-narrow-out-enclosing-class, c-guess-basic-syntax): |
| 1075 | the state cache system. It now can use partial info from an | 1059 | Improved the state cache system. It now can use partial info from |
| 1076 | old cached state to calculate a new one at a different | 1060 | an old cached state to calculate a new one at a different |
| 1077 | position. Removed some kludges to avoid the state cache. The | 1061 | position. Removed some kludges to avoid the state cache. |
| 1078 | new functions `c-whack-state-before' and `c-whack-state-after' | 1062 | The new functions `c-whack-state-before' and `c-whack-state-after' |
| 1079 | replace the now obsolete `c-whack-state'. | 1063 | replace the now obsolete `c-whack-state'. |
| 1080 | 1064 | ||
| 1081 | * progmodes/cc-engine.el (c-beginning-of-statement-1): | 1065 | * progmodes/cc-engine.el (c-beginning-of-statement-1): |
| @@ -1086,8 +1070,8 @@ | |||
| 1086 | 1070 | ||
| 1087 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1071 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1088 | 1072 | ||
| 1089 | * progmodes/cc-cmds.el (c-electric-continued-statement): Fixed | 1073 | * progmodes/cc-cmds.el (c-electric-continued-statement): |
| 1090 | a bug where the keyword wasn't reindented correctly if | 1074 | Fixed a bug where the keyword wasn't reindented correctly if |
| 1091 | followed by another keyword or identifier. | 1075 | followed by another keyword or identifier. |
| 1092 | 1076 | ||
| 1093 | * progmodes/cc-engine.el (c-parse-state): Ignore closed brace | 1077 | * progmodes/cc-engine.el (c-parse-state): Ignore closed brace |
| @@ -1097,8 +1081,8 @@ | |||
| 1097 | 1081 | ||
| 1098 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1082 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1099 | 1083 | ||
| 1100 | * progmodes/cc-engine.el (c-beginning-of-macro, | 1084 | * progmodes/cc-engine.el (c-beginning-of-macro) |
| 1101 | c-forward-syntactic-ws): Recognize "#!" as a preprocessor | 1085 | (c-forward-syntactic-ws): Recognize "#!" as a preprocessor |
| 1102 | directive when it begins a line, to allow for script | 1086 | directive when it begins a line, to allow for script |
| 1103 | interpreter lines like "#!/usr/bin/pike" at the beginning of | 1087 | interpreter lines like "#!/usr/bin/pike" at the beginning of |
| 1104 | the file. | 1088 | the file. |
| @@ -1107,13 +1091,12 @@ | |||
| 1107 | 1091 | ||
| 1108 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): | 1092 | * progmodes/cc-engine.el (c-looking-at-inexpr-block): |
| 1109 | Recognize brace blocks inside a parenthesis expression as | 1093 | Recognize brace blocks inside a parenthesis expression as |
| 1110 | inexpr-statement. Useful when writing statements as macro | 1094 | inexpr-statement. Useful when writing statements as macro arguments. |
| 1111 | arguments. | ||
| 1112 | 1095 | ||
| 1113 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1096 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1114 | 1097 | ||
| 1115 | * progmodes/cc-cmds.el (c-fill-paragraph, c-do-auto-fill, | 1098 | * progmodes/cc-cmds.el (c-fill-paragraph, c-do-auto-fill) |
| 1116 | c-mask-comment): Broke out the comment masking code from | 1099 | (c-mask-comment): Broke out the comment masking code from |
| 1117 | `c-fill-paragraph' to a new function `c-mask-comment', to be | 1100 | `c-fill-paragraph' to a new function `c-mask-comment', to be |
| 1118 | able to do the same thing in `c-do-auto-fill'. This should | 1101 | able to do the same thing in `c-do-auto-fill'. This should |
| 1119 | make auto-fill-mode behave better. | 1102 | make auto-fill-mode behave better. |
| @@ -1148,11 +1131,10 @@ | |||
| 1148 | current line with the comment starter, so that we line up | 1131 | current line with the comment starter, so that we line up |
| 1149 | comments which matches `c-comment-prefix-regexp' on the first | 1132 | comments which matches `c-comment-prefix-regexp' on the first |
| 1150 | line (after the `/') without the need to make | 1133 | line (after the `/') without the need to make |
| 1151 | `comment-start-skip' match whatever `c-comment-prefix-regexp' | 1134 | `comment-start-skip' match whatever `c-comment-prefix-regexp' matches. |
| 1152 | matches. | ||
| 1153 | 1135 | ||
| 1154 | * progmodes/cc-mode.el, progmodes/cc-styles.el (c-common-init, | 1136 | * progmodes/cc-mode.el, progmodes/cc-styles.el (c-common-init) |
| 1155 | c-set-style-1, c-setup-paragraph-variables): Moved the | 1137 | (c-set-style-1, c-setup-paragraph-variables): Moved the |
| 1156 | variable initialization based on `c-comment-prefix-regexp' to | 1138 | variable initialization based on `c-comment-prefix-regexp' to |
| 1157 | a new function `c-setup-paragraph-variables', which is now | 1139 | a new function `c-setup-paragraph-variables', which is now |
| 1158 | used both at mode init and when a style that sets | 1140 | used both at mode init and when a style that sets |
| @@ -1166,8 +1148,8 @@ | |||
| 1166 | 1148 | ||
| 1167 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1149 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1168 | 1150 | ||
| 1169 | * progmodes/cc-engine.el (c-most-enclosing-brace, | 1151 | * progmodes/cc-engine.el (c-most-enclosing-brace) |
| 1170 | c-least-enclosing-brace): Added optional second arg to limit | 1152 | (c-least-enclosing-brace): Added optional second arg to limit |
| 1171 | the search to before a certain point. | 1153 | the search to before a certain point. |
| 1172 | 1154 | ||
| 1173 | * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug | 1155 | * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug |
| @@ -1179,8 +1161,8 @@ | |||
| 1179 | * progmodes/cc-defs.el (c-forward-comment): More idiosyncrasy | 1161 | * progmodes/cc-defs.el (c-forward-comment): More idiosyncrasy |
| 1180 | insulation. This time for XEmacs 21. | 1162 | insulation. This time for XEmacs 21. |
| 1181 | 1163 | ||
| 1182 | * progmodes/cc-engine.el, progmodes/cc-langs.el: Improved | 1164 | * progmodes/cc-engine.el, progmodes/cc-langs.el: |
| 1183 | handling of inheritance lists: | 1165 | Improved handling of inheritance lists: |
| 1184 | 1166 | ||
| 1185 | (c-beginning-of-inheritance-list): Rewritten to use a more | 1167 | (c-beginning-of-inheritance-list): Rewritten to use a more |
| 1186 | syntactically correct method that doesn't get confused by | 1168 | syntactically correct method that doesn't get confused by |
| @@ -1190,8 +1172,7 @@ | |||
| 1190 | inheritance lists in combination with templates. 'inher-intro | 1172 | inheritance lists in combination with templates. 'inher-intro |
| 1191 | is now anchored on the start of the class declaration and not | 1173 | is now anchored on the start of the class declaration and not |
| 1192 | the indentation of the current line. Switched places on cases | 1174 | the indentation of the current line. Switched places on cases |
| 1193 | 5D.3 and 5D.4 and made them use more syntactically correct | 1175 | 5D.3 and 5D.4 and made them use more syntactically correct methods. |
| 1194 | methods. | ||
| 1195 | 1176 | ||
| 1196 | (c-inher-key): Removed since the code in | 1177 | (c-inher-key): Removed since the code in |
| 1197 | `c-guess-basic-syntax' now uses token-based search. | 1178 | `c-guess-basic-syntax' now uses token-based search. |
| @@ -1213,25 +1194,24 @@ | |||
| 1213 | 1194 | ||
| 1214 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1195 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1215 | 1196 | ||
| 1216 | * progmodes/cc-align.el (c-lineup-cascaded-calls): New | 1197 | * progmodes/cc-align.el (c-lineup-cascaded-calls): |
| 1217 | indentation function. | 1198 | New indentation function. |
| 1218 | 1199 | ||
| 1219 | * progmodes/cc-engine.el (c-beginning-of-macro): Bugfix for | 1200 | * progmodes/cc-engine.el (c-beginning-of-macro): Bugfix for |
| 1220 | directives with whitespace between the '#' and the name. | 1201 | directives with whitespace between the '#' and the name. |
| 1221 | 1202 | ||
| 1222 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1203 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1223 | 1204 | ||
| 1224 | * progmodes/cc-engine.el (c-forward-syntactic-ws, | 1205 | * progmodes/cc-engine.el (c-forward-syntactic-ws) |
| 1225 | c-backward-syntactic-ws): Handle line continuations as | 1206 | (c-backward-syntactic-ws): Handle line continuations as |
| 1226 | whitespace. Don't move past a macro if that'd take us past | 1207 | whitespace. Don't move past a macro if that'd take us past |
| 1227 | the limit. | 1208 | the limit. |
| 1228 | 1209 | ||
| 1229 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1210 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1230 | 1211 | ||
| 1231 | * progmodes/cc-engine.el (c-beginning-of-macro, | 1212 | * progmodes/cc-engine.el (c-beginning-of-macro) |
| 1232 | c-forward-syntactic-ws): Multiline strings begin with `#"' in | 1213 | (c-forward-syntactic-ws): Multiline strings begin with `#"' in |
| 1233 | Pike, and that shouldn't be confused with a preprocessor | 1214 | Pike, and that shouldn't be confused with a preprocessor directive. |
| 1234 | directive. | ||
| 1235 | 1215 | ||
| 1236 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1216 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1237 | 1217 | ||
| @@ -1250,8 +1230,8 @@ | |||
| 1250 | 1230 | ||
| 1251 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1231 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1252 | 1232 | ||
| 1253 | * progmodes/cc-mode.el (c-mode-help-address): Removed | 1233 | * progmodes/cc-mode.el (c-mode-help-address): |
| 1254 | bug-gnu-emacs@gnu.org from the receiver list for bug reports. | 1234 | Removed bug-gnu-emacs@gnu.org from the receiver list for bug reports. |
| 1255 | I've almost never seen a bug reported this way that should go | 1235 | I've almost never seen a bug reported this way that should go |
| 1256 | to that list, but it's rather common that the reports concern | 1236 | to that list, but it's rather common that the reports concern |
| 1257 | the combination CC Mode and XEmacs instead. | 1237 | the combination CC Mode and XEmacs instead. |
| @@ -1267,8 +1247,8 @@ | |||
| 1267 | 1247 | ||
| 1268 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1248 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1269 | 1249 | ||
| 1270 | * progmodes/cc-cmds.el (c-electric-brace, | 1250 | * progmodes/cc-cmds.el (c-electric-brace) |
| 1271 | c-electric-semi&comma, c-electric-colon, c-electric-paren): | 1251 | (c-electric-semi&comma, c-electric-colon, c-electric-paren): |
| 1272 | Check for last on line only for doing the auto-newline-mode | 1252 | Check for last on line only for doing the auto-newline-mode |
| 1273 | stuff, not for the reindentation. | 1253 | stuff, not for the reindentation. |
| 1274 | 1254 | ||
| @@ -1278,8 +1258,8 @@ | |||
| 1278 | line only when the inserted brace comes first on it, instead | 1258 | line only when the inserted brace comes first on it, instead |
| 1279 | of last. | 1259 | of last. |
| 1280 | 1260 | ||
| 1281 | * progmodes/cc-cmds.el (c-electric-brace, | 1261 | * progmodes/cc-cmds.el (c-electric-brace) |
| 1282 | c-electric-semi&comma): Fixed two places where | 1262 | (c-electric-semi&comma): Fixed two places where |
| 1283 | c-syntactic-indentation wasn't heeded. | 1263 | c-syntactic-indentation wasn't heeded. |
| 1284 | 1264 | ||
| 1285 | * progmodes/cc-cmds.el (c-electric-pound): Don't be electric | 1265 | * progmodes/cc-cmds.el (c-electric-pound): Don't be electric |
| @@ -1293,13 +1273,11 @@ | |||
| 1293 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1273 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1294 | 1274 | ||
| 1295 | * progmodes/cc-cmds.el (c-guess-fill-prefix): Tuned the dwim | 1275 | * progmodes/cc-cmds.el (c-guess-fill-prefix): Tuned the dwim |
| 1296 | for the fallback to add a single space after the comment | 1276 | for the fallback to add a single space after the comment prefix. |
| 1297 | prefix. | ||
| 1298 | 1277 | ||
| 1299 | * progmodes/cc-cmds.el (c-indent-new-comment-line): Somewhat | 1278 | * progmodes/cc-cmds.el (c-indent-new-comment-line): Somewhat better |
| 1300 | better behavior in some special cases, especially for | 1279 | behavior in some special cases, especially for single-line comments. |
| 1301 | single-line comments. Avoid breaking up a comment starter or | 1280 | Avoid breaking up a comment starter or ender. |
| 1302 | ender. | ||
| 1303 | 1281 | ||
| 1304 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1282 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1305 | 1283 | ||
| @@ -1312,8 +1290,8 @@ | |||
| 1312 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1290 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1313 | 1291 | ||
| 1314 | * progmodes/cc-cmds.el, progmodes/cc-mode.el | 1292 | * progmodes/cc-cmds.el, progmodes/cc-mode.el |
| 1315 | (c-electric-delete, c-electric-delete-forward): Split | 1293 | (c-electric-delete, c-electric-delete-forward): |
| 1316 | `c-electric-delete' into two functions where | 1294 | Split `c-electric-delete' into two functions where |
| 1317 | `c-electric-delete-forward' always deletes forward and | 1295 | `c-electric-delete-forward' always deletes forward and |
| 1318 | `c-electric-delete' only contains the code necessary for | 1296 | `c-electric-delete' only contains the code necessary for |
| 1319 | XEmacs to choose between backward and forward deletion. | 1297 | XEmacs to choose between backward and forward deletion. |
| @@ -1328,8 +1306,8 @@ | |||
| 1328 | 1306 | ||
| 1329 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> | 1307 | 2002-04-22 Martin Stjernholm <bug-cc-mode@gnu.org> |
| 1330 | 1308 | ||
| 1331 | * progmodes/cc-mode.el, progmodes/cc-vars.el (c-common-init, | 1309 | * progmodes/cc-mode.el, progmodes/cc-vars.el (c-common-init) |
| 1332 | c-default-style): Removed the hardcoded switch to "java" style | 1310 | (c-default-style): Removed the hardcoded switch to "java" style |
| 1333 | in Java mode. It's instead taken care of by the default value | 1311 | in Java mode. It's instead taken care of by the default value |
| 1334 | for c-default-style. | 1312 | for c-default-style. |
| 1335 | 1313 | ||
| @@ -3508,8 +3486,8 @@ | |||
| 3508 | 3486 | ||
| 3509 | 2002-02-15 Andreas Schwab <schwab@suse.de> | 3487 | 2002-02-15 Andreas Schwab <schwab@suse.de> |
| 3510 | 3488 | ||
| 3511 | * textmodes/tex-mode.el (tex-font-lock-keywords-2): Require | 3489 | * textmodes/tex-mode.el (tex-font-lock-keywords-2): |
| 3512 | non-letter after specials. | 3490 | Require non-letter after specials. |
| 3513 | 3491 | ||
| 3514 | 2002-02-15 Eli Zaretskii <eliz@is.elta.co.il> | 3492 | 2002-02-15 Eli Zaretskii <eliz@is.elta.co.il> |
| 3515 | 3493 | ||
| @@ -3540,8 +3518,7 @@ | |||
| 3540 | `describe-text-at' in the menu. | 3518 | `describe-text-at' in the menu. |
| 3541 | 3519 | ||
| 3542 | * wid-edit.el (widgetp): New function. | 3520 | * wid-edit.el (widgetp): New function. |
| 3543 | * wid-edit.el (widget-keymap, widget-insert, widget-setup): | 3521 | * wid-edit.el (widget-keymap, widget-insert, widget-setup): Autoload. |
| 3544 | Autoloaded. | ||
| 3545 | 3522 | ||
| 3546 | * emacs-lisp/pp.el (pp-to-string): Autoloaded. | 3523 | * emacs-lisp/pp.el (pp-to-string): Autoloaded. |
| 3547 | 3524 | ||
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index af491603fc8..f9b9003593d 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -226,40 +226,37 @@ act as a paragraph-separator." | |||
| 226 | (forward-line 1) | 226 | (forward-line 1) |
| 227 | (if (< (point) to) | 227 | (if (< (point) to) |
| 228 | (progn | 228 | (progn |
| 229 | (move-to-left-margin) | 229 | (move-to-left-margin) |
| 230 | (setq start (point)) | 230 | (setq start (point)) |
| 231 | (setq second-line-prefix | 231 | (setq second-line-prefix |
| 232 | (cond ((looking-at paragraph-start) nil) ; can it happen ?? -sm | 232 | (cond ((looking-at paragraph-start) nil) ;Can it happen ? -stef |
| 233 | ((and adaptive-fill-regexp | 233 | ((and adaptive-fill-regexp |
| 234 | (looking-at adaptive-fill-regexp)) | 234 | (looking-at adaptive-fill-regexp)) |
| 235 | (buffer-substring-no-properties start (match-end 0))) | 235 | (buffer-substring-no-properties start (match-end 0))) |
| 236 | (adaptive-fill-function | 236 | (adaptive-fill-function |
| 237 | (funcall adaptive-fill-function)))) | 237 | (funcall adaptive-fill-function)))) |
| 238 | ;; If we get a fill prefix from the second line, | 238 | ;; If we get a fill prefix from the second line, |
| 239 | ;; make sure it or something compatible is on the first line too. | 239 | ;; make sure it or something compatible is on the first line too. |
| 240 | (when second-line-prefix | 240 | (when second-line-prefix |
| 241 | (unless first-line-prefix (setq first-line-prefix "")) | 241 | (unless first-line-prefix (setq first-line-prefix "")) |
| 242 | 242 | ;; If the non-whitespace chars match the first line, | |
| 243 | (if ;; If the non-whitespace chars match the first line, | 243 | ;; just use it (this subsumes the 2 checks used previously). |
| 244 | ;; just use it (this subsumes the 2 checks used previously). | 244 | ;; Used when first line is `/* ...' and second-line is |
| 245 | ;; Used when first line is `/* ...' and second-line is | 245 | ;; ` * ...'. |
| 246 | ;; ` * ...'. | 246 | (let ((tmp second-line-prefix) |
| 247 | (let ((flp (replace-regexp-in-string | 247 | (re "\\`")) |
| 248 | "[ \t]+" "" first-line-prefix))) | 248 | (while (string-match "\\`[ \t]*\\([^ \t]+\\)" tmp) |
| 249 | (if (equal flp "") | 249 | (setq re (concat re ".*" (regexp-quote (match-string 1 tmp)))) |
| 250 | (string-match "\\`[ \t]*\\'" second-line-prefix) | 250 | (setq tmp (substring tmp (match-end 0)))) |
| 251 | (string-match | 251 | ;; (assert (string-match "\\`[ \t]*\\'" tmp)) |
| 252 | (concat "\\`" | 252 | |
| 253 | (mapconcat | 253 | (if (string-match re first-line-prefix) |
| 254 | (lambda (c) (regexp-quote (string c))) flp "?") | 254 | second-line-prefix |
| 255 | "?\\'") | 255 | |
| 256 | (replace-regexp-in-string "[ \t]+" "" second-line-prefix)))) | 256 | ;; Use the longest common substring of both prefixes, |
| 257 | second-line-prefix | 257 | ;; if there is one. |
| 258 | 258 | (fill-common-string-prefix first-line-prefix | |
| 259 | ;; Use the longest common substring of both prefixes, | 259 | second-line-prefix))))) |
| 260 | ;; if there is one. | ||
| 261 | (fill-common-string-prefix first-line-prefix | ||
| 262 | second-line-prefix)))) | ||
| 263 | ;; If we get a fill prefix from a one-line paragraph, | 260 | ;; If we get a fill prefix from a one-line paragraph, |
| 264 | ;; maybe change it to whitespace, | 261 | ;; maybe change it to whitespace, |
| 265 | ;; and check that it isn't a paragraph starter. | 262 | ;; and check that it isn't a paragraph starter. |