comparison lisp/progmodes/sh-script.el @ 49176:56966d83f3a5

(sh-mode-map): Use command remapping instead of substitute-key-definition.
author Andreas Schwab <schwab@suse.de>
date Sun, 12 Jan 2003 20:51:12 +0000
parents 99f9777a831b
children ed0ec7e165de
comparison
equal deleted inserted replaced
49175:97abde229069 49176:56966d83f3a5
1 ;;; sh-script.el --- shell-script editing commands for Emacs 1 ;;; sh-script.el --- shell-script editing commands for Emacs
2 2
3 ;; Copyright (C) 1993, 94, 95, 96, 97, 1999, 2001 3 ;; Copyright (C) 1993, 94, 95, 96, 97, 1999, 2001, 2003
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Author: Daniel Pfeiffer <occitan@esperanto.org> 6 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
7 ;; Version: 2.0f 7 ;; Version: 2.0f
8 ;; Maintainer: FSF 8 ;; Maintainer: FSF
441 (define-key map "[" 'skeleton-pair-insert-maybe) 441 (define-key map "[" 'skeleton-pair-insert-maybe)
442 (define-key map "'" 'skeleton-pair-insert-maybe) 442 (define-key map "'" 'skeleton-pair-insert-maybe)
443 (define-key map "`" 'skeleton-pair-insert-maybe) 443 (define-key map "`" 'skeleton-pair-insert-maybe)
444 (define-key map "\"" 'skeleton-pair-insert-maybe) 444 (define-key map "\"" 'skeleton-pair-insert-maybe)
445 445
446 (substitute-key-definition 'complete-tag 'comint-dynamic-complete 446 (define-key map [remap complete-tag] 'comint-dynamic-complete)
447 map (current-global-map)) 447 (define-key map [remap newline-and-indent] 'sh-newline-and-indent)
448 (substitute-key-definition 'newline-and-indent 'sh-newline-and-indent 448 (define-key map [remap delete-backward-char]
449 map (current-global-map)) 449 'backward-delete-char-untabify)
450 (substitute-key-definition 'delete-backward-char
451 'backward-delete-char-untabify
452 map (current-global-map))
453 (define-key map "\C-c:" 'sh-set-shell) 450 (define-key map "\C-c:" 'sh-set-shell)
454 (substitute-key-definition 'beginning-of-defun 451 (define-key map [remap beginning-of-defun]
455 'sh-beginning-of-compound-command 452 'sh-beginning-of-compound-command)
456 map (current-global-map)) 453 (define-key map [remap backward-sentence] 'sh-beginning-of-command)
457 (substitute-key-definition 'backward-sentence 'sh-beginning-of-command 454 (define-key map [remap forward-sentence] 'sh-end-of-command)
458 map (current-global-map))
459 (substitute-key-definition 'forward-sentence 'sh-end-of-command
460 map (current-global-map))
461 (define-key map [menu-bar insert] (cons "Insert" menu-map)) 455 (define-key map [menu-bar insert] (cons "Insert" menu-map))
462 (define-key menu-map [sh-while] '("While Loop" . sh-while)) 456 (define-key menu-map [sh-while] '("While Loop" . sh-while))
463 (define-key menu-map [sh-until] '("Until Loop" . sh-until)) 457 (define-key menu-map [sh-until] '("Until Loop" . sh-until))
464 (define-key menu-map [sh-tmp-file] '("Temporary File" . sh-tmp-file)) 458 (define-key menu-map [sh-tmp-file] '("Temporary File" . sh-tmp-file))
465 (define-key menu-map [sh-select] '("Select Statement" . sh-select)) 459 (define-key menu-map [sh-select] '("Select Statement" . sh-select))