diff options
| author | Stefan Monnier | 2001-11-06 17:01:58 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-11-06 17:01:58 +0000 |
| commit | c1966bb4443fa5c06a2bba6223e30877e154cc2b (patch) | |
| tree | ac3d3c741b87793da024b0d4b9695004f936c8b3 | |
| parent | 9bfaa84db4b93a2b57361f2ea5df3246625e243d (diff) | |
| download | emacs-c1966bb4443fa5c06a2bba6223e30877e154cc2b.tar.gz emacs-c1966bb4443fa5c06a2bba6223e30877e154cc2b.zip | |
(font-lock-match-c-style-declaration-item-and-skip-to-next):
Also work when LIMIT is further than the end of line.
| -rw-r--r-- | lisp/ChangeLog | 17 | ||||
| -rw-r--r-- | lisp/font-lock.el | 12 |
2 files changed, 16 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3ddae855a6..9d67fe2f9a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,8 +1,12 @@ | |||
| 1 | 2001-11-06 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * font-lock.el (font-lock-match-c-style-declaration-item-and-skip-to-next): | ||
| 4 | Also work when LIMIT is further than the end of line. | ||
| 5 | |||
| 1 | 2001-11-06 Eli Zaretskii <eliz@is.elta.co.il> | 6 | 2001-11-06 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 7 | ||
| 3 | * international/quail.el (quail-update-leim-list-file): Print the | 8 | * international/quail.el (quail-update-leim-list-file): Print the |
| 4 | offending file name if some of its quail-define-package forms is | 9 | offending file name if some of its quail-define-package forms is broken. |
| 5 | broken. | ||
| 6 | 10 | ||
| 7 | 2001-11-05 Richard M. Stallman <rms@gnu.org> | 11 | 2001-11-05 Richard M. Stallman <rms@gnu.org> |
| 8 | 12 | ||
| @@ -18,8 +22,8 @@ | |||
| 18 | 22 | ||
| 19 | 2001-11-05 Andrew Innes <andrewi@gnu.org> | 23 | 2001-11-05 Andrew Innes <andrewi@gnu.org> |
| 20 | 24 | ||
| 21 | * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): Don't | 25 | * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): |
| 22 | attempt to remake autoloads before nuking .elc files. | 26 | Don't attempt to remake autoloads before nuking .elc files. |
| 23 | 27 | ||
| 24 | 2001-11-04 Richard M. Stallman <rms@gnu.org> | 28 | 2001-11-04 Richard M. Stallman <rms@gnu.org> |
| 25 | 29 | ||
| @@ -27,7 +31,7 @@ | |||
| 27 | previous-single-property-change or next-single-char-property-change | 31 | previous-single-property-change or next-single-char-property-change |
| 28 | returns nil. | 32 | returns nil. |
| 29 | 33 | ||
| 30 | * international/mule-cmds.el (set-locale-environment): | 34 | * international/mule-cmds.el (set-locale-environment): |
| 31 | Make it interactive; make arg optional. | 35 | Make it interactive; make arg optional. |
| 32 | 36 | ||
| 33 | * international/mule-diag.el (help-funs): Require help-funs. | 37 | * international/mule-diag.el (help-funs): Require help-funs. |
| @@ -39,8 +43,7 @@ | |||
| 39 | 2001-11-04 Miles Bader <miles@gnu.org> | 43 | 2001-11-04 Miles Bader <miles@gnu.org> |
| 40 | 44 | ||
| 41 | * startup.el (fancy-splash-head): Reapply Gerd's hack to make the | 45 | * startup.el (fancy-splash-head): Reapply Gerd's hack to make the |
| 42 | shadow of the splash image grey on a dark background instead of | 46 | shadow of the splash image grey on a dark background instead of black. |
| 43 | black. | ||
| 44 | 47 | ||
| 45 | 2001-11-03 Stefan Monnier <monnier@cs.yale.edu> | 48 | 2001-11-03 Stefan Monnier <monnier@cs.yale.edu> |
| 46 | 49 | ||
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index e5fd64d2e45..d68098a82f1 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -2049,27 +2049,27 @@ The item is delimited by (match-beginning 1) and (match-end 1). | |||
| 2049 | If (match-beginning 2) is non-nil, the item is followed by a `('. | 2049 | If (match-beginning 2) is non-nil, the item is followed by a `('. |
| 2050 | 2050 | ||
| 2051 | This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | 2051 | This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." |
| 2052 | (when (looking-at "[ \t*]*\\(\\sw+\\)[ \t]*\\(((?\\)?") | 2052 | (when (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?") |
| 2053 | (when (and (match-end 2) (> (- (match-end 2) (match-beginning 2)) 1)) | 2053 | (when (and (match-end 2) (> (- (match-end 2) (match-beginning 2)) 1)) |
| 2054 | ;; If `word' is followed by a double open-paren, it's probably | 2054 | ;; If `word' is followed by a double open-paren, it's probably |
| 2055 | ;; a macro used for "int myfun P_ ((int arg1))". Let's go back one | 2055 | ;; a macro used for "int myfun P_ ((int arg1))". Let's go back one |
| 2056 | ;; word to try and match `myfun' rather than `P_'. | 2056 | ;; word to try and match `myfun' rather than `P_'. |
| 2057 | (let ((pos (point))) | 2057 | (let ((pos (point))) |
| 2058 | (skip-chars-backward " \t") | 2058 | (skip-chars-backward " \t\n") |
| 2059 | (skip-syntax-backward "w") | 2059 | (skip-syntax-backward "w") |
| 2060 | (unless (looking-at "\\(\\sw+\\)[ \t]*\\sw*_\\sw*[ \t]*\\((\\)?") | 2060 | (unless (looking-at "\\(\\sw+\\)[ \t\n]*\\sw*_\\sw*[ \t\n]*\\((\\)?") |
| 2061 | ;; Looks like it was something else, so go back to where we | 2061 | ;; Looks like it was something else, so go back to where we |
| 2062 | ;; were and reset the match data by rematching. | 2062 | ;; were and reset the match data by rematching. |
| 2063 | (goto-char pos) | 2063 | (goto-char pos) |
| 2064 | (looking-at "[ \t*]*\\(\\sw+\\)[ \t]*\\(((?\\)?")))) | 2064 | (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?")))) |
| 2065 | (save-match-data | 2065 | (save-match-data |
| 2066 | (condition-case nil | 2066 | (condition-case nil |
| 2067 | (save-restriction | 2067 | (save-restriction |
| 2068 | ;; Restrict to the end of line, currently guaranteed to be LIMIT. | 2068 | ;; Restrict to the LIMIT. |
| 2069 | (narrow-to-region (point-min) limit) | 2069 | (narrow-to-region (point-min) limit) |
| 2070 | (goto-char (match-end 1)) | 2070 | (goto-char (match-end 1)) |
| 2071 | ;; Move over any item value, etc., to the next item. | 2071 | ;; Move over any item value, etc., to the next item. |
| 2072 | (while (not (looking-at "[ \t]*\\(\\(,\\)\\|;\\|$\\)")) | 2072 | (while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)")) |
| 2073 | (goto-char (or (scan-sexps (point) 1) (point-max)))) | 2073 | (goto-char (or (scan-sexps (point) 1) (point-max)))) |
| 2074 | (goto-char (match-end 2))) | 2074 | (goto-char (match-end 2))) |
| 2075 | (error t))))) | 2075 | (error t))))) |