annotate lisp/sunpro/sunpro-keys.el @ 189:489f57a838ef r20-3b21

Import from CVS: tag r20-3b21
author cvs
date Mon, 13 Aug 2007 09:57:07 +0200
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; sunpro-keys.el --- SunPro-specific key bindings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1993, 1994 Sun Microsystems, Inc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 (define-key global-map 'find 'x-isearch-maybe-with-region)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 (define-key isearch-mode-map 'f18 'isearch-yank-x-clipboard)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 (add-hook 'isearch-mode-hook 'sunpro-set-isearch-direction)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 (define-key isearch-mode-map 'f19 'isearch-repeat-forward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 (defun x-isearch-maybe-with-region (&optional backward-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 "Enter isearch mode. If the region is active, find the selected text."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 (let ((sunpro-isearch-direction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 (if backward-p 'backward 'forward)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 (if (and zmacs-regions (mark))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 (progn (isearch-mode (not backward-p)) (isearch-yank-x-selection))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 (if backward-p (isearch-backward) (isearch-forward)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 (defun sunpro-set-isearch-direction ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 (if (or (eq this-command 'isearch-backward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 (eq this-command 'isearch-backward-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 (and (boundp 'sunpro-isearch-direction)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 (eq sunpro-isearch-direction 'backward)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (define-key isearch-mode-map 'f19 'isearch-repeat-backward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (define-key isearch-mode-map 'f19 'isearch-repeat-forward)))