From 073d087e3a1b596cb47d8bbe43f14b5e2f54afcb Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Jan 2006 18:11:34 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 1 + doc/rxvt.1.pod | 4 +++- src/main.C | 8 +++++--- src/rxvtperl.xs | 5 ++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index c8c972f8..a826b74c 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,7 @@ TODO: read property sequence is broken with respect to utf-8 etc. TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look. WISH: OnTheSpot editing, or maybe switch to miiiiiiif WISH: just for fun, do shade and tint with XRender. +WISH: make builtin character glyphs optional - optionally embed a perl interpreter, which can be used for more intelligent/customized selection support, visual feedback, diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 82f8687c..ea53082e 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -1067,7 +1067,9 @@ info): Colon-separated list of perl extension scripts to use in this terminal instance. Each extension is looked up in the library directories, loaded -if necessary, and bound to the current terminal instance; option B<-pe>. +if necessary, and bound to the current terminal instance. If this resource +is empty or missing, then the perl interpreter will not be initialized; +option B<-pe>. =item B: I diff --git a/src/main.C b/src/main.C index a61dbe14..e3cbaeb1 100644 --- a/src/main.C +++ b/src/main.C @@ -489,11 +489,13 @@ rxvt_term::init (int argc, const char *const *argv) #endif #if ENABLE_PERL - rxvt_perl.init (); + if (rs[Rs_perl_ext] && *rs[Rs_perl_ext]) + { + rxvt_perl.init (); + PERL_INVOKE ((this, HOOK_INIT, DT_END)); + } #endif - PERL_INVOKE ((this, HOOK_INIT, DT_END)); - create_windows (argc, argv); dDisp; diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 76f904fb..621c15b5 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -369,6 +369,8 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) term->self = (void *)newSVptr ((void *)term, "urxvt::term"); hv_store ((HV *)SvRV ((SV *)term->self), "_overlay", 8, newRV_noinc ((SV *)newHV ()), 0); } + else if (!term->self) + return false; // perl not initialized for this instance else if (htype == HOOK_DESTROY) { // handled later @@ -474,7 +476,6 @@ BOOT: set_hookname (SEL_EXTEND); set_hookname (SEL_MAKE); set_hookname (SEL_GRAB); - set_hookname (SEL_CLICK); set_hookname (FOCUS_IN); set_hookname (FOCUS_OUT); set_hookname (VIEW_CHANGE); @@ -483,8 +484,6 @@ BOOT: set_hookname (REFRESH_BEGIN); set_hookname (REFRESH_END); set_hookname (KEYBOARD_COMMAND); - set_hookname (MOUSE_CLICK); - set_hookname (MOUSE_MOVE); export_const (DEFAULT_RSTYLE); export_const (OVERLAY_RSTYLE); -- 2.34.1