From 8638f2f3e068b9a5409ed87edd7da4ee12a175f9 Mon Sep 17 00:00:00 2001 Message-Id: <8638f2f3e068b9a5409ed87edd7da4ee12a175f9.1718320581.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 25 Jun 2017 19:03:20 +0100 Subject: [PATCH] el/dot-emacs.el: Add hacking for LaTeX syntax highlighting. Organization: Straylight/Edgeware From: Mark Wooding --- el/dot-emacs.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index d83057a..59c8536 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3109,6 +3109,25 @@ (defun mdw-fontify-tex () (list "[$^_{}#&]" '(0 mdw-punct-face))))) +(eval-after-load 'font-latex + '(defun font-latex-jit-lock-force-redisplay (buf start end) + "Compatibility for Emacsen not offering `jit-lock-force-redisplay'." + ;; The following block is an expansion of `jit-lock-force-redisplay' + ;; and involved macros taken from CVS Emacs on 2007-04-28. + (with-current-buffer buf + (let ((modified (buffer-modified-p))) + (unwind-protect + (let ((buffer-undo-list t) + (inhibit-read-only t) + (inhibit-point-motion-hooks t) + (inhibit-modification-hooks t) + deactivate-mark + buffer-file-name + buffer-file-truename) + (put-text-property start end 'fontified t)) + (unless modified + (restore-buffer-modified-p nil))))))) + ;;;-------------------------------------------------------------------------- ;;; SGML hacking. -- [mdw]