Xref: utzoo comp.emacs:6122 gnu.emacs.bug:804 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsh!ho5cad!wjc From: wjc@ho5cad.ATT.COM (Bill Carpenter) Newsgroups: comp.emacs,gnu.emacs.bug Subject: how to not lock-buffer? Message-ID: Date: 19 May 89 10:56:39 GMT Sender: nntp@cbnewsh.ATT.COM Organization: AT&T Bell Laboratories Lines: 33 (Using 18.54 on a SUN) GNUemacs uses the two functions "lock-buffer" and "unlock-buffer" to watch out for two GNUemacses editing the same file (on systems that support its scheme for noticing it). I once saw someplace (sorry, don't remember where) the advice that to disable file locking, just do something like this: (fset 'lock-buffer 'ignore) (fset 'unlock-buffer 'ignore) I tried it. Trouble is, the lock still happens. (I've even tried using "beep" instead of "ignore"; same result, no beep.) I also tried making a new defun for "lock-buffer" to try to clobber the old one, but no luck. The original definition shines through (probably something to do with it being defined in C instead of lisp [src/filelock.c]). So, does anyone know of a way to turn file-locking on and off? Yes, I know I can compile it out when I build GNUemacs. I also know I can define the lockfile directory as something impossible or with unwritable perms at compile time. But I only want to get rid of it for me, and then only when I say so ... not all the time or for all users. (I also know I can track down all the occurences of (lock-buffer) in the elisp and clobber them, but you know that's not the kind of solution I'm looking for. If I were, I'd rather change the DEFUN of lock-file in the C code to lock-file-really-really and then put an (fset 'lock-file 'lock-file-really-really) someplace in the preloaded stuff. Then the original scheme would work, I think.) -- Bill Carpenter att!ho5cad!wjc or attmail!bill