org-contacts.el: Started to silent byte-compiler
* contrib/lisp/org-contacts.el: Remove some compile-time warnings by adding the proper declarations. (org-contacts-anniversaries): Hack around an undefined variable because I wasn't able to understand how this function works. (org-contacts-wl-get-from-header-content): Check whether the variable `wl-summary-buffer-elmo-folder' is bound or not.
This commit is contained in:
parent
a9b2eef66f
commit
680dc1f24d
1 changed files with 10 additions and 2 deletions
|
@ -43,6 +43,7 @@
|
||||||
(require 'org))
|
(require 'org))
|
||||||
(require 'gnus-util)
|
(require 'gnus-util)
|
||||||
(require 'org-agenda)
|
(require 'org-agenda)
|
||||||
|
(require 'org-capture)
|
||||||
|
|
||||||
(defgroup org-contacts nil
|
(defgroup org-contacts nil
|
||||||
"Options about contacts management."
|
"Options about contacts management."
|
||||||
|
@ -132,6 +133,11 @@ This overrides `org-email-link-description-format' if set."
|
||||||
:group 'org-contacts
|
:group 'org-contacts
|
||||||
:type 'file)
|
:type 'file)
|
||||||
|
|
||||||
|
;; Decalre external functions and variables
|
||||||
|
(declare-function wl-summary-message-number "ext:wl-summary" ())
|
||||||
|
(declare-function wl-address-header-extract-address "ext:wl-address")
|
||||||
|
(declare-function wl-address-header-extract-realname "ext:wl-address")
|
||||||
|
|
||||||
(defvar org-contacts-keymap
|
(defvar org-contacts-keymap
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(define-key map "M" 'org-contacts-view-send-email)
|
(define-key map "M" 'org-contacts-view-send-email)
|
||||||
|
@ -501,7 +507,8 @@ Format is a string matching the following format specification:
|
||||||
(let ((calendar-date-style 'american)
|
(let ((calendar-date-style 'american)
|
||||||
(entry ""))
|
(entry ""))
|
||||||
(unless format (setq format org-contacts-birthday-format))
|
(unless format (setq format org-contacts-birthday-format))
|
||||||
(loop for contact in (org-contacts-filter)
|
(loop with date = nil ; FIXME: prevent a warning
|
||||||
|
for contact in (org-contacts-filter)
|
||||||
for anniv = (let ((anniv (cdr (assoc-string
|
for anniv = (let ((anniv (cdr (assoc-string
|
||||||
(or field org-contacts-birthday-property)
|
(or field org-contacts-birthday-property)
|
||||||
(caddr contact)))))
|
(caddr contact)))))
|
||||||
|
@ -647,7 +654,8 @@ Works from wl-summary-mode and mime-view-mode - that is while viewing email.
|
||||||
Depends on Wanderlust been loaded."
|
Depends on Wanderlust been loaded."
|
||||||
(with-current-buffer (org-capture-get :original-buffer)
|
(with-current-buffer (org-capture-get :original-buffer)
|
||||||
(cond
|
(cond
|
||||||
((eq major-mode 'wl-summary-mode) (when wl-summary-buffer-elmo-folder
|
((eq major-mode 'wl-summary-mode) (when (and (boundp 'wl-summary-buffer-elmo-folder)
|
||||||
|
wl-summary-buffer-elmo-folder)
|
||||||
(elmo-message-field
|
(elmo-message-field
|
||||||
wl-summary-buffer-elmo-folder
|
wl-summary-buffer-elmo-folder
|
||||||
(wl-summary-message-number)
|
(wl-summary-message-number)
|
||||||
|
|
Loading…
Reference in a new issue