newlisp docs and various editors

Started by Tim Johnson, June 29, 2006, 09:17:59 AM

Previous topic - Next topic

Tim Johnson

While setting up a newlisp editor mode for emacs, I wrote an

application in rebol that parsed newlisp documentation and created

elisp data structures for emacs to use.



I first 'massaged' the documentation, inserting "tags" to provide some

sort of delimiting for the parsing operation.



1)Perhaps a I missed something, so can anyone offer a method to

   parse without the 'massaging'?



2)This same method can be modified to provide .txt helpfiles for vim.

   If any vim users are interested give me a 'holler'. I used to work

   with vim a lot, but it's been a while, so I will need to refresh my

   understanding of vim helpfile layouts.



3)Perhaps the same method can be used for other editors, too.



4)For myself, I'm nowhere without documentation and like to

write same for my own libraries. Programming is an "open book test"

for me. :-)



tim
Programmer since 1987. Unix environment.

Lutz

#1
the text web browser: lynx does a good job of formatting newlisp_manual.html for text output. Perhaps the following function can somehow help you:



(define-macro (help func)
  (if (primitive? (eval func))
        (let (func-name (name func))
                (if (ends-with func-name "?") (replace "?" func-name "p"))
        (!  (format "lynx /usr/share/newlisp/doc/newlisp_manual.html#%s" func-name)))
    (format "%s is not a built-in function" (name func))))

; try the following

(help list?)


Lutz

Tim Johnson

#2
Quote from: "Lutz"the text web browser: lynx does a good job of formatting newlisp_manual.html for text output. Perhaps the following function can somehow help you:



(define-macro (help func)
  (if (primitive? (eval func))
        (let (func-name (name func))
                (if (ends-with func-name "?") (replace "?" func-name "p"))
        (!  (format "lynx /usr/share/newlisp/doc/newlisp_manual.html#%s" func-name)))
    (format "%s is not a built-in function" (name func))))

; try the following

(help list?)


Lutz

Yes. That may very well be the way to go. It looks like it would work

sort of like the rebol 'help function.

Thanks

tim
Programmer since 1987. Unix environment.