branch: externals/idlwave commit 6cae5a09b1c5e661521b89361dce66222887b9b1 Author: JD Smith <jdtsm...@gmail.com> Commit: JD Smith <jdtsm...@gmail.com>
Shutdown the help viewer when closing. --- idlw-help.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/idlw-help.el b/idlw-help.el index 011194b834..d9c3c8dbe7 100644 --- a/idlw-help.el +++ b/idlw-help.el @@ -1292,13 +1292,22 @@ the idlhelp script.") (defun idlwave-help-eclipse-help-command () (expand-file-name idlwave-help-eclipse-help-command (idlwave-sys-dir))) +(defvar idlwave-help-eclipse-hook-added nil) + (defun idlwave-help-eclipse-help-open-link (&optional link) "Start IDL Eclipse-Help (if needed), loading link FULL-LINK, if passed." (let ((command (idlwave-help-eclipse-help-command))) (if (string-match "\.html$" link) ;; Strip HTML, unless anchored (setq link (substring link 0 (match-beginning 0)))) + (if (not idlwave-help-eclipse-hook-added) + (add-hook 'kill-emacs-hook 'idlwave-help-eclipse-kill) + (setq idlwave-help-eclipse-hook-added t)) (apply 'call-process command nil 0 nil (if link `("-topic" ,link))))) +(defun idlwave-help-eclipse-kill () + (let ((command (idlwave-help-eclipse-help-command))) + (call-process command nil 0 nil "-command" "shutdown"))) + ;;----- Control the IDL Assistant, which shipped with IDL v6.2 (defvar idlwave-help-assistant-process nil)