diff options
| author | Juri Linkov | 2008-06-25 20:17:07 +0000 |
|---|---|---|
| committer | Juri Linkov | 2008-06-25 20:17:07 +0000 |
| commit | 56d62ee1fba23e69035e5146a12323cdfb60ea9b (patch) | |
| tree | 601c121b0b5aff46cc7862a96fcbe32bb10a0359 | |
| parent | 43f8b2756816315f8779d64bad5cf6f1e14660e6 (diff) | |
| download | emacs-56d62ee1fba23e69035e5146a12323cdfb60ea9b.tar.gz emacs-56d62ee1fba23e69035e5146a12323cdfb60ea9b.zip | |
(goto-map): New variable. Rebind goto-related
commands to this `M-g' prefix keymap.
(search-map): New variable for `M-s' prefix keymap.
Bind `M-s o' to `occur', `M-shr' to `highlight-regexp', `M-shp' to
`highlight-phrase', `M-shl' to `highlight-lines-matching-regexp',
`M-shu' to `unhighlight-regexp', `M-shf' to `hi-lock-find-patterns',
`M-shw' to `hi-lock-write-interactive-patterns'.
| -rw-r--r-- | lisp/bindings.el | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index cb97209924c..3a5a13745de 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -804,16 +804,31 @@ language you are using." | |||
| 804 | (define-key ctl-x-map "\C-n" 'set-goal-column) | 804 | (define-key ctl-x-map "\C-n" 'set-goal-column) |
| 805 | (define-key global-map "\C-a" 'move-beginning-of-line) | 805 | (define-key global-map "\C-a" 'move-beginning-of-line) |
| 806 | (define-key global-map "\C-e" 'move-end-of-line) | 806 | (define-key global-map "\C-e" 'move-end-of-line) |
| 807 | (define-key esc-map "g" (make-sparse-keymap)) | ||
| 808 | (define-key esc-map "g\M-g" 'goto-line) | ||
| 809 | (define-key esc-map "gg" 'goto-line) | ||
| 810 | 807 | ||
| 811 | (define-key esc-map "gn" 'next-error) | ||
| 812 | (define-key esc-map "g\M-n" 'next-error) | ||
| 813 | (define-key ctl-x-map "`" 'next-error) | 808 | (define-key ctl-x-map "`" 'next-error) |
| 814 | 809 | ||
| 815 | (define-key esc-map "gp" 'previous-error) | 810 | (defvar goto-map (make-sparse-keymap) |
| 816 | (define-key esc-map "g\M-p" 'previous-error) | 811 | "Keymap for navigation commands.") |
| 812 | (define-key esc-map "g" goto-map) | ||
| 813 | |||
| 814 | (define-key goto-map "g" 'goto-line) | ||
| 815 | (define-key goto-map "\M-g" 'goto-line) | ||
| 816 | (define-key goto-map "n" 'next-error) | ||
| 817 | (define-key goto-map "\M-n" 'next-error) | ||
| 818 | (define-key goto-map "p" 'previous-error) | ||
| 819 | (define-key goto-map "\M-p" 'previous-error) | ||
| 820 | |||
| 821 | (defvar search-map (make-sparse-keymap) | ||
| 822 | "Keymap for search related commands.") | ||
| 823 | (define-key esc-map "s" search-map) | ||
| 824 | |||
| 825 | (define-key search-map "o" 'occur) | ||
| 826 | (define-key search-map "hr" 'highlight-regexp) | ||
| 827 | (define-key search-map "hp" 'highlight-phrase) | ||
| 828 | (define-key search-map "hl" 'highlight-lines-matching-regexp) | ||
| 829 | (define-key search-map "hu" 'unhighlight-regexp) | ||
| 830 | (define-key search-map "hf" 'hi-lock-find-patterns) | ||
| 831 | (define-key search-map "hw" 'hi-lock-write-interactive-patterns) | ||
| 817 | 832 | ||
| 818 | ;;(defun function-key-error () | 833 | ;;(defun function-key-error () |
| 819 | ;; (interactive) | 834 | ;; (interactive) |