linux-l: RegExp in eLisp
Jens-Uwe Morawski
morawski at gmx.net
Di Nov 28 09:12:28 CET 2000
Hallo,
Dank Robins Hilfe habe ich jetzt Tolles SyntaxHili im XEmacs.
Was mir immer fehlte, und auch immer noch fehlt ist, daß
align-Elemente im LaTeX-Code hervorgehoben werden.
Da ich weing mit dem tabbing-environment arbeite würde mir
schon reichen, wenn das "&" hervorgehoben ist.
Also habe ich mir die font-latex.el mal genauer angeschaut und
modifiziert. Leider kann ich kein eLisp, deshalb brauche ich mal
eure Hilfe.
Also:
originaler Ausdruck:
(defvar font-latex-match-textual
(concat
"\\\\" "\\("
;;;(regexp-opt
;;; '("item" ;;;FIXME: does not have an {arg} so should treated elsewhere.
;;; "part" "chapter" "section" "subsection" "subsubsection"
;;; "paragraph" "subparagraph" "subsubparagraph"
;;; "title" "author" "date" "thanks" "address"
;;; "caption"))
"a\\(ddress\\|uthor\\)\\|c\\(aption\\|hapter\\)\\|date\\|item\\|"
"par\\(agraph\\|t\\)\\|"
"s\\(ection\\|"
"ub\\(paragraph\\|s\\(ection\\|ub\\(paragraph\\|section\\)\\)\\)\\)\\|"
"t\\(hanks\\|itle\\)"
"\\)\\>")
"font-latex regexp to match LaTeX function with text arguemnt.")
die concat Liste habe ich am Anfang folgendenmaßen erweitert:
(defvar font-latex-match-textual
(concat
"[&]\\|" "\\\\" "\\("
;;;(regexp-opt
;;; '("item" ;;;FIXME: does not have an {arg} so should treated elsewhere.
;;; "part" "chapter" "section" "subsection" "subsubsection"
;;; "paragraph" "subparagraph" "subsubparagraph"
;;; "title" "author" "date" "thanks" "address"
;;; "caption"))
"a\\(ddress\\|uthor\\)\\|c\\(aption\\|hapter\\)\\|date\\|item\\|"
"par\\(agraph\\|t\\)\\|"
"s\\(ection\\|"
"ub\\(paragraph\\|s\\(ection\\|ub\\(paragraph\\|section\\)\\)\\)\\)\\|"
"t\\(hanks\\|itle\\)"
"\\)\\>")
"font-latex regexp to match LaTeX function with text arguemnt.")
Nun wird jedes "&" hervorgehoben, was schon mal toll ist ;)
Nun hätte ich gerne zwar jedes "&" mit Ausnahme dem "&" in "\&"
Wie kann ich das erreichen???
Vielen Dank, Jens
Mehr Informationen über die Mailingliste linux-l