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 >
Wrap
Text File
|
1994-04-20
|
6KB
|
45 lines
(provide (quote info))
(defvar info-directory (if (amiga-p) "INFO:" "/usr/local/info/") 58025)
(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)))
(defun info-read-tags (filename) (lisp-code "D\n\tI456ÿ*}H±HIF&HJF$Hþ¼Jþ\tF$þÐ\n]þõ\t\nKKF&Hû¿H\tF&HJF$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))
(defun info-remember nil (lisp-code "þ þ+KF#" [info-file-name info-node-name cursor-pos info-history] 3))
(defun info-find-node (nodename) (lisp-code "DI45ü\tÿì\n\tü«\nF%ûì\n\tüÂ\nF%ûì\tüÝF%ûìJüë*}ûìIH`]ÿü\tdþ\tHF\"ÿF\"û«þ£\tdþ«\tHÿ»\n\tHDII666\nJüùK\tF$HlüýV$F&û« ¡sHLaüVF$û¤LXLLVVF$HMF&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))
(defun info-list-nodes (start) (lisp-code "DI45±HIIJþ±\tHIIJKF$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))
(defun info-prompt (list-fun &optional title default start) (lisp-code "ÿF HþF HÿF&HDII66F&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))
(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))
(defun info-goto-node nil (lisp-code "D\t2þH\tE" [prompt "Goto node: " node info-remember info-find-node] 2))
(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))
(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))
(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))
(defun info-menu-nth (item-index) (lisp-code "ÿ)}Hdþ\tþ¥\tHiF#HûHcþ±)}HHD6üÍ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))
(defun info-menu nil (lisp-code "D\n3þ¡D6F#H\tEHþâ\tüÛ\tHD6üÑ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))
(defun info-follow-ref nil (lisp-code "I" [] 1))
(defun info-last nil (lisp-code "ü©DL1MF HLP\tþ¥P\tHJEû²\tH" [info-history hist info-find-node concat 40 41 1 goto 2 title "No more history" beep] 7))
(defun info-next nil (lisp-code "\t" [info-find-link "Next"] 2))
(defun info-prev nil (lisp-code "\t" [info-find-link "Prev"] 2))
(defun info-up nil (lisp-code "\t" [info-find-link "Up"] 2))
(defun info-find-link (link-type) (lisp-code "D\n3\nIJ6ü¦H\tû´\tHE" [concat link-type ": ([^,]*)(,| *$)" regexp regexp-expand-line "\\1" pos 1 new-node info-remember info-find-node title "No " " node" beep] 6))
(defun info-quit nil (lisp-code "\t" [kill-buffer info-buffer] 2))