home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / me34src.zip / me3 / mutt / builtin / help.mut < prev    next >
Text File  |  1995-01-14  |  2KB  |  80 lines

  1. ;; A "help" system built on top of the doc system.
  2. ;; C Durland  6/93 Public Domain
  3.  
  4. (const WEB-PACKAGE    "web")
  5.  
  6. (defun
  7.   help { (pop-help 0) }
  8.   pop-help (int n) HIDDEN
  9.   {
  10.     (if (not (load-code WEB-PACKAGE FALSE TRUE))
  11.       {
  12.     (msg "Sorry - I can't load the help system.")
  13.     (done)
  14.       })
  15.  
  16.     (query-menu n (floc help-do-it)
  17.       ">Help Topics"
  18.       "Quick Reference"
  19.       "ME Documentation"
  20.       "ME Packages"
  21.       "Regular Expressions"
  22.       "ME Mutt Extensions"
  23.       "Mutt Language Documentation"
  24.       "Commands and Key Bindings"
  25.       "Apropos"
  26.       "Mode Documentation"
  27.       "Your choice"
  28.     )
  29.   }
  30.   help-do-it (int n)(string name) HIDDEN
  31.   {
  32.     (string xxx)
  33.  
  34.     (switch n
  35.       1  (web-manual    "qref.doc")
  36.       2     (web-manual    "me3.doc")
  37.       3     (web-manual    "package.doc")
  38.       4     (web-manual    "regexp.doc")
  39.       5     (web-manual    "me3mutt.doc")
  40.       6     (web-manual    "mutt2.doc")
  41.       7
  42.         {
  43.       (current-window (describe-bindings))
  44.       (web-mode)
  45.     }
  46.       8  { (ask-user)(apropos) }
  47.       9
  48.         {
  49.       (ask-user)
  50.       (xxx (concat (ask "Name of mode"
  51.         (if (== "" (major-mode))
  52.           ": "
  53.           (concat " [return for " (major-mode) "]: ")))))
  54.       (if (== "" xxx)
  55.         {
  56.           (if (!= "" (major-mode))
  57.             (web-word (concat (major-mode) "-mode")))
  58.           (done)
  59.         })
  60.       (web-word (concat xxx "-mode"))
  61.     }
  62.       10 { (ask-user)(web-word) }
  63.     )
  64.   }
  65. )
  66.  
  67. (defun
  68.   need-help (int type)
  69.   {
  70.     (if (== 0 (HELP)) (done))        ;; Don't want help
  71.     (if (load-code WEB-PACKAGE FALSE TRUE)
  72.       {
  73.     (pop-help 7)
  74.       }
  75.       {
  76.     (describe-bindings)
  77.       })
  78.   }
  79. )
  80.