/[emacs]/emacs/lisp/scroll-all.el
ViewVC logotype

Diff of /emacs/lisp/scroll-all.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gm, Wed Apr 24 20:37:04 2002 UTC revision 1.10.2.1 by miles, Fri Apr 4 06:20:10 2003 UTC
# Line 39  Line 39 
39    
40  ;;; Code:  ;;; Code:
41    
 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))  
   
 ;;;###autoload  
 (defcustom scroll-all-mode nil  
   "Control/track scroll locking.  
   
 Setting this variable directly does not take effect;  
 use either \\[customize] or the function `scroll-all-mode'."  
   :set (lambda (symbol value) (scroll-all-mode (if value 1 0)))  
   :initialize 'custom-initialize-default  
   :require 'scroll-all  
   :type 'boolean  
   :group 'windows)  
   
 (if running-xemacs  
     (add-minor-mode 'scroll-all-mode " *SL*")  
   (or (assq 'scroll-all-mode minor-mode-alist)  
       (setq minor-mode-alist  
             (cons '(scroll-all-mode " *SL*") minor-mode-alist))))  
   
42  (defun scroll-all-function-all (func arg)  (defun scroll-all-function-all (func arg)
43    "Apply function FUNC with argument ARG to all visible windows."    "Apply function FUNC with argument ARG to all visible windows."
44    (let ((num-windows (count-windows))    (let ((num-windows (count-windows))
# Line 119  use either \\[customize] or the function Line 99  use either \\[customize] or the function
99           (call-interactively 'scroll-all-beginning-of-buffer-all))           (call-interactively 'scroll-all-beginning-of-buffer-all))
100          ((eq this-command 'end-of-buffer)          ((eq this-command 'end-of-buffer)
101           (call-interactively 'scroll-all-end-of-buffer-all))))           (call-interactively 'scroll-all-end-of-buffer-all))))
102    
103    
104  ;;;###autoload  ;;;###autoload
105  (defun scroll-all-mode (arg)  (define-minor-mode scroll-all-mode
106    "Toggle Scroll-All minor mode."    "Toggle Scroll-All minor mode.
107    (interactive "P")  With ARG, turn Scroll-All minor mode on if ARG is positive, off otherwise.
108    (setq scroll-all-mode (not scroll-all-mode))  When Scroll-All mode is on, scrolling commands entered in one window
109    (cond  apply to all visible windows in the same frame."
110     ((eq scroll-all-mode 't)    nil " *SL*" nil
111      (add-hook 'post-command-hook 'scroll-all-check-to-scroll))    :global t
112     ((eq scroll-all-mode 'nil)    :group 'windows
113      (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))))    :group 'scrolling
114      (if scroll-all-mode
115          (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
116        (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
117    
118  (provide 'scroll-all)  (provide 'scroll-all)
119    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.10.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26