Update copyright year to 2014 by running admin/update-copyright.
[bpt/emacs.git] / lisp / obsolete / pc-mode.el
CommitLineData
60370d40 1;;; pc-mode.el --- emulate certain key bindings used on PCs
b578f267 2
ba318903 3;; Copyright (C) 1995, 2001-2014 Free Software Foundation, Inc.
e0072c10 4
070c251e 5;; Maintainer: FSF
e0072c10 6;; Keywords: emulations
6ca94a0b 7;; Obsolete-since: 24.1
e0072c10
RS
8
9;; This file is part of GNU Emacs.
10
ed0f493f 11;; GNU Emacs is free software: you can redistribute it and/or modify
e0072c10 12;; it under the terms of the GNU General Public License as published by
ed0f493f
GM
13;; the Free Software Foundation, either version 3 of the License, or
14;; (at your option) any later version.
b578f267 15
e0072c10
RS
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
b578f267 20
e0072c10 21;; You should have received a copy of the GNU General Public License
ed0f493f 22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
e0072c10 23
60370d40
PJ
24;;; Commentary:
25
b578f267 26;;; Code:
e0072c10
RS
27
28;;;###autoload
601fa27a
RS
29(defun pc-bindings-mode ()
30 "Set up certain key bindings for PC compatibility.
31The keys affected are:
002c4306
RS
32Delete (and its variants) delete forward instead of backward.
33C-Backspace kills backward a word (as C-Delete normally would).
34M-Backspace does undo.
35Home and End move to beginning and end of line
36C-Home and C-End move to beginning and end of buffer.
37C-Escape does list-buffers."
601fa27a
RS
38
39 (interactive)
40 (define-key function-key-map [delete] "\C-d")
b6384070
RS
41 (define-key function-key-map [M-delete] [?\M-d])
42 (define-key function-key-map [C-delete] [?\M-d])
601fa27a 43 (global-set-key [C-M-delete] 'kill-sexp)
b6384070
RS
44 (global-set-key [C-backspace] 'backward-kill-word)
45 (global-set-key [M-backspace] 'undo)
601fa27a 46
002c4306
RS
47 (global-set-key [C-escape] 'list-buffers)
48
601fa27a
RS
49 (global-set-key [home] 'beginning-of-line)
50 (global-set-key [end] 'end-of-line)
51 (global-set-key [C-home] 'beginning-of-buffer)
52 (global-set-key [C-end] 'end-of-buffer))
53
896546cd
RS
54(provide 'pc-mode)
55
60370d40 56;;; pc-mode.el ends here