Mercurial > hg > xemacs-beta
diff lisp/prim/scrollbar.el @ 26:441bb1e64a06 r19-15b96
Import from CVS: tag r19-15b96
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:32 +0200 |
parents | 0293115a14e9 |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/lisp/prim/scrollbar.el Mon Aug 13 08:51:05 2007 +0200 +++ b/lisp/prim/scrollbar.el Mon Aug 13 08:51:32 2007 +0200 @@ -40,8 +40,7 @@ This is the little arrow to the left of the scrollbar. One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window (- (window-hscroll window) 1)) (setq zmacs-region-stays t) nil)) @@ -51,8 +50,7 @@ This is the little arrow to the right of the scrollbar. One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window (+ (window-hscroll window) 1)) (setq zmacs-region-stays t) nil)) @@ -62,8 +60,7 @@ \(The way this is done can vary from scrollbar to scrollbar.\) One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window (- (window-hscroll window) (- (window-width window) 2))) (setq zmacs-region-stays t) @@ -74,8 +71,7 @@ \(The way this is done can vary from scrollbar to scrollbar.\) One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window (+ (window-hscroll window) (- (window-width window) 2))) (setq zmacs-region-stays t) @@ -86,8 +82,7 @@ \(The way this is done can vary from scrollbar to scrollbar.\). One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window 0) (setq zmacs-region-stays t) nil)) @@ -97,8 +92,7 @@ \(The way this is done can vary from scrollbar to scrollbar.\). One argument is passed, the scrollbar's window. You can advise this function to change the scrollbar behavior." - (if (not (window-live-p window)) - nil + (when (window-live-p window) (scrollbar-set-hscroll window 'max) (setq zmacs-region-stays t) nil)) @@ -109,9 +103,8 @@ representing how many columns the thumb is slid over. You can advise this function to change the scrollbar behavior." (let ((window (car data)) - (value (cdr data))) - (if (not (or (window-live-p window) (integerp value))) - nil + (value (cdr data))) + (when (and (window-live-p window) (integerp value)) (scrollbar-set-hscroll window value) (setq zmacs-region-stays t) nil)))