diff options
| author | Karl Heuer | 1998-12-10 03:24:19 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-12-10 03:24:19 +0000 |
| commit | 12b0f4514ba7b52219fb25db3a820387984cd701 (patch) | |
| tree | 8401b80a519e49336feded2a42c59a23ab7734a0 | |
| parent | 4468c4f1cf677d3d68d7af111923e025f16bb948 (diff) | |
| download | emacs-12b0f4514ba7b52219fb25db3a820387984cd701.tar.gz emacs-12b0f4514ba7b52219fb25db3a820387984cd701.zip | |
(dirtrack-directory-change-hook): New hook.
(dirtrack): Run it. Make debug message more verbose.
| -rw-r--r-- | lisp/dirtrack.el | 12 |
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." | |||
| 181 | :type 'function | 181 | :type 'function |
| 182 | ) | 182 | ) |
| 183 | 183 | ||
| 184 | (defcustom dirtrack-directory-change-hook nil | ||
| 185 | "Hook that is called when a directory change is made." | ||
| 186 | :group 'dirtrack | ||
| 187 | :type 'function | ||
| 188 | ) | ||
| 189 | |||
| 190 | |||
| 184 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 191 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 185 | ;; Functions | 192 | ;; Functions |
| 186 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 193 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -277,8 +284,8 @@ forward ones." | |||
| 277 | (and dirtrack-debug | 284 | (and dirtrack-debug |
| 278 | (dirtrack-debug-message | 285 | (dirtrack-debug-message |
| 279 | (format | 286 | (format |
| 280 | "Failed to match regexp: %s" | 287 | "Input `%s' failed to match regexp: %s" |
| 281 | dirtrack-regexp))) | 288 | input dirtrack-regexp))) |
| 282 | (setq prompt-path | 289 | (setq prompt-path |
| 283 | (buffer-substring-no-properties | 290 | (buffer-substring-no-properties |
| 284 | (match-beginning match-num) (match-end match-num))) | 291 | (match-beginning match-num) (match-end match-num))) |
| @@ -308,6 +315,7 @@ forward ones." | |||
| 308 | (if (file-accessible-directory-p prompt-path) | 315 | (if (file-accessible-directory-p prompt-path) |
| 309 | ;; Change directory | 316 | ;; Change directory |
| 310 | (and (shell-process-cd prompt-path) | 317 | (and (shell-process-cd prompt-path) |
| 318 | (run-hooks dirtrack-directory-change-hook) | ||
| 311 | dirtrack-debug | 319 | dirtrack-debug |
| 312 | (dirtrack-debug-message | 320 | (dirtrack-debug-message |
| 313 | (format "Changing directory to %s" prompt-path))) | 321 | (format "Changing directory to %s" prompt-path))) |