Mercurial > hgrepos > hgweb.cgi > yatex
comparison yahtml.el @ 550:d97881f33e28 dev
Add default template string for name="vieport" to meta completion
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 21 Aug 2018 10:49:30 +0900 |
parents | 6fd30c828f96 |
children | be050eec7849 |
comparison
equal
deleted
inserted
replaced
548:a58a35eac93f | 550:d97881f33e28 |
---|---|
1621 (read-from-minibuffer-with-history | 1621 (read-from-minibuffer-with-history |
1622 "href: " "" yahtml-url-completion-map))))))) | 1622 "href: " "" yahtml-url-completion-map))))))) |
1623 | 1623 |
1624 (defvar yahtml:meta-attrs | 1624 (defvar yahtml:meta-attrs |
1625 '(("charset" value) | 1625 '(("charset" value) |
1626 ("name" content ("keywords")("author")("copyright")("date")("GENERATOR")) | 1626 ("name" content ("keywords")("author")("copyright")("date")("GENERATOR") |
1627 ("viewport")) | |
1627 ("http-equiv" content))) | 1628 ("http-equiv" content))) |
1628 | 1629 |
1629 (defun yahtml:meta () | 1630 (defun yahtml:meta () |
1630 (let ((attr (completing-read-with-history | 1631 (let ((attr (completing-read-with-history |
1631 "Meta Attribute: " yahtml:meta-attrs)) | 1632 "Meta Attribute: " yahtml:meta-attrs)) |
1663 ((string-match "content-type" name) | 1664 ((string-match "content-type" name) |
1664 (if (string-match "http-equiv" attr ) | 1665 (if (string-match "http-equiv" attr ) |
1665 (error "Use <meta charset=\"...\" instead.. See docs/qanda.") | 1666 (error "Use <meta charset=\"...\" instead.. See docs/qanda.") |
1666 (yahtml-make-optional-argument | 1667 (yahtml-make-optional-argument |
1667 "content" (yahtml-read-parameter "content")))) | 1668 "content" (yahtml-read-parameter "content")))) |
1669 ((string-match "viewport" name) | |
1670 ;; XXX: Very dirty static string | |
1671 "width=device-width, initial-scale=1") | |
1668 (t (read-string-with-history (concat name ": "))))))) | 1672 (t (read-string-with-history (concat name ": "))))))) |
1669 (t (yahtml-make-optional-argument | 1673 (t (yahtml-make-optional-argument |
1670 attr (yahtml-read-parameter attr)))))) | 1674 attr (yahtml-read-parameter attr)))))) |
1671 | 1675 |
1672 (defun yahtml:br () | 1676 (defun yahtml:br () |