unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23933: 25.1.50; Run a buffer-local hook with mapc
@ 2016-07-10 10:18 Tino Calancha
  2016-07-10 14:44 ` Eli Zaretskii
  2016-07-11 16:06 ` bug#23933: (no subject) Tino Calancha
  0 siblings, 2 replies; 18+ messages in thread
From: Tino Calancha @ 2016-07-10 10:18 UTC (permalink / raw)
  To: 23933; +Cc: kifer

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]


Prevent calling (funcall t) when running a buffer-local hook
as (mapc #'funcall LOCAL-HOOK).

emacs -Q /tmp
M-! for f in foo bar foo-new bar-new; do echo $f>/tmp/$f;done RET
M-! for f in foo bar; do diff -u /tmp/$f /tmp/${f}-new >> /tmp/patch;done 
RET
M-x epatch RET n patch RET C-k RET y n v q y
;; funcall: Symbol’s function definition is void: t

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From de693cda8c6a174149b523fb4adcfae6d28bc202 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Sun, 10 Jul 2016 18:02:16 +0900
Subject: [PATCH] Run a buffer-local hook with mapc

* lisp/vc/ediff-util.el (ediff-really-quit): Avoid to apply funcall on 't'
(Bug#23933).
---
  lisp/vc/ediff-util.el | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index a6b88d5..3d2b9a3 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -2522,7 +2522,8 @@ ediff-really-quit
  			    (frame-selected-window warp-frame))
  			  2 1))

-  (mapc #'funcall after-quit-hook-internal)
+  ;; after-quit-hook-internal is buffer-local; see 
`ediff-filegroup-action'.
+  (mapc (lambda (f) (or (eq f t) (funcall f))) after-quit-hook-internal)
    ))

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


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 25.1.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
  of 2016-07-10
Repository revision: 466ee1b3ea76425d201b5d59950e88251870c836

Ediff 2.81.5 of July 4, 2013;

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-07-11 16:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-10 10:18 bug#23933: 25.1.50; Run a buffer-local hook with mapc Tino Calancha
2016-07-10 14:44 ` Eli Zaretskii
2016-07-10 15:18   ` Stefan Monnier
2016-07-10 15:55     ` Eli Zaretskii
2016-07-10 17:01       ` Stefan Monnier
2016-07-10 17:12         ` npostavs
2016-07-10 21:12           ` Stefan Monnier
2016-07-11 16:02             ` Tino Calancha
2016-07-11 16:05               ` Tino Calancha
2016-07-10 17:15         ` Eli Zaretskii
2016-07-10 17:31           ` Tino Calancha
2016-07-10 17:41             ` Noam Postavsky
2016-07-10 17:52             ` Eli Zaretskii
2016-07-10 18:14               ` Tino Calancha
2016-07-10 15:56     ` Eli Zaretskii
2016-07-10 17:02       ` Stefan Monnier
2016-07-10 18:28       ` Andreas Schwab
2016-07-11 16:06 ` bug#23933: (no subject) Tino Calancha

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).