summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-11-06 17:01:58 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-11-06 17:01:58 +0000
commitc1966bb4443fa5c06a2bba6223e30877e154cc2b (patch)
treeac3d3c741b87793da024b0d4b9695004f936c8b3 /lisp
parent9bfaa84db4b93a2b57361f2ea5df3246625e243d (diff)
downloademacs-c1966bb4443fa5c06a2bba6223e30877e154cc2b.tar.gz
(font-lock-match-c-style-declaration-item-and-skip-to-next):
Also work when LIMIT is further than the end of line.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/font-lock.el12
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 @@
+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>
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).
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)))))