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

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

[elpa] externals/ebdb 60aea3d 045/350: ebdb-create-record: set record cl


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 60aea3d 045/350: ebdb-create-record: set record class outside of interactive call
Date: Mon, 14 Aug 2017 11:45:59 -0400 (EDT)

branch: externals/ebdb
commit 60aea3def27c51554f71bb114937057824e30506
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    ebdb-create-record: set record class outside of interactive call
    
    * ebdb-com.el (ebdb-create-record): Apparently the second interactive
      argument can't refer to the first.
---
 ebdb-com.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index c5c0d0e1..e6f2a8b 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1541,7 +1541,7 @@ actually-editable records."
         (ebdb-next-field 1)))))
 
 ;;;###autoload
-(defun ebdb-create-record (db record-class)
+(defun ebdb-create-record (db &optional record-class)
   "Create a new EBDB record.
 
 With no prefix argument, assume that we're creating a record in
@@ -1551,8 +1551,9 @@ record class.
 With a prefix arg, prompt for the database to use (assuming there
 is more than one), and prompt for the record class to use."
   (interactive
-   (list (car ebdb-db-list)
-        (slot-value db 'record-class)))
+   (list (car ebdb-db-list)))
+  (unless record-class
+    (setq record-class (slot-value db 'record-class)))
   (let ((record (ebdb-read record-class)))
    (condition-case nil
        (progn



reply via email to

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