annotate lisp/emulation/pc-mode.el @ 35012:444b43c38978

Do highlighting of alternative matches all at once, but only do it in the text that's visible in the selected window. (isearch-lazy-highlight-cleanup): Arg now says to remove all the current alternative-match highlighting. If nil, remove only what's outside the current window. (isearch-lazy-highlight-remove-overlays): Take optional region within which NOT to remove them. (isearch-lazy-highlight-new-loop): Greatly simplified. (isearch-lazy-highlight-update): Find all the other occurrences visible in the window, in just one call. (isearch-lazy-highlight-start): Now holds start of region to scan. (isearch-lazy-highlight-end): Now holds end of region to scan. (isearch-lazy-highlight-wrapped): Variable deleted. (isearch-lazy-highlight-search): Function deleted.
author Richard M. Stallman <rms@gnu.org>
date Wed, 03 Jan 2001 00:18:53 +0000
parents 11218164bc54
children 67b464da13ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15261
bd56cdc4d07b Fixed up initial line
Erik Naggum <erik@naggum.no>
parents: 14169
diff changeset
1 ;;; pc-mode.el --- emulate certain key bindings used on PCs.
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
2
13336
f225e4de23b4 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 12372
diff changeset
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
4
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
5 ;; Keywords: emulations
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
6
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
7 ;; This file is part of GNU Emacs.
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
8
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
12 ;; any later version.
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
13
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
17 ;; GNU General Public License for more details.
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
18
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
19 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
22 ;; Boston, MA 02111-1307, USA.
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
23
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
24 ;;; Code:
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
25
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
26 ;;;###autoload
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 (defun pc-bindings-mode ()
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 "Set up certain key bindings for PC compatibility.
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 The keys affected are:
11748
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
30 Delete (and its variants) delete forward instead of backward.
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
31 C-Backspace kills backward a word (as C-Delete normally would).
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
32 M-Backspace does undo.
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
33 Home and End move to beginning and end of line
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
34 C-Home and C-End move to beginning and end of buffer.
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
35 C-Escape does list-buffers."
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 (interactive)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 (define-key function-key-map [delete] "\C-d")
11747
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
39 (define-key function-key-map [M-delete] [?\M-d])
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
40 (define-key function-key-map [C-delete] [?\M-d])
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 (global-set-key [C-M-delete] 'kill-sexp)
11747
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
42 (global-set-key [C-backspace] 'backward-kill-word)
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
43 (global-set-key [M-backspace] 'undo)
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44
11748
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
45 (global-set-key [C-escape] 'list-buffers)
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
46
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 (global-set-key [home] 'beginning-of-line)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 (global-set-key [end] 'end-of-line)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 (global-set-key [C-home] 'beginning-of-buffer)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 (global-set-key [C-end] 'end-of-buffer))
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51
18383
11218164bc54 Add provide call.
Richard M. Stallman <rms@gnu.org>
parents: 15261
diff changeset
52 (provide 'pc-mode)
11218164bc54 Add provide call.
Richard M. Stallman <rms@gnu.org>
parents: 15261
diff changeset
53
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
54 ;; pc-mode.el ends here