[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/font-core.el
From: |
Luc Teirlinck |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/font-core.el |
Date: |
Sat, 04 Jun 2005 18:18:53 -0400 |
Index: emacs/lisp/font-core.el
diff -c emacs/lisp/font-core.el:1.28 emacs/lisp/font-core.el:1.29
*** emacs/lisp/font-core.el:1.28 Sun May 22 22:08:59 2005
--- emacs/lisp/font-core.el Sat Jun 4 22:18:53 2005
***************
*** 88,93 ****
--- 88,95 ----
It will be passed one argument, which is the current value of
`font-lock-mode'.")
+ ;; The mode for which font-lock was initialized, or nil if none.
+ (defvar font-lock-mode-major-mode)
(define-minor-mode font-lock-mode
"Toggle Font Lock mode.
With arg, turn Font Lock mode off if and only if arg is a non-positive
***************
*** 156,162 ****
;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode
(add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
! (remove-hook 'change-major-mode-hook 'font-lock-change-mode t)))
;; Get rid of fontification for the old major mode.
;; We do this when changing major modes.
--- 158,166 ----
;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode
(add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
! (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))
! (when font-lock-mode
! (setq font-lock-mode-major-mode major-mode)))
;; Get rid of fontification for the old major mode.
;; We do this when changing major modes.
***************
*** 175,180 ****
--- 179,185 ----
'(font-lock-face)))
(restore-buffer-modified-p modp)))
+ (defvar font-lock-set-defaults)
(defun font-lock-default-function (mode)
;; Turn on Font Lock mode.
(when mode
***************
*** 201,209 ****
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
(when (or font-lock-defaults
! (and (boundp 'font-lock-keywords) font-lock-keywords)
(with-no-warnings
! (cdr (assq major-mode font-lock-defaults-alist))))
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()
--- 206,219 ----
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
(when (or font-lock-defaults
! (if (boundp 'font-lock-keywords) font-lock-keywords)
(with-no-warnings
! (cdr (assq major-mode font-lock-defaults-alist)))
! (and mode
! (boundp 'font-lock-set-defaults)
! font-lock-set-defaults
! font-lock-mode-major-mode
! (not (eq font-lock-mode-major-mode major-mode))))
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/font-core.el,
Luc Teirlinck <=