X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fx-win-sun.el;h=273a862be7d4ff117bf906bed944e52190c2da4a;hb=8d7a661d48bb4688a647b0493ef5054e5bd06270;hp=0bebfaa0747ec419548574ea2a54ec39dad7d48c;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/x-win-sun.el b/lisp/x-win-sun.el index 0bebfaa..273a862 100644 --- a/lisp/x-win-sun.el +++ b/lisp/x-win-sun.el @@ -64,19 +64,9 @@ ;;; Code: +;;;###autoload (defun x-win-init-sun () - (defun x-remap-keysyms-using-function-key-map (from-key to-key) - (dolist (prefix '(() (shift) (control) (meta) (alt) - (shift control) (shift alt) (shift meta) - (control alt) (control meta) (alt meta) - (shift control alt) (shift control meta) - (shift alt meta) (control alt meta) - (shift control alt meta))) - (define-key function-key-map - (append prefix (list from-key)) - (vector (append prefix (list to-key)))))) - ;; help is ok ;; num_lock is ok ;; up is ok @@ -164,9 +154,15 @@ (f12 again)))) ) do (when (x-keysym-on-keyboard-sans-modifiers-p from-key) - (x-remap-keysyms-using-function-key-map from-key to-key))) - - (unintern 'x-remap-keysyms-using-function-key-map) + (dolist (prefix '(() (shift) (control) (meta) (alt) + (shift control) (shift alt) (shift meta) + (control alt) (control meta) (alt meta) + (shift control alt) (shift control meta) + (shift alt meta) (control alt meta) + (shift control alt meta))) + (define-key function-key-map + (append prefix (list from-key)) + (vector (append prefix (list to-key))))))) ;; for each element in the left column of the above table, alias it ;; to the thing in the right column. Then do the same for many, but @@ -250,8 +246,10 @@ to more mnemonic ones,like `kp-3'." ;;; themselves are in x-win.el in case someone wants to use them when ;;; not running on a Sun display.) - (define-key global-map 'find 'ow-find) - (define-key global-map '(shift find) 'ow-find-backward) + (or (lookup-key global-map 'find) + (define-key global-map 'find 'ow-find)) + (or (lookup-key global-map '(shift find)) + (define-key global-map '(shift find) 'ow-find-backward)) )