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

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

[elpa] externals/ebdb 057c4c0 144/350: Have ebdb-snarf accept optional r


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 057c4c0 144/350: Have ebdb-snarf accept optional records argument
Date: Mon, 14 Aug 2017 11:46:24 -0400 (EDT)

branch: externals/ebdb
commit 057c4c05496f663ed6f0abe7e0773a6b4e6b0189
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Have ebdb-snarf accept optional records argument
    
    * ebdb-snarf.el (ebdb-snarf): It should be possible to pass this
      argument down all the way from the top.
---
 ebdb-snarf.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ebdb-snarf.el b/ebdb-snarf.el
index 4b53364..c0274cf 100644
--- a/ebdb-snarf.el
+++ b/ebdb-snarf.el
@@ -70,14 +70,17 @@ with other field types."
   :type 'list)
 
 ;;;###autoload
-(defun ebdb-snarf (&optional string start end)
+(defun ebdb-snarf (&optional string start end records)
   "Snarf text and attempt to display/update/create a record from it.
 
 If STRING is given, snarf the string.  If START and END are given
 in addition to STRING, assume they are 0-based indices into it.
 If STRING is nil but START and END are given, assume they are
 buffer positions, and snarf the region between.  If all three
-arguments are nil, snarf the entire current buffer."
+arguments are nil, snarf the entire current buffer.
+
+If RECORDS is present, it is a list of records that we assume may
+be relevant to snarfed field data."
   (interactive)
   (let ((str
         (cond ((use-region-p)
@@ -96,7 +99,7 @@ arguments are nil, snarf the entire current buffer."
       (insert (string-trim str))
       (setq records (ebdb-snarf-query
                     (ebdb-snarf-collapse
-                     (ebdb-snarf-collect)))))
+                     (ebdb-snarf-collect records)))))
     (when records
       (ebdb-display-records records nil nil t (ebdb-popup-window)
                            (format "*%s-Snarf*" ebdb-buffer-name)))))



reply via email to

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