[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13730: 24.3.50; Diff from Bzr-Log-View not highlighted
From: |
Richard Copley |
Subject: |
bug#13730: 24.3.50; Diff from Bzr-Log-View not highlighted |
Date: |
Sun, 17 Feb 2013 05:27:52 +0000 |
> Unfortunately font-lock gets turned off in a change-major-mode-hook
> function (font-lock-change-mode in "font-core.el"), which doesn't seem
> to have been anticipated.
Sorry, that's a red herring, it has nothing to do with font-lock-change-mode.
Now that turning a minor mode off during a major mode function
disables the corresponding global minor mode, turning the minor mode
back on should re-enable the global minor mode, as in the patch below.
(In Emacs trunk, whitespace mode is turned on in diff mode by a
directory-local variable. Thus the function `whitepace-turn-on' is
called from inside the diff-mode major mode function; but
`whitespace-turn-on' turns font lock off and turns it back on again.)
=== modified file 'lisp/emacs-lisp/easy-mmode.el'
*** lisp/emacs-lisp/easy-mmode.el 2013-02-15 20:01:51 +0000
--- lisp/emacs-lisp/easy-mmode.el 2013-02-17 05:18:06 +0000
***************
*** 461,468 ****
;; kill-all-local-variables.
(defvar-local ,disable-MODE nil)
(defun ,MODE-disable-in-buffer ()
! (unless ,mode
! (setq ,disable-MODE t)))
(put ',MODE-disable-in-buffer 'definition-name ',global-mode))))
;;;
--- 461,467 ----
;; kill-all-local-variables.
(defvar-local ,disable-MODE nil)
(defun ,MODE-disable-in-buffer ()
! (setq ,disable-MODE (not ,mode)))
(put ',MODE-disable-in-buffer 'definition-name ',global-mode))))
;;;
Message not available