Skip to content

Commit 7bbf3a9

Browse files
committed
bugfix for kpp-doc-face didn't work. MECCA-specific highlighting commented out
1 parent 26adb65 commit 7bbf3a9

1 file changed

Lines changed: 12 additions & 19 deletions

File tree

site-lisp/kpp.el

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@
6060
:type 'string
6161
:group 'kpp)
6262

63-
;; ---------------------------------------------------------------------------
64-
;; Faces
65-
;; ---------------------------------------------------------------------------
66-
67-
(defface kpp-doc-face
68-
;; Fix #6: `font-lock-doc-face' was introduced in Emacs 22. Defining our
69-
;; own face that *inherits* from it gives graceful degradation on older
70-
;; Emacs versions while using the correct face on modern ones.
71-
'((t (:inherit font-lock-doc-face)))
72-
"Face for KPP LaTeX documentation strings, e.g. {@...}.
73-
Inherits from `font-lock-doc-face'; compatible with Emacs 21+."
74-
:group 'kpp)
75-
7663
;; ---------------------------------------------------------------------------
7764
;; Syntax table (defined once at load time; shared by all kpp buffers)
7865
;; ---------------------------------------------------------------------------
@@ -109,16 +96,16 @@ Inherits from `font-lock-doc-face'; compatible with Emacs 21+."
10996
'("!.*" 0 font-lock-comment-face t)
11097

11198
;; {@...} – alternative LaTeX text (documentation)
112-
;; Uses kpp-doc-face rather than font-lock-doc-face directly; see Fix #6.
113-
'("{@[^}]+}" 0 kpp-doc-face t)
99+
;; '("{@[^}]+}" 0 font-lock-doc-face t)
100+
101+
;; uncertainty of rate coefficient
102+
;; '("{§[^}]*}" 0 font-lock-builtin-face t)
114103

115104
;; {$...} – alternative LaTeX math text
116-
;; Fix: the original "{$[^}]+}" relied on $ being treated as literal
117-
;; when not at end of regexp. Using \\$ is explicit and unambiguous.
118-
'("{\\$[^}]+}" 0 font-lock-string-face t)
105+
;; '("{\\$[^}]+}" 0 font-lock-string-face t)
119106

120107
;; {&...} – BibTeX reference
121-
'("{&[^}]+}" 0 font-lock-builtin-face t)
108+
;; '("{&[^}]+}" 0 font-lock-function-name-face t)
122109

123110
;; {%...} – marker tag, e.g. {%TrG}
124111
;; Fix #2: same [A-z] → [A-Za-z] correction as above.
@@ -165,6 +152,12 @@ Inherits from `font-lock-doc-face'; compatible with Emacs 21+."
165152
"\\)\\>")
166153
'font-lock-keyword-face)
167154

155+
;; LaTeX note
156+
;; '("//.*" 0 font-lock-string-face t)
157+
158+
;; Fixme
159+
;; '("qqq" 0 font-lock-warning-face t)
160+
168161
;; C++-style line comment: // comment
169162
'("^//.*" 0 font-lock-comment-face t))
170163
"Font-lock keyword specification for `kpp-mode'.")

0 commit comments

Comments
 (0)