changeset 17433:7df65491ab5f

(sgml-mode-facemenu-add-face-function): New function. (sgml-mode-common): Use that function for the hook value.
author Richard M. Stallman <rms@gnu.org>
date Sun, 13 Apr 1997 06:11:35 +0000
parents 5d2e0051fe39
children 5fb0f4a5336f
files lisp/textmodes/sgml-mode.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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 "</" face ">"))
-		  (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 "</" face ">"))
+	(concat "<" face ">"))
+    (error "Face not configured for %s mode." mode-name)))
+
+
 ;;;###autoload
 (defun sgml-mode (&optional function)
   "Major mode for editing SGML documents.