help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a function interactively with a universal argument


From: Tim X
Subject: Re: Calling a function interactively with a universal argument
Date: Thu, 14 Jun 2007 23:21:07 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

"spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com> writes:

> Is it possible to call a function from a program with a certain
> universal argument?
>
> I'd like to a redefine a standard command, but *without* bothering to
> use its actual lisp interface, so I want to call the function from a
> program as a user would, supplying only a universal argument or not.
>
>
> I'd like to override find-tag behavior, so that it does something
> after reading the interactive arguments, but before invoking the
> original command:
>
>
> (defun my-find-tag ()
>    ; the result of (interactive-form 'find-tag) should be substituted
> here somehow as an interactive specifier, because I want the same
> interactive behavior (I can copy it of course manually, but it would
> be nicer to copy here the interactive specification of find-tag
> programatically)
>
>   (if my-find-tags was called with C-u then do something
>        otherwise do something else)
>
>   (call original find-tag with the interactive arugments received))
>
>
>
> I've seen call-interactively, but it doesn't allow me to specify the
> actual interactive arguments to call the command with.
>

have a look at defadvice in the elisp manual. It should allow you to do what
you want.

tim
-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]