emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/font-core.el


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/font-core.el
Date: Wed, 12 Jun 2002 00:51:07 -0400

Index: emacs/lisp/font-core.el
diff -c emacs/lisp/font-core.el:1.7 emacs/lisp/font-core.el:1.8
*** emacs/lisp/font-core.el:1.7 Sat Jun  8 22:27:43 2002
--- emacs/lisp/font-core.el     Wed Jun 12 00:51:07 2002
***************
*** 73,81 ****
  `font-lock-inhibit-thing-lock' and `font-lock-maximum-size'.")
  (make-variable-buffer-local 'font-lock-defaults)
  
- (defvar font-lock-core-only nil
-   "If non-nil, then don't load font-lock.el unless necessary.")
- 
  ;; This variable is used where font-lock.el itself supplies the
  ;; keywords.  Really, this shouldn't need to be in font-core.el, but
  ;; we can't avoid it.  In the future, this stuff will hopefully be
--- 73,78 ----
***************
*** 225,232 ****
        (push (list 'face 'font-lock-face) char-property-alias-alist)))
      ;; Only do hard work if the mode has specified stuff in
      ;; `font-lock-defaults'.
!     (when (and font-lock-defaults
!              (not font-lock-core-only))
        (add-hook 'after-change-functions 'font-lock-after-change-function t t)
        (font-lock-turn-on-thing-lock)
        ;; Fontify the buffer if we have to.
--- 222,228 ----
        (push (list 'face 'font-lock-face) char-property-alias-alist)))
      ;; Only do hard work if the mode has specified stuff in
      ;; `font-lock-defaults'.
!     (when font-lock-defaults
        (add-hook 'after-change-functions 'font-lock-after-change-function t t)
        (font-lock-turn-on-thing-lock)
        ;; Fontify the buffer if we have to.
***************
*** 248,255 ****
        (setcdr elt (remq 'font-lock-face (cdr elt)))
        (when (null (cdr elt))
          (setq char-property-alias-alist (delq elt 
char-property-alias-alist)))))
!     (when (and font-lock-defaults
!              (not font-lock-core-only))
        (remove-hook 'after-change-functions 'font-lock-after-change-function t)
        (font-lock-unfontify-buffer)
        (font-lock-turn-off-thing-lock))))
--- 244,250 ----
        (setcdr elt (remq 'font-lock-face (cdr elt)))
        (when (null (cdr elt))
          (setq char-property-alias-alist (delq elt 
char-property-alias-alist)))))
!     (when font-lock-defaults
        (remove-hook 'after-change-functions 'font-lock-after-change-function t)
        (font-lock-unfontify-buffer)
        (font-lock-turn-off-thing-lock))))
***************
*** 271,283 ****
      (make-local-variable 'font-lock-multiline)
      (let ((defaults (or font-lock-defaults
                        (cdr (assq major-mode font-lock-defaults-alist)))))
!       ;; Variable alist?
!       (dolist (x (nthcdr 5 defaults))
!       (set (make-local-variable (car x)) (cdr x)))
!       (when (and defaults
!                ;; Detect if this is a simple mode, which doesn't use
!                ;; any syntactic fontification functions.
!                (not font-lock-core-only))
        (require 'font-lock)
        (font-lock-set-defaults-1)))))
  
--- 266,272 ----
      (make-local-variable 'font-lock-multiline)
      (let ((defaults (or font-lock-defaults
                        (cdr (assq major-mode font-lock-defaults-alist)))))
!       (when defaults
        (require 'font-lock)
        (font-lock-set-defaults-1)))))
  
***************
*** 353,364 ****
    :group 'font-lock)
  
  (defun turn-on-font-lock-if-enabled ()
!   (when (and (or font-lock-defaults
!                (assq major-mode font-lock-defaults-alist))
!            (or (eq font-lock-global-modes t)
!                (if (eq (car-safe font-lock-global-modes) 'not)
!                    (not (memq major-mode (cdr font-lock-global-modes)))
!                  (memq major-mode font-lock-global-modes))))
      (let (inhibit-quit)
        (turn-on-font-lock))))
  
--- 342,349 ----
    :group 'font-lock)
  
  (defun turn-on-font-lock-if-enabled ()
!   (unless (and (eq (car-safe font-lock-global-modes) 'not)
!              (memq major-mode (cdr font-lock-global-modes)))
      (let (inhibit-quit)
        (turn-on-font-lock))))
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]