Deprecate __keywords__ internal function?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Deprecate __keywords__ internal function?

Rik-4
2/24/15

All,

Is there any objection to getting rid of the __keywords__ function?  It is
located in help.cc and returns a list of keywords for which there is help
text.  However, this is not the full list of keywords as returned by the
iskeyword() function.  The latter function is based directly on what the
parser knows as keywords and includes the new classdef keywords like
"properties" for which no documentation has yet been written.

The only place I see this function used is

libgui/src/m-editor/file-editor-tab.cc:535:              add_octave_apis
(F__keywords__ ());       // add new entries

I changed this to Fiskeyword () and the code compiles fine, although I
still don't get properties/endproperties as keywords in the built-in editor.

--Rik

Reply | Threaded
Open this post in threaded view
|

Re: Deprecate __keywords__ internal function?

Søren Hauberg

Den 24-02-2015 kl. 18:39 skrev Rik:
> Is there any objection to getting rid of the __keywords__ function?  It is
> located in help.cc and returns a list of keywords for which there is help
> text.
This function was introduced in order to automatically generate html
documentation (see e.g. http://octave.sourceforge.net/operators.html).
Perhaps there is a smarter way of doing that nowadays?

Søren

Reply | Threaded
Open this post in threaded view
|

Re: Deprecate __keywords__ internal function?

Torsten-2
In reply to this post by Rik-4
On 24.02.2015 18:39, Rik wrote:

> 2/24/15
>
> All,
>
> Is there any objection to getting rid of the __keywords__ function?  It is
> located in help.cc and returns a list of keywords for which there is help
> text.  However, this is not the full list of keywords as returned by the
> iskeyword() function.  The latter function is based directly on what the
> parser knows as keywords and includes the new classdef keywords like
> "properties" for which no documentation has yet been written.
>
> The only place I see this function used is
>
> libgui/src/m-editor/file-editor-tab.cc:535:              add_octave_apis
> (F__keywords__ ());       // add new entries
>
> I changed this to Fiskeyword () and the code compiles fine, although I
> still don't get properties/endproperties as keywords in the built-in editor.
>

Try to delete the *.pap files in

$HOME/.config/octave/3.9.1+/qsci

where prepared information for autocompletion is saved. After opening an
m-file the new keywords should show up in the autocompletion list.
However, the highlighting depends on QsciScintilla's lexer.

Torsten