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

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

Re: Using passing the tempo-template user input to my function?


From: Vagn Johansen
Subject: Re: Using passing the tempo-template user input to my function?
Date: Wed, 27 Oct 2004 19:23:47 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)

Hattuari <susudata@setidava.kushan.aa> writes:

> I've tried all the ways I can come up with to pass the string returned from
> querying the user to my own function.  

[...]

> If I explicitly pass the correct string to the function, the correct output
> is generated.  Suggestions?

Use your own query-function and a global variable. 

For example

    (defvar xyz-name nil)

    (defun xyz-read ()
        (interactive)
        (setq xyz-name (read-from-minibuffer "xyz-name? ")))

    (defun xyz-func ()
        (upcase xyz-name))

    (tempo-define-template "xyz" 
        '("xyz { " (xyz-read) " } { " 'xyz-name " } { " (xyz-func) " }" )
        "xyz" "desc" 'elisp-tempo-tags)

-- 
Vagn Johansen


reply via email to

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