[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/taxy 2a0cc62 6/6: Change: Use with-eval-after-load for
From: |
ELPA Syncer |
Subject: |
[elpa] externals/taxy 2a0cc62 6/6: Change: Use with-eval-after-load for shortdoc |
Date: |
Fri, 24 Sep 2021 02:57:28 -0400 (EDT) |
branch: externals/taxy
commit 2a0cc628f2eebc02b905157ccabf9e76dba700a0
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: Use with-eval-after-load for shortdoc
Thanks to Basil L. Contovounesios (@basil-conto) for suggesting. See
<https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg01726.html>.
---
taxy.el | 135 +++++++++++++++++++++++++++++++---------------------------------
1 file changed, 66 insertions(+), 69 deletions(-)
diff --git a/taxy.el b/taxy.el
index 3c38145..db54a14 100644
--- a/taxy.el
+++ b/taxy.el
@@ -364,75 +364,72 @@ defined with a definer defined by
`taxy-define-key-definer')."
;; byte-compiling this section will produce warnings due to the
;; shortdoc forms that appear to be function calls.
-(eval-when-compile
- (require 'shortdoc nil t))
-
-(when (require 'shortdoc nil t)
- (with-no-warnings
- ;; TODO: Remove `with-no-warnings' when requiring Emacs 28+.
- (define-short-documentation-group taxy
- (taxy-flatten
- :eval (taxy-flatten
- (make-taxy
- :items '(a b c)
- :taxys (list (make-taxy
- :items '(d e f))))))
- (taxy-emptied
- :eval (taxy-emptied
- (make-taxy
- :items '(a b c)
- :taxys (list (make-taxy
- :items '(d e f))))))
- (taxy-fill
- :eval (taxy-fill '(0 1 2 3)
- (make-taxy
- :name "Numbers"
- :taxys (list (make-taxy
- :name "Odd"
- :predicate #'cl-oddp)
- (make-taxy
- :name "Even"
- :predicate #'cl-evenp)))))
- (taxy-make-take-function
- :eval (taxy-make-take-function
- '(first-char second-char)
- '((first-char (lambda (s) (substring s nil 1)))
- (second-char (lambda (s) (substring s 1 2))))))
- (taxy-mapc-taxys
- :eval (taxy-mapc-taxys
- (lambda (taxy)
- (setf (taxy-name taxy) (upcase (taxy-name taxy))))
- (make-taxy :name "a" :taxys (list (make-taxy :name "b")))))
- (taxy-mapcar-items
- :eval (taxy-mapcar-items #'upcase
- (make-taxy :items (list "a" "b" "c")
- :taxys (list (make-taxy :items (list "d" "e"
"f"))))))
- (taxy-plain
- :eval (taxy-plain
- (taxy-fill '(0 1 2 3)
- (make-taxy
- :name "Numbers"
- :taxys (list (make-taxy
- :name "Odd"
- :predicate #'cl-oddp)
- (make-taxy
- :name "Even"
- :predicate #'cl-evenp))))))
- (taxy-size
- :eval (taxy-size
- (make-taxy
- :items '(a b c)
- :taxys (list (make-taxy
- :items '(d e f))))))
- (taxy-sort-items
- :eval (taxy-sort-items #'string< #'identity
- (make-taxy :items (list "c" "b" "a")
- :taxys (list (make-taxy :items (list "f" "e"
"d"))))))
- (taxy-sort-taxys
- :eval (taxy-sort-taxys #'string< #'taxy-name
- (make-taxy :name "Taxy"
- :taxys (list (make-taxy :name "Beta")
- (make-taxy :name "Alpha"))))))))
+(with-eval-after-load 'shortdoc
+ (declare-function shortdoc-add-function "shortdoc" (group section elem))
+ (mapc (lambda (elem)
+ (shortdoc-add-function 'taxy nil elem))
+ '((taxy-flatten
+ :eval (taxy-flatten
+ (make-taxy
+ :items '(a b c)
+ :taxys (list (make-taxy
+ :items '(d e f))))))
+ (taxy-emptied
+ :eval (taxy-emptied
+ (make-taxy
+ :items '(a b c)
+ :taxys (list (make-taxy
+ :items '(d e f))))))
+ (taxy-fill
+ :eval (taxy-fill '(0 1 2 3)
+ (make-taxy
+ :name "Numbers"
+ :taxys (list (make-taxy
+ :name "Odd"
+ :predicate #'cl-oddp)
+ (make-taxy
+ :name "Even"
+ :predicate #'cl-evenp)))))
+ (taxy-make-take-function
+ :eval (taxy-make-take-function
+ '(first-char second-char)
+ '((first-char (lambda (s) (substring s nil 1)))
+ (second-char (lambda (s) (substring s 1 2))))))
+ (taxy-mapc-taxys
+ :eval (taxy-mapc-taxys
+ (lambda (taxy)
+ (setf (taxy-name taxy) (upcase (taxy-name taxy))))
+ (make-taxy :name "a" :taxys (list (make-taxy :name "b")))))
+ (taxy-mapcar-items
+ :eval (taxy-mapcar-items #'upcase
+ (make-taxy :items (list "a" "b" "c")
+ :taxys (list (make-taxy :items (list "d" "e"
"f"))))))
+ (taxy-plain
+ :eval (taxy-plain
+ (taxy-fill '(0 1 2 3)
+ (make-taxy
+ :name "Numbers"
+ :taxys (list (make-taxy
+ :name "Odd"
+ :predicate #'cl-oddp)
+ (make-taxy
+ :name "Even"
+ :predicate #'cl-evenp))))))
+ (taxy-size
+ :eval (taxy-size
+ (make-taxy
+ :items '(a b c)
+ :taxys (list (make-taxy
+ :items '(d e f))))))
+ (taxy-sort-items
+ :eval (taxy-sort-items #'string< #'identity
+ (make-taxy :items (list "c" "b" "a")
+ :taxys (list (make-taxy :items (list "f" "e"
"d"))))))
+ (taxy-sort-taxys
+ :eval (taxy-sort-taxys #'string< #'taxy-name
+ (make-taxy :name "Taxy"
+ :taxys (list (make-taxy :name "Beta")
+ (make-taxy :name "Alpha"))))))))
;;;; Footer
- [elpa] externals/taxy updated (ce8d3eb -> 2a0cc62), ELPA Syncer, 2021/09/24
- [elpa] externals/taxy debb8cc 2/6: Meta: Set fill-column to 90, ELPA Syncer, 2021/09/24
- [elpa] externals/taxy 2a0cc62 6/6: Change: Use with-eval-after-load for shortdoc,
ELPA Syncer <=
- [elpa] externals/taxy db79b73 4/6: Tidy: taxy-magit-section, ELPA Syncer, 2021/09/24
- [elpa] externals/taxy 67e6604 5/6: Example: (bookmarky) Require requirements, ELPA Syncer, 2021/09/24
- [elpa] externals/taxy bb1487b 3/6: Meta: taxy-magit-section as separate package, ELPA Syncer, 2021/09/24
- [elpa] externals/taxy e12d796 1/6: Meta: Set org-list-two-spaces-after-bullet-regexp, ELPA Syncer, 2021/09/24