# HG changeset patch # User Richard M. Stallman # Date 860911895 0 # Node ID 7df65491ab5f095abcc3786ab31767211e9c4031 # Parent 5d2e0051fe39741eeb385328a82fb7289d75d5f4 (sgml-mode-facemenu-add-face-function): New function. (sgml-mode-common): Use that function for the hook value. diff -r 5d2e0051fe39 -r 7df65491ab5f lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Sun Apr 13 05:07:27 1997 +0000 +++ b/lisp/textmodes/sgml-mode.el Sun Apr 13 06:11:35 1997 +0000 @@ -333,13 +333,7 @@ sgml-font-lock-keywords-1) nil t) - facemenu-add-face-function - (lambda (face end) - (if (setq face (cdr (assq face sgml-face-tag-alist))) - (progn - (setq facemenu-end-add-face (concat "")) - (concat "<" face ">")) - (error "Face not configured for %s mode." mode-name)))) + facemenu-add-face-function 'sgml-mode-facemenu-add-face-function) (while sgml-display-text (put (car (car sgml-display-text)) 'before-string (cdr (car sgml-display-text))) @@ -347,6 +341,15 @@ (run-hooks 'text-mode-hook 'sgml-mode-hook)) +(defun sgml-mode-facemenu-add-face-function (face end) + (if (setq face (cdr (assq face sgml-face-tag-alist))) + (progn + (setq face (funcall skeleton-transformation face)) + (setq facemenu-end-add-face (concat "")) + (concat "<" face ">")) + (error "Face not configured for %s mode." mode-name))) + + ;;;###autoload (defun sgml-mode (&optional function) "Major mode for editing SGML documents.