From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: wael-zwaiter@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Setting variables, argumunts in defun Date: Sat, 13 Feb 2021 18:23:08 +0100 Message-ID: References: <87blcnq5qz.fsf@posteo.net> <20210213165749.GC5448@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15770"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 18:23:59 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAyeE-0003zA-Hy for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 18:23:58 +0100 Original-Received: from localhost ([::1]:40668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAyeD-0003dX-Fp for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 12:23:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAydY-0003ct-N7 for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 12:23:17 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:37275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAydW-000517-OR for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 12:23:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613236988; bh=uoFLIJPOm3CtclhHdLg4Q/oEaTVNgL5s5Y7MKJEqr34=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=QNr4Zc+dTQf42M5TNHasAAkU/IaJitfbjjFxQfNumX3wpR4hm9JN3EbGwhFsU1Evv Kr79RICnWIEur8bZKStf0LiE9/Wr+9a85u+0P7gAuiVc0r/t9fYvtkXf6oCIUWrnKz HvX1D/ACDmT2UP0knihVHjMl9uBsQbgVSutEpi1U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs12.server.lan [172.19.170.180]) (via HTTP); Sat, 13 Feb 2021 18:23:08 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <20210213165749.GC5448@tuxteam.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:RmbE27jGxLpIdIRQy5U/ZR80oy7N/vbqQH5pBzZXiLwccp3uFiheV9pqLbxcPJ5Bwa3uv jbNTr9NZab5xKi66IxhxPBZAYB2u0fPmw6BkodixoV/iPkmK5vubWhMIAZL1yMhWKbmega1hqzoM /9+RoTeMANatfT5I3Zxv6rcjgRp6epBFHC9PizOZ6Pb2A7hKpZMxQs3DUtNkgJXwh0ETJIT8SQAN +BCZKgdgsSzgjC699DeNqICJ/pKnXrDKbtWN26U17jk9aq5lyUkXnmhXxwi1lzJBDGg8z6RY+wPS x0= X-UI-Out-Filterresults: notjunk:1;V03:K0:N8x/1S9wr/M=:yQmIQ149iaC12kWE9Nofv2 2THjkEHmsjZMV0xoTYHUtXiTI9jzCMucN+6LnjvCld8yN2vFVn41900NXbEGLGcCbIvuA/CfN XAXNdWAA7BsOJW5STe4E4gDyHMD0VeQSxUxkqrQnsd9Cork/Zb/cd0P6c1N30WQtPUOFd28uf 9X7fA96oL/FTkRcdOSDb3vUCa0uwFBL8GcmyQDgfuHBq1OMG8vSsLpAmf/xVZiSgttQAZnSjG VRxiPypbkoHxaax33CnRkXiuwqk8ot9X5h6bGPEInMtk+7l+9y6ogFfc6ERdMWgJXmVRLPIvm JB7YEN/NsqzBIe7FVlKwtXJcUnUnmIxVBwXdxV597FLUGZWVebqHKInhTlEiiuLTEnymRqEKK W9f8tmJfxYpxWy5Iy7ArX8/f8ZWWczrfIGVaRPonHTwIUU94MZsQ5sYTYOhzX3xrc1y0v/1Eq ETGJM68Pf3f+7kHWlmCqlBo1as/Iwj6x51nD/BukgFOCdf1XRd7whz6R2J9kAXTFVOA4nNLdn C1qYIjiGqvuixyD3I9tmVsW5tDLgVjJi+Ks7KDCk8bRiobkFurtOn8rVZMsNcSPsFMESdVFPC MMNTRoZ5fdhpI= Received-SPF: pass client-ip=212.227.15.15; envelope-from=wael-zwaiter@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127965 Archived-At: There seems to be some problem with the following test Am getting "Wrong number of arguments: (2 =2E 2), 4" (defun test (objv) "Set some local variables=2E" (pcase objv ( "enable" (setq-local devi '(0=2E18 -0=2E18) scal 0=2E2)) ( "disable" (setq-local devi '(0=2E0 0=2E0) scal 1=2E0)) ) ) (defun myenable () "Enable=2E" (interactive) (test "enable") ) > Sent: Sunday, February 14, 2021 at 4:57 AM > From: tomas@tuxteam=2Ede > To: help-gnu-emacs@gnu=2Eorg > Subject: Re: Setting variables, argumunts in defun > > On Sat, Feb 13, 2021 at 05:52:58PM +0100, wael-zwaiter@gmx=2Ecom wrote: > > Is the following valid? > >=20 > > (setq-local devi 0=2E18 > > scal 1=2E0) >=20 > Just ask Emacs: C-h f setq-local says: >=20 > ---------------------------------------------------------------- > setq-local is a Lisp macro in =E2=80=98subr=2Eel=E2=80=99=2E > =20 > (setq-local [VARIABLE VALUE]=2E=2E=2E) > =20 > Probably introduced at or before Emacs version 24=2E > =20 > Make variables in PAIRS buffer-local and assign them the > corresponding values=2E > =20 > PAIRS is a list of variable/value pairs=2E For each variable, > make it buffer-local and assign it the corresponding value=2E > [rest elided] > ---------------------------------------------------------------- >=20 > So I'd say yes, it is valid=2E Whether it does what you want it to > do I can't say, because you didn't tell us that :-) >=20 > Cheers > - t >