[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 59449b9 10/11: New defsubst ebdb-record-self
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 59449b9 10/11: New defsubst ebdb-record-self |
Date: |
Sun, 22 Oct 2017 13:17:03 -0400 (EDT) |
branch: externals/ebdb
commit 59449b9d161e5dd2ee368cb8aeff5a24c3c65b02
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New defsubst ebdb-record-self
* ebdb.el (ebdb-record-self): Convenience subst for returning the self
record.
(ebdb-field-phone-signal-text): Use it.
* ebdb-mua.el (ebdb-get-user-mail-address-re): Use it.
* ebdb-com.el (ebdb-signal-text): Use it.
---
ebdb-com.el | 2 +-
ebdb-mua.el | 2 +-
ebdb.el | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ebdb-com.el b/ebdb-com.el
index 449049a..a2aeb36 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2638,7 +2638,7 @@ message."
(interactive
(list (or (and ebdb-record-self
(ebdb-signal-get-number
- (ebdb-gethash ebdb-record-self 'uuid)
+ (ebdb-record-self)
t))
(ebdb-read-string
"Number to send from (or set `ebdb-record-self'): "))
diff --git a/ebdb-mua.el b/ebdb-mua.el
index d2cc931..a33eb4e 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -223,7 +223,7 @@ accordingly."
(cond ((stringp ebdb-user-mail-address-re)
ebdb-user-mail-address-re)
((eq ebdb-user-mail-address-re 'self)
- (let ((self-rec (ebdb-gethash ebdb-record-self 'uuid)))
+ (let ((self-rec (ebdb-record-self)))
(unless self-rec
(user-error "`ebdb-user-mail-address-re' set to 'self, but
`ebdb-record-self' is not set."))
(setq ebdb-user-mail-address-re
diff --git a/ebdb.el b/ebdb.el
index bc91c72..3fc86bb 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -500,6 +500,10 @@ It takes one argument, the name as extracted by
:group 'ebdb-utilities
:type 'function)
+(defsubst ebdb-record-self ()
+ "Return the \"self\" record"
+ (ebdb-gethash ebdb-record-self 'uuid))
+
;;; Record editing
(defcustom ebdb-default-separator '("[,;]" ", ")
@@ -4320,7 +4324,7 @@ command's docstring for more details."
(let ((sender
(or (and ebdb-record-self
(ebdb-signal-get-number
- (ebdb-gethash ebdb-record-self 'uuid)
+ (ebdb-record-self)
t))
(ebdb-read-string
"Number to send from (or set `ebdb-record-self'): ")))
- [elpa] externals/ebdb updated (aac31a3 -> db53550), Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb c9acc38 04/11: Add ebdb-org-field-tags to ebdb-hash-extra-predicates, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb eee0868 03/11: Downcase all-completions string when searching, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb fd66ed0 05/11: Add optional "shortcut" arg to ebdb-prompt-for-db, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb db53550 11/11: Protect against bug with timestamp/creation-dates, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb c56d9e2 02/11: Get ebdb-ispell working again, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb 121281d 01/11: Part one of migration from org-contacts, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb d4dbf34 07/11: New ebdb-record-change-name methods for strings, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb 59449b9 10/11: New defsubst ebdb-record-self,
Eric Abrahamsen <=
- [elpa] externals/ebdb 2661406 09/11: Use cached record name string in cl-print-object, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb d806d7d 08/11: Compiler-inspired fixes, vol 335534, Eric Abrahamsen, 2017/10/22
- [elpa] externals/ebdb 90ff5d1 06/11: New MUA command for toggling record layout, Eric Abrahamsen, 2017/10/22