Index: commands.c
===================================================================
--- commands.c	(revision 9186c75ec164683622b4eac28d412877f724cfef)
+++ commands.c	(revision 66e409c96288dd36cee1498652dc8d6dce9b4c45)
@@ -2255,5 +2255,5 @@
     return NULL;
   }
-  filtname = owl_function_classinstfilt(argv[1], NULL);
+  filtname = owl_function_classinstfilt(argv[1], NULL, owl_global_is_narrow_related(&g));
   owl_function_change_currentview_filter(filtname);
   owl_free(filtname);
@@ -2367,5 +2367,5 @@
   }
 
-  filtname=owl_function_classinstfilt(argv[1], NULL);
+  filtname=owl_function_classinstfilt(argv[1], NULL, owl_global_is_narrow_related(&g));
   (void) owl_function_color_filter(filtname, argv[2], (argc == 4 ? argv[3] : NULL));
   return NULL;
Index: functions.c
===================================================================
--- functions.c	(revision 9186c75ec164683622b4eac28d412877f724cfef)
+++ functions.c	(revision 66e409c96288dd36cee1498652dc8d6dce9b4c45)
@@ -2280,6 +2280,7 @@
  * instance is NULL then catch all messgaes in the class.  Returns the
  * name of the filter, which the caller must free.
+ * If 'related' is nonzero, encompass unclasses and .d classes as well.
  */
-char *owl_function_classinstfilt(const char *c, const char *i) 
+char *owl_function_classinstfilt(const char *c, const char *i, int related) 
 {
   owl_filter *f;
@@ -2288,14 +2289,21 @@
   char *class, *instance = NULL;
 
-  class = owl_util_baseclass(c);
-  if(i) {
-    instance = owl_util_baseclass(i);
+  if (related) {
+    class = owl_util_baseclass(c);
+    if (i) {
+      instance = owl_util_baseclass(i);
+    }
+  } else {
+    class = owl_strdup(c);
+    if (i) {
+      instance = owl_strdup(i);
+    }
   }
 
   /* name for the filter */
   if (!instance) {
-    filtname = owl_sprintf("class-%s", class);
-  } else {
-    filtname = owl_sprintf("class-%s-instance-%s", class, instance);
+    filtname = owl_sprintf("%sclass-%s", related ? "related-" : "", class);
+  } else {
+    filtname = owl_sprintf("%sclass-%s-instance-%s", related ? "related-" : "", class, instance);
   }
   /* downcase it */
@@ -2329,8 +2337,8 @@
   }
 
-  argbuff = owl_sprintf("class ^(un)*%s(\\.d)*$", tmpclass);
+  argbuff = owl_sprintf(related ? "class ^(un)*%s(\\.d)*$" : "class ^%s$", tmpclass);
   if (tmpinstance) {
     char *tmp = argbuff;
-    argbuff = owl_sprintf("%s and ( instance ^(un)*%s(\\.d)*$ )", tmp, tmpinstance);
+    argbuff = owl_sprintf(related ? "%s and ( instance ^(un)*%s(\\.d)*$ )" : "%s and instance ^%s$", tmp, tmpinstance);
     owl_free(tmp);
   }
@@ -2508,5 +2516,6 @@
   const owl_message *m;
   char *zperson, *filtname=NULL;
-  const char *argv[1];
+  const char *argv[2];
+  int related = owl_global_is_narrow_related(&g);
   
   v=owl_global_get_current_view(&g);
@@ -2553,5 +2562,5 @@
     /* narrow class MESSAGE, instance foo, recip * messages to class, inst */
     if (!strcasecmp(owl_message_get_class(m), "message")) {
-      filtname=owl_function_classinstfilt(owl_message_get_class(m), owl_message_get_instance(m));
+      filtname=owl_function_classinstfilt(owl_message_get_class(m), owl_message_get_instance(m), related);
       return(filtname);
     }
@@ -2559,7 +2568,7 @@
     /* otherwise narrow to the class */
     if (type==0) {
-      filtname=owl_function_classinstfilt(owl_message_get_class(m), NULL);
+      filtname=owl_function_classinstfilt(owl_message_get_class(m), NULL, related);
     } else if (type==1) {
-      filtname=owl_function_classinstfilt(owl_message_get_class(m), owl_message_get_instance(m));
+      filtname=owl_function_classinstfilt(owl_message_get_class(m), owl_message_get_instance(m), related);
     }
     return(filtname);
@@ -2567,8 +2576,7 @@
 
   /* pass it off to perl */
-  if(type) {
-    argv[0] = "-i";
-  };
-  return owl_perlconfig_message_call_method(m, "smartfilter", type ? 1 : 0, argv);
+  argv[0] = type ? "1" : "0";
+  argv[1] = related ? "1" : "0";
+  return owl_perlconfig_message_call_method(m, "smartfilter", 2, argv);
 }
 
Index: variable.c
===================================================================
--- variable.c	(revision 66a8cd6f82c4a4dc47992bd57b12563500abb001)
+++ variable.c	(revision 66e409c96288dd36cee1498652dc8d6dce9b4c45)
@@ -358,4 +358,11 @@
 	       "normal,top,neartop,center,paged,pagedcenter" ),
 
+  OWLVAR_BOOL( "narrow-related" /* %OwlVarStub:narrow_related */, 1,
+               "Make smartnarrow use broader filters",
+               "Causes smartfiler to narrow to messages \"related\" to \n"
+               "the current message, as well as ones to the same place.\n\n"
+               "for Zephyr, this controls whether to narrow to e.g. class-help or\n"
+               "class-help.d alone, or to related-class-help, which includes\n"
+               "help, unhelp, help.d, etc.\n\nDefault is true (include unclasses, etc.).\n" ),
 
   OWLVAR_BOOL( "_followlast" /* %OwlVarStub */, 0,
