From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Setting variables, argumunts in defun Date: Sat, 13 Feb 2021 17:33:21 +0100 Message-ID: References: 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="405"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: wael-zwaiter@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 17:34:02 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 1lAxrt-000AW2-JT for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 17:34:01 +0100 Original-Received: from localhost ([::1]:38840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAxrs-00034Z-M7 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 11:34:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAxrJ-00034D-Qh for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 11:33:25 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:49927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAxrI-0006ng-2L for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 11:33:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613234001; bh=nyO02smMVDkCyL7gfhQaJlQgpQ0czNih0JmGzmDTBC0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CVdSc7w5MMzYU6cA0NxQ+DdY5guIEumRW65GOyv5Xx5qjSPzmlXCZ13ON+uck+DMx 4EudyTx2Y4ijIPaixW+WBQL+beG0ELmMRAwatBgL0T7OktuceORe1M5ZvzLAbJ21Gk NcbGwc3N/EgMEvPtbM+Q7dxgUW/wcxrbglgeS2ZU= 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 17:33:21 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:X+cRNTEx1pVZdxNyE/HQCb3CJZJXMTH2AQ9STCsAtruX6rl/8PijCFAwdO/iIf8Fcffo+ gfxQ5Vjs/4P6oVV1VE+KT23h4x1rFgBhMPO4u9vVCl4weDCCH6R7MXivOwTAF0qfcjSe8OHr8Zot Dxs2JZg76f3W7wKTNqkaLEEg8I2rfuiwUsldQ72PNEUudwNCuaPuDqtRG7QwbCZiMp+SH/GHeFfq GdqRIOs1PIs1XfSHAdWakv0o58T8GOYYx11Bw0I2OnCZNsbrBkOl9vYHoQIIjI3Ub2q3nyaqzTxD y4= X-UI-Out-Filterresults: notjunk:1;V03:K0:zN0B/AW5g48=:4pIMHb7Ta5VcyIkFQzfTAj 9I79CsMvQzwxnnQNCvGv/a8mzCQE7fMTZ1zozEaJOhwtjR9FSG9QXeW4VJdeSTxAUl1TuJj65 zuepAPcgdfr35yARIH0rBbnSOf2H7JcbphdlNBe4Qlzg4JSdyysgaZX/Otdrz4x+E9e2mwOrR pSs2kD7VO6UeFh650HfvCFIjt+yuwhfZwicz1jCW1MV9P7CiE74JFHD6atXt+DTi2qUtmQrjI OZnCXfacwnbmTc3Ryg/ux9PaPAZSp6o1p02FQHMDj88VV0NCiMM1ICk/Yvh+IlE/WNEw3tpCM fuKdvCnI/WIc/39LlwrK9ATasGu5Bx2iqKQ4t2D3GV0ZJrQ7ks1kZ76pZs+pfms2bSgBzktFF x7GNmql1IhrjHsOz/neGdDLkrW6EzuQqnWapYd1Cl9kngz3pVz0SHf+N7lDs2jpJlbqaMLy0L CuZAcjdH3x2vYq1y+/y0GE7UiAIbp4FJkM6pztDD4I5a09sBF2F+UstxmGaj5svyhlwrEApu8 sHJ2IVwRvtcGIuN7oQc0LYYpMDsx0dm1/C8NYLnr9PRkm7lZ5mRETdPcardPi8B7jzXU4Zdh6 jIXnZR3wuvy3s= Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:127958 Archived-At: I am trying to use pcase on a string, but do need some direction on how to use it. (pcase (string-match "enable" objv) ( (setq devi 0.18) (setq scal 0.2) ) ( (string-match "disable" objv) (setq devi 0.0) (setq scal 1.0) ) ) > Sent: Sunday, February 14, 2021 at 4:14 AM > From: wael-zwaiter@gmx.com > To: "Help Gnu Emacs" > Subject: Setting variables, argumunts in defun > > I would like to set up devi and scal by selecting either one or > the other. Wow can I do this in elisp. Should I pass parameters > to the function. Can one pass a string, then check its contents? > > (defun deviscal () > > (setq devi 0.18) > (setq scal 0.2) > > (setq devi 0.0) > (setq scal 1.0) ) > > > > >