;ELC ;;; compiled by cthomp@willow on Wed Aug 25 17:54:07 1993 ;;; from file /era/era-working/editor/lisp/prim/userlock.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.16; 8-aug-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "#MM#MMMM" [put file-locked error-conditions (file-locked file-error error) ask-user-about-lock-minibuf #[(fn opponent) "" [((byte-code " #Ɖ \n*  U  \" !! A=  A= E\")) A)" [nil answer message "%s is locking %s: action (s, q, p, ?)? " opponent fn t cursor-in-echo-area inhibit-quit read-char quit-flag tem help-char ask-user-about-lock-help assoc ((115 . t) (113 . yield) (7 . yield) (112) (63 . help)) beep "Please type q, s, or p; or ? for help" sit-for 3 help yield signal file-locked "File is locked"] 6))] 1] ask-user-about-lock-help #[nil "!" ["*Help*" princ "It has been detected that you want to modify a file that someone else has\nalready started modifying in EMACS.\n\nYou can teal the file; The other user becomes the\n intruder if (s)he ever unmodifies the file and then changes it again.\nYou can

roceed; you edit at your own (and the other user's) risk.\nYou can uit; don't modify this file."] 3] file-supersession (file-supersession file-error error) ask-user-about-supersession-threat-minibuf #[(fn) "" [((byte-code " !\" ) \nU˪ \"A !! =  = D\")2!)" [nil answer message "%s changed on disk; really edit the buffer? (y, n or C-h) " file-name-nondirectory fn t cursor-in-echo-area read-char tem help-char help assoc ((110 . yield) (7 . yield) (121 . proceed) (63 . help)) beep "Please type y or n; or ? for help" sit-for 3 ask-user-about-supersession-help yield signal file-supersession "File changed on disk" "File on disk now will become a backup file if you save these changes." buffer-backed-up] 5))] 1] ask-user-about-supersession-help #[nil "!" ["*Help*" princ "You want to modify a buffer whose disk file has changed\nsince you last read it in or saved it with this buffer.\n\nIf you say `y' to go ahead and modify this buffer,\nyou risk ruining the work of whoever rewrote the file.\nIf you say `n', the change you started to make will be aborted.\n\nUsually, you should type `n' and then `M-x revert-buffer',\nto get the latest version of the file, then make the change again."] 3] ask-user-about-lock-dbox #[(fn opponent) " #B!ʍ*" [0 format "%s is locking %s\n\n It has been detected that you want to modify a file that\n someone else has already started modifying in Emacs." opponent fn (["Steal Lock\n\nThe other user will\nbecome the intruder" steal t] ["Proceed\n\nEdit file at your own\n(and the other user's) risk" proceed t] nil ["Abort\n\nDon't modify the buffer\n" yield t]) dbox echo-keystrokes popup-dialog-box aual-done (byte-code "  ! !=\" ! !=\" ! !=E\" ! !)0" [next-command-event event menu-event-p event-object proceed throw aual-done nil steal t yield signal file-locked "File is locked" fn opponent button-release-event-p beep message "please answer the dialog box"] 5)] 5] ask-user-about-supersession-threat-dbox #[(fn) " \"B !ɍ*" [0 format "File %s has changed on disk\nsince its buffer was last read in or saved.\n\nDo you really want to edit the buffer? " fn (["Yes\n\nEdit the buffer anyway,\nignoring the disk file" proceed t] ["No\n\nDon't modify the buffer\n" yield t] nil ["No\n\nDon't modify the buffer\nbut revert it" revert t]) dbox echo-keystrokes popup-dialog-box auast-done (byte-code "  ! !=\" ! != D\" ! != !\" D\" ! !)" [next-command-event event menu-event-p event-object proceed throw auast-done nil yield signal file-supersession "File changed on disk" fn revert buffer-file-name error "ask-user-about-supersession-threat called bogusly" revert-buffer t "File changed on disk; reverted" button-release-event-p beep message "please answer the dialog box"] 4)] 4]] 4) (fset 'ask-user-about-lock #[(fn opponent) " ! ! ! ! \" \"" [discard-input fboundp popup-dialog-box button-press-event-p last-command-event button-release-event-p menu-event-p ask-user-about-lock-dbox fn opponent ask-user-about-lock-minibuf] 3 "\ Ask user what to do when he wants to edit FILE but it is locked by USER. This function has a choice of three things to do: do (signal 'buffer-file-locked (list FILE USER)) to refrain from editing the file return t (grab the lock on the file) return nil (edit the file even though it is locked). You can rewrite it to use any criterion you like to choose which one to do."]) (fset 'ask-user-about-supersession-threat #[(fn) " ! ! ! !!!" [discard-input fboundp popup-dialog-box button-press-event-p last-command-event button-release-event-p menu-event-p ask-user-about-supersession-threat-dbox fn ask-user-about-supersession-threat-minibuf] 2 "\ Ask a user who is about to modify an obsolete buffer what to do. This function has two choices: it can return, in which case the modification of the buffer will proceed, or it can (signal 'file-supersession (file)), in which case the proposed buffer modification will not be made. You can rewrite this to use any criterion you like to choose which one to do. The buffer in question is current when this function is called."])