# HG changeset patch # User Richard M. Stallman # Date 769304304 0 # Node ID b05a6824c5129592af8ad555f2095c2292285ce9 # Parent 0e1f3b9598bb71449e332e8be7a6ea485293b756 (font-lock-after-change-function): Fix typo in prev chg. (font-lock-mode): Use after-change-functions not after-change-function. diff -r 0e1f3b9598bb -r b05a6824c512 lisp/font-lock.el --- a/lisp/font-lock.el Wed May 18 23:37:55 1994 +0000 +++ b/lisp/font-lock.el Wed May 18 23:38:24 1994 +0000 @@ -265,7 +265,7 @@ ;; Must scan from line start in case of ;; inserting space into `intfoo () {}'. (if font-lock-no-comments - (remove-text-properties beg (1+ end) '(face nil)) + (remove-text-properties beg (min (1+ end) (point-max)) '(face nil)) (font-lock-fontify-region beg (min (1+ end) (point-max)))) ;; Now scan for keywords. (font-lock-hack-keywords beg end)))) @@ -365,11 +365,14 @@ (> (prefix-numeric-value arg) 0)))) (if (equal (buffer-name) " *Compiler Input*") ; hack for bytecomp... (setq on-p nil)) - (or (memq after-change-function - '(nil font-lock-after-change-function)) - (error "after-change-function is %s" after-change-function)) - (set (make-local-variable 'after-change-function) - (if on-p 'font-lock-after-change-function nil)) + (make-local-variable 'after-change-functions) + (if on-p + (or (memq 'font-lock-after-change-function after-change-functions) + (setq after-change-functions (cons 'font-lock-after-change-function + after-change-functions))) + (setq after-change-functions + (delq 'font-lock-after-change-function + (copy-sequence after-change-functions)))) (set (make-local-variable 'font-lock-mode) on-p) (make-local-variable 'font-lock-no-comments) (cond (on-p