diff options
author | Glenn Morris <rgm@gnu.org> | 2013-12-30 10:58:16 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-12-30 10:58:16 -0800 |
commit | 9d1804dcb8b711a6d7eee16f0f54f3d418e2cb53 (patch) | |
tree | fa478f9b188b389bcb68bff7bfe1a037b7b83379 | |
parent | 1b7259fce2719182e2b557682e40d02807784d1f (diff) | |
download | emacs-9d1804dcb8b711a6d7eee16f0f54f3d418e2cb53.tar.gz |
* admin.el (manual-html-fix-headers, manual-html-fix-index-1):
Some updates for changes in Texinfo 5 output.
-rw-r--r-- | admin/ChangeLog | 5 | ||||
-rw-r--r-- | admin/admin.el | 19 |
2 files changed, 17 insertions, 7 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 877c813513c..1fbff400acd 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2013-12-30 Glenn Morris <rgm@gnu.org> + + * admin.el (manual-html-fix-headers, manual-html-fix-index-1): + Some updates for changes in Texinfo 5 output. + 2013-12-29 Xue Fuqiao <xfq.free@gmail.com> * make-emacs: diff --git a/admin/admin.el b/admin/admin.el index 571bd824143..f178ef61f16 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -395,20 +395,25 @@ the @import directive." (defun manual-html-fix-headers () "Fix up HTML headers for the Emacs manual in the current buffer." - (let (opoint) - (insert manual-doctype-string) + (let ((texi5 (search-forward "<!DOCTYPE" nil t)) + opoint) + ;; Texinfo 5 supplies a DOCTYPE. + (or texi5 + (insert manual-doctype-string)) (search-forward "<head>\n") (insert manual-meta-string) (search-forward "<meta") (setq opoint (match-beginning 0)) - (re-search-forward "<!--") + (unless texi5 + (search-forward "<!--") (goto-char (match-beginning 0)) (delete-region opoint (point)) - (insert manual-style-string) (search-forward "<meta http-equiv=\"Content-Style") - (setq opoint (match-beginning 0)) + (setq opoint (match-beginning 0))) (search-forward "</head>") - (delete-region opoint (match-beginning 0)))) + (goto-char (match-beginning 0)) + (delete-region opoint (point)) + (insert manual-style-string))) (defun manual-html-fix-node-div () "Fix up HTML \"node\" divs in the current buffer." @@ -426,7 +431,7 @@ the @import directive." (defun manual-html-fix-index-1 () (let (opoint) - (re-search-forward "<body>\n") + (re-search-forward "<body.*>\n") (setq opoint (match-end 0)) (search-forward "<h2 class=\"") (goto-char (match-beginning 0)) |