 		      ("L" . ibuffer)
 		      ("n" . universal-argument)
 		      ("o" . exchange-point-and-mark)
-		      ("r" . query-replace-regexp)
-		      ("s" . (lambda () (interactive)
-			       (call-interactively 'search-forward)
-			       (unless mark-active (set-mark (match-beginning 0)))))
-		      ("S" . (lambda () (interactive)
-			       (call-interactively 'search-backward)
-			       (unless mark-active (set-mark (match-end 0)))))
+		      ("r" . isearch-backward)
+		      ("s" . isearch-forward)
 		      ("p" . nil)
 		      ("p b" . compile)
+		      ("q" . save-buffers-kill-terminal)
 		      ("w" . kill-region)
 		      ("@" . mark-sexp)
 		      ("x" ,@ctl-x-map)

                        "d/working/wiki.im.hexo/source/asn1-vs-protobuf/index/deps/gpb/include"
                        (getenv "HOME")))
              (cons 'i (expand-file-name
                        "d/working/easemob/deps/tick"
                        (getenv "HOME")))
              (cons 'd (intern "'LAGER'"))
              (cons 'd (intern "'LICENSE'"))
              (list 'd (intern "'INITIAL_LICENSE_TIME'") 86400)
              'debug_info))
  ;; TODO: this is no good way to detect distel is installed.
  (let ((distel-root (expand-file-name "~/d/working/distel")))

          (define-key erlang-mode-map (kbd "<f7>") #'erlang-compile)
          (dolist (spec distel-shell-keys)
            (define-key erlang-shell-mode-map (read-kbd-macro (car spec)) (cadr spec))))

        (add-hook 'erlang-shell-mode-hook 'erlang-shell-mode-hook-1)))))
;;; -------------------  DONE --------------------------------
;; setq inhibit-startup-message to show "*scratch*" as the initial
