emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash 98e819e 053/316: Merge pull request #210 from Wilf


From: ELPA Syncer
Subject: [elpa] externals/dash 98e819e 053/316: Merge pull request #210 from Wilfred/car_opcode_with_first_item
Date: Mon, 15 Feb 2021 15:57:24 -0500 (EST)

branch: externals/dash
commit 98e819e407bbc35478cde30a74be15f077bd6d4b
Merge: 958e3fb 75cde71
Author: Magnar Sveen <magnars@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #210 from Wilfred/car_opcode_with_first_item
    
    Ensure that -first-item is as fast as car
---
 dash.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dash.el b/dash.el
index ce62b84..078175c 100644
--- a/dash.el
+++ b/dash.el
@@ -578,6 +578,11 @@ Alias: `-any'"
 
 \(fn LIST)")
 
+;; Ensure that calls to `-first-item' are compiled to a single opcode,
+;; just like `car'.
+(put '-first-item 'byte-opcode 'byte-car)
+(put '-first-item 'byte-compile 'byte-compile-one-arg)
+
 ;; TODO: emacs23 support, when dropped remove the condition
 (eval-when-compile
   (require 'cl)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]