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

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

[nongnu] elpa/j-mode 8daf7cf 25/56: Adding monkey patches for some and c


From: ELPA Syncer
Subject: [nongnu] elpa/j-mode 8daf7cf 25/56: Adding monkey patches for some and caddr
Date: Sun, 29 Aug 2021 11:20:48 -0400 (EDT)

branch: elpa/j-mode
commit 8daf7cf2ed82970f9ff75b5669f88609eabba1aa
Author: Zachary Elliott <zach@nyu.edu>
Commit: Zachary Elliott <zach@nyu.edu>

    Adding monkey patches for some and caddr
---
 j-help.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/j-help.el b/j-help.el
index e8469ba..904920d 100644
--- a/j-help.el
+++ b/j-help.el
@@ -73,6 +73,16 @@ It groups the objects in LIST according to the predicate FN"
   (let ((sl (sort list (lambda (x y) (< (funcall fn x) (funcall fn y))))))
     (group-by* sl fn '() '() '())))
 
+(unless (fboundp 'some)
+  (defun some ( fn list )
+    (when list
+      (let ((val (funcall fn (car list))))
+       (if val val (some fn (cdr list)))))))
+
+(unless (fboundp 'caddr)
+  (defun caddr ( list )
+    (car (cdr (cdr list)))))
+
 (defgroup j-help nil
   "Documentation extention for j-mode"
   :group 'applications



reply via email to

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