首先,需要下载一个叫做KeyHH 的小工具,KeyHH is a program that augments HTML Help. 有了这个工具之后,可以通过如下命令行来按关键字查询帮助

keyhh -MyID -#klink "keyword"  foobar.chm

于是~/.emacs配置如下就可以了:

;;KeyHH -MyHelp -#klink "ActiveX Control Wizard" htmlhelp.chm
(defun chm-keyword-lookup (typeid help-file)
    "lookup a keyword in a CHM file and display it"
    (interactive)
    (start-process "CHM keyword lookup" nil
       "keyhh.exe"
       (concat "-" typeid) "-#klink"
       (format "'%s'" (thing-at-point 'symbol))
       help-file )
)

;;php
(defun chm-keyword-lookup-php ()
   (interactive)
   (chm-keyword-lookup "PHP" "e:/Apache2.2/php_manual_en.chm")
)

(define-key php-mode-map (kbd "C-h C-k") 'chm-keyword-lookup-php )

;;python
(defun chm-keyword-lookup-py ()
   (interactive)
   (chm-keyword-lookup "PYTHON" "e:/Python24/Doc/ActivePython24.chm")
)

(define-key py-mode-map (kbd "C-h C-k") 'chm-keyword-lookup-py )

 

 

BTW: 对于.hlp文件可以用:

winhlp32 -k keyword path/to/foobar.hlp



相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2021-05-29
  • 2021-12-05
猜你喜欢
  • 2021-11-24
  • 2021-11-19
  • 2022-01-15
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案