<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -97,13 +97,7 @@
   &quot;Runs a compilation process with a number of PHP style checks.&quot;
   (interactive &quot;p&quot;)
   (let ((compilation-error-regexp-alist (get-php-compilation-regexp)))
-    (setq cb (current-buffer))
     (php-loc arg)
-    (switch-to-buffer &quot;*compilation*&quot;)
-    (if (get-buffer  &quot;*php lines of code*&quot;)
-	(kill-buffer &quot;*php lines of code*&quot;))
-    (rename-buffer &quot;*php lines of code*&quot;)
-    (switch-to-buffer cb)
     (php-pmd arg)
     (switch-to-buffer &quot;*compilation*&quot;)
     (if (get-buffer  &quot;*php mess detection*&quot;)
@@ -111,24 +105,8 @@
     (rename-buffer &quot;*php mess detection*&quot;)
     (switch-to-buffer cb)
     (php-cpd arg)
-    (switch-to-buffer &quot;*compilation*&quot;)
-    (if (get-buffer  &quot;*php copy paste detection*&quot;)
-	(kill-buffer &quot;*php copy paste detection*&quot;))
-    (rename-buffer &quot;*php copy paste detection*&quot;)
-    (switch-to-buffer cb)
     (phpcs arg)
-    (switch-to-buffer &quot;*compilation*&quot;)
-    (if (get-buffer  &quot;*php code style*&quot;)
-	(kill-buffer &quot;*php code style*&quot;))
-    (rename-buffer &quot;*php code style*&quot;)
-    (switch-to-buffer cb)
-    (php-lint arg)
-    (switch-to-buffer &quot;*compilation*&quot;)
-    (if (get-buffer  &quot;*php lint*&quot;)
-	(kill-buffer &quot;*php lint*&quot;))
-    (rename-buffer &quot;*php lint*&quot;)
-    (switch-to-buffer cb)
-    ))
+    (php-lint arg)))
 
 ;; taken from http://atomized.org/2008/10/php-lint-and-style-checking-from-emacs/
 (defun php-lint (arg)
@@ -141,7 +119,8 @@
 		    (buffer-file-name))))
     (compile (format &quot;%s \&quot;%s\&quot;&quot;
 		     phplint_command
-		     file-arg))))
+		     file-arg)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php lint*&quot;))
 
 (defun phpcs (arg)
   &quot;Performs a PHP code sniffer check on the current file.&quot;
@@ -154,7 +133,8 @@
     (compile (format &quot;%s %s %s&quot;
 		     phpcs_command
 		     phpcs_options
-                     file-arg))))
+                     file-arg)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php code style*&quot;))
  
 (defun php-loc (arg)
   (interactive &quot;p&quot;)
@@ -168,7 +148,8 @@
     (compile (format &quot;%s %s %s&quot;
 		     plc_command
 		     plc_options
-		     file-arg))))
+		     file-arg)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php lines of code*&quot;))
 
 (defun php-cpd (arg)
   (interactive &quot;p&quot;)
@@ -182,7 +163,8 @@
     (compile (format &quot;%s %s %s&quot;
 		     pcp_command
 		     pcp_options
-		     file-arg))))
+		     file-arg)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php copy paste detection*&quot;))
 
 (defun php-pmd (arg)
   (interactive &quot;p&quot;)
@@ -200,7 +182,8 @@
 		     file-arg
 		     pmd_format
 		     pmd_codestyle
-		     pmd_options))))
+		     pmd_options)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php mess detection*&quot;))
 
 (defun php-unit (format)
   (interactive (list (completing-read &quot;Output format: &quot;
@@ -250,7 +233,8 @@
 		     (file-name-directory buffer-file-name)
 		     phprun_command
 		     phprun_phpoptions
-		     buffer-file-name))))
+		     buffer-file-name)))
+  (switch-and-rename &quot;*compilation*&quot; &quot;*php run*&quot;))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -316,6 +300,14 @@
     (setq currentdir (file-name-directory (directory-file-name currentdir))))
   currentdir)
 
+(defun switch-and-rename (target name)
+    (setq cb (current-buffer))
+    (switch-to-buffer target)
+    (if (get-buffer  name)
+	(kill-buffer name))
+    (rename-buffer name)
+    (switch-to-buffer cb))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;;  F3 - Evaluating, programming</diff>
      <filename>pardalys/modules/tool_emacs/files/ed_01_php_mode.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2ae270066f013cacc1f9282b2fd82d374347a4fb</id>
    </parent>
  </parents>
  <author>
    <name>Gunnar Wrobel</name>
    <email>p@rdus.de</email>
  </author>
  <url>http://github.com/wrobel/pardalys/commit/14794666e5e47029310bef69be82e2598780550a</url>
  <id>14794666e5e47029310bef69be82e2598780550a</id>
  <committed-date>2009-10-02T11:31:58-07:00</committed-date>
  <authored-date>2009-10-02T11:31:58-07:00</authored-date>
  <message>Improve the buffer naming.</message>
  <tree>e9702ae6470779660289713fdb47123cccf472ac</tree>
  <committer>
    <name>Gunnar Wrobel</name>
    <email>p@rdus.de</email>
  </committer>
</commit>
