Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 Windows CHM integration

closed-out-of-date
nobody
None
5
2007-11-05
2004-04-09
Reini Urban
No

I used the following (X)Emacs hooks to integrate the
CHM into the php-mode:
Use the attached two files plus the following .emacs
snippet, which overrides the php-mode function (which
normally calls MSIE)

This binary is compiled for XEmacs support.
I didn't associate it with F1, rather with c-C c-f

Should I put a webpage with the code and support files,
so you can link to this page to download the binaries?
-----------------------------------------------
;;; php chm winhelp
(defvar php-hhelp-file
"R:\\php\\manual\\php_manual_en.chm"
"PHP Manual")
(defvar php-hhelp-command
(if (file-exists-p (concat (getenv "EMACS_DIR")
"\\site-packages\\bin\\w32hhelp.exe"))
(concat (getenv "EMACS_DIR")
"\\site-packages\\bin\\w32hhelp.exe")
)
"This is the path to the command to open the chm")

(defun php-hhelp-on-topic (file &rest topic)
"*Get help from the specified Windows help FILE for
the specified TOPIC"
(interactive "fName of help file: ")
(let
(setq-default shell-file-name '"cmdproxy.exe")
(setq command (apply 'concat topic))
(call-process php-hhelp-command nil 0 nil file
command)))
;; Define function documentation function
(defun php-search-chm-documentation ()
"Search PHP documentation for the word at the point."
(interactive)
;(browse-url (concat php-search-url (current-word t)))
(php-hhelp-on-topic php-hhelp-file (current-word t))
)
(add-hook 'php-mode-user-hook
'(lambda()
(define-key php-mode-map
"\C-c\C-f"
'php-search-chm-documentation)
))

Discussion

  • Reini Urban
    Reini Urban
    2004-04-09

    w32hhelp c source + xemacs binary (zipped)

     
    Attachments
    • status: open --> closed-out-of-date
     
  • Logged In: YES
    user_id=25294
    Originator: NO

    Your modified use of PHP mode would be a good thing to mention on the Emacs Wiki.