Subject: Re: bug#23933: 25.1.50; Run a buffer-local hook with mapc

From: Tino Calancha <[email-masked]>
Date: Mon, 11 Jul 2016 02:31:52 +0900 (JST)

On Sun, 10 Jul 2016, Eli Zaretskii wrote:

> Tino, can you figure out why t is there?  Perhaps the solution is
> simply to remove it?
Just explained in previous e-mail by Noam.
I have tried another approach: drop the let binding
and call run-hooks over the actual hook, as follows:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index a6b88d5..b50ac6d 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -2439,7 +2439,6 @@ ediff-really-quit
    ;; restore buffer mode line id's in buffer-A/B/C
    (let ((control-buffer ediff-control-buffer)
  	(meta-buffer ediff-meta-buffer)
-	(after-quit-hook-internal ediff-after-quit-hook-internal)
  	(session-number ediff-meta-session-number)
  	;; suitable working frame
  	(warp-frame (if (and (ediff-window-display-p) (eq ediff-grab-mouse 
t))
@@ -2522,7 +2521,7 @@ ediff-really-quit
  			    (frame-selected-window warp-frame))
  			  2 1))

-  (mapc #'funcall after-quit-hook-internal)
+  (run-hooks 'ediff-after-quit-hook-internal)
    ))

  ;; Returns frame under mouse, if this frame is not a minibuffer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

but it doesn't work: the meta-buffer is not shown.
I prefer my initial patch which behaves the same as before
adding the lexical-binding.

Tino