[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash bcc74b5 045/316: [#200] Define setters for -first-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash bcc74b5 045/316: [#200] Define setters for -first-item and -last-item |
Date: |
Mon, 15 Feb 2021 15:57:22 -0500 (EST) |
branch: externals/dash
commit bcc74b56cc90842cb120015632b37eeffcaa4b9a
Author: Matus Goljer <goljer@logio.cz>
Commit: Matus Goljer <goljer@logio.cz>
[#200] Define setters for -first-item and -last-item
---
dash.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dash.el b/dash.el
index 0747eb8..27dd2c1 100644
--- a/dash.el
+++ b/dash.el
@@ -578,11 +578,15 @@ Alias: `-any'"
\(fn LIST)")
+(gv-define-simple-setter -first-item setcar)
+
(defun -last-item (list)
"Return the last item of LIST, or nil on an empty list."
(declare (pure t) (side-effect-free t))
(car (last list)))
+(gv-define-setter -last-item (val x) `(setcar (last ,x) ,val))
+
(defun -butlast (list)
"Return a list of all items in list except for the last."
;; no alias as we don't want magic optional argument
- [elpa] externals/dash 012b3bc 024/316: Docstrings grammar fixes (#186), (continued)
- [elpa] externals/dash 012b3bc 024/316: Docstrings grammar fixes (#186), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6ded2f2 014/316: Add 'see also' to `-find-index` and `-find-last-index`., ELPA Syncer, 2021/02/15
- [elpa] externals/dash e680ad0 015/316: Merge pull request #173 from Wilfred/master, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a10fb6b 028/316: Add -each-indexed keyword to font-lock, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 502be58 029/316: Make -each-indexed indent like -each, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4ae329a 032/316: Release 2.13.0, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0100584 033/316: Correct typo of 'does' to 'do' in -map-when docs, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b7ba212 036/316: Edebug support for threading macros (#188), ELPA Syncer, 2021/02/15
- [elpa] externals/dash d4bccfe 037/316: Add annotations to pure functions. (#199), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4b805e1 041/316: Update README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bcc74b5 045/316: [#200] Define setters for -first-item and -last-item,
ELPA Syncer <=
- [elpa] externals/dash a9f90d7 016/316: Add -select-column(s), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 27b1ea5 030/316: Update changelog for 2.12.x., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 52e7eb4 031/316: Merge pull request #191 from Wilfred/update_changelog, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3075aea 040/316: Add -unzip, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2996a0d 035/316: Add a LICENSE file (#194), ELPA Syncer, 2021/02/15
- [elpa] externals/dash 9dfb01a 050/316: Correct use of eval-after-load, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 75cde71 052/316: Ensure that -first-item is as fast as car, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 05dc0aa 062/316: Add copyright assignment statement to documentation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4de2189 027/316: [Feature #185] -cut <> in first slot is a function, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b45b38a 039/316: Fix typo, ELPA Syncer, 2021/02/15