[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 48e8e70 042/433: Fixed bug where font-lock-mode was set to
From: |
Dmitry Gutov |
Subject: |
[elpa] master 48e8e70 042/433: Fixed bug where font-lock-mode was set to `t' globally, causing |
Date: |
Thu, 15 Mar 2018 19:43:31 -0400 (EDT) |
branch: master
commit 48e8e70d317ab9a47e0830b6d23ce7c852cf6c19
Author: mas <mas>
Commit: mas <mas>
Fixed bug where font-lock-mode was set to `t' globally, causing
global-font-lock-mode to turn it off.
---
mmm-auto.el | 5 ++++-
mmm-region.el | 12 +++++++-----
mmm-vars.el | 6 ++----
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/mmm-auto.el b/mmm-auto.el
index 0baa29a..a39f383 100644
--- a/mmm-auto.el
+++ b/mmm-auto.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-auto.el,v 1.5 2000/05/24 09:13:00 mas Exp $
+;; Version: $Id: mmm-auto.el,v 1.6 2000/06/27 00:35:02 mas Exp $
;;{{{ GPL
@@ -104,6 +104,9 @@ positive and off otherwise." t))
(defun mmm-major-mode-change ()
"Add mode hooks to turn MMM Mode on where appropriate.
Actually adds `mmm-run-major-mode-hook' to all major mode hooks."
+ (and (boundp 'mmm-mode)
+ mmm-mode
+ (mmm-mode-off))
(unless (window-minibuffer-p (selected-window))
(loop for lookback from 4
for frame = (backtrace-frame lookback)
diff --git a/mmm-region.el b/mmm-region.el
index 038e8fb..ab91fce 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-region.el,v 1.8 2000/06/26 22:22:43 mas Exp $
+;; Version: $Id: mmm-region.el,v 1.9 2000/06/27 00:35:02 mas Exp $
;;{{{ GPL
@@ -319,12 +319,14 @@ which is set here as well. See
`mmm-save-local-variables'."
(not (memq major-mode (cdr font-lock-global-modes)))
(memq major-mode font-lock-global-modes)))
;; Don't actually fontify, but note that we should.
+ (make-local-variable 'font-lock-mode)
(setq font-lock-mode t)))
;; Get the font-lock variables
(font-lock-set-defaults)
;; These can't be in the local variables list, because we
;; replace their actual values, but we want to use their
;; original values elsewhere.
+ (put mode 'mmm-font-lock-mode font-lock-mode)
(put mode 'mmm-fontify-region-function
font-lock-fontify-region-function)
(put mode 'mmm-beginning-of-syntax-function
@@ -393,7 +395,7 @@ different keymaps, syntax tables, local variables, etc. for
submodes."
(mmm-update-mode-info mode)
(mmm-set-local-variables mode)
; (and (featurep 'font-lock)
-; (mmm-get-saved-local mode 'font-lock-mode)
+; (get mode 'mmm-font-lock-mode)
; (font-lock-mode 1))
)
(if mmm-current-submode
@@ -407,8 +409,8 @@ different keymaps, syntax tables, local variables, etc. for
submodes."
(force-mode-line-update)))
(defun mmm-add-hooks ()
- (make-local-hook 'change-major-mode-hook)
- (add-hook 'change-major-mode-hook 'mmm-mode-off nil 'local)
+; (make-local-hook 'change-major-mode-hook)
+; (add-hook 'change-major-mode-hook 'mmm-mode-off nil 'local)
(make-local-hook 'post-command-hook)
(add-hook 'post-command-hook 'mmm-update-submode-region nil 'local))
@@ -567,7 +569,7 @@ of the REGIONS covers START to STOP."
;; I don't know why it does this, but let's undo it here.
(let ((font-lock-beginning-of-syntax-function 'mmm-beginning-of-syntax))
(mapcar #'(lambda (elt)
- (when (mmm-get-saved-local (car elt) 'font-lock-mode)
+ (when (get (car elt) 'mmm-font-lock-mode)
(mmm-fontify-region-list (car elt) (cdr elt))))
(mmm-regions-alist start stop)))
(mmm-update-submode-region)
diff --git a/mmm-vars.el b/mmm-vars.el
index 1e2b370..eadd05d 100644
--- a/mmm-vars.el
+++ b/mmm-vars.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-vars.el,v 1.7 2000/06/26 22:19:40 mas Exp $
+;; Version: $Id: mmm-vars.el,v 1.8 2000/06/27 00:35:02 mas Exp $
;;{{{ GPL
@@ -80,7 +80,7 @@
;;{{{ Save Local Variables
(defcustom mmm-save-local-variables
- '(
+ '(;; Don't use `function' (#') here!! We're already inside `quote'!
mode-name
comment-start
comment-end
@@ -96,8 +96,6 @@
font-lock-syntax-table
font-lock-mark-block-function ; Override this?
font-lock-syntactic-keywords
- ;; Don't use `function' (#') here!! We're already inside `quote'!
- (font-lock-mode nil (lambda () (featurep 'font-lock)))
indent-line-function
(c-basic-offset buffer (cc-mode))
skeleton-transformation
- [elpa] master 3c44251 047/433: # Added comment about loading supplied classes separately., (continued)
- [elpa] master 3c44251 047/433: # Added comment about loading supplied classes separately., Dmitry Gutov, 2018/03/15
- [elpa] master faaf000 040/433: # Commented on local variable improvements and version numbers., Dmitry Gutov, 2018/03/15
- [elpa] master 85ced66 041/433: # Reformatting., Dmitry Gutov, 2018/03/15
- [elpa] master 216c602 046/433: Fixed bug saving variables when creating regions; need to set them first., Dmitry Gutov, 2018/03/15
- [elpa] master 854c8a1 049/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master fbf7da0 045/433: # Updated docstring, Dmitry Gutov, 2018/03/15
- [elpa] master c2f2ef7 050/433: # Changed version numbers, Dmitry Gutov, 2018/03/15
- [elpa] master c22fb9f 054/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master aedb013 060/433: # Updated comment about psgml., Dmitry Gutov, 2018/03/15
- [elpa] master 9afb287 043/433: Added mmm-[get, set]-class-parameters and creation-hook., Dmitry Gutov, 2018/03/15
- [elpa] master 48e8e70 042/433: Fixed bug where font-lock-mode was set to `t' globally, causing,
Dmitry Gutov <=
- [elpa] master e77d5b3 026/433: Released 0.3.9., Dmitry Gutov, 2018/03/15
- [elpa] master b6fccc2 044/433: Added creation-hook, fixed mode-name problem., Dmitry Gutov, 2018/03/15
- [elpa] master 8270590 037/433: Rewrote local variable functions, added new ones, changed updating,, Dmitry Gutov, 2018/03/15
- [elpa] master ccecc35 057/433: (mmm-valid-buffer): Checked against noninteractive and hidden buffers., Dmitry Gutov, 2018/03/15
- [elpa] master c4ffbd8 059/433: (mmm-fontify-region-list): Saved local variables before moving., Dmitry Gutov, 2018/03/15
- [elpa] master 6819dcc 062/433: Added Embperl., Dmitry Gutov, 2018/03/15
- [elpa] master 297bf01 063/433: Created file defining `universal' submode., Dmitry Gutov, 2018/03/15
- [elpa] master dddbab2 031/433: Released 0.3.10, Dmitry Gutov, 2018/03/15
- [elpa] master a083dc4 061/433: Added def-edebug-specs., Dmitry Gutov, 2018/03/15
- [elpa] master a70fdfa 068/433: Removed use-local-map advice; no longer necessary (thank goodness!), Dmitry Gutov, 2018/03/15