diff src/help.cc @ 625:9cdb3844008b

[project @ 1994-08-19 02:01:31 by jwe]
author jwe
date Fri, 19 Aug 1994 02:02:15 +0000
parents bc813f5eb025
children fcaa09b47acf
line wrap: on
line diff
--- a/src/help.cc
+++ b/src/help.cc
@@ -650,9 +650,29 @@
 	      else if (sym_rec->is_builtin_function ())
 		output_buf << *argv << " is a builtin function\n";
 	      else if (sym_rec->is_user_variable ())
-		output_buf << *argv << " is a user-defined variable\n";
+		{
+		  tree_fvc *defn = sym_rec->def ();
+
+		  if (nargout == 0 && ! quiet)
+		    output_buf << *argv << " is a user-defined variable\n";
+
+		  defn->print_code (output_buf);
+
+		  if (nargout == 0)
+		    output_buf << "\n";
+		}
 	      else if (sym_rec->is_builtin_variable ())
-		output_buf << *argv << " is a builtin variable\n";
+		{
+		  tree_fvc *defn = sym_rec->def ();
+
+		  if (nargout == 0 && ! quiet)
+		    output_buf << *argv << " is a builtin variable\n";
+
+		  defn->print_code (output_buf);
+
+		  if (nargout == 0)
+		    output_buf << "\n";
+		}
 	      else
 		output_buf << "type: `" << *argv << "' has unknown type!\n";
 	    }