commit 486876e062b7acf07748fd39745ea8f6c05ad30b
parent a94cf0edbda736c030a764b911d3e441dac930d6
Author: Wilfred Hughes <me@wilfred.me.uk>
Date: Fri, 7 Apr 2017 21:33:04 +0100
Use destructuring lambda rather than immediately destructuring
Hat tip @Fuco1, this is nice and I had no idea.
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/helpful.el b/helpful.el
@@ -57,8 +57,8 @@ This allows us to distinguish strings from symbols."
(let* ((syms-and-vals
(-partition 2 (symbol-plist symbol)))
(lines
- (--map
- (-let [(sym val) it]
+ (-map
+ (-lambda ((sym val))
(format "%s %s"
(propertize (symbol-name sym)
'face 'font-lock-constant-face)
@@ -227,10 +227,10 @@ Ensures global keybindings are shown first."
(defun helpful--format-position-heads (position-heads)
(s-join "\n"
- (--map (-let [(def name) it]
- (helpful--syntax-highlight
- (format "(%s %s ...)" def name)))
- position-heads)))
+ (-map (-lambda ((def name))
+ (helpful--syntax-highlight
+ (format "(%s %s ...)" def name)))
+ position-heads)))
(defun helpful-update ()
"Update the current *Helpful* buffer to the latest