]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve <title> in the Emacs manuals
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Jul 2022 10:47:16 +0000 (12:47 +0200)
committerRobert Pluim <rpluim@gmail.com>
Mon, 4 Jul 2022 12:07:30 +0000 (14:07 +0200)
Backport from master.

* admin/admin.el (manual-html-fix-headers): Preserve the <title>
element (bug#48334).

(cherry picked from commit b778e71af7ca8c59917334b4bb1b34cdb52faca9)

admin/admin.el

index 57d5afb23b775ee69b208fd40b80d55237b13244..2a597e624bcd158090b8620e37c3b9a766ccb37e 100644 (file)
@@ -477,10 +477,11 @@ the @import directive."
       (delete-region opoint (point))
       (search-forward "<meta http-equiv=\"Content-Style")
       (setq opoint (match-beginning 0)))
+    (search-forward "<title>")
+    (delete-region opoint (match-beginning 0))
     (search-forward "</title>\n")
-    (delete-region opoint (point))
-    (search-forward "<link href=")
-    (goto-char (match-beginning 0))
+    (when (search-forward "<link href=" nil t)
+      (goto-char (match-beginning 0)))
     (insert manual-links-string)
     (setq opoint (point))
     (search-forward "</head>")