mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-22 21:50:45 -08:00
lisp/textmodes/bibtex.el: Treat $ as punctuation in BibTeX fields (bug#50202)
This commit is contained in:
parent
d086cd6cf8
commit
ab38abfdf7
1 changed files with 8 additions and 4 deletions
|
|
@ -1822,8 +1822,9 @@ Initialized by `bibtex-set-dialect'.")
|
||||||
1 '(11))))
|
1 '(11))))
|
||||||
|
|
||||||
(defvar bibtex-font-lock-keywords
|
(defvar bibtex-font-lock-keywords
|
||||||
;; entry type and reference key
|
`(("\\$[^$\n]+\\$" . font-lock-string-face) ; bug#50202
|
||||||
`((,bibtex-any-entry-maybe-empty-head
|
;; entry type and reference key
|
||||||
|
(,bibtex-any-entry-maybe-empty-head
|
||||||
(,bibtex-type-in-head font-lock-function-name-face)
|
(,bibtex-type-in-head font-lock-function-name-face)
|
||||||
(,bibtex-key-in-head font-lock-constant-face nil t))
|
(,bibtex-key-in-head font-lock-constant-face nil t))
|
||||||
;; optional field names (treated as comments)
|
;; optional field names (treated as comments)
|
||||||
|
|
@ -3631,8 +3632,11 @@ if that value is non-nil.
|
||||||
(setq-local fill-paragraph-function #'bibtex-fill-field)
|
(setq-local fill-paragraph-function #'bibtex-fill-field)
|
||||||
(setq-local font-lock-defaults
|
(setq-local font-lock-defaults
|
||||||
'(bibtex-font-lock-keywords
|
'(bibtex-font-lock-keywords
|
||||||
nil t ((?$ . "\"")
|
nil t ((?$ . ".")
|
||||||
;; Mathematical expressions should be fontified as strings
|
;; Mathematical expressions should be fontified
|
||||||
|
;; as strings. Yet `$' may also appear in certain
|
||||||
|
;; fields like `URL' when it does not delimit
|
||||||
|
;; a math expression (bug#50202).
|
||||||
(?\" . ".")
|
(?\" . ".")
|
||||||
;; Quotes are field delimiters and quote-delimited
|
;; Quotes are field delimiters and quote-delimited
|
||||||
;; entries should be fontified in the same way as
|
;; entries should be fontified in the same way as
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue