diff options
| author | Richard M. Stallman | 1995-08-22 20:27:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-08-22 20:27:05 +0000 |
| commit | c2bf3f2e59ab666307fed33da761907bf2d11254 (patch) | |
| tree | 056946d8380e967fd25852d079e78fd40845f4e8 | |
| parent | faec11dbd4d6436a20b5f0614b368c2902144d62 (diff) | |
| download | emacs-c2bf3f2e59ab666307fed33da761907bf2d11254.tar.gz emacs-c2bf3f2e59ab666307fed33da761907bf2d11254.zip | |
(ediff-profile): Use make-local-hook and add and remove hooks locally.
| -rw-r--r-- | lisp/ediff-util.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index d12d19f1f02..8c8f4dc2c1f 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -3035,15 +3035,15 @@ avoid loading cl-*." | |||
| 3035 | (interactive) | 3035 | (interactive) |
| 3036 | (or (ediff-buffer-live-p ediff-control-buffer) | 3036 | (or (ediff-buffer-live-p ediff-control-buffer) |
| 3037 | (error "This command runs only out of Ediff Control Buffer")) | 3037 | (error "This command runs only out of Ediff Control Buffer")) |
| 3038 | (make-local-variable 'pre-command-hook) | 3038 | (make-local-hook 'pre-command-hook) |
| 3039 | (make-local-variable 'post-command-hook) | 3039 | (make-local-hook 'post-command-hook) |
| 3040 | (if (memq 'ediff-save-time pre-command-hook) | 3040 | (if (memq 'ediff-save-time pre-command-hook) |
| 3041 | (progn (remove-hook 'pre-command-hook 'ediff-save-time) | 3041 | (progn (remove-hook 'pre-command-hook 'ediff-save-time t) |
| 3042 | (remove-hook 'post-command-hook 'ediff-calc-command-time) | 3042 | (remove-hook 'post-command-hook 'ediff-calc-command-time t) |
| 3043 | (setq ediff-command-begin-time '(0 0 0)) | 3043 | (setq ediff-command-begin-time '(0 0 0)) |
| 3044 | (message "Ediff profiling disabled")) | 3044 | (message "Ediff profiling disabled")) |
| 3045 | (add-hook 'pre-command-hook 'ediff-save-time t) | 3045 | (add-hook 'pre-command-hook 'ediff-save-time t t) |
| 3046 | (add-hook 'post-command-hook 'ediff-calc-command-time) | 3046 | (add-hook 'post-command-hook 'ediff-calc-command-time nil t) |
| 3047 | (message "Ediff profiling enabled"))) | 3047 | (message "Ediff profiling enabled"))) |
| 3048 | 3048 | ||
| 3049 | (defun ediff-print-diff-vector (diff-vector-var) | 3049 | (defun ediff-print-diff-vector (diff-vector-var) |