
(setq help-buffer (make-buffer "*Help*") help-keymap (make-keylist))

(set-buffer-special help-buffer t)

(bind-keys help-keymap "a" (quote apropos-function) "e" (quote apropos-variable) "f" (quote describe-function) "h" (quote help-help) "ctrl-h" (quote help-help) "i" (quote info) "ctrl-i" (quote (info t)) "m" (quote describe-mode) "?" (quote help-help) "v" (quote describe-variable))

(defun help nil (lisp-code "\tHIKF#" [title "Type: a f h i m v -- h for more help" help-keymap next-keymap-path] 2))

(defun help-help nil (lisp-code "\tH\nH†\tH‡\n\tHˆ" [clear-buffer help-buffer insert "\nHelp mode -- Type one of the following:\n\na   `apropos-function'\n\tSearch for functions which match a regular expression.\nf   `describe-function'\n\tView the documentation for a particular function.\nh   `help-help'\n\tDisplay this text.\ni   `info'\n\tEnter the info hypertext viewer.\nm   `describe-mode'\n\tShow the documentation for the edit mode of the current buffer.\nv   `describe-variable'\n\tView the documentation and value of a variable." pos 1 goto-buffer goto help] 5))

(defun apropos-function (&optional regexp) (lisp-code "ÿ€Ž\tF ÿ€ŽH\tH†‡Hˆ‰Š\n\nH‹\tHŒŽŽ\n\t" [regexp prompt "Regular Expression: " return clear-buffer help-buffer format "Apropos for expression %S:\n" print apropos fboundp goto-buffer goto pos 1] 4))

(defun apropos-variable (&optional regexp) (lisp-code "ÿ€Ž\tF ÿ€ŽH\tH†‡Hˆ‰Š\n\nH‹\tH‹Œ\n\t" [regexp prompt "Regular Expression: " return clear-buffer help-buffer format "Apropos for expression %S:\n" print apropos boundp goto pos 1] 4))

(defun describe-function (&optional fun &aux doc) (lisp-code "ÿ€F ÿ€H\tF$H†\tH‡†ˆÿ€¥‰HŠ†\tH‹Œ\n\t" [fun prompt-for-function return documentation doc clear-buffer help-buffer format "\n%s\n" "undocumented." goto-buffer goto pos 1] 4))

(defun describe-variable (&optional var &aux doc) (lisp-code "ÿ€F ÿ€HJ\nF$H†\tH‡†JKˆ‰\tŠ\tÿ€°‹HŒ†\tHŽ\n\t" [var prompt-for-variable return documentation doc clear-buffer help-buffer format "\nsymbol name: %s\ncurrent value: %S\n\n%s\n" symbol-name symbol-value "undocumented." goto-buffer goto pos 1] 6))

(defun describe-mode nil (lisp-code "\tHHD\t5qþ€¤†‡ˆH‰Š‹‹\n\tE" [goto-buffer help-buffer clear-buffer documentation major-mode doc format "\n%s\n" mode-documentation goto pos 1] 4))
