[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/paredit 66d6374 189/224: Tweak HTML output a little more.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/paredit 66d6374 189/224: Tweak HTML output a little more. |
Date: |
Sat, 7 Aug 2021 09:22:47 -0400 (EDT) |
branch: elpa/paredit
commit 66d637451e2fa063b5c5e8f26f5df020f1bceb76
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>
Tweak HTML output a little more.
---
paredit.el | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/paredit.el b/paredit.el
index 57d7dd8..2083066 100644
--- a/paredit.el
+++ b/paredit.el
@@ -534,19 +534,26 @@ Paredit behaves badly if parentheses are unbalanced, so
exercise
"Insert HTML for a paredit quick reference table."
(interactive)
(let ((insert-lines
- (lambda (&rest lines) (dolist (line lines) (insert line) (newline)))))
+ (lambda (&rest lines) (dolist (line lines) (insert line) (newline))))
+ (initp nil))
(paredit-do-commands (spec keys fn examples)
- (funcall insert-lines (concat "<h3>" spec "</h3>"))
- (let ((name (symbol-name fn)))
- (funcall insert-lines (concat "<h4>" name "</h4>"))
+ (progn (if initp
+ (funcall insert-lines "</table>")
+ (setq initp t))
+ (funcall insert-lines (concat "<h3>" spec "</h3>"))
+ (funcall insert-lines "<table>"))
+ (let ((name (symbol-name fn))
+ (keys
+ (mapconcat (lambda (key)
+ (concat "<tt>" (paredit-html-quote key) "</tt>"))
+ keys
+ ", ")))
+ (funcall insert-lines "<tr>")
+ (funcall insert-lines (concat " <th>" name "</th>"))
+ (funcall insert-lines (concat " <th>" keys "</th>"))
+ (funcall insert-lines "</tr>")
(funcall insert-lines
- "<p>Keys: "
- (mapconcat (lambda (key)
- (concat "<tt>" (paredit-html-quote key) "</tt>"))
- keys
- ", ")
- "</p>")
- (funcall insert-lines "<table cellpadding=\"10\">")
+ "<tr><td colspan=\"2\"><table cellpadding=\"10\">")
(dolist (example examples)
(let ((prefix "<tr><td><pre>")
(examples
@@ -555,7 +562,8 @@ Paredit behaves badly if parentheses are unbalanced, so
exercise
(concat "</pre></td><td>→</td><td><pre>")))
(suffix "</pre></td></tr>"))
(funcall insert-lines (concat prefix examples suffix))))
- (funcall insert-lines "</table>")))))
+ (funcall insert-lines "</table></td></tr>")))
+ (funcall insert-lines "</table>")))
(defun paredit-html-quote (string)
(with-temp-buffer
- [nongnu] elpa/paredit 427d8e1 160/224: Add a pile of `paredit-backward-barf-sexp' tests., (continued)
- [nongnu] elpa/paredit 427d8e1 160/224: Add a pile of `paredit-backward-barf-sexp' tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 758c896 170/224: Add some notes for version 24., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4fdd1b7 172/224: In test.el, use (delete-char -1), not backward-delete-char., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 4c7ac6e 173/224: Avoid `backward-delete-char', which GNU Emacs 24 broke., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit db99ca6 176/224: Note `backward-delete-char' lossage in NEWS., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit aa26b48 181/224: Make sure M-? leaves space appropriately when there was none., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit da5b1e0 183/224: Flesh out paredit-wrap-... tests a little., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 3ab28ec 185/224: Revert "Bind M-[ to paredit-wrap-square.", ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c33e134 186/224: Fix reference to `backward-down-list', which is no more., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit e775e43 187/224: Tweak whitespace in `paredit-split-sexp'. No functional change., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 66d6374 189/224: Tweak HTML output a little more.,
ELPA Syncer <=
- [nongnu] elpa/paredit f8bf24c 192/224: Allow slurping while in a character., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 146a434 194/224: Add some slurp tests with characters and strings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit c92197a 196/224: Tweak comment about barfage error., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 67d6a4f 202/224: Let C-d and DEL delete the other spurious delimiters too., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit ad27e64 203/224: Remove beta marker from 24 in NEWS., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit aec81db 206/224: Quote M-mode-hook for add-hook in example .emacs fragment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 2f6f672 210/224: Add email address., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 6ee9f06 213/224: Bump copyright year to 2017., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 0b523c3 215/224: Switch http://mumble.net to https://mumble.net., ELPA Syncer, 2021/08/07
- [nongnu] elpa/paredit 8330a41 224/224: Use `-q --no-site-file' for genhtml.sh too., ELPA Syncer, 2021/08/07