]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix skeleton-related errors in sgml-mode.el
authorEli Zaretskii <eliz@gnu.org>
Sat, 19 Oct 2024 06:40:53 +0000 (09:40 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 22 Oct 2024 18:55:07 +0000 (20:55 +0200)
* lisp/textmodes/sgml-mode.el (sgml-mode-facemenu-add-face-function)
(sgml-attributes): Require 'skeleton before using its symbols.
(Bug#53710)

(cherry picked from commit b730c4acfcff20047a5c574fbf36c5ef1271b902)

lisp/textmodes/sgml-mode.el

index f126df8955a8f4b61bcbfe7b71f7e888eb05b9c4..ee585896946d44e17cc7a524a769fe8e17361534 100644 (file)
@@ -533,6 +533,7 @@ an optional alist of possible values."
   "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)))
@@ -851,6 +852,7 @@ If QUIET, do not print a message when there are no attributes for TAG."
             (setq alist (cons '("class") alist)))
           (unless (assoc-string "id" alist)
             (setq alist (cons '("id") alist))))
+        (require 'skeleton)
        (if (stringp (car alist))
            (progn
              (insert (if (eq (preceding-char) ?\s) "" ?\s)