octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64286] `type` misidentifies things as user-de


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #64286] `type` misidentifies things as user-defined functions
Date: Fri, 9 Jun 2023 06:52:41 -0400 (EDT)

Update of bug #64286 (project octave):

                  Status:                    None => Patch Submitted        

    _______________________________________________________

Follow-up Comment #1:

This patch seems to fix it:


diff -r 4ae5e5b62481 scripts/help/type.m
--- a/scripts/help/type.m       Thu Jun 08 20:25:35 2023 -0400
+++ b/scripts/help/type.m       Fri Jun 09 06:48:22 2023 -0400
@@ -97,8 +97,9 @@ function text = type (varargin)
       if (quiet)
         txt = contents;
       else
-        txt = sprintf ("%s is the user-defined function defined from:
%s\n\n%s",
-                        name, file, contents);
+        tmp = __which__ (name);
+        txt = sprintf ("%s is the %s defined from: %s\n\n%s",
+                        name, tmp.type, file, contents);
       endif
     elseif (e == 3)
       txt = sprintf ("%s is a dynamically-linked function", name);


Is it OK to make this change on stable?

There's also a BIST that requires the string "user-defined function" to be
returned -- can that be changes as well or is that required for Matlab
compatibility?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64286>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]