michael.cadilhac@lrde.org (Michaėl Cadilhac) writes: > Kevin Rodgers writes: > >> Michaėl Cadilhac wrote: >>> I've a problem I can't solve in a clean way, here. >>> >>> I want that when `gnus-group-jump-to-group' is called, its >>> completing-read (PC enabled) uses `:' as PC-word-delimiters. >>> >> >> Does this work? >> >> (defadvice gnus-group-jump-to-group (before PC-word-delimiters activate) >> "Temporarily bind `PC-word-delimiters' while reading GROUP." >> (interactive >> (let ((PC-word-delimiters ":")) >> (call-interactively >> `(lambda (&rest args) >> ,(interactive-form 'gnus-group-jump-to-group) >> args))))) > > Nice try :-) > > Well, it doesn't. It complains about infinite recursion. I think it's > due to infinite evaluation of the advice on the « interactive-form ». > > However, with a « before » advice, I think jump-to-group would have > been called twice. Okey, this remark was silly, I didn't read as I should your proposition, TITS with a lot of attention ;-) The following doesn't work: > (defadvice gnus-group-jump-to-group (around PC-word-delimiters activate) > "Temporarily bind `PC-word-delimiters' while reading GROUP." > (interactive > (let ((PC-word-delimiters ":")) > (ad-deactivate 'gnus-group-jump-to-group) > (call-interactively 'gnus-group-jump-to-group) > (ad-activate 'gnus-group-jump-to-group)))) And is really dirty. One can fix your proposal, which is a really great one, by the following : (defadvice gnus-group-jump-to-group (before PC-word-delimiters activate) "Temporarily bind `PC-word-delimiters' while reading GROUP." (interactive (progn (ad-deactivate 'gnus-group-jump-to-group) (let* ((PC-word-delimiters ":") (retval (call-interactively `(lambda (&rest args) ,(interactive-form 'gnus-group-jump-to-group) args)))) (ad-activate 'gnus-group-jump-to-group) retval)))) Thank you again, now it seems fine ! -- | Michaėl `Micha' Cadilhac | Pour les 35-40 ans, l'humour | | Epita/LRDE Promo 2007 | c'est une plus-value. | | http://www.lrde.org/~cadilh_m | -- Guillaume L. | `-- - JID: micha@amessage.be --' - --'