shell-mode で Mercurial の hg qseries のコマンド入力すると、適用解除されたものがグレー表示されなくて困ってたが解決したのでとりあずメモ
init.el
# MacPorts で bash インストールした場合 (setenv "SHELL" "/opt/local/bin/bash") (add-hook 'shell-mode-hook '(lambda () (progn (define-key shell-mode-map (kbd "C-p") 'comint-previous-matching-input-from-input) (define-key shell-mode-map (kbd "C-n") 'comint-next-matching-input-from-input) (set-buffer-process-coding-system 'utf-8-hfs 'utf-8-hfs) (require 'ansi-color) (autoload 'ansi-color-for-comint-mode-on "ansi-color" "Set `ansi-color-for-comint-mode' to t." t) ;; ;; "Emacs ANSI colors" ;; ;; http://tapoueh.org/blog/2011/07/29-emacs-ansi-colors.html (setq ansi-color-names-vector (vector ;; (frame-parameter nil 'background-color) "#444444" "#f57900" "#8ae234" "#edd400" "#729fcf" "#ad7fa8" "#00cdcd" "#eeeeec") ansi-term-color-vector ansi-color-names-vector ansi-color-map (ansi-color-make-color-map)) ))) ;; emacs-bash-completion ;; https://github.com/szermatt/emacs-bash-completion (require 'bash-completion) (bash-completion-setup) (setq bash-completion-process-timeout 7) ;; (setq bash-completion-initial-timeout 60) (setq bash-completion-prog "/opt/local/bin/bash")
.bashrc
# "Emacs 上で快適に Bash や Zsh を利用する設定" # http://sakito.jp/emacs/emacsshell.html#emacs-shell-mode if [ "$EMACS" ];then export TERM=Eterm-color fi