[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-tag-mode 4c7adddd91 3/6: Added explicit use of lamb
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-tag-mode 4c7adddd91 3/6: Added explicit use of lambda expressions. |
Date: |
Tue, 28 Dec 2021 13:57:58 -0500 (EST) |
branch: externals/svg-tag-mode
commit 4c7adddd912feb809e1d15e83d1085d3ec7f3184
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Added explicit use of lambda expressions.
---
examples/example-3.el | 44 +++++++++++++++++++-------------------------
1 file changed, 19 insertions(+), 25 deletions(-)
diff --git a/examples/example-3.el b/examples/example-3.el
index 0cb2e31679..dd0ef4b141 100644
--- a/examples/example-3.el
+++ b/examples/example-3.el
@@ -15,46 +15,39 @@
;; For a full copy of the GNU General Public License
;; see <http://www.gnu.org/licenses/>.
-;; This replaces any occurence of ":TODO:" with a static SVG tag
+
+;; This replaces any occurence of ":TODO:" with a SVG tag
;; displaying "TODO"
(setq svg-tag-tags
- '((":TODO:" . ((svg-tag-make "TODO" :margin 0)))))
-
+ '((":TODO:" . ((lambda (tag) (svg-tag-make "TODO" ))))))
;; This replaces any occurence of ":HELLO:" with a static SVG tag that
;; can be clicked to execute the specified command. Help message is
;; displayed when the tag is hovered with the pointer.
(setq svg-tag-tags
- '((":HELLO:" . ((svg-tag-make "HELLO")
+ '((":HELLO:" . ((lambda (tag) (svg-tag-make "HELLO"))
(lambda () (interactive) (message "Hello world!"))
"Print a greeting message"))))
-;; This replaces any occurence of ":TODO:" with a dynamic SVG tag
-;; displaying ":TODO:"
-(setq svg-tag-tags
- '((":TODO:" . (svg-tag-make))))
-
-;; This replaces any occurence of ":TODO:" with a dynamic SVG tag
-;; displaying "TODO"
-(setq svg-tag-tags
- '((":TODO:" . ((lambda (tag)
- (svg-tag-make tag :beg 1 :end -1))))))
-
-;; This replaces any occurence of ":XXX:" with a dynamic SVG tag
-;; displaying "XXX"
+;; This replaces any occurence of ":XYZ:" with a dynamic SVG tag
+;; displaying "XYZ"
(setq svg-tag-tags
'(("\\(:[A-Z]+:\\)" . ((lambda (tag)
- (svg-tag-make tag :beg 1 :end -1))))))
+ (svg-tag-make tag :beg 1 :end -1))))))
;; This replaces any occurence of ":XXX|YYY:" with two adjacent
;; dynamic SVG tags displaying "XXX" and "YYY"
(setq svg-tag-tags
- '(("\\(:[A-Z]+\\)\|[a-zA-Z#0-9]+:" . ((lambda (tag)
- (svg-tag-make tag :beg 1 :inverse t
- :margin 0
:crop-right t))))
- (":[A-Z]+\\(\|[a-zA-Z#0-9]+:\\)" . ((lambda (tag)
- (svg-tag-make tag :beg 1 :end -1
- :margin 0 :crop-left
t))))))
+ '(("\\(:[A-Z]+\\)\|[a-zA-Z#0-9]+:" .
+ ((lambda (tag) (svg-tag-make tag :beg 1
+ :inverse t
+ :margin 0
+ :crop-right t))))
+ (":[A-Z]+\\(\|[a-zA-Z#0-9]+:\\)" .
+ ((lambda (tag) (svg-tag-make tag :beg 1
+ :end -1
+ :margin 0
+ :crop-left t))))))
;; This replaces any occurence of ":#TAG1:#TAG2:…:$" ($ means end of
;; line) with a dynamic collection of SVG tags. Note the # symbol in
@@ -64,7 +57,8 @@
'(("\\(:#[A-Za-z0-9]+\\)" . ((lambda (tag)
(svg-tag-make tag :beg 2))))
("\\(:#[A-Za-z0-9]+:\\)$" . ((lambda (tag)
- (svg-tag-make tag :beg 2 :end -1))))))
+ (svg-tag-make tag :beg 2
+ :end -1))))))
- [elpa] externals/svg-tag-mode updated (e2481ae15a -> fcfead5e98), ELPA Syncer, 2021/12/28
- [elpa] externals/svg-tag-mode 202a70dc25 4/6: Changed documentation for lambda expressions only., ELPA Syncer, 2021/12/28
- [elpa] externals/svg-tag-mode 4c7adddd91 3/6: Added explicit use of lambda expressions.,
ELPA Syncer <=
- [elpa] externals/svg-tag-mode 6d11ab5626 5/6: Restrict usage to explicit function calls., ELPA Syncer, 2021/12/28
- [elpa] externals/svg-tag-mode e57e08e1a5 1/6: Fixed copyright., ELPA Syncer, 2021/12/28
- [elpa] externals/svg-tag-mode fcfead5e98 6/6: Bumper version to 0.4., ELPA Syncer, 2021/12/28
- [elpa] externals/svg-tag-mode 90a26f3c21 2/6: Fixed tags and added cite example., ELPA Syncer, 2021/12/28