I wrote this function to find functions whose help text doesn't match their name. This causes errors in the function reference.

(block (result)
   (enum (sysGlobals) f
      (if (and (isPrimitive (eval f))
            (gr (count (help f)) 0)
            (not (strFind (help f) f))
         )
         (setq result (cat result "\n\n" f ":\n" (help f)))
      )
   )
   (dbgLog result)
)

It produces:

int:
(objTranslate obj textID [data] [default]) -> text (or Nil)

intTranslate:
(objTranslate obj textID [data] [default]) -> text (or Nil)

objGetOverlayProperty:
(objSetOverlayProperty obj overlayID property) -> value

property

'counter
'counterLabel
'pos
'rotation
'type


objSetOverlayProperty:
(objSetOverlayPos obj overlayID property value)

property:

'counter
'counterLabel
'pos position
'rotation angle


typAddTimerEvent:
(typeAddTimerEvent unid delay event)

delay in ticks
george moromisato 28 Oct 2016:

Fixed in 1.7 Alpha 3. The only one I didn't fix is intTranslate, which is an alias, so always maps to objTranslate.

Note also that I've made a change so that an exact match only ever returns one entry: (help 'int) only returns a single entry. You can force a partial match by appending a *: (help 'int*). If there is no exact match, then we return a partial list as before.

nms 28 Oct 2016:

Thanks! But...
The problem with having a function whose help text starts with the name of a second function is that it causes a duplicate entry for the second function to appear in the function reference list at the location where the first function should be alphabetically.

Please change intTranslate's help either to indicate that it's deprecated, to be blank, or to start with "(intTranslate".

george moromisato 28 Oct 2016:

@nms: Fair enough.

I've fixed it so aliases are not included in the list. That is, (help 'intTranslate) returns Nil. When I run your code above, it returns Nil, which I think means all functions match their names.

assumedpseudonym 28 Oct 2016:

 I’m looking forward to seeing what happens when my function list utilimod plows through all of this, now. ^.^

nms 28 Oct 2016:

I guess that also works. Thanks.

Actually, (help intTranslate) and (fncHelp intTranslate) (no quote) still return lines that begin with "(objTranslate", and (sysGlobals) still includes intTranslate, so the issue with that one is still present.

nms 2 Oct 2017:

While what I wrote in the last comment is true, it's also irrelevant. The script works by calling (fncHelp (eval symbol)), since this seems to be the only way to get the help text for deprecated functions. And (fncHelp (eval 'intTranslate)) is the same as (fncHelp objTranslate), so modifying fncHelp to work differently for aliases wouldn't help.

Instead, we can check for aliases of primitives by (neq (convertTo 'string (eval symbol)) symbol), so this is resolved.