Function: idlwave-help-assistant-open-link

idlwave-help-assistant-open-link is a byte-compiled function defined in idlw-help.el.gz.

Signature

(idlwave-help-assistant-open-link &optional LINK)

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/idlw-help.el.gz
(defun idlwave-help-assistant-open-link (&optional link)
  ;; Open a link (file name with anchor, no leading path) in the assistant.
  (let ((help-loc (idlwave-html-help-location))
	topic anchor file just-started exists full-link)

    (if (string-match "\\.html" link)
	(setq topic (substring link 0 (match-beginning 0))
	      anchor (substring link (match-end 0)))
      (error "Malformed help link"))

    (setq file (expand-file-name (concat topic ".html") help-loc))
    (if (file-exists-p file)
	(setq exists t)
      (setq file (expand-file-name
		  (concat (upcase topic) ".html") help-loc))
      (setq exists (file-exists-p file)))

    (setq full-link    (concat file anchor)
	  just-started (idlwave-help-assistant-start (if exists full-link)))
    (if exists
	(progn
	  (if (not just-started)
	      (process-send-string idlwave-help-assistant-socket
				   (concat "openLink " full-link "\n")))
	  (process-send-string idlwave-help-assistant-socket
			       (concat "searchIndexNoOpen " topic "\n")))
      (process-send-string idlwave-help-assistant-socket
			   (concat "searchIndexAndOpen " topic "\n"))))
  (idlwave-help-assistant-raise))