From 1b8c25cc639c6f145bdf641c8ad0a9cdc662a2a7 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 14 Apr 2012 14:59:00 +0900 Subject: [PATCH] less-like searching in view-mode --- emacs.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index e7b1f97..9ea2f03 100644 --- a/emacs.el +++ b/emacs.el @@ -699,9 +699,17 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (lambda() (define-key view-mode-map "j" (lambda() (interactive) (scroll-up 1))) (define-key view-mode-map "k" (lambda() (interactive) (scroll-down 1))) - (define-key view-mode-map "/" 'isearch-forward) (define-key view-mode-map "v" 'toggle-read-only) - (define-key view-mode-map "q" 'bury-buffer))) + (define-key view-mode-map "q" 'bury-buffer) + ;; (define-key view-mode-map "/" 'nonincremental-re-search-forward) + ;; (define-key view-mode-map "?" 'nonincremental-re-search-backward) + ;; (define-key view-mode-map "n" 'nonincremental-repeat-search-forward) + ;; (define-key view-mode-map "N" 'nonincremental-repeat-search-backward) + (define-key view-mode-map "/" 'isearch-forward-regexp) + (define-key view-mode-map "?" 'isearch-backward-regexp) + (define-key view-mode-map "n" 'isearch-repeat-forward) + (define-key view-mode-map "N" 'isearch-repeat-backward) + )) (global-set-key "\M-r" 'view-mode) (setq view-read-only t) @@ -755,14 +763,17 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;; (define-key term-raw-map "\C-t" 'set-mark-command) (define-key term-raw-map "\C-x" (lookup-key (current-global-map) "\C-x")) (define-key term-raw-map "\C-z" (lookup-key (current-global-map) "\C-z"))) + (define-key term-raw-map (kbd "C-p") 'term-send-raw) + (define-key term-raw-map (kbd "C-n") 'term-send-raw) (define-key term-raw-map "q" 'my-term-quit-or-send-raw) - (define-key term-raw-map (kbd "ESC") 'term-send-raw) + ;; (define-key term-raw-map (kbd "ESC") 'term-send-raw) (define-key term-raw-map [delete] 'term-send-raw) (define-key term-raw-map (kbd "DEL") 'term-send-backspace) (define-key term-raw-map "\C-y" 'term-paste) (define-key term-raw-map "\C-c" 'term-send-raw) ;; 'term-interrupt-subjob) + '(define-key term-mode-map (kbd "C-x C-q") 'term-pager-toggle) ;; (dolist (key '("" "" "" "")) - ;; (define-key term-raw-map (kbd key) 'term-send-raw)) + ;; (define-key term-raw-map (read-kbd-macro key) 'term-send-raw)) ;; (define-key term-raw-map "\C-d" 'delete-char) (set (make-local-variable 'scroll-margin) 0) ;; (set (make-local-variable 'cua-enable-cua-keys) nil)