]> code.delx.au - gnu-emacs/blobdiff - lisp/font-lock.el
(mouse-drag-secondary): Make sure to return nil
[gnu-emacs] / lisp / font-lock.el
index 2e840bfc7d10bc16a352258f7193d84c192c32bb..fd3ccdc0d1a948a6ddf1cda35cc375579d69c7b6 100644 (file)
@@ -501,9 +501,10 @@ its mode hook."
     (set (make-local-variable 'font-lock-mode) on-p)
     ;; Turn on Font Lock mode.
     (when on-p
-      (make-local-hook 'after-change-functions)
-      (add-hook 'after-change-functions 'font-lock-after-change-function nil t)
       (font-lock-set-defaults)
+      (unless (eq font-lock-fontify-region-function 'ignore)
+       (make-local-hook 'after-change-functions)
+       (add-hook 'after-change-functions 'font-lock-after-change-function nil t))
       (font-lock-turn-on-thing-lock)
       (run-hooks 'font-lock-mode-hook)
       ;; Fontify the buffer if we have to.
@@ -1568,9 +1569,9 @@ the face is also set; its value is the face name."
              (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]*\\(\\(,\\)\\|;\\|$\\)"))
                (goto-char (or (scan-sexps (point) 1) (point-max))))
-             (goto-char (match-end 0)))
+             (goto-char (match-end 2)))
          (error t)))))
 
 (let ((c-keywords