* Re: `scroll-all-mode' hard to customize
[not found] <E17YOJF-0002bi-00@bundalo.shootybangbang.com>
@ 2002-07-29 1:12 ` Richard Stallman
2002-07-29 3:11 ` John Paul Wallington
2002-08-09 8:02 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2002-07-29 1:12 UTC (permalink / raw)
Cc: emacs-devel
This patch looks correct. Can you install it or do you
need someone else to do so?
To get it into 21.3, please install it in the RC branch
as well as the trunk.
From: John Paul Wallington <jpw@shootybangbang.com>
To: emacs-pretest-bug@gnu.org
Subject: `scroll-all-mode' hard to customize
Date: Sat, 27 Jul 2002 10:56:25 +0100
Symptoms:
M-x customize-variable scroll-all-mode
save its value to "Off"
restart Emacs - hey! it's on!
Here is a patch:
2002-07-27 John Paul Wallington <jpw@shootybangbang.com>
* scroll-all.el (scroll-all-mode): Handle numeric arg. Use `if'
instead of `cond'.
Index: scroll-all.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/scroll-all.el,v
retrieving revision 1.10
diff -u -r1.10 scroll-all.el
*** scroll-all.el 24 Apr 2002 20:37:04 -0000 1.10
--- scroll-all.el 27 Jul 2002 09:46:13 -0000
***************
*** 125,136 ****
(defun scroll-all-mode (arg)
"Toggle Scroll-All minor mode."
(interactive "P")
! (setq scroll-all-mode (not scroll-all-mode))
! (cond
! ((eq scroll-all-mode 't)
! (add-hook 'post-command-hook 'scroll-all-check-to-scroll))
! ((eq scroll-all-mode 'nil)
! (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))))
(provide 'scroll-all)
--- 125,136 ----
(defun scroll-all-mode (arg)
"Toggle Scroll-All minor mode."
(interactive "P")
! (setq scroll-all-mode
! (if (null arg) (not scroll-all-mode)
! (> (prefix-numeric-value arg) 0)))
! (if scroll-all-mode
! (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
! (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
(provide 'scroll-all)
In GNU Emacs 21.3.50.5 (i686-pc-linux-gnu, X toolkit)
of 2002-07-25 on bundalo
--
John Paul Wallington
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: `scroll-all-mode' hard to customize
[not found] <E17YOJF-0002bi-00@bundalo.shootybangbang.com>
2002-07-29 1:12 ` `scroll-all-mode' hard to customize Richard Stallman
@ 2002-08-09 8:02 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2002-08-09 8:02 UTC (permalink / raw)
Cc: emacs-devel
> --- 125,136 ----
> (defun scroll-all-mode (arg)
> "Toggle Scroll-All minor mode."
> (interactive "P")
> ! (setq scroll-all-mode
> ! (if (null arg) (not scroll-all-mode)
> ! (> (prefix-numeric-value arg) 0)))
> ! (if scroll-all-mode
> ! (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
> ! (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
>
> (provide 'scroll-all)
Better yet, use define-minor-mode.
Stefan
--- scroll-all.el.~1.10.~ Fri Apr 26 14:03:51 2002
+++ scroll-all.el Fri Aug 9 00:03:15 2002
@@ -39,26 +39,6 @@
;;; Code:
-(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))))
-
(defun scroll-all-function-all (func arg)
"Apply function FUNC with argument ARG to all visible windows."
(let ((num-windows (count-windows))
@@ -122,15 +102,12 @@
;;;###autoload
-(defun scroll-all-mode (arg)
+(define-minor-mode scroll-all-mode " *SL*"
"Toggle Scroll-All minor mode."
- (interactive "P")
- (setq scroll-all-mode (not scroll-all-mode))
- (cond
- ((eq scroll-all-mode 't)
- (add-hook 'post-command-hook 'scroll-all-check-to-scroll))
- ((eq scroll-all-mode 'nil)
- (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))))
+ :global t
+ (if scroll-all-mode
+ (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
+ (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
(provide 'scroll-all)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-08-09 8:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E17YOJF-0002bi-00@bundalo.shootybangbang.com>
2002-07-29 1:12 ` `scroll-all-mode' hard to customize Richard Stallman
2002-07-29 3:11 ` John Paul Wallington
2002-07-29 13:14 ` Glenn Morris
2002-07-30 1:00 ` Richard Stallman
2002-08-09 8:02 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.