Loading ...
Sorry, an error occurred while loading the content.

Invoking Helpfiles from Me (java-version)

Expand Messages
  • Detlef Groth
    Hello, here are just two macros which allows to inove the java-api-files from the program. Versions for other programming-languages can be made in a similar
    Message 1 of 1 , Feb 15, 2001
    • 0 Attachment
      Hello,

      here are just two macros which allows to inove the java-api-files from
      the program.
      Versions for other programming-languages can be made in a similar
      manner.

      Hope this helps,
      regards,

      By the way, the ME-help-pages are still online at:
      http://www.microemacs.de/findex094/bin/findex.htm

      Detlef

      ; two small macros delivering support for the java-api-help-pages

      ; two variables which must be adjusted individually
      set-variable :java-api-path "F:/java/jdk1.2.2/api/"
      set-variable :browser
      "E:/Programme/Netscape/Communicator/Program/netscape.exe " ; space at
      the end !

      ;simple-invokation of the java-api
      define-macro find-java-api
      shell-command &cat &cat :browser :java-api-path "index.html"
      !emacro

      ; invoke the page in dependence of the marked text
      ; par example if something like `java.io.*' is marked a
      directory-listing for
      ; all io-files will be given
      ; if `java.awt.Button' is marked the java/awt/Button.html page is shown
      define-macro find-java-class-help
      set-variable #l0 @y ; get the marked text
      find-buffer "*temp*" ; do some replacements here
      execute-string #l0
      beginning-of-buffer
      replace-string "\\." "/"
      beginning-of-buffer
      replace-string "\*" ""
      beginning-of-buffer
      set-mark
      end-of-line
      exchange-point-and-mark
      kill-region
      delete-buffer "*temp*"
      !if &sin "*" #l0 ; ie a directory listing
      shell-command &cat &cat :browser :java-api-path @y
      !else ; ie a certain class
      shell-command &cat &cat &cat :browser :java-api-path @y ".html"
      !endif
      -1 yank
      !emacro

      ; two ugly additions into the java-menu you can make shortcuts also
      osd .osd.java-tool 50 "-"
      osd .osd.java-tool 51 "" "open java-api" f find-java-api
      osd .osd.java-tool 52 "" "open java-class-api" f
      find-java-class-help
    Your message has been successfully submitted and would be delivered to recipients shortly.