* lisp/calc/calc-menu.el: Make it loadable in isolation.
* lisp/gnus/gnus-vm.el: Make it loadable without VM.
(gnus-vm-make-folder, gnus-summary-save-in-vm): Require 'vm.
(vm-forward-message, vm-reply, vm-mail): Remove unused autoloads.
* lisp/net/eudcb-bbdb.el: Make it loadable without bbdb.
(eudc-bbdb-filter-non-matching-record, eudc-bbdb-extract-phones)
(eudc-bbdb-extract-addresses, eudc-bbdb-format-record-as-result)
(eudc-bbdb-query-internal): Require 'bbdb.
2013-05-11 Glenn Morris <rgm@gnu.org>
+ * calc/calc-menu.el: Make it loadable in isolation.
+
+ * net/eudcb-bbdb.el: Make it loadable without bbdb.
+ (eudc-bbdb-filter-non-matching-record, eudc-bbdb-extract-phones)
+ (eudc-bbdb-extract-addresses, eudc-bbdb-format-record-as-result)
+ (eudc-bbdb-query-internal): Require 'bbdb.
+
* lpr.el (lpr-headers-switches):
* emacs-lisp/testcover.el (testcover-compose-functions): Fix :type.
(Info-goto-node "Help Commands"))])
"Menu for Calc's help functions.")
-(defvar calc-mode-map)
+;; Needed to make this file loadable in isolation.
+;; Another option would be to use calc-load-hook.
+(require 'calc)
(easy-menu-define
calc-menu
+2013-05-11 Glenn Morris <rgm@gnu.org>
+
+ * gnus-vm.el: Make it loadable without VM.
+ (gnus-vm-make-folder, gnus-summary-save-in-vm): Require 'vm.
+ (vm-forward-message, vm-reply, vm-mail): Remove unused autoloads.
+
2013-05-09 Glenn Morris <rgm@gnu.org>
* mml1991.el: Make it loadable. (Bug#13456)
(require 'gnus-msg)
(eval-when-compile
- (require 'cl)
- (autoload 'vm-mode "vm")
- (autoload 'vm-save-message "vm")
- (autoload 'vm-forward-message "vm")
- (autoload 'vm-reply "vm")
- (autoload 'vm-mail "vm"))
+ (require 'cl))
+
+(autoload 'vm-mode "vm")
+(autoload 'vm-save-message "vm")
(defvar gnus-vm-inhibit-window-system nil
"Inhibit loading `win-vm' if using a window-system.
(when window-system
(require 'win-vm))))
-(when (not (featurep 'vm))
- (load "vm"))
-
(defun gnus-vm-make-folder (&optional buffer)
+ (require 'vm)
(let ((article (or buffer (current-buffer)))
(tmp-folder (generate-new-buffer " *tmp-folder*"))
(start (point-min))
(defun gnus-summary-save-in-vm (&optional folder)
(interactive)
+ (require 'vm)
(setq folder
(gnus-read-save-file-name
"Save %s in VM folder:" folder
;;; Code:
(require 'eudc)
-(if (not (featurep 'bbdb))
- (load-library "bbdb"))
-(if (not (featurep 'bbdb-com))
- (load-library "bbdb-com"))
+
+;; Make it loadable on systems without bbdb.
+(require 'bbdb nil t)
+(require 'bbdb-com nil t)
;;{{{ Internal cooking
(defun eudc-bbdb-filter-non-matching-record (record)
"Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
+ (require 'bbdb)
(catch 'unmatch
(progn
(dolist (condition eudc-bbdb-current-query)
(&optional dont-check-disk already-in-db-buffer))
(defun eudc-bbdb-extract-phones (record)
+ (require 'bbdb)
(mapcar (function
(lambda (phone)
(if eudc-bbdb-use-locations-as-attribute-names
(bbdb-record-phones record)))
(defun eudc-bbdb-extract-addresses (record)
+ (require 'bbdb)
(let (s c val)
(mapcar (lambda (address)
(setq c (bbdb-address-streets address))
(defun eudc-bbdb-format-record-as-result (record)
"Format the BBDB RECORD as a EUDC query result record.
The record is filtered according to `eudc-bbdb-current-return-attributes'"
+ (require 'bbdb)
(let ((attrs (or eudc-bbdb-current-return-attributes
'(firstname lastname aka company phones addresses net notes)))
attr
BBDB attribute names.
RETURN-ATTRS is a list of attributes to return, defaulting to
`eudc-default-return-attributes'."
-
+ (require 'bbdb)
(let ((eudc-bbdb-current-query query)
(eudc-bbdb-current-return-attributes return-attrs)
(query-attrs (eudc-bbdb-format-query query))