[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb adfe13f 235/350: Fix stupidity
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb adfe13f 235/350: Fix stupidity |
Date: |
Mon, 14 Aug 2017 11:46:45 -0400 (EDT) |
branch: externals/ebdb
commit adfe13f008543ffc63419eabeef5fc3526f7e8f4
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Fix stupidity
* ebdb.el (ebdb-search): First, "criterion" was unused. Second, the
whole thing was broken. There are tests for a reason; run them
before you push, idiot.
(ebdb-field-phone-signal-text): Sneak this in.
---
ebdb.el | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 1baaa4d..9ba3cdd 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -3957,7 +3957,7 @@ leading \"+\"."
(and (null no-prompt)
(ebdb-read-string "Use phone number: "))))
-(cl-defmethod ebdb-field-phone-signal-text ((record ebdb-record-entity)
+(cl-defmethod ebdb-field-phone-signal-text ((_record ebdb-record-entity)
(phone-field ebdb-field-phone))
"Use the Signal protocol to compose a text message to RECORD.
@@ -4850,31 +4850,30 @@ criteria), which will be used to make a call to
`ebdb-record-search', or it is a callable, which will be called
with a record as the argument. All other values will be
interpreted as t, ie the record passes."
- (let ((case-fold-search ebdb-case-fold-search)
- criterion)
+ (let ((case-fold-search ebdb-case-fold-search))
;; Handle transformations of search strings.
(when ebdb-search-transform-functions
(dolist (c clauses)
(when (and (consp c)
(stringp (cadr c)))
(dolist (func ebdb-search-transform-functions)
- (setf (cadr c) (funcall func (cadr c))))))
- (seq-filter
- (lambda (r)
- (eql (null invert)
- (catch 'found
- (condition-case nil
- (dolist (c clauses)
- (pcase c
- (`(,type ,criteria)
- (and (ebdb-record-search r type criteria)
- (throw 'found t)))
- (`,(and func (pred functionp))
- (and (funcall func r)
- (throw 'found t)))
- (_ t)))
- (cl-no-applicable-method nil)))))
- records))))
+ (setf (cadr c) (funcall func (cadr c)))))))
+ (seq-filter
+ (lambda (r)
+ (eql (null invert)
+ (catch 'found
+ (condition-case nil
+ (dolist (c clauses)
+ (pcase c
+ (`(,type ,criteria)
+ (and (ebdb-record-search r type criteria)
+ (throw 'found t)))
+ (`,(and func (pred functionp))
+ (and (funcall func r)
+ (throw 'found t)))
+ (_ t)))
+ (cl-no-applicable-method nil)))))
+ records)))
(cl-defgeneric ebdb-field-search (field criterion)
"Return t if search CRITERION somehow matches the value of
- [elpa] externals/ebdb 760fd91 204/350: More informative warning when deleting record fields, (continued)
- [elpa] externals/ebdb 760fd91 204/350: More informative warning when deleting record fields, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 762f027 219/350: Add Makefile, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 325426e 207/350: Add ebdb-complete.el (#32), Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ea13778 221/350: Autoload calendar-absolute-from-gregorian, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb af13080 218/350: Support sending text messages via Signal, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 94749fd 224/350: Expand gnus-user-format-function-%s, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c9f8f33 226/350: Be more when careful migrating timestamps, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b7a28f3 227/350: Be more forgiving about contents of BBDB file when migrating, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dd675a6 223/350: Revert changes to pop-up routine., Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1096c6e 230/350: Search read transform functions needs to work for all methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb adfe13f 235/350: Fix stupidity,
Eric Abrahamsen <=
- [elpa] externals/ebdb 817414a 234/350: Drop object-print for cl-print-object, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a629bde 236/350: Last tweak to pop-up buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 444f762 231/350: Fix condition-case catch in ebdb-i18n-* methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 2de4f0e 241/350: Apparently I was spelling vCard wrong, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f9d5af6 243/350: Add close parenthesis to email regexp delimiter, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4882f66 238/350: Include addresses in vcard output, plus escaping, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 440cb9e 245/350: More search functions can use prefixes: mention in manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c8bdb70 194/350: Don't assume Chinese names have both surname and given-names, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 212a1e1 212/350: Snarfing shouldn't pop up its own window, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb fc813dd 193/350: Yet more fixes to proper name formatting, Eric Abrahamsen, 2017/08/14