zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Re: wrapper functions in modules
Date: Wed, 16 Dec 1998 09:05:05 +0100 (MET)	[thread overview]
Message-ID: <199812160805.JAA00604@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Tue, 15 Dec 1998 09:05:40 -0800


Bart Schaefer wrote:

> 
> On Dec 15,  1:03pm, Sven Wischnowsky wrote:
> } Subject: Re: wrapper functions in modules
> }
> } Bart Schaefer wrote:
> } > Is the new first parameter of doshfunc() needed any longer?
> } 
> } [For those who don't want to look at the code: the argument is the
> } name of the function to be executed.]
> } 
> } I added the argument since modules may be interested in it
> 
> Hm.  I'm not sure that modules *ought* to be interested in it, but...

It's just that wrappers can't get at this information. But I wouldn't
resist to remove this or to use a global variable for it.
Apropos variables: we could use two static variables for the other
arguments a wrapper function gets and which are only passed to
runshfunc()... hm, I might produce a patch for this some time.

> 
> One thing a wrapper function might legitimately be interested in is the
> context in which it was called.  By that I mean, the wrapper might want
> to do something different if the function is being run by the completion
> widget code (the call to doshfunc() in zle_main.c), the compctl -K code
> or -Y code (zle_tricky.c), or the signal traps (signals.c).  The signal
> handlers can sort of be determined by examination of the name, but that's
> not what I'd call the best way to do it (e.g. it's possible to invoke the
> trap functions manually without a signal having been received), and that
> doesn't work for the other cases.

Yes, that would be good to have. Using a global integer variable or an 
argument and a couple of constants?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1998-12-16  8:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  8:05 Sven Wischnowsky [this message]
1998-12-16  9:50 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1998-12-15 12:03 Sven Wischnowsky
1998-12-15 17:05 ` Bart Schaefer
1998-12-14 10:11 Sven Wischnowsky
1998-12-14 18:42 ` Bart Schaefer
1998-12-11 14:16 Sven Wischnowsky
1998-12-11 17:40 ` Bart Schaefer
1998-12-09 14:44 PATCH: " Sven Wischnowsky
1998-12-11 13:18 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199812160805.JAA00604@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).