]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-match-c-style-declaration-item-and-skip-to-next):
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 6 Nov 2001 17:01:58 +0000 (17:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 6 Nov 2001 17:01:58 +0000 (17:01 +0000)
Also work when LIMIT is further than the end of line.

lisp/ChangeLog
lisp/font-lock.el

index b3ddae855a6bc0ce3f27569be6ae5f09a3d93e5d..9d67fe2f9a649347884814e4f0b7f608a35e5fca 100644 (file)
@@ -1,8 +1,12 @@
+2001-11-06  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * font-lock.el (font-lock-match-c-style-declaration-item-and-skip-to-next):
+       Also work when LIMIT is further than the end of line.
+
 2001-11-06  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * international/quail.el (quail-update-leim-list-file): Print the
-       offending file name if some of its quail-define-package forms is
-       broken.
+       offending file name if some of its quail-define-package forms is broken.
 
 2001-11-05  Richard M. Stallman  <rms@gnu.org>
 
@@ -18,8 +22,8 @@
 
 2001-11-05  Andrew Innes  <andrewi@gnu.org>
 
-       * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): Don't
-       attempt to remake autoloads before nuking .elc files.
+       * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH):
+       Don't attempt to remake autoloads before nuking .elc files.
 
 2001-11-04  Richard M. Stallman  <rms@gnu.org>
 
@@ -27,7 +31,7 @@
        previous-single-property-change or next-single-char-property-change
        returns nil.
 
-       * international/mule-cmds.el (set-locale-environment): 
+       * international/mule-cmds.el (set-locale-environment):
        Make it interactive; make arg optional.
 
        * international/mule-diag.el (help-funs): Require help-funs.
@@ -39,8 +43,7 @@
 2001-11-04  Miles Bader  <miles@gnu.org>
 
        * startup.el (fancy-splash-head): Reapply Gerd's hack to make the
-       shadow of the splash image grey on a dark background instead of
-       black.
+       shadow of the splash image grey on a dark background instead of black.
 
 2001-11-03  Stefan Monnier  <monnier@cs.yale.edu>
 
index e5fd64d2e45d8340d46d13a5702da4abc8aa8582..d68098a82f1310e6840045b6fe567ab665485701 100644 (file)
@@ -2049,27 +2049,27 @@ The item is delimited by (match-beginning 1) and (match-end 1).
 If (match-beginning 2) is non-nil, the item is followed by a `('.
 
 This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
-  (when (looking-at "[ \t*]*\\(\\sw+\\)[ \t]*\\(((?\\)?")
+  (when (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?")
     (when (and (match-end 2) (> (- (match-end 2) (match-beginning 2)) 1))
       ;; If `word' is followed by a double open-paren, it's probably
       ;; a macro used for "int myfun P_ ((int arg1))".  Let's go back one
       ;; word to try and match `myfun' rather than `P_'.
       (let ((pos (point)))
-       (skip-chars-backward " \t")
+       (skip-chars-backward " \t\n")
        (skip-syntax-backward "w")
-       (unless (looking-at "\\(\\sw+\\)[ \t]*\\sw*_\\sw*[ \t]*\\((\\)?")
+       (unless (looking-at "\\(\\sw+\\)[ \t\n]*\\sw*_\\sw*[ \t\n]*\\((\\)?")
          ;; Looks like it was something else, so go back to where we
          ;; were and reset the match data by rematching.
          (goto-char pos)
-         (looking-at "[ \t*]*\\(\\sw+\\)[ \t]*\\(((?\\)?"))))
+         (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?"))))
     (save-match-data
       (condition-case nil
          (save-restriction
-           ;; Restrict to the end of line, currently guaranteed to be LIMIT.
+           ;; Restrict to the LIMIT.
            (narrow-to-region (point-min) limit)
            (goto-char (match-end 1))
            ;; Move over any item value, etc., to the next item.
-           (while (not (looking-at "[ \t]*\\(\\(,\\)\\|;\\|$\\)"))
+           (while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)"))
              (goto-char (or (scan-sexps (point) 1) (point-max))))
            (goto-char (match-end 2)))
        (error t)))))