# HG changeset patch # User Richard M. Stallman # Date 1031800881 0 # Node ID 5256689862225b53b26d5c7510ccdf2ea11326f0 # Parent 472a934998024f501901f21dbd46ffc3daa2cf11 (ruler-mode-left-scroll-bar-cols): Always round scroll-bar-width parameter up. If it is nil, use 14. diff -r 472a93499802 -r 525668986222 lisp/ruler-mode.el --- a/lisp/ruler-mode.el Thu Sep 12 03:19:25 2002 +0000 +++ b/lisp/ruler-mode.el Thu Sep 12 03:21:21 2002 +0000 @@ -451,8 +451,12 @@ (defmacro ruler-mode-left-scroll-bar-cols () "Return the width, measured in columns, of the left vertical scrollbar." '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) - (round (or (frame-parameter nil 'scroll-bar-width) 0) - (frame-char-width)) + (let ((sbw (frame-parameter nil 'scroll-bar-width))) + ;; nil means it's a non-toolkit scroll bar, + ;; and its width in columns is 14 pixels rounded up. + (unless sbw (setq sbw 14)) + ;; Always round up to multiple of columns. + (ceiling sbw (frame-char-width))) 0)) (defmacro ruler-mode-right-scroll-bar-cols ()