]> code.delx.au - gnu-emacs/commitdiff
(dirtrack-directory-change-hook): New hook.
authorKarl Heuer <kwzh@gnu.org>
Thu, 10 Dec 1998 03:24:19 +0000 (03:24 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 10 Dec 1998 03:24:19 +0000 (03:24 +0000)
(dirtrack): Run it.  Make debug message more verbose.

lisp/dirtrack.el

index 7ecfae014f61ac8458802cccaab85bccf6944463..d9bd8d3ef397d06df2079b0dc0695b1f7ef71e71 100644 (file)
@@ -181,6 +181,13 @@ be on a single line."
   :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 @@ forward ones."
              (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 @@ forward ones."
                (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)))