From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
zsh-workers@sunsite.auc.dk
Subject: Re: compadd -r
Date: Mon, 8 Feb 1999 09:37:40 -0800 [thread overview]
Message-ID: <990208093740.ZM14060@candle.brasslantern.com> (raw)
In-Reply-To: <199902081217.NAA27404@beta.informatik.hu-berlin.de>
On Feb 8, 1:17pm, Sven Wischnowsky wrote:
} Subject: Re: compadd -r
}
} Bart Schaefer wrote:
}
} > How about this: For the simple case (remove the whole suffix, which I
} > suspect is the most common by far) stick with something like `-r <str>'.
} > For complex cases, let the user give the name of a user-defined function
} > that is called as a callback as if it were a ZLE widget, that is, with
} > LBUFFER and RBUFFER etc. writable, and with the keystrokes that caused
} > it to be called also available somewhere.
}
} The easiest way to do this is to add a function-pointer-variable in
} the zle module that will be called whenever zle thinks that a suffix
} should be removed. The completion module sets this variable whenever
} it needs it to the address of a function that calls the given shell
} function.
Isn't this more complicated than necessary? Why couldn't it be the same
function pointer every time? All it has to do is the equivalent of
zle user-defined-widget
} This is easy to implement, but somehow I think that we probably should
} take this as an example for a more gerneral problem (calling functions
} in sub-modules from modules they depend upon), and solve that one.
Eh? There isn't any such dependency here, is there? The compctl module
already depends on zle, and it's calling a function in zle.
} What I'm thinking about is some kind of hook-mechanism. Giving modules
} the possibility to register functions that should be called whenever
} some event happens.
This is, in effect, what the "wrappers" already are.
} By making the description of the hooks contain a `char *name' this
} could also easily exposed to user level to let users register shell
} function to be executed when a hook is run. The builtin to control
} this could be added in a separate module, of course.
Have you finished reimplementing emacs yet?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1999-02-08 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-08 12:17 Sven Wischnowsky
1999-02-08 17:37 ` Bart Schaefer [this message]
1999-02-09 8:20 Sven Wischnowsky
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=990208093740.ZM14060@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/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).