From 9cd4641437b873ad476fbfb9f47e3a34a876941f Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sat, 28 Sep 2024 18:22:45 +0200 Subject: Don't require nxml-mode at compile time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ebuild-mode.el (ebuild-repo-mode): Define the nxml-* variables instead of requiring nxml-mode at compile time. Signed-off-by: Ulrich Müller --- ChangeLog | 5 +++++ ebuild-mode.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index be6ceda..fca3953 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-09-28 Ulrich Müller + + * ebuild-mode.el (ebuild-repo-mode): Define the nxml-* variables + instead of requiring nxml-mode at compile time. + 2024-09-25 Ulrich Müller * keyword-generation.sh (OBSOLETE): Update. diff --git a/ebuild-mode.el b/ebuild-mode.el index a6e265e..e0edb6c 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -962,6 +962,9 @@ This will be added to the `write-contents-functions' hook." This excludes `comment-start'. See `ebuild-mode-insert-tag-line' for the format of the tag line.") +(defvar nxml-child-indent) ; nxml-mode.el +(defvar nxml-attribute-indent) + ;;;###autoload (define-minor-mode ebuild-repo-mode "Minor mode for files in an ebuild repository." @@ -994,7 +997,6 @@ for the format of the tag line.") (regexp-quote (concat comment-start)) ebuild-mode-tag-line-regexp)))) ((derived-mode-p 'nxml-mode) - (eval-when-compile (ignore-errors (require 'nxml-mode))) (unless (or (local-variable-p 'nxml-child-indent (current-buffer)) (local-variable-p 'nxml-attribute-indent (current-buffer))) (let ((indent (if ebuild-mode-xml-indent-tabs 4 2))) -- cgit v1.2.3-65-gdbad