diff --git a/bashrc b/bashrc index 5ed5616..d40f255 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 ################################## @@ -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 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