summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-07-27 14:04:44 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-07-27 14:04:45 +0000
commit74722c7392ae95069df6966b1194d3e10320f3de (patch)
treef8a1cd57a6e60f8d8e6ebb0baa486bacd5c63c87
parent8e06a6a28a00adeef8d7b443faaa88138544870a (diff)
downloadzsh-74722c7392ae95069df6966b1194d3e10320f3de.tar.gz
zsh-74722c7392ae95069df6966b1194d3e10320f3de.tar.xz
zsh-74722c7392ae95069df6966b1194d3e10320f3de.zip
unposted: Prefix function's name to its error messages.
-rw-r--r--ChangeLog3
-rw-r--r--Functions/Misc/add-zle-hook-widget4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 15fe53b70..bf74cbe3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-07-27  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* unposted: Functions/Misc/add-zle-hook-widget: Prefix function's
+	name to its error messages.
+
 	* unposted (after 38939): Completion/Unix/Command/_git:
 	_git-rebase: Unbreak.
 
diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget
index 04be50478..82a404d7a 100644
--- a/Functions/Misc/add-zle-hook-widget
+++ b/Functions/Misc/add-zle-hook-widget
@@ -25,7 +25,7 @@ emulate -L zsh
 # This is probably more safeguarding than necessary
 zmodload -e zsh/zle || return 1
 { zmodload zsh/parameter && zmodload zsh/zleparameter } || {
-    print -u2 "Need parameter modules for zle hooks"
+    print -u2 "add-zle-hook-widget: Need parameter modules for zle hooks"
     return 1
 }
 
@@ -130,7 +130,7 @@ function add-zle-hook-widget {
 	# Check whether attempting to add a widget named for the hook
 	if [[ "$fn" = "$hook" ]]; then
 	    if [[ -n "${widgets[$fn]}" ]]; then
-		print -u2 "Cannot hook $fn to itself"
+		print -u2 "${0}: Cannot hook $fn to itself"
 		return 1
 	    fi
 	    # No point in building the array until another is added