annotate lisp/emulation/pc-mode.el @ 82767:353b15b3c5d3

* NEWS: `shell' prompts for the default directory if called with a prefix and `default-directory' is a remote file name.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 22 Aug 2007 20:08:18 +0000
parents ac0efac52065
children d6d821e3ae21 f55f9811f5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 18383
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
74466
1d4b1a32fd66 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
3 ;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
75346
7a3f13e2dd57 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74466
diff changeset
4 ;; 2006, 2007 Free Software Foundation, Inc.
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
5
38695
01c7199c0ee7 Specify FSF as Maintainer.
Pavel Janík <Pavel@Janik.cz>
parents: 38414
diff changeset
6 ;; Maintainer: FSF
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
7 ;; Keywords: emulations
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 ;; This file is part of GNU Emacs.
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
10
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
11 ;; 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
12 ;; it under the terms of the GNU General Public License as published by
78218
ac0efac52065 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75346
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
14 ;; any later version.
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
15
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
16 ;; 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
17 ;; 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
18 ;; 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
19 ;; GNU General Public License for more details.
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
20
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
21 ;; 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
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
24 ;; Boston, MA 02110-1301, USA.
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
25
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 18383
diff changeset
26 ;;; Commentary:
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 18383
diff changeset
27
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
28 ;;; Code:
12372
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
29
91dc931a32c8 (pc-bindings-mode): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents: 11748
diff changeset
30 ;;;###autoload
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 (defun pc-bindings-mode ()
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 "Set up certain key bindings for PC compatibility.
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 The keys affected are:
11748
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
34 Delete (and its variants) delete forward instead of backward.
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
35 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
36 M-Backspace does undo.
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
37 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
38 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
39 C-Escape does list-buffers."
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 (interactive)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 (define-key function-key-map [delete] "\C-d")
11747
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
43 (define-key function-key-map [M-delete] [?\M-d])
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
44 (define-key function-key-map [C-delete] [?\M-d])
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 (global-set-key [C-M-delete] 'kill-sexp)
11747
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
46 (global-set-key [C-backspace] 'backward-kill-word)
afc9c0b4fbb5 entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 11344
diff changeset
47 (global-set-key [M-backspace] 'undo)
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48
11748
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
49 (global-set-key [C-escape] 'list-buffers)
f09f5b29f524 Add C-escape binding.
Richard M. Stallman <rms@gnu.org>
parents: 11747
diff changeset
50
11344
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 (global-set-key [home] 'beginning-of-line)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 (global-set-key [end] 'end-of-line)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 (global-set-key [C-home] 'beginning-of-buffer)
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 (global-set-key [C-end] 'end-of-buffer))
6f5c3bb789a5 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55
18383
11218164bc54 Add provide call.
Richard M. Stallman <rms@gnu.org>
parents: 15261
diff changeset
56 (provide 'pc-mode)
11218164bc54 Add provide call.
Richard M. Stallman <rms@gnu.org>
parents: 15261
diff changeset
57
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38695
diff changeset
58 ;;; arch-tag: df007c05-f885-4cd0-8c1e-487d0f8dd9c9
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 18383
diff changeset
59 ;;; pc-mode.el ends here