# HG changeset patch # User Richard M. Stallman # Date 809123225 0 # Node ID 00ee215f022ea37f3174f892cb8df56055f9da61 # Parent 30dad6bfce63e1c388d9fdfd43a06d45a88a4b17 (ediff-profile): Use make-local-hook and add and remove hooks locally. diff -r 30dad6bfce63 -r 00ee215f022e lisp/ediff-util.el --- a/lisp/ediff-util.el Tue Aug 22 19:44:26 1995 +0000 +++ b/lisp/ediff-util.el Tue Aug 22 20:27:05 1995 +0000 @@ -3035,15 +3035,15 @@ (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)