Function: sgml-mode-facemenu-add-face-function
sgml-mode-facemenu-add-face-function is a byte-compiled function
defined in sgml-mode.el.gz.
Signature
(sgml-mode-facemenu-add-face-function FACE END)
Documentation
Add "face" tags with facemenu-keymap(var)/facemenu-keymap(fun) commands.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/sgml-mode.el.gz
(defun sgml-mode-facemenu-add-face-function (face _end)
"Add \"face\" tags with `facemenu-keymap' commands."
(let ((tag-face (ensure-list (cdr (assq face sgml-face-tag-alist)))))
(cond (tag-face
(require 'skeleton)
(setq tag-face (funcall skeleton-transformation-function tag-face))
(setq facemenu-end-add-face
(mapconcat (lambda (f) (concat "</" f ">")) (reverse tag-face)))
(mapconcat (lambda (f) (concat "<" f ">")) tag-face))
((and (consp face)
(consp (car face))
(null (cdr face))
(memq (caar face) '(:foreground :background)))
(setq facemenu-end-add-face "</span>")
(format "<span style=\"%s:%s\">"
(if (eq (caar face) :foreground)
"color"
"background-color")
(cadr (car face))))
(t
(error "Face not configured for %s mode"
(format-mode-line mode-name))))))