Mercurial > emacs
comparison lisp/ruler-mode.el @ 47425:525668986222
(ruler-mode-left-scroll-bar-cols):
Always round scroll-bar-width parameter up.
If it is nil, use 14.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 12 Sep 2002 03:21:21 +0000 |
parents | 865837df3fe7 |
children | c297d31ef382 |
comparison
equal
deleted
inserted
replaced
47424:472a93499802 | 47425:525668986222 |
---|---|
449 (frame-char-width))) | 449 (frame-char-width))) |
450 | 450 |
451 (defmacro ruler-mode-left-scroll-bar-cols () | 451 (defmacro ruler-mode-left-scroll-bar-cols () |
452 "Return the width, measured in columns, of the left vertical scrollbar." | 452 "Return the width, measured in columns, of the left vertical scrollbar." |
453 '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) | 453 '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'left) |
454 (round (or (frame-parameter nil 'scroll-bar-width) 0) | 454 (let ((sbw (frame-parameter nil 'scroll-bar-width))) |
455 (frame-char-width)) | 455 ;; nil means it's a non-toolkit scroll bar, |
456 ;; and its width in columns is 14 pixels rounded up. | |
457 (unless sbw (setq sbw 14)) | |
458 ;; Always round up to multiple of columns. | |
459 (ceiling sbw (frame-char-width))) | |
456 0)) | 460 0)) |
457 | 461 |
458 (defmacro ruler-mode-right-scroll-bar-cols () | 462 (defmacro ruler-mode-right-scroll-bar-cols () |
459 "Return the width, measured in columns, of the right vertical scrollbar." | 463 "Return the width, measured in columns, of the right vertical scrollbar." |
460 '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'right) | 464 '(if (eq (frame-parameter nil 'vertical-scroll-bars) 'right) |