summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--devbook-mode.el6
-rw-r--r--test/devbook-mode-tests.el4
3 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4083c98..b04bcac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-12 Ulrich Müller <ulm@gentoo.org>
+
+ * devbook-mode.el (devbook-set-schema, devbook-insert-skeleton):
+ The document element has been renamed from guide to devbook.
+ * test/devbook-mode-tests.el (devbook-mode-test-skeleton): Update.
+
2024-11-11 Ulrich Müller <ulm@gentoo.org>
* ebuild-mode.el (ebuild-mode-bug-regexp): Allow a fragment
diff --git a/devbook-mode.el b/devbook-mode.el
index 7205f77..01b800f 100644
--- a/devbook-mode.el
+++ b/devbook-mode.el
@@ -49,7 +49,7 @@ Return the schema file name, or nil if no schema was found."
((symbol-function 'rng-document-element)
(lambda ()
(or (funcall origfn)
- '(nil nil "guide")))))
+ '(nil nil "devbook")))))
(rng-locate-schema-file))
(let ((dir (and buffer-file-name
(locate-dominating-file buffer-file-name
@@ -79,7 +79,7 @@ Return the schema file name, or nil if no schema was found."
"Insert a skeleton for a DevBook XML document."
nil
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<guide "
+ "<devbook "
(let ((path (if (and buffer-file-name
(string-match "/devmanual[^/]*/\\(.*/\\)"
buffer-file-name))
@@ -93,7 +93,7 @@ Return the schema file name, or nil if no schema was found."
"<title>" (skeleton-read "Title: ") "</title>\n"
- "\n"
"</chapter>\n"
- "</guide>\n")
+ "</devbook>\n")
(define-key devbook-mode-map "\C-c\C-n" #'devbook-insert-skeleton)
diff --git a/test/devbook-mode-tests.el b/test/devbook-mode-tests.el
index cd29751..156a205 100644
--- a/test/devbook-mode-tests.el
+++ b/test/devbook-mode-tests.el
@@ -57,12 +57,12 @@
((symbol-function 'read-string) getinput))
(devbook-insert-skeleton))
(let ((buf1 (concat "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<guide self=\"quickstart/\">\n"
+ "<devbook self=\"quickstart/\">\n"
"<chapter>\n"
"<title>Quickstart guide</title>\n"))
(buf2 (concat "\n"
"</chapter>\n"
- "</guide>\n")))
+ "</devbook>\n")))
(should (equal (point)
(+ (point-min) (length buf1))))
(should (string-equal (buffer-string)