unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Fix (letrec ((ignore)))
@ 2015-12-11 16:11 Zack Piper
  2015-12-11 20:08 ` Kaushal Modi
  0 siblings, 1 reply; 14+ messages in thread
From: Zack Piper @ 2015-12-11 16:11 UTC (permalink / raw)
  To: emacs-devel

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

Org mode uses `(letrec ((ignore)) ...)' a few times, this introduces
compatibility after the recent setq changed which stopped an
odd number of arguments being passed.
-- 
Zack Piper <zack@apertron.net> http://apertron.net

[-- Attachment #2: 0001-Fix-letrec-and-ignore-producing-an-odd-numbered-call.patch --]
[-- Type: text/plain, Size: 1160 bytes --]

From df31b93604b28ee9b098280907fb8d5c12710b63 Mon Sep 17 00:00:00 2001
From: Zack Piper <zack.piper123@gmail.com>
Date: Fri, 11 Dec 2015 16:00:37 +0000
Subject: [PATCH] Fix `letrec' and `(ignore)' producing an odd-numbered call to
 `setq'.

Revision 5d93a89e805baa2f29941fd801e48235f6c1a6b6 introduces a change to
`setq' where it no longer accepts an odd amount of arguments. Org mode
uses `(letrec ((ignore)) ...)' a few times and other packages might do
the same.

Copyright-paperwork-exempt: yes
---
 lisp/subr.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 860c14c..e8ba4d8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1500,7 +1500,10 @@ letrec
   ;; making the vars actually unbound during evaluation of the binders).
   (declare (debug let) (indent 1))
   `(let ,(mapcar #'car binders)
-     ,@(mapcar (lambda (binder) `(setq ,@binder)) binders)
+     ,@(mapcar (lambda (binder)
+                 (if (second binder)
+                     `(setq ,@binder)
+                   `(setq ,@binder nil))) binders)
      ,@body))
 
 (defmacro with-wrapper-hook (hook args &rest body)
-- 
2.6.3


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

end of thread, other threads:[~2015-12-15 14:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 16:11 [PATCH] Fix (letrec ((ignore))) Zack Piper
2015-12-11 20:08 ` Kaushal Modi
2015-12-12 23:10   ` John Wiegley
2015-12-13  4:08     ` Kyle Meyer
2015-12-13 12:13     ` Alan Mackenzie
2015-12-13 17:41       ` Drew Adams
2015-12-13 22:19         ` Kaushal Modi
2015-12-13 23:05           ` Drew Adams
2015-12-14 18:23       ` John Wiegley
2015-12-14 20:24         ` Alan Mackenzie
2015-12-14 20:25           ` John Wiegley
2015-12-14 20:47             ` David Kastrup
2015-12-14 21:55               ` John Wiegley
2015-12-15 14:14               ` Alan Mackenzie

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).