[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ca87dd4 187/433: (mmm-update-mode-info): Hacked so `font-l
From: |
Dmitry Gutov |
Subject: |
[elpa] master ca87dd4 187/433: (mmm-update-mode-info): Hacked so `font-lock-keywords-alist' works. |
Date: |
Thu, 15 Mar 2018 19:43:59 -0400 (EDT) |
branch: master
commit ca87dd4f2070152675e1b35df8ae391c3ed7ce8c
Author: mas <mas>
Commit: mas <mas>
(mmm-update-mode-info): Hacked so `font-lock-keywords-alist' works.
---
mmm-region.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/mmm-region.el b/mmm-region.el
index 469d5d1..faebf0b 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.26 2000/08/29 09:28:02 mas Exp $
+;; Version: $Id: mmm-region.el,v 1.27 2001/01/08 01:43:21 mas Exp $
;;{{{ GPL
@@ -301,19 +301,21 @@ If STRICT, only clear those strictly included, rather
than partially."
;; BASIC UPDATING
;;{{{ Submode Info
-(defun mmm-update-mode-info (mode)
+(defun mmm-update-mode-info (mode &optional force)
"Save the global-saved and buffer-saved variables for MODE.
Global saving is done on properties of the symbol MODE and buffer
saving in `mmm-buffer-saved-locals'. This function must be called for
both the dominant mode and all submodes, in each file. Region-saved
variables are initialized from `mmm-region-saved-locals-defaults',
-which is set here as well. See `mmm-save-local-variables'."
+which is set here as well. See `mmm-save-local-variables'. If FORCE
+is non-nil, don't quit if the info is already there."
(let ((buffer-entry (assq mode mmm-buffer-saved-locals))
(region-entry (assq mode mmm-region-saved-locals-defaults))
global-vars buffer-vars region-vars
;; kludge for XEmacs 20
(html-helper-build-new-buffer nil))
- (unless (and (get mode 'mmm-local-variables)
+ (unless (and (not force)
+ (get mode 'mmm-local-variables)
buffer-entry
region-entry)
(save-excursion
@@ -338,7 +340,8 @@ which is set here as well. See `mmm-save-local-variables'."
;; Code copied from font-lock.el to detect when font-lock
;; should be on via global-font-lock-mode.
(and (or font-lock-defaults
- (assq major-mode font-lock-defaults-alist))
+ (assq major-mode font-lock-defaults-alist)
+ (assq major-mode font-lock-keywords-alist))
(or (eq font-lock-global-modes t)
(if (eq (car-safe font-lock-global-modes) 'not)
(not (memq major-mode
@@ -348,7 +351,9 @@ which is set here as well. See `mmm-save-local-variables'."
(put mode 'mmm-font-lock-mode t))
;; Get the font-lock variables
(when mmm-font-lock-available-p
- (mmm-set-font-lock-defaults))
+ ;; To fool `font-lock-add-keywords'
+ (let ((font-lock-mode t))
+ (mmm-set-font-lock-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.
- [elpa] master 16907a3 368/433: Delete .cvsignore, move almost everything to .gitignore, (continued)
- [elpa] master 16907a3 368/433: Delete .cvsignore, move almost everything to .gitignore, Dmitry Gutov, 2018/03/15
- [elpa] master df0d56b 406/433: Fix regression from the previous commit, Dmitry Gutov, 2018/03/15
- [elpa] master 50764ae 269/433: Fixed back recognition of output regions., Dmitry Gutov, 2018/03/15
- [elpa] master cb905bd 431/433: Add copyright blurbs to the test files, Dmitry Gutov, 2018/03/15
- [elpa] master 38f1f2a 390/433: Update TODO, Dmitry Gutov, 2018/03/15
- [elpa] master 6406e1a 357/433: Update NEWS, Dmitry Gutov, 2018/03/15
- [elpa] master a57afa3 421/433: Release 0.5.5, Dmitry Gutov, 2018/03/15
- [elpa] master fd3c992 378/433: Fix sporadic keywords mishighlighting in sql-mode, Dmitry Gutov, 2018/03/15
- [elpa] master 8ed11ab 262/433: Added delimiter regions and region name matching., Dmitry Gutov, 2018/03/15
- [elpa] master cb10b47 165/433: (mmm-set-buffer-file-name-p): Added to control file name setting., Dmitry Gutov, 2018/03/15
- [elpa] master ca87dd4 187/433: (mmm-update-mode-info): Hacked so `font-lock-keywords-alist' works.,
Dmitry Gutov <=
- [elpa] master cf82d88 423/433: Add to TODO, Dmitry Gutov, 2018/03/15
- [elpa] master 3ef8864 374/433: Expected results depend on the Emacs version, Dmitry Gutov, 2018/03/15
- [elpa] master c563b85 377/433: mmm-beginning-of-syntax: Don't consider overlays ending at point, Dmitry Gutov, 2018/03/15
- [elpa] master b8c18c2 227/433: Defined new submode placement error conditions., Dmitry Gutov, 2018/03/15
- [elpa] master 4e21882 403/433: mmm-match-region: Return front-pos even without front-delim; likewise for back, Dmitry Gutov, 2018/03/15
- [elpa] master b3c3510 289/433: Fix fontification of the first subregion line, Dmitry Gutov, 2018/03/15
- [elpa] master 4d41181 405/433: Make c-mode raise fewer errors, Dmitry Gutov, 2018/03/15
- [elpa] master 6115059 288/433: Refontify buffer when creating new region, Dmitry Gutov, 2018/03/15
- [elpa] master a05fca0 247/433: Initial revision, from Joe Kesley., Dmitry Gutov, 2018/03/15
- [elpa] master 68a169e 366/433: Don't make the temp buffer unmodified before killing it, Dmitry Gutov, 2018/03/15