[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112471: * net/eudc-export.el: Make i
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112471: * net/eudc-export.el: Make it loadable without bbdb. |
Date: |
Mon, 06 May 2013 00:14:03 -0700 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112471
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2013-05-06 00:14:03 -0700
message:
* net/eudc-export.el: Make it loadable without bbdb.
(top-level): Use require rather than load-library.
(eudc-create-bbdb-record, eudc-bbdbify-phone)
(eudc-batch-export-records-to-bbdb)
(eudc-insert-record-at-point-into-bbdb, eudc-try-bbdb-insert):
Require bbdb.
modified:
lisp/ChangeLog
lisp/net/eudc-export.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-06 02:29:42 +0000
+++ b/lisp/ChangeLog 2013-05-06 07:14:03 +0000
@@ -1,3 +1,12 @@
+2013-05-06 Glenn Morris <address@hidden>
+
+ * net/eudc-export.el: Make it loadable without bbdb.
+ (top-level): Use require rather than load-library.
+ (eudc-create-bbdb-record, eudc-bbdbify-phone)
+ (eudc-batch-export-records-to-bbdb)
+ (eudc-insert-record-at-point-into-bbdb, eudc-try-bbdb-insert):
+ Require bbdb.
+
2013-05-06 Stefan Monnier <address@hidden>
* progmodes/octave.el (octave-texinfo-font-lock-keywords): Remove.
=== modified file 'lisp/net/eudc-export.el'
--- a/lisp/net/eudc-export.el 2013-03-05 17:13:01 +0000
+++ b/lisp/net/eudc-export.el 2013-05-06 07:14:03 +0000
@@ -31,16 +31,16 @@
(require 'eudc)
-(if (not (featurep 'bbdb))
- (load-library "bbdb"))
-(if (not (featurep 'bbdb-com))
- (load-library "bbdb-com"))
+;; NOERROR is so we can compile it.
+(require 'bbdb nil t)
+(require 'bbdb-com nil t)
(defun eudc-create-bbdb-record (record &optional silent)
"Create a BBDB record using the RECORD alist.
RECORD is an alist of (KEY . VALUE) where KEY is a directory attribute name
symbol and VALUE is the corresponding value for the record.
If SILENT is non-nil then the created BBDB record is not displayed."
+ (require 'bbdb)
;; This function runs in a special context where lisp symbols corresponding
;; to field names in record are bound to the corresponding values
(eval
@@ -166,6 +166,7 @@
PHONE is either a string supposedly containing a phone number or
a list of such strings which are concatenated.
LOCATION is used as the phone location for BBDB."
+ (require 'bbdb)
(cond
((stringp phone)
(let (phone-list)
@@ -188,6 +189,7 @@
(defun eudc-batch-export-records-to-bbdb ()
"Insert all the records returned by a directory query into BBDB."
(interactive)
+ (require 'bbdb)
(goto-char (point-min))
(let ((nbrec 0)
record)
@@ -203,6 +205,7 @@
"Insert record at point into the BBDB database.
This function can only be called from a directory query result buffer."
(interactive)
+ (require 'bbdb)
(let ((record (and (overlays-at (point))
(overlay-get (car (overlays-at (point))) 'eudc-record))))
(if (null record)
@@ -213,9 +216,8 @@
(defun eudc-try-bbdb-insert ()
"Call `eudc-insert-record-at-point-into-bbdb' if on a record."
(interactive)
- (and (or (featurep 'bbdb)
- (prog1 (locate-library "bbdb") (message "")))
- (overlays-at (point))
+ (require 'bbdb)
+ (and (overlays-at (point))
(overlay-get (car (overlays-at (point))) 'eudc-record)
(eudc-insert-record-at-point-into-bbdb)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112471: * net/eudc-export.el: Make it loadable without bbdb.,
Glenn Morris <=