home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / may94 / util / edit / jade.lha / Jade / lisp / info.jlc < prev    next >
Text File  |  1994-04-20  |  6KB  |  45 lines

  1.  
  2. (provide (quote info))
  3.  
  4. (defvar info-directory (if (amiga-p) "INFO:" "/usr/local/info/") 58025)
  5.  
  6. (unless (boundp (quote info-initialised)) (put (quote info-error) (quote error-message) "Info") (setq info-keymap (make-keytab) info-buffer (make-buffer "*Info*") info-tags-buffer (make-buffer "*Info tags*") info-history nil info-file-name nil info-node-name nil info-file-modtime nil info-indirect-list nil info-initialised t) (bind-keys info-keymap "space" (quote next-screen) "backspace" (quote prev-screen) "1" (quote (info-menu-nth 1)) "2" (quote (info-menu-nth 2)) "3" (quote (info-menu-nth 3)) "4" (quote (info-menu-nth 4)) "5" (quote (info-menu-nth 5)) "b" (quote goto-file-start) "f" (quote info-follow-ref) "g" (quote info-goto-node) "l" (quote info-last) "m" (quote info-menu) "n" (quote info-next) "p" (quote info-prev) "q" (quote info-quit) "u" (quote info-up)) (set-buffer-special info-buffer t) (set-buffer-special info-tags-buffer t) (with-buffer info-buffer (setq keymap-path (cons info-keymap keymap-path)) (set-buffer-read-only info-buffer t)))
  7.  
  8. (defun info-read-tags (filename) (lisp-code "D\n\tI456††ÿ€™‡ˆ*}H‰±ŠHIF&‹HŒ†J F$Hþ€¼ŽJ þ‰†\tF$þ€Ð‘’\n]þ€õ“”•– \t—”˜– \nK‹KF&‹Hû€¿H™‹\tF&‹HŒ†šJ F$Hþ•Ž›J ü œ†\tû¥‡}H&žŸ\tF& HJG±HE" [open filename "r" path-name str dir file info-error "Can't open info file" info-tags-buffer clear-buffer info-indirect-list read-file-until "^(Tag Table:|Indirect:) *\n$" regexp-match "Indirect" read-line string-head-eq "" read-from-string regexp-expand "^.*: ([0-9]+)\n$" "\\1" concat "^(.*): [0-9]+\n$" nreverse "^Tag Table: *\n$" "Tag Table" read-buffer ("No tag table in info file") info-file-name file-modtime info-file-modtime] 8))
  9.  
  10. (defun info-remember nil (lisp-code "þ€…þ€‘+KF#" [info-file-name info-node-name cursor-pos info-history] 3))
  11.  
  12. (defun info-find-node (nodename) (lisp-code "D I45ü–†\tÿ€ì†‡ˆ\n\tü€«‡ˆ\nF%û€ì†‡‰\n\tü€Â‡‰\nF%û€ì†‡‰ˆ \tü€Ý‡‰ˆ F%û€ìJü€ëŠ‹*}û€ìIHŒ`]ÿ€ü\tŽdþƒ\tH F\"ÿ“‘F\"û«Œþ£Œ\tŽdþ«Œ\tHŒÿ»‡‰’\n\tHD‡“” II6•6–6—˜—™šš\n›J ü‚ùœ›K\tF$HžlüýŸV$ŒF&–û‚« ¡sH–žLaü‚•ŸVF$û‚¤–LXžLLVŸVF$H–MF&–H¢–£ F&•ü‚拉I\nH¦H§•\tH¤¥J\nH¨HF&©H‡ª«Œ\t¬© F&­û‚öŠ®*}ûƒ€Š¯*}EE" [regexp-expand "^\\((.*)\\).*$" nodename "\\1" offset filename file-exists-p concat ".info" info-directory info-error "Can't find file" info-file-name file-modtime info-file-modtime info-read-tags "^\\(.*\\)(.+)$" "Top" "dir" "^Node: " 127 text subfile regexp find-next-regexp pos 1 info-tags-buffer read find-last-end-pos info-indirect-list 2 (lisp-code "D1Mþ€¢MLLfþ€™LF#HItHMF!Hû€ƒHLF#E" [info-indirect-list list offset subfile info] 2) (quote info) read-file-from-to 31 set-buffer-read-only info-buffer clear-buffer insert goto-file-start info-node-name 40 base-name 41 mode-name "Can't read from file" "Can't find node"] 5))
  13.  
  14. (defun info-list-nodes (start) (lisp-code "D I45†±‡HˆIIJ þ€±‰Š\tH‹ŒIIJKF$Hû€G±HHE" [concat "^Node: (" start ".*)" list regexp info-tags-buffer goto-file-start find-next-regexp goto find-last-end-pos regexp-expand-line "\\1"] 7))
  15.  
  16. (defun info-prompt (list-fun &optional title default start) (lisp-code "ÿ€‡F Hþ€” F H†ÿ€Ÿ‡F&†HDII6ˆ6‰Š‹† F&‰H‰‡`ü€¿û€Á‰E" [title "Select node" default concat " (default: " ")" start "" prompt-list res prompt2 (lambda (w) (lisp-code "ÿ€Ž±\tF G±HH\t" [prompt-list info-buffer funcall list-fun prompt-complete-from-list w] 3))] 5))
  17.  
  18. (defun info (&optional start-node) 58090 (lisp-code "H\tHü€‘\tû€¦þ€—†ÿ€¦Jü€¥‡\tû€¦I" [info-remember goto-buffer info-buffer start-node info-find-node info-file-name info-node-name "(dir)"] 2))
  19.  
  20. (defun info-goto-node nil (lisp-code "D\t2þ€H\tE" [prompt "Goto node: " node info-remember info-find-node] 2))
  21.  
  22. (defun info-parse-menu-line nil (lisp-code "\nÿ€’\nÿ€’\n" [regexp-expand-line "^\\* ([a-zA-Z0-9]+.*)::" "\\1" "^\\* [a-zA-Z0-9]+.*: *(\\(.*\\).*)\\." "^\\* [a-zA-Z0-9]+.*: *(.*)\\."] 3))
  23.  
  24. (defun info-list-menu-items nil (lisp-code "DI12\tþ€ †\tH‡ˆ‰\nKF\"Hû€†HE" [cursor-pos opos list find-next-regexp "^\\* [a-zA-Z0-9]+.*:" goto find-last-end-pos regexp-expand-line "^\\* ([^:.]+)" "\\1"] 3))
  25.  
  26. (defun info-goto-menu-start nil (lisp-code "IIJ ÿ€IIJ þ€™†\n\t" [find-prev-regexp "^\\* Menu: *$" find-next-regexp goto next-line 1 find-last-start-pos] 5))
  27.  
  28. (defun info-menu-nth (item-index) (lisp-code "ÿ€‰)}Hdþ€”†\tþ€¥‡ˆ\tHiF#Hû€ŠHcþ€±‰)}HŠHD‹6ŒŒü€ÍHŽŒ\tû€Ò)}E" [info-goto-menu-start info-error "Can't find menu" item-index 0 find-next-regexp "^\\* .*:" goto find-last-end-pos "Can't find menu node" goto-line-start info-parse-menu-line nodename info-remember info-find-node "Menu line malformed"] 2))
  29.  
  30. (defun info-menu nil (lisp-code "D\n3þ€¡D6†‡ˆ‰ F#HŠ†\tEHþ€â‹ŒŽ \tü€ÛŠ\tHD6‘‘ü€Ñ’H“‘\tû€×”•)}Eû€â”–*}E" [regexp-expand-line "^\\* ([^:.]+)" "\\1" menu-name info-goto-menu-start cursor-pos opos info-prompt info-list-menu-items "Menu item" goto find-next-regexp concat "^\\* " 58 find-last-start-pos info-parse-menu-line node-name info-remember info-find-node info-error "Menu line malformed" "Can't find menu"] 5))
  31.  
  32. (defun info-follow-ref nil (lisp-code "I" [] 1))
  33.  
  34. (defun info-last nil (lisp-code "ü€©DL1MF HL†P \tþ€¥‡ˆP\tHJEû€²‰Š\tH‹" [info-history hist info-find-node concat 40 41 1 goto 2 title "No more history" beep] 7))
  35.  
  36. (defun info-next nil (lisp-code "\t" [info-find-link "Next"] 2))
  37.  
  38. (defun info-prev nil (lisp-code "\t" [info-find-link "Prev"] 2))
  39.  
  40. (defun info-up nil (lisp-code "\t" [info-find-link "Up"] 2))
  41.  
  42. (defun info-find-link (link-type) (lisp-code "D\n3†‡‡\nIJ6ˆˆü€¦‰HŠˆ\tû€´‹Œ \tHŽE" [concat link-type ": ([^,]*)(,| *$)" regexp regexp-expand-line "\\1" pos 1 new-node info-remember info-find-node title "No " " node" beep] 6))
  43.  
  44. (defun info-quit nil (lisp-code "\t" [kill-buffer info-buffer] 2))
  45.