1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
emacs/lisp/emulation/pc-mode.el

58 lines
1.9 KiB
EmacsLisp
Raw Normal View History

;;; pc-mode.el --- emulate certain key bindings used on PCs
1996-01-14 07:34:30 +00:00
1995-10-30 17:22:28 +00:00
;; Copyright (C) 1995 Free Software Foundation, Inc.
1995-06-24 04:23:05 +00:00
2001-08-06 09:59:02 +00:00
;; Maintainer: FSF
1995-06-24 04:23:05 +00:00
;; Keywords: emulations
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
1996-01-14 07:34:30 +00:00
1995-06-24 04:23:05 +00:00
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
1996-01-14 07:34:30 +00:00
1995-06-24 04:23:05 +00:00
;; You should have received a copy of the GNU General Public License
1996-01-14 07:34:30 +00:00
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
1995-06-24 04:23:05 +00:00
;;; Commentary:
1996-01-14 07:34:30 +00:00
;;; Code:
1995-06-24 04:23:05 +00:00
;;;###autoload
1995-04-10 07:11:42 +00:00
(defun pc-bindings-mode ()
"Set up certain key bindings for PC compatibility.
The keys affected are:
1995-05-07 23:08:17 +00:00
Delete (and its variants) delete forward instead of backward.
C-Backspace kills backward a word (as C-Delete normally would).
M-Backspace does undo.
Home and End move to beginning and end of line
C-Home and C-End move to beginning and end of buffer.
C-Escape does list-buffers."
1995-04-10 07:11:42 +00:00
(interactive)
(define-key function-key-map [delete] "\C-d")
1995-05-07 23:02:13 +00:00
(define-key function-key-map [M-delete] [?\M-d])
(define-key function-key-map [C-delete] [?\M-d])
1995-04-10 07:11:42 +00:00
(global-set-key [C-M-delete] 'kill-sexp)
1995-05-07 23:02:13 +00:00
(global-set-key [C-backspace] 'backward-kill-word)
(global-set-key [M-backspace] 'undo)
1995-04-10 07:11:42 +00:00
1995-05-07 23:08:17 +00:00
(global-set-key [C-escape] 'list-buffers)
1995-04-10 07:11:42 +00:00
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [C-end] 'end-of-buffer))
1997-06-22 18:57:55 +00:00
(provide 'pc-mode)
;;; pc-mode.el ends here