home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / packages / HyperActiveFTP / active-hyper.el < prev    next >
Encoding:
Text File  |  1992-04-29  |  3.7 KB  |  122 lines

  1.  
  2. ;;;
  3. ;;; Begin Active Hyper Stuff For .emacs file
  4. ;;;
  5.  
  6. (defun active-hyper:update-big-list ()
  7.   (interactive)
  8.   (find-file "active-hyper.menu.update.big.list")
  9.   (delete-other-windows)
  10.   (split-window-vertically)
  11.   (let ((MSG "Site not added to Frequent List. ")
  12.     (aha (concat "*    " (read-from-minibuffer "Topic of New Site (return if none) ")))
  13.     (ahb (concat "**   " (read-from-minibuffer "Files at New Site (return if none) ")))
  14.     (ahc (concat "***  " (read-from-minibuffer "Describe the Site/Files (return if none) ")))
  15.     (ahd (concat "**** " (read-from-minibuffer "Complete the ange-ftp pathname " "\"/anonymous@"))))
  16.   (if (y-or-n-p "Add this site to your frequent list? ")
  17.       (progn
  18.     (setq MSG "Added to Frequent List. ")
  19.     (find-file "active-hyper.list.frq.otl")
  20.     (goto-char (point-max))
  21.     (insert "\n")
  22.     (insert (concat "\n" aha "\n" ahb "\n" ahc "\n" ahd "\n\n"))
  23.     (save-buffer)))
  24.     (mail)
  25.     (delete-other-windows)
  26.     (mail-to)
  27.     (insert "brannon@jove.cs.caltech.edu")
  28.     (mail-subject)
  29.     (insert (concat "New ftp Site "))
  30.     (goto-char (point-max))
  31.     (insert "
  32. Hi Terrence, add this ftp site to the big ftp site list.
  33.  
  34. Note: this site will be added to the file active-hyper.list.new and will be
  35. accessible  by clicking on the new sites button near the top of the file
  36. active-hyper.list.big.otl. When a new release of HyperActiveFTP comes out it
  37. will be transferred to the file named active-hyper.list.big.otl.
  38.  
  39. (I, Terrence thank you in advance for your contribution)
  40. ")
  41.  
  42.     (insert (concat "\n" aha "\n" ahb "\n" ahc "\n" ahd "\n"))
  43.   (message (concat MSG "C-c C-c to send message to the moderator"))
  44.   (kill-buffer "active-hyper.menu.update.big.list")))
  45.          
  46.  
  47. (defun active-hyper:get-hyper()
  48.   (interactive)
  49.   (if (one-window-p)
  50.       (progn
  51.     (find-file (concat ah-install-directory
  52.                "active-hyper.menu.main"))
  53.     (goto-char (point-min)))
  54.     (progn
  55.       (find-file-other-window (concat ah-install-directory
  56.                       "active-hyper.menu.main"))
  57.       (goto-char (point-min))))
  58.   (recenter '(0)))
  59.  
  60. (defun active-hyper:display-topics ()
  61.   (goto-char (point-min))
  62.   (while (re-search-forward "^\*[^*].*$" (point-max) "x")
  63.     (hide-subtree))
  64.   (goto-char (point-min))
  65.   (while (re-search-forward "[\n]$" (point-max) t)
  66.     (progn
  67.       (backward-char 3)
  68.       (replace-regexp "[\n]$" "" nil)))
  69.   (goto-char (point-min))
  70.   (while (re-search-forward "[<]+[(]+.*[)]+[>]+" (point-max) t)
  71.     (progn
  72.       (backward-char 8)
  73.       (replace-regexp "[<]+[(]+.*[)]+[>]+" "" nil))))
  74.  
  75. (defun active-hyper:prevent-save ()
  76.   (progn
  77.     (define-key outline-mode-map"\C-x\C-s" 'active-hyper:nosave)
  78.     (define-key outline-mode-map "\C-xs" 'active-hyper:nosave)))
  79.  
  80. (defun active-hyper:nosave()
  81.   (interactive)
  82.   (message "Do not attempt to save this buffer. Ever"))
  83.  
  84. (defun active-hyper:view-compressed-file (filename)
  85.   (let ((E (make-temp-name "/tmp/")))
  86.     (setq aha (concat E ".Z"))
  87.     (setq max-lisp-eval-depth 1000)
  88.     (copy-file filename aha t)
  89.     (shell-command (concat "uncompress " aha))
  90.     (kill-buffer "*Shell Command Output*")
  91.     (delete-other-windows)
  92.     (view-file E))
  93.   (makunbound 'aha))
  94.   
  95.  
  96. (defun active-hyper:sort-buffer ()
  97.   (untabify (point-min) (point-max))
  98.   (sort-lines nil (point-min) (point-max)))
  99.  
  100. (defun active-hyper:outline-quickdoc ()
  101.   (goto-char (point-min))
  102.   (insert "C-c C-s to show the full entry
  103. <(Top Level)>
  104. <(Show All Fields of Entries)>
  105. <(Frequent FTP Sites)>")
  106.   (goto-char (point-max))
  107.   (insert "C-c C-s to show the full entry
  108. <(Top Level)>
  109. <(Show All Fields of Entries)>
  110. <(Frequent FTP Sites)>")
  111.   (insert (concat "\n" "<(Top of File)>")))
  112.       
  113. (defun active-hyper:credits ()
  114.   (delete-other-windows)
  115.   (view-file "active-hyper.credits")
  116.   (goto-char (point-min)))
  117.  
  118.  
  119. ;;;
  120. ;;; End Active Hyper Stuff
  121. ;;;
  122.