From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: A way for interactive to modify a let-bound variable? Date: Fri, 12 Feb 2016 11:41:07 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1455295351 7884 80.91.229.3 (12 Feb 2016 16:42:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Feb 2016 16:42:31 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 12 17:42:19 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUGnS-0003AS-IO for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Feb 2016 17:42:18 +0100 Original-Received: from localhost ([::1]:34184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUGnO-0000au-HL for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Feb 2016 11:42:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUGnC-0000an-IC for help-gnu-emacs@gnu.org; Fri, 12 Feb 2016 11:42:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUGnA-0002PV-V8 for help-gnu-emacs@gnu.org; Fri, 12 Feb 2016 11:42:02 -0500 Original-Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:36371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUGmx-0002KO-S4 for help-gnu-emacs@gnu.org; Fri, 12 Feb 2016 11:42:00 -0500 Original-Received: by mail-ob0-x230.google.com with SMTP id gc3so28010141obb.3 for ; Fri, 12 Feb 2016 08:41:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=YJYbWPmgI0+0B7wOWSRhKDlRa98CgxJHrUY0uniMrYw=; b=a1umqGenWoV+5uvSZ4zsNsVL9kxQSL6+tvrVrULWFn94yEdeTV1SUGX1mbTmy98LPi LFiR/Qv/GIGEiThk+SVwDH5jCV93OZxLUSo5FJrUHLmEn9O+JhgzR2HtYn269RA3HMH/ wYxM/zHodoPmoivN0uJudGaMKdPPATErQ08v6UZ7pksyipbUVAVzCvXTnlhcnf6RTMz5 +Ar0RUjl0wYwHrNT0PJBsjayD99HHRp2QWbCkUi9y1h1o9FFOlPXBq8PtF5vALpFfwE2 jaRQdKUEWygj4Fo+lkmHlkvd48F9BwK280BMLMJHs/zGh/tjlP1YC0OXkdnnQ8m+2lGQ BXmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=YJYbWPmgI0+0B7wOWSRhKDlRa98CgxJHrUY0uniMrYw=; b=LVVMWHImPzqecOBvsSO7E0A36ZKE5H+yVAPjkN4BofvQyt2SiT2kutLCCFbum6XXyb uUMuxBW7gmmokSZ5LsSVeeOyrg9j0SGXEK0mYBJ48zFSGoHo9X7FCWDfG7AN46cpwVCl su4Vi0JJKRbbIU3C4ctrvACTlAIsKGYrAXkdguJnKIL6sZzWsbNLqUtoGqzLzeNBFlPC KgMpT99dw60xzSPPaJilGILSO2SFiddRJI0kaw6Sd+6JgMeQ+/ELLmN6dioRhWEDzqMA ypVB5rwLRtcuMPLi72byZG3jbKOp62psWLdpOVJ7wNR5hqOPJiOhgkA6wmkRWsQsyjrP TL3Q== X-Gm-Message-State: AG10YORnwBKBaOeagRB1Uy0D0Nbeo07x1b8TcC+SZdZISKzTpSoMUhqj9wA68kfvbdVmaPmBbC8581oR1v4BbA== X-Received: by 10.182.165.8 with SMTP id yu8mr2113817obb.63.1455295307167; Fri, 12 Feb 2016 08:41:47 -0800 (PST) Original-Received: by 10.202.201.73 with HTTP; Fri, 12 Feb 2016 08:41:07 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c01::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109138 Archived-At: Hi, The below snippet will of course not work but I would like to achive something like that: (defun my-dummy-fn () (let (msg) (interactive (progn (if (use-region-p) (setq msg "Region") (setq msg "No region")) nil)) (message msg))) This is a very simplified example. But I need to change a let-bound variable in the interactive form based on some condition and then use that variable in the defun body. Is that possible? -- Kaushal Modi