unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Zack Piper <zack@apertron.net>
To: emacs-devel@gnu.org
Subject: [PATCH] Fix (letrec ((ignore)))
Date: Fri, 11 Dec 2015 16:11:16 +0000	[thread overview]
Message-ID: <20151211161116.GA8923@apertron.net> (raw)

[-- 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


             reply	other threads:[~2015-12-11 16:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 16:11 Zack Piper [this message]
2015-12-11 20:08 ` [PATCH] Fix (letrec ((ignore))) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151211161116.GA8923@apertron.net \
    --to=zack@apertron.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).