







* font-latex.el (font-latex-match-command-with-arguments): Fontify macros with '-' as macro modifier correctly. (Bug#81755)
diff --git a/font-latex.el b/font-latex.el
index 0908d78e8a0..4ef7de08f07 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1622,10 +1622,11 @@ Returns nil if none of KEYWORDS is found."
(goto-char (match-end 0))
;; Check for starred macro if first spec is an asterisk or a
;; plus sign in case of \defaultfontfeatures+ provided by
- ;; fontspec.sty
- (when (memql (car spec-list) '(?* ?+))
+ ;; fontspec.sty or a minus sign in case of \footnote- provided
+ ;; by bigfoot.sty:
+ (when (memql (car spec-list) '(?* ?+ ?-))
(setq spec-list (cdr spec-list))
- (skip-chars-forward "*+" (1+ (point))))
+ (skip-chars-forward "*+-" (1+ (point))))
;; Add current point to match data and use keyword face for
;; region from start to point.
(nconc match-data (list (point)))
@@ -1652,7 +1653,7 @@ Returns nil if none of KEYWORDS is found."
(forward-char)
(if (zerop (skip-syntax-forward "_w"))
(forward-char) ; Single-char macro.
- (skip-chars-forward "*+"))
+ (skip-chars-forward "*+-"))
(point))))
(nconc font-latex-matched-faces (list face))
(setq end (max end (point)))
@@ -1674,8 +1675,8 @@ Returns nil if none of KEYWORDS is found."
(when (and match-beg (= match-beg (point)))
(setq error-indicator-pos match-beg))
(throw 'break nil))))
- ;; Asterisk or plus sign between arguments (sigh!):
- ((and (memql spec '(?* ?+))
+ ;; Asterisk, plus or minus sign between arguments (sigh!):
+ ((and (memql spec '(?* ?+ ?-))
(= (char-after) spec))
(setq match-beg (point))
(if (= (char-after) spec)
@@ -1683,7 +1684,7 @@ Returns nil if none of KEYWORDS is found."
(nconc match-data
(list (point)
(progn
- (skip-chars-forward "*+")
+ (skip-chars-forward "*+-")
(point))))
(nconc font-latex-matched-faces
(list 'font-lock-keyword-face))
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。