emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 94c7c6b 039/350: Provide ebdb-load guards in a few


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 94c7c6b 039/350: Provide ebdb-load guards in a few more places
Date: Mon, 14 Aug 2017 11:45:58 -0400 (EDT)

branch: externals/ebdb
commit 94c7c6bf5977be9dd04a6ec9bbb540776e8ddb8b
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Provide ebdb-load guards in a few more places
    
    * ebdb-com.el (ebdb-completing-read-records): Make sure records are
      loaded, if this is the point of entry.
    * ebdb.el (ebdb-prompt-for-db): Ditto, though I'm less sure about this one.
---
 ebdb-com.el | 2 ++
 ebdb.el     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/ebdb-com.el b/ebdb-com.el
index 23b1bfa..6484f64 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2227,6 +2227,8 @@ Obey `ebdb-completion-list'."
   "Read and return list of records from the ebdb.
 Completion is done according to `ebdb-completion-list'.  If the user
 just hits return, nil is returned.  Otherwise, a valid response is forced."
+  (unless ebdb-record-tracker
+    (ebdb-load))
   (let* ((completion-ignore-case t)
          (string (completing-read prompt ebdb-hashtable
                                   'ebdb-completion-predicate t)))
diff --git a/ebdb.el b/ebdb.el
index 91bed87..0656bc2 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -3229,6 +3229,8 @@ Returns a list of (\"label\" slot . field-class)."
        (list choice (cons 'fields 'ebdb-field-user-simple)))))
 
 (defun ebdb-prompt-for-db (&optional db-list)
+  (unless (or db-list ebdb-db-list)
+    (ebdb-load))
   (let* ((collection (or db-list ebdb-db-list))
         (db-string
          (ebdb-read-string "Choose a database: "



reply via email to

[Prev in Thread] Current Thread [Next in Thread]