From: Mark Wooding Date: Sun, 25 Jun 2017 18:03:20 +0000 (+0100) Subject: el/dot-emacs.el: Add hacking for LaTeX syntax highlighting. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/8638f2f3e068b9a5409ed87edd7da4ee12a175f9 el/dot-emacs.el: Add hacking for LaTeX syntax highlighting. --- 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.