Mercurial > emacs
changeset 34324:4d26cf62962c
(font-lock-default-fontify-region):
Include the terminating \n (off-by-one error).
(font-lock-set-defaults): Use dolist.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 07 Dec 2000 11:59:38 +0000 |
parents | 1e0fd85c0b60 |
children | a65d8c29442a |
files | lisp/font-lock.el |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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'."