comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;; sunpro-keys.el --- SunPro-specific key bindings
2
3 ;; Copyright (C) 1993, 1994 Sun Microsystems, Inc
4
5 (define-key global-map 'find 'x-isearch-maybe-with-region)
6
7 (define-key isearch-mode-map 'f18 'isearch-yank-x-clipboard)
8 (add-hook 'isearch-mode-hook 'sunpro-set-isearch-direction)
9 (define-key isearch-mode-map 'f19 'isearch-repeat-forward)
10
11 (defun x-isearch-maybe-with-region (&optional backward-p)
12 "Enter isearch mode. If the region is active, find the selected text."
13 (interactive "P")
14 (let ((sunpro-isearch-direction
15 (if backward-p 'backward 'forward)))
16 (if (and zmacs-regions (mark))
17 (progn (isearch-mode (not backward-p)) (isearch-yank-x-selection))
18 (if backward-p (isearch-backward) (isearch-forward)))))
19
20 (defun sunpro-set-isearch-direction ()
21 (if (or (eq this-command 'isearch-backward)
22 (eq this-command 'isearch-backward-regexp)
23 (and (boundp 'sunpro-isearch-direction)
24 (eq sunpro-isearch-direction 'backward)))
25 (define-key isearch-mode-map 'f19 'isearch-repeat-backward)
26 (define-key isearch-mode-map 'f19 'isearch-repeat-forward)))