;; Copyright 2009 Kevin Ryde.

;; This file is part of miscbits-el.
;;
;; miscbits-el is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the
;; Free Software Foundation; either version 3, or (at your option) any later
;; version.
;;
;; miscbits-el is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
;; Public License for more details.
;;
;; You should have received a copy of the GNU General Public License along
;; with miscbits-el; see the file COPYING.  Failing that, go to
;; <http://www.gnu.org/licenses/>.


(setq compilation-directory-matcher
      '("\\(?:Entering\\|Leavin\\(g\\)\\) directory `\\(.+\\)'$" (2 . 1)))
(compilation-moredirs-shell-cd)

(compilation-mode)
(progn (text-mode) (setq buffer-read-only nil) (flyspell-mode 0))

cd /some/where
+ cd /some/where

set -x; cd /some/where; echo hi
set -x; cd /some/where; echo hi; cd /tmp;

cd /etc/emacs
site-start.el:1:1: some error

cd ..; cat bar
passwd:1:1: some error


make: Entering directory `/tmp/a/b/c'
foo:1:1: some error
make: Entering directory `..'
foo:1:1: some error


make: Entering directory `/tmp/a/'
foo:1:1: some error
make: Entering directory `b/'
foo:1:1: some error


Entering directory `/tmp/a/'
