[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el |
Date: |
Mon, 12 May 2003 11:46:02 -0400 |
Index: emacs/lisp/textmodes/sgml-mode.el
diff -c emacs/lisp/textmodes/sgml-mode.el:1.95
emacs/lisp/textmodes/sgml-mode.el:1.96
*** emacs/lisp/textmodes/sgml-mode.el:1.95 Sat Jan 11 17:47:33 2003
--- emacs/lisp/textmodes/sgml-mode.el Mon May 12 11:46:02 2003
***************
*** 239,244 ****
--- 239,245 ----
:type '(choice (const nil) integer)
:group 'sgml)
+ (defconst sgml-namespace-re "[_[:alpha:]][-_.[:alnum:]]*")
(defconst sgml-name-re "[_:[:alpha:]][-_.:[:alnum:]]*")
(defconst sgml-tag-name-re (concat "<\\([!/?]?" sgml-name-re "\\)"))
(defconst sgml-attrs-re "\\(?:[^\"'/><]\\|\"[^\"]*\"\\|'[^']*'\\)*")
***************
*** 246,258 ****
"Regular expression that matches a non-empty start tag.
Any terminating `>' or `/' is not matched.")
;; internal
(defconst sgml-font-lock-keywords-1
`((,(concat "<\\([!?]" sgml-name-re "\\)") 1 font-lock-keyword-face)
! (,(concat "<\\(/?" sgml-name-re"\\)") 1 font-lock-function-name-face)
;; FIXME: this doesn't cover the variables using a default value.
! (,(concat "\\(" sgml-name-re "\\)=[\"']") 1 font-lock-variable-name-face)
(,(concat "[&%]" sgml-name-re ";?") . font-lock-variable-name-face)))
(defconst sgml-font-lock-keywords-2
--- 247,270 ----
"Regular expression that matches a non-empty start tag.
Any terminating `>' or `/' is not matched.")
+ (defface sgml-namespace-face
+ '((t (:inherit font-lock-builtin-face)))
+ "`sgml-mode' face used to highlight the namespace part of identifiers.")
+ (defvar sgml-namespace-face 'sgml-namespace-face)
;; internal
(defconst sgml-font-lock-keywords-1
`((,(concat "<\\([!?]" sgml-name-re "\\)") 1 font-lock-keyword-face)
! ;; We could use the simpler "\\(" sgml-namespace-re ":\\)?" instead,
! ;; but it would cause a bit more backtracking in the re-matcher.
! (,(concat "</?\\(" sgml-namespace-re "\\)\\(?::\\(" sgml-name-re
"\\)\\)?")
! (1 (if (match-end 2) sgml-namespace-face font-lock-function-name-face))
! (2 font-lock-function-name-face nil t))
;; FIXME: this doesn't cover the variables using a default value.
! (,(concat "\\(" sgml-namespace-re "\\)\\(?::\\("
! sgml-name-re "\\)\\)?=[\"']")
! (1 (if (match-end 2) sgml-namespace-face font-lock-variable-name-face))
! (2 font-lock-variable-name-face nil t))
(,(concat "[&%]" sgml-name-re ";?") . font-lock-variable-name-face)))
(defconst sgml-font-lock-keywords-2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,
Stefan Monnier <=