From: hmurata Date: Sat, 18 Feb 2006 05:13:18 +0000 (+0000) Subject: * elmo-signal.el (elmo-signal-bindings): Use cons to append X-Git-Tag: wl-2_15_3~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a6d5a5adb70f71665568e1189525fc4eb98b088d;p=elisp%2Fwanderlust.git * elmo-signal.el (elmo-signal-bindings): Use cons to append element into list. (elmo-define-signal-handler): Add docstring. (elmo-define-signal-filter): Ditto. * elmo-multi.el (elmo-multi-connect-signals): Fix the signal name. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 81e79c1..56c72e9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,12 @@ +2006-02-18 Hiroya Murata + + * elmo-signal.el (elmo-signal-bindings): Use cons to append + element into list. + (elmo-define-signal-handler): Add docstring. + (elmo-define-signal-filter): Ditto. + + * elmo-multi.el (elmo-multi-connect-signals): Fix the signal name. + 2006-02-10 Hiroya Murata * elmo-util.el (elmo-flatten): Don't use recursive call. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 12eb2c4..4d5b9a6 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -91,7 +91,7 @@ nil 'cache-changed folder (elmo-define-signal-handler (folder child number) (elmo-emit-signal - 'flag-changed folder + 'cache-changed folder (car (elmo-multi-map-numbers folder child (list number))))) (elmo-define-signal-filter (folder sender) (memq sender (elmo-multi-folder-children-internal folder)))) diff --git a/elmo/elmo-signal.el b/elmo/elmo-signal.el index 4f44d07..00aa853 100644 --- a/elmo/elmo-signal.el +++ b/elmo/elmo-signal.el @@ -91,22 +91,21 @@ This function is for internal use only." (let ((i 0) bindings) (when (car arg-list) - (setq bindings (list (list (car arg-list) listener)))) + (setq bindings (cons (list (car arg-list) listener) bindings))) (when (setq arg-list (cdr arg-list)) - (setq bindings (nconc bindings - (list (list (car arg-list) source))))) + (setq bindings (cons (list (car arg-list) source) bindings))) (while (and (setq arg-list (cdr arg-list)) (not (eq (car arg-list) '&optional))) - (setq bindings (nconc bindings - (list (list (car arg-list) (list 'nth i args)))) + (setq bindings (cons (list (car arg-list) (list 'nth i args)) bindings) i (1+ i))) (when (and handback (setq arg-list (cdr arg-list))) - (setq bindings (nconc bindings - (list (list (car arg-list) handback))))) + (setq bindings (cons (list (car arg-list) handback) bindings))) bindings)) (defmacro elmo-define-signal-handler (args &rest body) + "Define a signal handler. +ARGS is a symbol list as (LISTENER SOURCE ARG... &optional HANDBACK)." (let ((source (make-symbol "--source--")) (listener (make-symbol "--listener--")) (argument (make-symbol "--argument--")) @@ -121,6 +120,8 @@ This function is for internal use only." def-body)) (defmacro elmo-define-signal-filter (args &rest body) + "Define a signal filter. +ARGS is a symbol list as (LISTENER SOURCE ARG...)." (let ((source (make-symbol "--source--")) (listener (make-symbol "--listener--")) (argument (make-symbol "--argument--")))