summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-08-30 20:31:21 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2016-08-30 20:31:21 -0700
commit70166178bdc7ea149eb1cd29bcdb549a392c46dd (patch)
tree8a8d654ed69cd5b77258d99beb678693090e5711 /Functions
parentc2592b4f7278cb9e3ce3cd663fb5effec570e7d4 (diff)
downloadzsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.tar.gz
zsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.tar.xz
zsh-70166178bdc7ea149eb1cd29bcdb549a392c46dd.zip
39131: return on error needs to be at the outer scope.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Misc/add-zle-hook-widget8
1 files changed, 4 insertions, 4 deletions
diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget
index c47d9a3cb..572de2561 100644
--- a/Functions/Misc/add-zle-hook-widget
+++ b/Functions/Misc/add-zle-hook-widget
@@ -18,10 +18,6 @@
 #
 # The -L option lists the hooks and their associated widgets.
 
-() { # Preserve caller global option settings
-
-emulate -L zsh
-
 # This is probably more safeguarding than necessary
 zmodload -e zsh/zle || return 1
 { zmodload zsh/parameter && zmodload zsh/zleparameter } || {
@@ -29,6 +25,10 @@ zmodload -e zsh/zle || return 1
     return 1
 }
 
+() { # Preserve caller global option settings
+
+emulate -L zsh
+
 # Setup - create the base functions for hook widgets that call the others
 
 local -a hooktypes=( zle-isearch-exit zle-isearch-update