branch: externals/eev commit 0711fcfcdf269651902004c33d80d6ccd8de21ad Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Added `ee-struct-to-triples' and `find-estructt'. --- VERSION | 4 ++-- eev-blinks.el | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index dddc014036..4e7ed8a438 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Wed Dec 14 13:22:55 GMT 2022 -Wed Dec 14 10:22:55 -03 2022 +Fri Dec 16 02:32:21 GMT 2022 +Thu Dec 15 23:32:21 -03 2022 diff --git a/eev-blinks.el b/eev-blinks.el index 7dc01568dc..9e71a84713 100644 --- a/eev-blinks.el +++ b/eev-blinks.el @@ -21,7 +21,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20221028 +;; Version: 20221215 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-blinks.el> @@ -941,6 +941,25 @@ fieldname value\", like this: (apply 'find-estring (ee-struct-to-string stro) pos-spec-list)) +;; Added in 2022dec15. +;; TODO: refactor and write better docstrings! +;; +(defun ee-struct-to-triples (stro) + "Like `ee-struct-to-string', but returns a list of triples." + (let* ((ns (number-sequence 0 (length stro))) + (fieldnames (ee-struct-slot-names+ stro)) + (triples (cl-mapcar + (lambda (n name o) (list n name o)) + ns fieldnames stro))) + triples)) + +(defun find-estructt (stro &rest pos-spec-list) + "Like `find-estructt', but pretty-prints a list of triples." + (apply 'find-epp (ee-struct-to-triples stro) pos-spec-list)) + + + +