branch: externals/ebdb
commit 61b533c409dec6cef4bf03b4c6c122c3deb3323b
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    Simplify ebdb-record-field for strings
    
    * ebdb.el (ebdb-record-field): If the argument is a string, just use
      `ebdb-record-user-field' with the string as label.
---
 ebdb.el | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index 23f5b5a..5729187 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4217,12 +4217,7 @@ also be one of the special symbols below.
 
 (cl-defmethod ebdb-record-field ((record ebdb-record)
                                 (field string))
-  (let ((user-fields (ebdb-record-user-fields record)))
-    (catch 'found
-      (dolist (f user-fields)
-       (when (and (slot-exists-p f 'object-name)
-                  (string= field (slot-value f 'object-name)))
-         (throw 'found f))))))
+  (ebdb-record-user-field record field))
 
 (defun ebdb-merge-concat (string1 string2 &optional separator)
   "Return the concatenation of STRING1 and STRING2.

Reply via email to