>>>> "David" == David Bakhash
<cadet(a)bu.edu> writes:
David> okay,
David> so I mentioned this earlier, but just wanted to make sure...
David> It seems as though the function `x-initialize-keyboard' uses `load'
David> instead of require:
David> (defun x-initialize-keyboard ()
David> "Perform X-Server-specific initializations. Don't call this."
David> ;; <some more comments>
David> (let ((vendor (x-server-vendor)))
David> (cond ((or (string-match "Sun Microsystems" vendor)
David> ;; MIT losingly fails to tell us what hardware the X server
David> ;; is managing, so assume all MIT displays are Suns... HA HA!
David> (string-equal "MIT X Consortium" vendor)
David> (string-equal "X Consortium" vendor))
David> ;; Ok, we think this could be a Sun keyboard. Load the Sun code.
David> (load "x-win-sun"))
David> ((string-match "XFree86" vendor)
David> ;; Those XFree86 people do some weird keysym stuff, too.
David> (load "x-win-xfree86")))))
David> Note that these things are loaded. I guess this is as safeguard to
David> deal with the situation when someone opens up an X frame on different
David> kinds of computers? I don't know. All I do know is that it's not as
David> simple as putting
David> (require 'x-win-sun)
David> instead of the load line, because those features arn't provided. So
David> they get re-loaded every time (a waste of time, especially on slow
David> computers). Don't know what the best fix is. Personally, I've added
David> a defvar and fixed it on my own, but it's not so nice looking:
David> (defvar keyboard-initialized-p nil
David> "Non-nil iff the `x-initialize-keyboard' code has been
loaded.")
David> (defadvice x-initialize-keyboard (around no-load activate)
David> (unless keyboard-initialized-p
David> (setq keyboard-initialized-p t)
David> ad-do-it))
x-win-sun gets reloaded every time a new console is created. It's
hard to believe this is a performance issue, since this typically
happens once per XEmacs session. Yes, changing it to use autoloading
and require would be cleaner, but this is just an aesthetics fix.
(not that I don't like fixing aesthetics)
The aesthetics can be fixed in 21.1. Is there actually a user-visible
bug there now?
Martin