summaryrefslogtreecommitdiff
path: root/lisp/dirtrack.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1998-12-10 03:24:19 +0000
committerKarl Heuer <kwzh@gnu.org>1998-12-10 03:24:19 +0000
commit12b0f4514ba7b52219fb25db3a820387984cd701 (patch)
tree8401b80a519e49336feded2a42c59a23ab7734a0 /lisp/dirtrack.el
parent4468c4f1cf677d3d68d7af111923e025f16bb948 (diff)
downloademacs-12b0f4514ba7b52219fb25db3a820387984cd701.tar.gz
(dirtrack-directory-change-hook): New hook.
(dirtrack): Run it. Make debug message more verbose.
Diffstat (limited to 'lisp/dirtrack.el')
-rw-r--r--lisp/dirtrack.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 7ecfae014f6..d9bd8d3ef39 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -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)))