Insert patterns from compilation-perl.el and compilation-weblint.el files.
[bpt/emacs.git] / lisp / master.el
index 157cfee..caa48d1 100644 (file)
@@ -1,6 +1,7 @@
 ;;; master.el --- make a buffer the master over another buffer
 
-;; Copyright (C) 1999, 2000, 2001  Alexander Schroeder
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;;   Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; Maintainer: Alex Schroeder <alex@gnu.org>
 
 ;; This file is part of GNU Emacs.
 
-;; master.el is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by the
-;; Free Software Foundation; either version 2, or (at your option) any
-;; later version.
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
 
-;; master.el is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-;; MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -38,7 +39,6 @@
 ;; sql-buffer contains the slave buffer.  It is a local variable in the
 ;; SQL buffer.
 ;;
-;; (autoload 'master-mode "master" "Master mode minor mode." t)
 ;; (add-hook 'sql-mode-hook
 ;;        (function (lambda ()
 ;;                    (master-mode t)
 ;;
 ;; Rob Riepel <networking.stanford.edu>
 
-\f
-
-
 ;;; History:
-;; 
+;;
 
 ;;; Code:
 
-(require 'easy-mmode)
+(defgroup master nil
+  "Support for master/slave relationships between buffers."
+  :version "22.1"
+  :group 'convenience)
 
 ;; Variables that don't need initialization.
-  
+
 (defvar master-of nil
   "Slave buffer of the current buffer.  See `master-mode'.
 You can set this variable using `master-set-slave'.")
@@ -72,7 +72,8 @@ You can set this variable using `master-set-slave'.")
 
 ;;; Define master mode.
 
-(easy-mmode-define-minor-mode master-mode
+;;;###autoload
+(define-minor-mode master-mode
   "Toggle Master mode.
 With no argument, this command toggles the mode.
 Non-null prefix argument turns on the mode.
@@ -86,16 +87,13 @@ following commands:
 The slave buffer is stored in the buffer-local variable `master-of'.
 You can set this variable using `master-set-slave'.  You can show
 yourself the value of `master-of' by calling `master-show-slave'."
- ;; The initial value.
- nil
- ;; The indicator for the mode line.
- nil
- ;; The minor mode bindings.
- '(("\C-c\C-n" . master-says-scroll-up)
-   ("\C-c\C-p" . master-says-scroll-down)
-   ("\C-c<" . master-says-beginning-of-buffer)
-   ("\C-c>" . master-says-end-of-buffer)
-   ("\C-c\C-l" . master-says-recenter)))
+  :group 'master
+  :keymap
+  '(("\C-c\C-n" . master-says-scroll-up)
+    ("\C-c\C-p" . master-says-scroll-down)
+    ("\C-c<" . master-says-beginning-of-buffer)
+    ("\C-c>" . master-says-end-of-buffer)
+    ("\C-c\C-l" . master-says-recenter)))
 
 ;; Initialize Master mode by setting a slave buffer.
 
@@ -163,5 +161,5 @@ See `recenter'."
 
 (provide 'master)
 
+;;; arch-tag: dca08daa-8127-45ae-b77e-b135160dce98
 ;;; master.el ends here
-