okay,
so I mentioned this earlier, but just wanted to make sure...
It seems as though the function `x-initialize-keyboard' uses `load'
instead of require:
(defun x-initialize-keyboard ()
"Perform X-Server-specific initializations. Don't call this."
;; <some more comments>
(let ((vendor (x-server-vendor)))
(cond ((or (string-match "Sun Microsystems" vendor)
;; MIT losingly fails to tell us what hardware the X server
;; is managing, so assume all MIT displays are Suns... HA HA!
(string-equal "MIT X Consortium" vendor)
(string-equal "X Consortium" vendor))
;; Ok, we think this could be a Sun keyboard. Load the Sun code.
(load "x-win-sun"))
((string-match "XFree86" vendor)
;; Those XFree86 people do some weird keysym stuff, too.
(load "x-win-xfree86")))))
Note that these things are loaded. I guess this is as safeguard to
deal with the situation when someone opens up an X frame on different
kinds of computers? I don't know. All I do know is that it's not as
simple as putting
(require 'x-win-sun)
instead of the load line, because those features arn't provided. So
they get re-loaded every time (a waste of time, especially on slow
computers). Don't know what the best fix is. Personally, I've added
a defvar and fixed it on my own, but it's not so nice looking:
(defvar keyboard-initialized-p nil
"Non-nil iff the `x-initialize-keyboard' code has been loaded.")
(defadvice x-initialize-keyboard (around no-load activate)
(unless keyboard-initialized-p
(setq keyboard-initialized-p t)
ad-do-it))
dave