changeset 23851:6c6028a96f5a

(dirtrack-directory-change-hook): New hook. (dirtrack): Run it. Make debug message more verbose.
author Karl Heuer <kwzh@gnu.org>
date Thu, 10 Dec 1998 03:24:19 +0000
parents 1a0fa0377fb3
children dc812cd8bd1b
files lisp/dirtrack.el
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dirtrack.el	Thu Dec 10 03:19:37 1998 +0000
+++ b/lisp/dirtrack.el	Thu Dec 10 03:24:19 1998 +0000
@@ -181,6 +181,13 @@
   :type  'function
   )
 
+(defcustom dirtrack-directory-change-hook nil
+  "Hook that is called when a directory change is made."
+  :group 'dirtrack
+  :type 'function
+  )
+
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Functions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -277,8 +284,8 @@
 	      (and dirtrack-debug
 		   (dirtrack-debug-message 
 		    (format 
-		     "Failed to match regexp: %s" 
-		    dirtrack-regexp)))
+		     "Input `%s' failed to match regexp: %s" 
+		    input dirtrack-regexp)))
 	    (setq prompt-path 
 		  (buffer-substring-no-properties
 		   (match-beginning match-num) (match-end match-num)))
@@ -308,6 +315,7 @@
 		(if (file-accessible-directory-p prompt-path)
 		    ;; Change directory
 		    (and (shell-process-cd prompt-path)
+			 (run-hooks dirtrack-directory-change-hook)
 			 dirtrack-debug
 			 (dirtrack-debug-message 
 			  (format "Changing directory to %s" prompt-path)))