about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/init.c24
2 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1dc91a655..049c60243 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-08-04  Peter Stephenson  <pws@csr.com>
 
+	* 25384: Src/init.c: fix problem with autoload of zsh/zle
+	for warning message at boot.
+
 	* users/13093: Src/module.c: HashNode changes didn't
 	get propagated to AIX-specific code.
 
diff --git a/Src/init.c b/Src/init.c
index fcbf9236c..a21b39639 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1206,14 +1206,22 @@ VA_DCL
     /* autoload */
     switch (zle_load_state) {
     case 0:
-	if (load_module("zsh/zle", NULL, 0) != 1) {
-	    (void)load_module("zsh/compctl", NULL, 0);
-	    ret = zle_entry_ptr(cmd, ap);
-	    /* Don't execute fallback code */
-	    cmd = -1;
-	} else {
-	    zle_load_state = 2;
-	    /* Execute fallback code below */
+	/*
+	 * Some commands don't require us to load ZLE.
+	 * These also have no fallback.
+	 */
+	if (cmd != ZLE_CMD_TRASH && cmd != ZLE_CMD_RESET_PROMPT &&
+	    cmd != ZLE_CMD_REFRESH)
+	{
+	    if (load_module("zsh/zle", NULL, 0) != 1) {
+		(void)load_module("zsh/compctl", NULL, 0);
+		ret = zle_entry_ptr(cmd, ap);
+		/* Don't execute fallback code */
+		cmd = -1;
+	    } else {
+		zle_load_state = 2;
+		/* Execute fallback code below */
+	    }
 	}
 	break;