# HG changeset patch # User HIROSE Yuuji # Date 1786448626 -32400 # Node ID f294195d0d3f40a8b85e78eea837aac7907eec96 # Parent 0018833906a16c8886613d6f102f40cf29e71f18 Add details add-in, which fills . diff -r 0018833906a1 -r f294195d0d3f yahtml.el --- a/yahtml.el Sat Aug 01 13:57:31 2026 +0900 +++ b/yahtml.el Tue Aug 11 20:43:46 2026 +0900 @@ -3040,15 +3040,16 @@ (open-line 1) (YaTeX-reindent c)))) -(defun yahtml-intelligent-newline-head () - (let ((title (read-string-with-history "Document title: ")) - (b "") (e "") p) +(defun yahtml-intelligent-newline-head (&optional elem) + (let*((elem (or elem "title")) + (title (read-string-with-history (concat (capitalize elem) ": "))) + (b (format "<%s>" elem)) (e (format "" elem)) p) (yahtml-indent-line) (insert (format "%s" (if yahtml-prefer-upcases (upcase b) b))) (setq p (point)) (insert (format "%s%s" title (if yahtml-prefer-upcases (upcase e) e))) (if (string= "" title) (goto-char p)) - (setq yahtml-last-begend "body"))) + (setq yahtml-last-begend (if elem "p" "body")))) (defun yahtml-intelligent-newline-script () (let ((p (point)) b) @@ -3139,6 +3140,9 @@ (defun yahtml-intelligent-newline-iframe () (insert "

Your browser does not support iframes.

")) +(defun yahtml-intelligent-newline-details () + (yahtml-intelligent-newline-head "summary")) + ;;; ---------- Marking ---------- (defun yahtml-mark-begend () "Mark current tag"