# HG changeset patch # User Karl Heuer # Date 913260259 0 # Node ID 6c6028a96f5ae71147ce585f0c4edc7ef38fc22d # Parent 1a0fa0377fb339c8a5722dd7ae13a9c03e45f4e5 (dirtrack-directory-change-hook): New hook. (dirtrack): Run it. Make debug message more verbose. diff -r 1a0fa0377fb3 -r 6c6028a96f5a lisp/dirtrack.el --- 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)))