branch: master commit f5e5b600368774cda972cc7ffa707e21860d4990 Author: Thomas Fitzsimmons <fitz...@fitzsim.org> Commit: Thomas Fitzsimmons <fitz...@fitzsim.org>
excorporate-calfw.el: Enable clean byte-compiling in GNU ELPA * excorporate/excorporate-calfw.el: Specify NOERROR when require'ing calfw. (cfw:component-model, cfw:cp-add-selection-change-hook) (cfw:cp-get-contents-sources) (cfw:create-calendar-component-buffer, cfw:cursor-to-nearest-date) (cfw:date, cfw:model-set-contents-sources) (cfw:refresh-calendar-buffer, make-cfw:event, make-cfw:source): Declare functions. (cfw:component): Declare variable. (cfw:cp-set-contents-sources): Override to fix a bug. * excorporate/excorporate-calfw.el (exco-calfw-add-meetings) (exco-calfw-finalize-buffer): Do not declare cfw:component special. * copyright_exceptions: Add exception for description of calfw's copyright situation in excorporate-calfw.el. --- copyright_exceptions | 1 + packages/excorporate/excorporate-calfw.el | 29 ++++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/copyright_exceptions b/copyright_exceptions index a9609ef..fc321b3 100644 --- a/copyright_exceptions +++ b/copyright_exceptions @@ -63,6 +63,7 @@ ./auctex/tex-info.el: '("copyright" nil) ./debbugs/debbugs-gnu.el: (insert " Copyright-paperwork-exempt: yes")) ./ergoemacs-mode/ergoemacs-themes.el: ,(lambda () emacs-copyright) +./excorporate/excorporate-calfw.el:;; copyright assignment papers on file with the FSF. ./gnugo/gnugo.el: (CP "Copyright" game simpletext) ./hyperbole/hib-doc-id.el:;; Copyright: ./math-symbol-lists/math-symbol-lists.el: "columnsep" "columnseprule" "columnwidth" "contentsline" "copyright" diff --git a/packages/excorporate/excorporate-calfw.el b/packages/excorporate/excorporate-calfw.el index 11bdfe8..5eda6e4 100644 --- a/packages/excorporate/excorporate-calfw.el +++ b/packages/excorporate/excorporate-calfw.el @@ -31,7 +31,32 @@ ;;; Code: -(require 'calfw) +;; calfw is not FSF-assigned yet so it is not in GNU ELPA. The +;; following workarounds allow excorporate-calfw.elc to be built +;; regardless. +(require 'calfw nil t) + +(declare-function cfw:component-model "ext:calfw" t) +(declare-function cfw:cp-add-selection-change-hook "ext:calfw" t) +(declare-function cfw:cp-get-contents-sources "ext:calfw" t) +(declare-function cfw:create-calendar-component-buffer "ext:calfw" t) +(declare-function cfw:cursor-to-nearest-date "ext:calfw" t) +(declare-function cfw:date "ext:calfw" t) +(declare-function cfw:model-set-contents-sources "ext:calfw" t) +(declare-function cfw:refresh-calendar-buffer "ext:calfw" t) +(declare-function make-cfw:event "ext:calfw" t) +(declare-function make-cfw:source "ext:calfw" t) + +(defvar cfw:component) + +;; Fix a bad bug in calfw. See: +;; https://github.com/kiwanami/emacs-calfw/pull/79 +(defun cfw:cp-set-contents-sources (component sources) + "Set content SOURCES for COMPONENT. +SOURCES is a list of content sources." + (cfw:model-set-contents-sources + sources (cfw:component-model component))) + (require 'excorporate) (defvar excorporate-calfw-buffer-name "*Excorporate*" @@ -85,7 +110,6 @@ are the requested participants." (let ((event-list (exco-calendar-item-iterate response #'exco-calfw-add-meeting))) (with-current-buffer (get-buffer-create excorporate-calfw-buffer-name) - (declare (special cfw:component)) (let* ((new-source (make-cfw:source :name (format "%S (as of %s)" identifier @@ -99,7 +123,6 @@ are the requested participants." (defun exco-calfw-finalize-buffer () "Finalize the Calfw widget after retrievals have completed." (with-current-buffer (get-buffer-create excorporate-calfw-buffer-name) - (declare (special cfw:component)) (let ((sources (cfw:cp-get-contents-sources cfw:component)) (status-source (make-cfw:source :name "Done." :data (lambda (_b _e) nil))))