From 88312cfc5990060c2d5d54002774ef07e354dd12 Mon Sep 17 00:00:00 2001 From: Jan Tatarik Date: Wed, 18 Dec 2013 22:11:40 +0000 Subject: [PATCH] lisp/gnus/gnus-icalendar.el (gnus-icalendar-identities): Make changing the value of gnus-icalendar-additional-identities work without restart --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-icalendar.el | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7cee21522b6..fb5b85356cd 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-12-18 Jan Tatarik + + * gnus-icalendar.el (gnus-icalendar-identities): Make changing the + value of gnus-icalendar-additional-identities work without restart. + 2013-12-17 Katsumi Yamaoka * mm-util.el (mm-make-temp-file): diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 5f152921b66..1abcb6e27e4 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -677,7 +677,10 @@ only makes sense to define names or email addresses." (make-variable-buffer-local (defvar gnus-icalendar-handle nil)) -(defvar gnus-icalendar-identities +(defun gnus-icalendar-identities () + "Return list of regexp-quoted names and email addresses belonging to the user. + +These will be used to retrieve the RSVP information from ical events." (apply #'append (mapcar (lambda (x) (if (listp x) x (list x))) (list user-full-name (regexp-quote user-mail-address) @@ -766,7 +769,7 @@ only makes sense to define names or email addresses." (event (caddr data)) (reply (gnus-icalendar-with-decoded-handle handle (gnus-icalendar-event-reply-from-buffer - (current-buffer) status gnus-icalendar-identities)))) + (current-buffer) status (gnus-icalendar-identities))))) (when reply (gmm-labels ((fold-icalendar-buffer () @@ -838,7 +841,7 @@ only makes sense to define names or email addresses." (defun gnus-icalendar-mm-inline (handle) - (let ((event (gnus-icalendar-event-from-handle handle gnus-icalendar-identities))) + (let ((event (gnus-icalendar-event-from-handle handle (gnus-icalendar-identities)))) (setq gnus-icalendar-reply-status nil) @@ -867,7 +870,7 @@ only makes sense to define names or email addresses." (defun gnus-icalendar-save-part (handle) (let (event) (when (and (equal (car (mm-handle-type handle)) "text/calendar") - (setq event (gnus-icalendar-event-from-handle handle gnus-icalendar-identities))) + (setq event (gnus-icalendar-event-from-handle handle (gnus-icalendar-identities)))) (gnus-icalendar-event:sync-to-org event)))) -- 2.39.2