From 2a3bf9a2a44b0cb5f06751e5de0128ac3f021541 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 3 Jul 2013 15:14:38 +0900 Subject: [PATCH 1/3] emacs.el: add remember-major-modes-mode sexps --- emacs.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 38cefed..75ee8ee 100644 --- a/emacs.el +++ b/emacs.el @@ -683,7 +683,13 @@ found, otherwise returns nil." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; some modes and hooks -;; todo: reg major mode when set explicitly +(and (fetch-library + "https://raw.github.com/10sr/emacs-lisp/master/remember-major-modes-mode.el") + (require 'remember-major-modes-mode nil t) + (remember-major-modes-mode 1) + (add-hook 'after-change-major-mode-hook + 'remember-major-modes-remember)) + ;; Detect file type from shebang and set major-mode. (add-to-list 'interpreter-mode-alist From d4d71f426117ac90c7b3728d0cec2a34a7c0bd9b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 5 Jul 2013 13:28:46 +0900 Subject: [PATCH 2/3] update s function --- bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bashrc b/bashrc index 4119cae..6b891aa 100755 --- a/bashrc +++ b/bashrc @@ -374,6 +374,11 @@ s(){ ack --pager="$PAGER" "$@" else echo ">> Using grep" 1>&2 + if test $# -eq 0 + then + echo "No search word given." 1>&2 + return 1 + fi grep -nH --color=always --exclude='.svn/*' --exclude='.git/*' "$@" -r . \ | $PAGER # echo "No search command found. Use grep." 2>&1 From e98fb411354078574101b3c5d94c6c2a1ec0ae03 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 5 Jul 2013 15:02:18 +0900 Subject: [PATCH 3/3] bashrc: fix bug --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 6b891aa..6d379de 100755 --- a/bashrc +++ b/bashrc @@ -69,7 +69,7 @@ fi # when building tmux if ! __search_string "$LD_LIBRARY_PATH" "$HOME/.local/lib" then - LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.local/lib" + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.local/lib" fi ##################################