;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:58 2007 ;;; from file /home/cyd/emacs/lisp/master.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`master.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'master nil "Support for master/slave relationships between buffers." :version "22.1" :group 'convenience) #@109 Slave buffer of the current buffer. See `master-mode'. You can set this variable using `master-set-slave'. (defvar master-of nil (#$ . 689)) #@64 Hook run after the slave is changed using \[master-set-slave]. (defvar master-set-slave-hook nil (#$ . 837)) #@91 Non-nil if Master mode is enabled. Use the command `master-mode' to change this variable. (defvar master-mode nil (#$ . 952)) (make-variable-buffer-local 'master-mode) #@469 Toggle Master mode. With no argument, this command toggles the mode. Non-null prefix argument turns on the mode. Null prefix argument turns off the mode. When Master mode is enabled, you can scroll the slave buffer using the following commands: \{master-mode-map} 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'. (defalias 'master-mode #[(&optional arg) "\302=\203 ?\202%\203\303!\304V\202% \204\305\202%\306\307\301\"\210\310\311\312 \2030\313\2021\314\"\210\315 \203E\306\316 \203B\317\202C\320\"\210\321 \210 \207" [arg master-mode toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil run-hooks master-mode-hook master-mode-on-hook master-mode-off-hook called-interactively-p "Master mode %sabled" "en" "dis" force-mode-line-update] 3 (#$ . 1127) (list (or current-prefix-arg 'toggle))]) #@27 Keymap for `master-mode'. (defvar master-mode-map (byte-code "\301\302!\203\f\202<\203\303!\202\304\305\301\")\207" [m (("" . master-says-scroll-up) ("" . master-says-scroll-down) ("<" . master-says-beginning-of-buffer) (">" . master-says-end-of-buffer) ("\f" . master-says-recenter)) keymapp easy-mmode-define-keymap error "Invalid keymap %S"] 3) (#$ . 2141)) (add-minor-mode 'master-mode nil master-mode-map) #@105 Makes BUFFER the slave of the current buffer. Use \[master-mode] to toggle control of the slave buffer. (defalias 'master-set-slave #[(buffer) "\302\301!\210\303\304!\207" [buffer master-of make-local-variable run-hooks master-set-slave-hook] 2 (#$ . 2578) "bSlave: "]) #@55 Displays a message with the name of the slave buffer. (defalias 'master-show-slave #[nil "\302\303\206\304 #\207" [master-of master-mode message "This buffer is the master of %s. Master-mode is %S." "none"] 4 (#$ . 2856) nil]) #@58 Display and scroll the slave buffer up. See `scroll-up'. (defalias 'master-says-scroll-up #[(&optional arg) "\301\302\"\207" [arg master-says scroll-up] 3 (#$ . 3093) nil]) #@62 Display and scroll the slave buffer down. See `scroll-down'. (defalias 'master-says-scroll-down #[(&optional arg) "\301\302\"\207" [arg master-says scroll-down] 3 (#$ . 3273) nil]) #@83 Display and move to the beginning of the slave buffer. See `beginning-of-buffer'. (defalias 'master-says-beginning-of-buffer #[(&optional arg) "\301\302\"\207" [arg master-says beginning-of-buffer] 3 (#$ . 3461) nil]) #@71 Display and move to the end of the slave buffer. See `end-of-buffer'. (defalias 'master-says-end-of-buffer #[(&optional arg) "\301\302\"\207" [arg master-says end-of-buffer] 3 (#$ . 3686) nil]) #@44 Recenter the slave buffer. See `recenter'. (defalias 'master-says-recenter #[(&optional arg) "\301\302\"\207" [arg master-says recenter] 3 (#$ . 3887) nil]) #@66 Display slave buffer and execute COMMAND with ARG in its window. (defalias 'master-says #[(&optional command arg) "\303\304!!\204\f\305\306!\207\307 \310 !\304!=\204\311!\210\n\203&\312\313\314\217\210\315 !)\207" [master-of window command buffer-live-p get-buffer error "Slave buffer has disappeared" selected-window window-buffer switch-to-buffer-other-window nil (apply command arg) ((error)) select-window] 3 (#$ . 4051) nil]) (provide 'master)