]> git.eshelyaron.com Git - emacs.git/commitdiff
(ediff-profile): Use make-local-hook and add and remove hooks locally.
authorRichard M. Stallman <rms@gnu.org>
Tue, 22 Aug 1995 20:27:05 +0000 (20:27 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 22 Aug 1995 20:27:05 +0000 (20:27 +0000)
lisp/ediff-util.el

index d12d19f1f02fac6c0da858bac7ad32c9c7a88b91..8c8f4dc2c1f3eec2e5e78003e8140933eb41f3a4 100644 (file)
@@ -3035,15 +3035,15 @@ avoid loading cl-*."
   (interactive)
   (or (ediff-buffer-live-p ediff-control-buffer)
       (error "This command runs only out of Ediff Control Buffer"))
-  (make-local-variable 'pre-command-hook)
-  (make-local-variable 'post-command-hook)
+  (make-local-hook 'pre-command-hook)
+  (make-local-hook 'post-command-hook)
   (if (memq 'ediff-save-time pre-command-hook)
-      (progn (remove-hook 'pre-command-hook 'ediff-save-time)
-            (remove-hook 'post-command-hook 'ediff-calc-command-time)
+      (progn (remove-hook 'pre-command-hook 'ediff-save-time t)
+            (remove-hook 'post-command-hook 'ediff-calc-command-time t)
             (setq ediff-command-begin-time '(0 0 0))
             (message "Ediff profiling disabled"))
-    (add-hook 'pre-command-hook 'ediff-save-time t)
-    (add-hook 'post-command-hook 'ediff-calc-command-time)
+    (add-hook 'pre-command-hook 'ediff-save-time t t)
+    (add-hook 'post-command-hook 'ediff-calc-command-time nil t)
     (message "Ediff profiling enabled")))
     
 (defun ediff-print-diff-vector (diff-vector-var)