# HG changeset patch # User Stefan Monnier # Date 976190378 0 # Node ID 4d26cf62962c26e6cad0cc032eed160dd8d3276a # Parent 1e0fd85c0b6029fb03d17c1aab728c731041fc0c (font-lock-default-fontify-region): Include the terminating \n (off-by-one error). (font-lock-set-defaults): Use dolist. diff -r 1e0fd85c0b60 -r 4d26cf62962c lisp/font-lock.el --- a/lisp/font-lock.el Thu Dec 07 11:52:01 2000 +0000 +++ b/lisp/font-lock.el Thu Dec 07 11:59:38 2000 +0000 @@ -1215,7 +1215,7 @@ 'font-lock-multiline nil) (point-max))) (goto-char end) - (setq end (line-end-position)) + (setq end (line-beginning-position 2)) ;; Now do the fontification. (font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords @@ -1741,13 +1741,11 @@ (set (make-local-variable 'font-lock-beginning-of-syntax-function) (nth 4 defaults))) ;; Variable alist? - (let ((alist (nthcdr 5 defaults))) - (while alist - (let ((variable (car (car alist))) (value (cdr (car alist)))) - (unless (boundp variable) - (set variable nil)) - (set (make-local-variable variable) value) - (setq alist (cdr alist)))))))) + (dolist (x (nthcdr 5 defaults)) + (let ((variable (car x)) (value (cdr x))) + (unless (boundp variable) + (set variable nil)) ;why ? + (set (make-local-variable variable) value)))))) (defun font-lock-unset-defaults () "Unset fontification defaults. See function `font-lock-set-defaults'."