======================================================= CONTRIBUTOR: Engineering Staff, Atria Software, Inc. ======================================================= ********************************************************** ************** THIS IS UNSUPPORTED SOFTWARE ************** ********************************************************** ********************************************************** * Atria makes no representation that the descriptions * * and software code contained in this document will * * not infringe on existing or future patent rights, * * copyrights, trademarks, trade secrets or other * * proprietary rights of third parties. The * * descriptions contained herein do not imply the * * granting of licenses to make, use, sell, license or * * otherwise transfer Atria products described herein. * * Atria disclaims responsibility for errors which may * * appear in this document, and it reserves the right, * * in its sole discretion and without notice, to make * * substitutions and modifications in the products and * * practices described in this document. * ********************************************************** --------------------------------- T0001: EMACS MACROS FOR CHECKOUTS --------------------------------- OVERVIEW -------- This example gives GNU Emacs-Lisp macros to checkout, checkin, or uncheckout the file version in the current buffer. It also has macros to list checkouts for the current buffer or for the current directory. Command output appears in the *Shell Command Output* buffer. You can load these macros into emacs, for example: (load-file "/usr/atria/examples/emacs_checkouts/checkouts.el") You can bind a macro to a key, for example: (global-set-key key 'checkout-curr) where key is a string with the appropriate key sequence for your system. SOURCE ------ checkouts.el GNU Emacs-Lisp macros to handle checkouts. FUNCTIONS --------- checkout-curr (comment) Checkout version in current buffer with COMMENT. If no comment is given, it prompts for a comment. The default comment is the one given for the last checkout-curr invocation. After the checkout, it re-reads the file. checkin-curr Checkin version in current buffer. The macro will prompt with: Comment: s (same) or n (new) or l (list): s Respond "s" to checkin using the checkout comment (default). Respond "n" to supply a new comment. Respond "l" to list the current checkout comment, then prompt again. After the checkout, it re-reads the file. uncheckout-curr Uncheckout version in current buffer and remove private data, then re-read the file. lscheckout-curr List checkout for the current buffer. lscheckout-curr-dir List checkouts for the current directory. find-curr-file-again (read-only) Supporting function to read in the current file again, READONLY (t) or not (nil), after change of checkout state. shell-command-verbose (command) Supporting function to execute COMMAND in shell with message.