ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nascif A. Abousalh Neto" <>
Subject RE: Where is Antidote? - try emacs for now
Date Wed, 06 Feb 2002 23:21:13 GMT
I use plain sgml-mode, I like the syntax coloring and indentation resources better.

Anyway, because I also could not remember all the options for the Ant tasks/types, I created
a small hack to create a simple "context-sensitive" help based 
on the keyword under point (the command is called jde-ant-manual-find-tag).

It assumes that the Ant User Manual is installed on the current machine in its regular place.
It wouldn't be hard to extend it to point to the version on the web.

Still needs to be refined for the Optional Tasks (names don't map nicely to html files) and
to handle anchors (need to copy code from jde-help.el)


;; ------------------------------------------------------------
; Provides context help for Ant task and core types 
; (using local Ant HTML manual)
(defvar jde-ant-manual-sections
    (("using" "buildfile")
    (("using" "path")
    (("using" "references")

(defun jde-ant-manual-find-section (tag sections)
  (if sections
      (if (member tag (cadar sections))
          (caar sections)
        (jde-ant-manual-find-section tag (cdr sections)))))

(defun build-ant-manual-url (ant-manual-section)
   (if (string= "" jde-ant-home)
       (jde-normalize-path (getenv "ANT_HOME"))
     (jde-normalize-path jde-ant-home)) 
   (if (atom ant-manual-section)
     (concat ant-manual-section "/" tag ".html")
     ; not working, check JDE mailing list
     (concat (car ant-manual-section) ".html#" (cadr ant-manual-section)))))
(defun jde-ant-manual-find-tag (tag)
  (interactive (list (read-string "tag: " (current-word))))
  (let ((ant-manual-section (jde-ant-manual-find-section (downcase tag) jde-ant-manual-sections)))
    (if ant-manual-section
        (browse-url (build-ant-manual-url ant-manual-section))
      (message "unkonwn tag"))))

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message