home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
me_cd.arc
/
NOMUNGE.MUT
< prev
next >
Wrap
Text File
|
1988-09-07
|
1KB
|
41 lines
;; nomunge.mut :
;; Make the file in the current buffer unmungeable - ie allow
;; no changes to buffer contents.
;; Note that this method is full of holes but works OK for people not
;; going out of their way to munge the buffer.
(include me.h)
(include asc.mut)
(defun
self-nomunge { (msg "buffer unmungeable!") }
nomungeCR { (forward-line 1) }
buffer-nomunge
{
(int i)
(string str 10)
(for (i 0x20) (< i 0x7F) (+= i 1)
(bind-local-key "self-nomunge" (asc i str)))
(bind-local-key "self-nomunge" "C-d")
(bind-local-key "self-nomunge" "C-H")
(bind-local-key "self-nomunge" "C-d")
(bind-local-key "self-nomunge" "C-xC-s")
(bind-local-key "self-nomunge" "C-q")
(bind-local-key "self-nomunge" "C-k")
(bind-local-key "self-nomunge" "C-o")
(bind-local-key "self-nomunge" "M-Q")
(bind-local-key "self-nomunge" "C-T")
(bind-local-key "self-nomunge" "C-I")
(bind-local-key "self-nomunge" "C-Y")
(bind-local-key "self-nomunge" "M-d")
(bind-local-key "nomungeCR" "C-m")
(bind-local-key "nomungeCR" "C-j")
(file-name -1 "")
(buffer-flags -1 BFNoCare)
}
)