Mercurial > emacs
comparison lisp/bindings.el @ 61650:9a27f4097b8f
(next-buffer, prev-buffer, next-error)
(scroll-other-window, keyboard-quit, keyboard-escape-quit)
(clone-indirect-buffer-other-window): Move bindings from simple.el.
(next-buffer, prev-buffer): Add C-x C-right and C-x C-left bindings.
(next-error, previous-error): Add M-g M-n/n and M-g M-p/p bindings.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 19 Apr 2005 09:25:32 +0000 |
parents | 65691b78b6f2 |
children | 2c98b8bb06c8 bbf359ec4a59 |
comparison
equal
deleted
inserted
replaced
61649:07fac5b8e9dc | 61650:9a27f4097b8f |
---|---|
626 (define-key ctl-x-map "nn" 'narrow-to-region) | 626 (define-key ctl-x-map "nn" 'narrow-to-region) |
627 (define-key ctl-x-map "nw" 'widen) | 627 (define-key ctl-x-map "nw" 'widen) |
628 ;; (define-key ctl-x-map "n" 'narrow-to-region) | 628 ;; (define-key ctl-x-map "n" 'narrow-to-region) |
629 ;; (define-key ctl-x-map "w" 'widen) | 629 ;; (define-key ctl-x-map "w" 'widen) |
630 | 630 |
631 ;; Quitting | |
632 (define-key global-map "\e\e\e" 'keyboard-escape-quit) | |
633 (define-key global-map "\C-g" 'keyboard-quit) | |
634 | |
631 (define-key global-map "\C-j" 'newline-and-indent) | 635 (define-key global-map "\C-j" 'newline-and-indent) |
632 (define-key global-map "\C-m" 'newline) | 636 (define-key global-map "\C-m" 'newline) |
633 (define-key global-map "\C-o" 'open-line) | 637 (define-key global-map "\C-o" 'open-line) |
634 (define-key esc-map "\C-o" 'split-line) | 638 (define-key esc-map "\C-o" 'split-line) |
635 (define-key global-map "\C-q" 'quoted-insert) | 639 (define-key global-map "\C-q" 'quoted-insert) |
650 (define-key ctl-x-map "\M-:" 'repeat-complex-command) | 654 (define-key ctl-x-map "\M-:" 'repeat-complex-command) |
651 (define-key ctl-x-map "u" 'advertised-undo) | 655 (define-key ctl-x-map "u" 'advertised-undo) |
652 ;; Many people are used to typing C-/ on X terminals and getting C-_. | 656 ;; Many people are used to typing C-/ on X terminals and getting C-_. |
653 (define-key global-map [?\C-/] 'undo) | 657 (define-key global-map [?\C-/] 'undo) |
654 (define-key global-map "\C-_" 'undo) | 658 (define-key global-map "\C-_" 'undo) |
659 ;; Richard said that we should not use C-x <uppercase letter> and I have | |
660 ;; no idea whereas to bind it. Any suggestion welcome. -stef | |
661 ;; (define-key ctl-x-map "U" 'undo-only) | |
662 | |
655 (define-key esc-map "!" 'shell-command) | 663 (define-key esc-map "!" 'shell-command) |
656 (define-key esc-map "|" 'shell-command-on-region) | 664 (define-key esc-map "|" 'shell-command-on-region) |
665 | |
666 (define-key global-map [?\C-x right] 'next-buffer) | |
667 (define-key global-map [?\C-x C-right] 'next-buffer) | |
668 (define-key global-map [?\C-x left] 'prev-buffer) | |
669 (define-key global-map [?\C-x C-left] 'prev-buffer) | |
657 | 670 |
658 (let ((map minibuffer-local-map)) | 671 (let ((map minibuffer-local-map)) |
659 (define-key map "\en" 'next-history-element) | 672 (define-key map "\en" 'next-history-element) |
660 (define-key map [next] 'next-history-element) | 673 (define-key map [next] 'next-history-element) |
661 (define-key map [down] 'next-history-element) | 674 (define-key map [down] 'next-history-element) |
707 (define-key global-map "\C-e" 'move-end-of-line) | 720 (define-key global-map "\C-e" 'move-end-of-line) |
708 (define-key esc-map "g" (make-sparse-keymap)) | 721 (define-key esc-map "g" (make-sparse-keymap)) |
709 (define-key esc-map "g\M-g" 'goto-line) | 722 (define-key esc-map "g\M-g" 'goto-line) |
710 (define-key esc-map "gg" 'goto-line) | 723 (define-key esc-map "gg" 'goto-line) |
711 | 724 |
725 (define-key esc-map "gn" 'next-error) | |
726 (define-key esc-map "g\M-n" 'next-error) | |
727 (define-key ctl-x-map "`" 'next-error) | |
728 | |
729 (define-key esc-map "gp" 'previous-error) | |
730 (define-key esc-map "g\M-p" 'previous-error) | |
731 | |
712 ;;(defun function-key-error () | 732 ;;(defun function-key-error () |
713 ;; (interactive) | 733 ;; (interactive) |
714 ;; (error "That function key is not bound to anything")) | 734 ;; (error "That function key is not bound to anything")) |
715 | 735 |
716 (define-key global-map [menu] 'execute-extended-command) | 736 (define-key global-map [menu] 'execute-extended-command) |
735 (define-key global-map [C-prior] 'scroll-right) | 755 (define-key global-map [C-prior] 'scroll-right) |
736 (put 'scroll-left 'disabled t) | 756 (put 'scroll-left 'disabled t) |
737 (define-key global-map [C-next] 'scroll-left) | 757 (define-key global-map [C-next] 'scroll-left) |
738 (define-key global-map [M-next] 'scroll-other-window) | 758 (define-key global-map [M-next] 'scroll-other-window) |
739 (define-key global-map [M-prior] 'scroll-other-window-down) | 759 (define-key global-map [M-prior] 'scroll-other-window-down) |
760 (define-key esc-map [?\C-\S-v] 'scroll-other-window-down) | |
740 (define-key global-map [end] 'end-of-line) | 761 (define-key global-map [end] 'end-of-line) |
741 (define-key global-map [C-end] 'end-of-buffer) | 762 (define-key global-map [C-end] 'end-of-buffer) |
742 (define-key global-map [M-end] 'end-of-buffer-other-window) | 763 (define-key global-map [M-end] 'end-of-buffer-other-window) |
743 (define-key global-map [begin] 'beginning-of-buffer) | 764 (define-key global-map [begin] 'beginning-of-buffer) |
744 (define-key global-map [M-begin] 'beginning-of-buffer-other-window) | 765 (define-key global-map [M-begin] 'beginning-of-buffer-other-window) |
1018 (define-key esc-map "'" 'abbrev-prefix-mark) | 1039 (define-key esc-map "'" 'abbrev-prefix-mark) |
1019 (define-key ctl-x-map "'" 'expand-abbrev) | 1040 (define-key ctl-x-map "'" 'expand-abbrev) |
1020 | 1041 |
1021 (define-key ctl-x-map "z" 'repeat) | 1042 (define-key ctl-x-map "z" 'repeat) |
1022 | 1043 |
1044 (define-key ctl-x-4-map "c" 'clone-indirect-buffer-other-window) | |
1045 | |
1023 ;; Don't look for autoload cookies in this file. | 1046 ;; Don't look for autoload cookies in this file. |
1024 ;; Local Variables: | 1047 ;; Local Variables: |
1025 ;; no-update-autoloads: t | 1048 ;; no-update-autoloads: t |
1026 ;; End: | 1049 ;; End: |
1027 | 1050 |