home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / mutt / nomunge.mut < prev    next >
Text File  |  1988-09-07  |  1KB  |  41 lines

  1.   ;; nomunge.mut :
  2.   ;; Make the file in the current buffer unmungeable - ie allow
  3.   ;;   no changes to buffer contents.
  4.   ;; Note that this method is full of holes but works OK for people not
  5.   ;;   going out of their way to munge the buffer.
  6.  
  7. (include me.h)
  8. (include asc.mut)
  9.  
  10. (defun
  11.   self-nomunge { (msg "buffer unmungeable!") }
  12.   nomungeCR { (forward-line 1) }
  13.   buffer-nomunge
  14.   {
  15.     (int i)
  16.     (string str 10)
  17.  
  18.     (for (i 0x20) (< i 0x7F) (+= i 1)
  19.       (bind-local-key "self-nomunge" (asc i str)))
  20.  
  21.     (bind-local-key "self-nomunge"    "C-d")
  22.     (bind-local-key "self-nomunge"    "C-H")
  23.     (bind-local-key "self-nomunge"    "C-d")
  24.     (bind-local-key "self-nomunge"    "C-xC-s")
  25.     (bind-local-key "self-nomunge"     "C-q")
  26.     (bind-local-key "self-nomunge"    "C-k")
  27.     (bind-local-key "self-nomunge"    "C-o")
  28.     (bind-local-key "self-nomunge"    "M-Q")
  29.     (bind-local-key "self-nomunge"    "C-T")
  30.     (bind-local-key "self-nomunge"    "C-I")
  31.     (bind-local-key "self-nomunge"    "C-Y")
  32.     (bind-local-key "self-nomunge"    "M-d")
  33.  
  34.     (bind-local-key "nomungeCR"        "C-m")
  35.     (bind-local-key "nomungeCR"        "C-j")
  36.  
  37.     (file-name -1 "")
  38.     (buffer-flags -1 BFNoCare)
  39.   }
  40. )
  41.