[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 312c858 25/50: kexport.el - use lowercase HTM
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 312c858 25/50: kexport.el - use lowercase HTML tags; mail-address ibtype allow trigger in any major mode |
Date: |
Wed, 17 Mar 2021 18:44:17 -0400 (EDT) |
branch: externals/hyperbole
commit 312c85876d4fa4db66ab7c3a190bc9d1eb0139c6
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
kexport.el - use lowercase HTML tags; mail-address ibtype allow trigger in
any major mode
---
Changes | 9 +++++++++
hibtypes.el | 3 ++-
kotl/kexport.el | 56 ++++++++++++++++++++++++++++----------------------------
3 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/Changes b/Changes
index 05267e2..5aa21dc 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+2020-11-22 Bob Weiner <rsw@gnu.org>
+
+* hibtypes.el (mail-address): If mail-address-mode-list is set to nil,
+ activate this ibtype in any major mode.
+
+2020-11-16 Bob Weiner <rsw@gnu.org>
+
+* kotl/kexport.el (kexport:html): Lowercase HTML tags for HTML5.
+
2020-11-08 Bob Weiner <rsw@gnu.org>
* hsettings.el (hyperbole-toggle-messaging): Moved from hyperbole.el
diff --git a/hibtypes.el b/hibtypes.el
index 23e8547..0c15aff 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -143,7 +143,8 @@ any buffer attached to a file in `hyrolo-file-list', or any
buffer with
\"mail\" or \"rolo\" (case-insensitive) within its name."
(when (let ((case-fold-search t))
(or
- (and (memq major-mode mail-address-mode-list)
+ (and (or (null mail-address-mode-list)
+ (memq major-mode mail-address-mode-list))
(not (string-match "-Elements\\'" (buffer-name)))
;; Don't want this to trigger within an OOBR-FTR buffer.
(not (string-match "\\`\\(OOBR.*-FTR\\|oobr.*-ftr\\)"
diff --git a/kotl/kexport.el b/kotl/kexport.el
index 9613d22..861b3fb 100644
--- a/kotl/kexport.el
+++ b/kotl/kexport.el
@@ -70,7 +70,7 @@
'(">" . ">")
;;
;; italicize keybindings
- '("{[^}]+}" . "<I>\0</I>")
+ '("{[^}]+}" . "<i>\0</i>")
;;
;; make URLs into hyperlinks
(cons hpath:url-regexp 'kexport:html-url)
@@ -83,15 +83,15 @@
'kexport:html-url)
;;
;; make mail addresses into hyperbuttons
- (cons mail-address-regexp "<A HREF=\"mailto:\\1\"><I>\\1</I></A>\\2")
+ (cons mail-address-regexp "<a href=\"mailto:\\1\"><i>\\1</i></a>\\2")
;;
;; make klinks into hyperlinks
(cons (concat "<\\s-*@\\s-*" kexport:kcell-reference-regexp
"[^&>]*>")
- "<A HREF=\"#k\\1\">\0</A>")
+ "<a href=\"#k\\1\">\0</a>")
(cons (format "<\\s-*@\\s-*\\(%s\\)[^=&>]*>"
kexport:kcell-partial-reference-regexp)
- "<A HREF=\"#k\\1\">\0</A>")
+ "<a href=\"#k\\1\">\0</a>")
(cons (format "<\\s-*\\([^ \t\n\r,<>]+\\)\\s-*,\\s-*%s[^=&>]*>"
kexport:kcell-reference-regexp)
'kexport:html-file-klink)
@@ -169,18 +169,18 @@ STILL TODO:
(setq title (read-string (format "Title for %s: " output-to-buf-name)
title)))
- (princ "<HTML><HEAD>\n\n")
- (princ "<A ID=\"top\"></A><A ID=\"k0\"></A>\n")
- (princ (format "<TITLE>%s</TITLE>\n" title))
+ (princ "<html><head>\n\n")
+ (princ "<a id=\"top\"></a><a id=\"k0\"></a>\n")
+ (princ (format "<title>%s</title>\n" title))
(if kexport:html-description
- (princ (format "<META ID=\"description\" CONTENT=\"%s\">\n"
+ (princ (format "<meta id=\"description\" content=\"%s\">\n"
kexport:html-description)))
(if kexport:html-keywords
- (princ (format "<META ID=\"keywords\" CONTENT=\"%s\">\n"
+ (princ (format "<meta id=\"keywords\" content=\"%s\">\n"
kexport:html-keywords)))
- (princ "</HEAD>\n\n")
- (princ (format "<BODY %s>\n\n" kexport:html-body-attributes))
- (princ (format "<CENTER><H1>%s</H1></CENTER>\n\n" title))
+ (princ "</head>\n\n")
+ (princ (format "<body %s>\n\n" kexport:html-body-attributes))
+ (princ (format "<center><h1>%s</h1></center>\n\n" title))
(let* ((separator
(hypb:replace-match-string
">" (hypb:replace-match-string
@@ -192,36 +192,36 @@ STILL TODO:
(setq level (kcell-view:level)
i level)
(while (> i 1)
- (princ "<UL>")
+ (princ "<ul>")
(setq i (1- i)))
- (princ "<TABLE><TR>\n")
+ (princ "<table><tr>\n")
(setq label (kcell-view:label))
- (princ (format "<A ID=\"k%s\"></A>" label))
- (princ (format "<A ID=\"k%s\"></A>\n" (kcell-view:idstamp)))
- (princ "<TD WIDTH=2% VALIGN=top><PRE>\n")
+ (princ (format "<a id=\"k%s\"></a>" label))
+ (princ (format "<a id=\"k%s\"></a>\n" (kcell-view:idstamp)))
+ (princ "<td width=2% valign=top><pre>\n")
(princ (format
- "<FONT %s>%s%s</FONT></PRE></TD>\n"
+ "<font %s>%s%s</font></pre></td>\n"
kexport:label-html-font-attributes
label separator))
- (princ "<TD>")
+ (princ "<td>")
(setq contents (kcell-view:contents))
(if (string-match "\\`\\([-_$%#@~^&*=+|/A-Za-z0-9 ]+\\):.*\\S-"
contents)
- (princ (format "<A ID=\"%s\"></A>"
+ (princ (format "<a id=\"%s\"></a>"
(substring contents 0 (match-end 1)))))
(setq contents (kexport:html-markup contents))
(if soft-newlines-flag
(princ contents)
- (princ "<PRE>") (princ contents) (princ "</PRE>"))
- (princ "</TD>\n")
- (princ "</TR></TABLE>")
+ (princ "<pre>") (princ contents) (princ "</pre>"))
+ (princ "</td>\n")
+ (princ "</tr></table>")
(setq i level)
(while (> i 1)
- (princ "</UL>")
+ (princ "</ul>")
(setq i (1- i)))
(terpri) (terpri))
kview t t))
- (princ "</BODY></HTML>\n")
+ (princ "</body></html>\n")
(set-buffer standard-output)
(save-buffer)))
@@ -236,8 +236,8 @@ Works exclusively within a call to
`hypb:replace-match-string'."
(match-end 1))))
(if (equal filename (file-name-nondirectory
kexport:input-filename))
- "<A HREF=\"#k\\2\">\0</A>"
- (format "<A HREF=\"file://%s#k\\2\">\0</A>"
+ "<a href=\"#k\\2\">\0</a>"
+ (format "<a href=\"file://%s#k\\2\">\0</a>"
(expand-file-name filename
(if kexport:input-filename
(file-name-directory
@@ -264,7 +264,7 @@ Works exclusively within a call to
`hypb:replace-match-string'."
(while (memq (aref string (1- last-str-char))
'(?. ?, ?? ?# ?! ?* ?\( ?\)))
(setq last-str-char (1- last-str-char)))
- (format "<A HREF=\"%s\">%s</A>%s"
+ (format "<a href=\"%s\">%s</a>%s"
(substring url 0 last-url-char)
(substring string (match-beginning 0) last-str-char)
(substring string last-str-char))))
- [elpa] externals/hyperbole ad16470 13/50: Document Koutline Org table support; allow ibtype reprioritization, (continued)
- [elpa] externals/hyperbole ad16470 13/50: Document Koutline Org table support; allow ibtype reprioritization, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 9f5a787 14/50: Add hypb-maintenance.el, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e914edb 15/50: Add hypb-maintenance.el to MANIFEST, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole b4f7e49 16/50: Move HY-TALK.org button data to HY-TALK/.hypb, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 781bbb5 17/50: Merge pull request #41 from rswgnu/update-git-repo-cache-interactively, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 22439e6 20/50: Add klink ref cmds, ebut:program and defiblink for programmatic creation, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e999fc7 21/50: Stop man-apropos from matching to log file entries, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole cfc61a3 22/50: Eliminate a number of order-based byte-compilation warnings, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e3544c8 23/50: Revert improper application of "Use \\0 for matched Nth substitution", Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole f1b2cba 24/50: Add dependency on hvar to resolve use of var:remove-all (#43), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 312c858 25/50: kexport.el - use lowercase HTML tags; mail-address ibtype allow trigger in any major mode,
Stefan Monnier <=
- [elpa] externals/hyperbole a3b9d6d 26/50: Merge branch 'master' of github.com:rswgnu/hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 398f8e4 32/50: Add hypb:def-to-buffer to hypb.el for fast def copying, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole a831ef9 36/50: Fix bug #46606 by replacing hkey-define-key with hkey-global-set-key, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 8969fe9 43/50: Merge branch 'master' of hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole c8947dd 47/50: Merge branch 'master' of hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole db73cf7 19/50: Use \0 for matched Nth substitution (see also commit #c0e48fb3), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 1826307 27/50: Resolve bug#43644 where final double quote was trimmed from strings., Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole f38a8dd 28/50: Fix Hyrolo logicial searches; bug fixes; handle file:// URLs better, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 3469ea3 29/50: Release defil and defal simpler implicit button type create macros, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 6a8154a 33/50: Add first unit tests (#46), Stefan Monnier, 2021/03/17