Some time ago, Greg Klanderman wrote...
|+
| (note scrollbar, not toolbar)
Oops, my head is stuffed with toolbars since recently.
| (specifier-specs scrollbar-width)
| ((global (nil . 15)))
|
| (specifier-specs scrollbar-height)
| ((global (nil . 15)))
|
| (specifier-specs (specifier-fallback scrollbar-width))
| nil
|
| (specifier-specs (specifier-fallback scrollbar-height))
| ((global (nil . 0)))
Innocent Your Honor, innocent!!! Here's the offender:
(defcustom scrollbars-visible-p ;; added for the options menu - dverna
(> (specifier-instance scrollbar-width) 0)
"Whether the scrollbars are globally visible. This variable can be
customized through the options menu."
:group 'display
:type 'boolean
;; This is really a hack: there should be a real specifier for this, in
;; order to turn on/off the scrollbars without altering their size.
:set '(lambda (var val)
(if val
(progn
(set-specifier scrollbar-width 15)
(set-specifier scrollbar-height 15))
(set-specifier scrollbar-width 0)
(set-specifier scrollbar-height 0))
(setq scrollbars-visible-p val))
)
This is evaluated at dump time, and triggers its set function, which sees that
scrollbar-width is greater than zero (ultimate fallback), and sets the specification
to 15 in 'global. The init code is run when XEmacs launches, and stuffs
'(global . ((nil . 0))) into the ghost spec part, which is overridden by the bodily
spec set to '(global . ((nil . 15))).
This code sets scrollbar width to 15, which is absolutely wrong, as it overrides both
user's setting and resource settings. A better solution would be to do
(if val
(remove-specifier scrollbar-width)
(set-specifier scrollbar-width 0)
which also ignores user's setting of toolbar size but at least keeps what's been
read
from resources, which is adequate in most cases.
But the ideal solution is a separate specifier for scrollbar visibility, as the comment
suggests. I remeber that Hrvoje said that in last October, but perhaps it was not the
first time this' been said... :)
Btw, this specifier will not break any backward compatibility. Phasing out a convention
that zero size toolbar is no toolbar may then take some time but is very harmless.
Kirill