>> "Dave" == Dave Goldberg writes: >> (defun my-dired-attach (&optional arg) >> (interactive "P") >> (if arg >> (New code) >> (old code))) > It looks like you are writing a modified version of > gnus-dired-attach, along with the above wrapper. If that's correct > then I think this will work. I haven't tested with this specific > case, but it's worked for others: > (defun my-dired-attach (&optional arg) > (interactive "P") > (if arg > (call-interactively 'modified-gnus-dired-attach) > (call-interactively 'gnus-dired-attach))) Right precisely, I tried that but without the call-interactively. I originally thought to modify *directly* gnus-dired-attach,[1] but as I said its interactive structure is too complex for me. Also it seems that most users don't think such a patch is necessary. > I think you can do something similar with defadvice but I haven't > used that. I have decided to avoid defadvice if possible, it is just almost impossible to debug. thanks Uwe Footnotes: [1] one function to rule them all.