Mercurial > hg > xemacs-beta
diff lisp/sunpro/sunpro-keys.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/sunpro/sunpro-keys.el Mon Aug 13 08:45:50 2007 +0200 @@ -0,0 +1,26 @@ +;;; sunpro-keys.el --- SunPro-specific key bindings + +;; Copyright (C) 1993, 1994 Sun Microsystems, Inc + +(define-key global-map 'find 'x-isearch-maybe-with-region) + +(define-key isearch-mode-map 'f18 'isearch-yank-x-clipboard) +(add-hook 'isearch-mode-hook 'sunpro-set-isearch-direction) +(define-key isearch-mode-map 'f19 'isearch-repeat-forward) + +(defun x-isearch-maybe-with-region (&optional backward-p) + "Enter isearch mode. If the region is active, find the selected text." + (interactive "P") + (let ((sunpro-isearch-direction + (if backward-p 'backward 'forward))) + (if (and zmacs-regions (mark)) + (progn (isearch-mode (not backward-p)) (isearch-yank-x-selection)) + (if backward-p (isearch-backward) (isearch-forward))))) + +(defun sunpro-set-isearch-direction () + (if (or (eq this-command 'isearch-backward) + (eq this-command 'isearch-backward-regexp) + (and (boundp 'sunpro-isearch-direction) + (eq sunpro-isearch-direction 'backward))) + (define-key isearch-mode-map 'f19 'isearch-repeat-backward) + (define-key isearch-mode-map 'f19 'isearch-repeat-forward)))