Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: zle TODOs etc.
- X-seq: zsh-workers 21054
- From: Clint Adams <clint@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: zle TODOs etc.
- Date: Tue, 22 Mar 2005 19:36:52 -0500
- In-reply-to: <1050321020913.ZM11750@xxxxxxxxxxxxxxxxxxxxxxx> <200502251446.j1PEkID6019392@xxxxxxxxxxxxxx>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050321013910.GA32327@xxxxxxxxxxx> <1050321020913.ZM11750@xxxxxxxxxxxxxxxxxxxxxxx> <200502251446.j1PEkID6019392@xxxxxxxxxxxxxx>
On Mon, Mar 21, 2005 at 02:09:13AM +0000, Bart Schaefer wrote:
> Some discussion of this is in zsh-workers/20869.
Oops. Thanks.
On Fri, Feb 25, 2005 at 02:46:17PM +0000, Peter Stephenson wrote:
> Word stuff: this will need a whole new way of doing iword(). Probably
> that's going to have to be a function call. The obvious thing to do is
> to have it on each call check that either the character iswalnum() or
> the multibyte representation of the character is in the string set by
> $WORDCHARS (which we could cache as wchar_t in zle). That's slower, but
> probably not prohibitively so. (The functions supplied with the shell
> can in principle do much more, but the underlying pattern matching tests
> there don't no about multibyte characters either.)
Is this the right way to go about this?
M Src/Zle/zle_main.c
M Src/init.c
M Src/params.c
* modified files
--- orig/Src/Zle/zle_main.c
+++ mod/Src/Zle/zle_main.c
@@ -101,6 +101,11 @@
/**/
mod_export int
lastchar_wide_valid;
+
+/**/
+mod_export ZLE_STRING_T zle_wordchars;
+#else
+# define zle_wordchars wordchars;
#endif
/* the bindings for the previous and for this key */
@@ -1507,6 +1512,15 @@
kungetct = 0;
}
+/**/
+mod_export void
+wordcharshook(void)
+{
+#ifdef ZLE_UNICODE_SUPPORT
+ /* TODO: convert wordchars to wchar zle_wordchars */
+#endif
+}
+
/* Hook functions. Used to allow access to zle parameters if zle is
* active. */
@@ -1560,6 +1574,7 @@
zlegetlineptr = zlegetline;
zlereadptr = zleread;
zlesetkeymapptr = zlesetkeymap;
+ wordcharshookptr = wordcharshook;
getkeyptr = getbyte;
@@ -1645,6 +1660,7 @@
zlegetlineptr = NULL;
zlereadptr = fallback_zleread;
zlesetkeymapptr= noop_function_int;
+ wordcharshookptr = noop_function;
getkeyptr = NULL;
--- orig/Src/init.c
+++ mod/Src/init.c
@@ -1150,6 +1150,9 @@
#endif /* !LINKED_XMOD_zshQszle */
/**/
+mod_export ZleVoidFn wordcharshookptr = noop_function;
+
+/**/
unsigned char *
autoload_zleread(char **lp, char **rp, int ha, int con)
{
--- orig/Src/params.c
+++ mod/Src/params.c
@@ -3316,6 +3316,7 @@
zsfree(wordchars);
wordchars = x;
inittyptab();
+ wordcharshookptr();
}
/* Function to get value for special parameter `_' */
Messages sorted by:
Reverse Date,
Date,
Thread,
Author