Merge from emacs--devo--0
[bpt/emacs.git] / lisp / font-lock.el
index 4fd933e..e254b04 100644 (file)
@@ -11,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -355,7 +355,7 @@ Each element in a user-level keywords list should have one of these forms:
 
 where MATCHER can be either the regexp to search for, or the function name to
 call to make the search (called with one argument, the limit of the search;
-it should return non-nil, move point, and set `match-data' appropriately iff
+it should return non-nil, move point, and set `match-data' appropriately if
 it succeeds; like `re-search-forward' would).
 MATCHER regexps can be generated via the function `regexp-opt'.
 
@@ -1068,7 +1068,7 @@ that tries to find such elements and move the boundaries such that they do
 not fall in the middle of one.
 Each function is called with no argument; it is expected to adjust the
 dynamically bound variables `font-lock-beg' and `font-lock-end'; and return
-non-nil iff it did make such an adjustment.
+non-nil if it did make such an adjustment.
 These functions are run in turn repeatedly until they all return nil.
 Put first the functions more likely to cause a change and cheaper to compute.")
 ;; Mark it as a special hook which doesn't use any global setting
@@ -1746,7 +1746,7 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
   "Set fontification defaults appropriately for this mode.
 Sets various variables using `font-lock-defaults' (or, if nil, using
 `font-lock-defaults-alist') and `font-lock-maximum-decoration'."
-  ;; Set fontification defaults iff not previously set for correct major mode.
+  ;; Set fontification defaults if not previously set for correct major mode.
   (unless (and font-lock-set-defaults
               (eq font-lock-mode-major-mode major-mode))
     (setq font-lock-mode-major-mode major-mode)
@@ -2114,7 +2114,8 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
            ;; Move over any item value, etc., to the next item.
            (while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)"))
              (goto-char (or (scan-sexps (point) 1) (point-max))))
-           (goto-char (match-end 2)))
+           (if (match-end 2)
+               (goto-char (match-end 2))))
        (error t)))))
 
 ;; C preprocessor(cpp) is used outside of C, C++ and Objective-C source file.