I am having a problem introducing the tex-font-lock-keywords and get the superscript-subscript functionality to work.
> Sent: Thursday, January 14, 2021 at 10:34 PM > From: "Robert Pluim" <[email protected]> > To: "Christopher Dimech" <[email protected]> > Cc: "help-texinfo gnu" <[email protected]> > Subject: Re: tex-mode.el for setting superscript and subscript face > > >>>>> On Thu, 14 Jan 2021 11:29:34 +0100, Christopher Dimech <[email protected]> > >>>>> said: > > Christopher> I am working on a minor mode that will use the superscipt > and subscript > Christopher> functionality for texinfo-mode. > > Well, itʼs easy enough to locate. lisp/tex-mode.el:646 > > (defun tex-font-lock-match-suscript (limit) > "Match subscript and superscript patterns up to LIMIT." > (when (and tex-fontify-script > (re-search-forward "[_^] *\\([^\n\\{}]\\|\ > \\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t)) > (when (match-end 3) > (let ((beg (match-beginning 3)) > (end (save-restriction > (narrow-to-region (point-min) limit) > (condition-case nil (scan-lists (point) 1 1) (error nil))))) > (store-match-data (if end > (list (match-beginning 0) end beg end) > (list beg beg beg beg))))) > t)) > > (defconst tex-font-lock-keywords-3 > (append tex-font-lock-keywords-2 > '((tex-font-lock-match-suscript > (1 (tex-font-lock-suscript (match-beginning 0)) append)))) > "Experimental expressions to highlight in TeX modes.") > >
