branch: externals/ebdb commit 44440310e739df9d46aaa38f9ac275199f25f439 Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
* ebdb.el (ebdb-add-to-list): Move macro before first use --- ebdb.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ebdb.el b/ebdb.el index 5811fef..a46061c 100644 --- a/ebdb.el +++ b/ebdb.el @@ -794,6 +794,11 @@ You really should not disable debugging. But it will speed things up." `(let ((debug-on-error t)) ,@body))) +(defmacro ebdb-add-to-list (list-var element) + "Add ELEMENT to the value of LIST-VAR if it isn't there yet and non-nil. +The test for presence of ELEMENT is done with `equal'." + `(when ,element (cl-pushnew ,element ,list-var :test #'equal))) + ;;; Fields. (defclass ebdb-field () @@ -4494,11 +4499,6 @@ REQUIRE-MATCH have the same meaning as in `completing-read'." (signal 'ebdb-empty (list prompt)) string))))) -(defmacro ebdb-add-to-list (list-var element) - "Add ELEMENT to the value of LIST-VAR if it isn't there yet and non-nil. -The test for presence of ELEMENT is done with `equal'." - `(when ,element (cl-pushnew ,element ,list-var :test #'equal))) - ;; FIXME: Get rid of this add-job and eval-spec stuff. (defsubst ebdb-add-job (spec record string) "Internal function: Evaluate SPEC for RECORD and STRING.