From 0628802baf5c9245138db82dd058cad023a7d0ae Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 29 Oct 2015 15:01:07 +0000 Subject: 37014: Improved internal parameter setting. Enhance WARNCREATEGLOBAL to work in many more cases. Don't create REPLY as an integer if it didn't previously exist as one, even if the value to be set is integral, as this is likely to mess up later uses of REPLY. --- Functions/MIME/zsh-mime-setup | 2 +- Functions/Misc/add-zsh-hook | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Functions') diff --git a/Functions/MIME/zsh-mime-setup b/Functions/MIME/zsh-mime-setup index 23e44fdc0..35f6e6b6b 100644 --- a/Functions/MIME/zsh-mime-setup +++ b/Functions/MIME/zsh-mime-setup @@ -1,7 +1,7 @@ emulate -L zsh setopt extendedglob cbases -local opt o_verbose o_list +local opt o_verbose o_list i autoload -Uz zsh-mime-handler diff --git a/Functions/Misc/add-zsh-hook b/Functions/Misc/add-zsh-hook index ee37d674d..fc39659ae 100644 --- a/Functions/Misc/add-zsh-hook +++ b/Functions/Misc/add-zsh-hook @@ -82,9 +82,11 @@ if (( del )); then else if (( ${(P)+hook} )); then if (( ${${(P)hook}[(I)$fn]} == 0 )); then + typeset -ga $hook set -A $hook ${(P)hook} $fn fi else + typeset -ga $hook set -A $hook $fn fi autoload $autoopts -- $fn -- cgit 1.4.1