diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-11-12 19:28:10 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-11-12 19:28:10 +0100 |
commit | 9b2a3016a2b5f60b9f4aa45ccee2ace9b62cc697 (patch) | |
tree | cc83d9dfe252499f0173297ad98555f7137e6762 | |
parent | Allow fragment identifier in bug regexp (diff) | |
download | ebuild-mode-9b2a3016a2b5f60b9f4aa45ccee2ace9b62cc697.tar.gz ebuild-mode-9b2a3016a2b5f60b9f4aa45ccee2ace9b62cc697.tar.bz2 ebuild-mode-9b2a3016a2b5f60b9f4aa45ccee2ace9b62cc697.zip |
Update name of devbook document element
* 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.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | devbook-mode.el | 6 | ||||
-rw-r--r-- | test/devbook-mode-tests.el | 4 |
3 files changed, 11 insertions, 5 deletions
@@ -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) |