From: Jordon Biondo <jordonbiondo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: John Wiegley <jwiegley@gmail.com>,
Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Revisiting `setq-local`s signature
Date: Thu, 2 Feb 2017 09:28:06 -0500 [thread overview]
Message-ID: <CABB6V6qxAxENVugM28P4nzTFKPzJptUhmkdTTM61Yus-dcvUHA@mail.gmail.com> (raw)
In-Reply-To: <83zii5uuxx.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]
Below is an updated patch of the change.
From 625060e5a72f0e25bd2c59bad9f4b828ac80ac0f Mon Sep 17 00:00:00 2001
From: jordonbiondo <jordonbiondo@gmail.com>
Date: Thu, 2 Feb 2017 09:20:02 -0500
Subject: [PATCH] * lisp/subr.el (setq-local): Is now variadic like setq
---
lisp/subr.el | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index a204577..447952c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -118,10 +118,21 @@ lambda
;; depend on backquote.el.
(list 'function (cons 'lambda cdr)))
-(defmacro setq-local (var val)
- "Set variable VAR to value VAL in current buffer."
+(defmacro setq-local (&rest args)
+ "Set each SYM to the value of its VAL in the current buffer.
+
+\(fn [SYM VAL]...)"
;; Can't use backquote here, it's too early in the bootstrap.
- (list 'set (list 'make-local-variable (list 'quote var)) val))
+ (let ((expr))
+ (while args
+ (setq expr
+ (cons
+ (list 'set
+ (list 'make-local-variable (list 'quote (car args)))
+ (car (cdr args)))
+ expr))
+ (setq args (cdr (cdr args))))
+ (cons 'progn (nreverse expr))))
(defmacro defvar-local (var val &optional docstring)
"Define VAR as a buffer-local variable with default value VAL.
--
2.7.4 (Apple Git-66)
On Wed, Feb 1, 2017 at 10:34 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: John Wiegley <jwiegley@gmail.com>
> > Date: Wed, 01 Feb 2017 22:01:29 -0500
> > Cc: Emacs development discussions <emacs-devel@gnu.org>
> >
> > >>>>> "JB" == Jordon Biondo <jordonbiondo@gmail.com> writes:
> >
> > JB> Are maintainers and users still opposed to this change? If not I'd be
> > JB> happy to update the patch from the previous thread.
> >
> > I wouldn't mind having them be consistent, if only because it makes it
> easier
> > to switch between them, and there is nothing necessary about the
> > inconsistency. Eli?
>
> No objections.
>
[-- Attachment #2: Type: text/html, Size: 3192 bytes --]
next prev parent reply other threads:[~2017-02-02 14:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 18:37 Revisiting `setq-local`s signature Jordon Biondo
2017-01-31 3:47 ` Tino Calancha
2017-01-31 18:13 ` Philipp Stephani
2017-01-31 18:48 ` Tom Tromey
2017-01-31 18:57 ` Drew Adams
2017-01-31 19:13 ` Jordon Biondo
2017-02-01 5:55 ` Tino Calancha
2017-02-02 3:01 ` John Wiegley
2017-02-02 3:34 ` Eli Zaretskii
2017-02-02 14:28 ` Jordon Biondo [this message]
2017-02-02 17:35 ` Eli Zaretskii
2017-02-02 17:43 ` Jordon Biondo
2017-02-02 20:31 ` Eli Zaretskii
2017-02-08 15:59 ` Jordon Biondo
2017-02-10 8:33 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABB6V6qxAxENVugM28P4nzTFKPzJptUhmkdTTM61Yus-dcvUHA@mail.gmail.com \
--to=jordonbiondo@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jwiegley@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.