Mercurial > emacs
comparison lisp/textmodes/picture.el @ 49177:f47ff7e8f5f5
(picture-substitute): Use command remapping instead of
substitute-key-definition.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sun, 12 Jan 2003 20:51:36 +0000 |
parents | fc643b6ab4f4 |
children | 695cf19ef79e d7ddb3e565de |
comparison
equal
deleted
inserted
replaced
49176:56966d83f3a5 | 49177:f47ff7e8f5f5 |
---|---|
1 ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model | 1 ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model |
2 | 2 |
3 ;; Copyright (C) 1985, 1994, 2002 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 1994, 2002, 2003 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: K. Shane Hartman | 5 ;; Author: K. Shane Hartman |
6 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
7 ;; Keywords: convenience wp | 7 ;; Keywords: convenience wp |
8 | 8 |
588 ;; Picture Keymap, entry and exit points. | 588 ;; Picture Keymap, entry and exit points. |
589 | 589 |
590 (defvar picture-mode-map nil) | 590 (defvar picture-mode-map nil) |
591 | 591 |
592 (defun picture-substitute (oldfun newfun) | 592 (defun picture-substitute (oldfun newfun) |
593 (substitute-key-definition oldfun newfun picture-mode-map global-map)) | 593 (define-key picture-mode-map (vector 'remap oldfun) newfun)) |
594 | 594 |
595 (if (not picture-mode-map) | 595 (if (not picture-mode-map) |
596 (progn | 596 (progn |
597 (setq picture-mode-map (make-keymap)) | 597 (setq picture-mode-map (make-keymap)) |
598 (picture-substitute 'self-insert-command 'picture-self-insert) | 598 (picture-substitute 'self-insert-command 'picture-self-insert) |