From: Roland Rosenfeld <roland@debian.org>
Date: Sun, 6 Jan 2002 15:05:57 +0100
Subject: Use -w (complete words) option on agrep, when "best match" is enabled,
 too (upstream disables -w when "best match" is enabled, which seems to
 be a bad idea) (Closes: #127317).
Bug-Debian: http://bugs.debian.org/127317
Forwarded: To Frank Richter <frank.richter@hrz.tu-chemnitz.de> by mail on Fri, 7 Oct 2005 21:18:19 +0200

--- a/ding
+++ b/ding
@@ -2893,9 +2893,9 @@ proc dictsearch {query args} {
     } elseif {[string match "*grep" $searchmeth($curr,grepcmd)]} {
         # grep family
         set isgrep 1
-        if {$opts(word) == 0 && ![regexp {[.| ]} $squery] && $opts(errors) != -1} {
+        if {$opts(word) == 0 && ![regexp {[.| ]} $squery]} {
             # words only search - makes no sense if search string contains
-            # white space, or when "best match" used
+            # white space
             set opt "$opt -w"
         }
         if {$opts(case) == 0} {
