diff --git a/latex.el b/latex.el index ac4b0c54..5f408cb5 100644 --- a/latex.el +++ b/latex.el @@ -3713,8 +3713,9 @@ non-parenthetical delimiters, like \\verb+foo+, are recognized." "Return non-nil if position POS is in a verbatim-like construct." (when pos (goto-char pos)) (save-match-data - (or (when (fboundp 'font-latex-faces-present-p) - (font-latex-faces-present-p 'font-latex-verbatim-face)) + (or (progn + (syntax-propertize (point)) + (nth 3 (syntax-ppss))) (member (LaTeX-current-verbatim-macro) (LaTeX-verbatim-macros-with-delims)) (member (TeX-current-macro) (LaTeX-verbatim-macros-with-braces)) diff --git a/style/shortvrb.el b/style/shortvrb.el index a8b4cd17..e7a0320b 100644 --- a/style/shortvrb.el +++ b/style/shortvrb.el @@ -69,12 +69,19 @@ (cons str str))) LaTeX-shortvrb-chars))) + ;; Syntax + (when LaTeX-shortvrb-chars + (let ((st (make-syntax-table (syntax-table)))) + (dolist (c LaTeX-shortvrb-chars) + (modify-syntax-entry c "\"" st)) + (set-syntax-table st))) + ;; Fontification (when (and LaTeX-shortvrb-chars (featurep 'font-latex) (eq TeX-install-font-lock 'font-latex-setup)) (font-latex-add-to-syntax-alist - (mapcar (lambda (char) (cons char "|")) + (mapcar (lambda (char) (cons char "\"")) LaTeX-shortvrb-chars)) (font-latex-add-keywords '(("MakeShortVerb" "*{")