From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Browder Newsgroups: gmane.emacs.help Subject: How can I assign a regex to a variable? Date: Thu, 28 Jul 2016 14:36:37 -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 1469734658 31994 80.91.229.3 (28 Jul 2016 19:37:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 19:37:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 28 21:37:38 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 1bSr7e-0008VY-3c for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 21:37:34 +0200 Original-Received: from localhost ([::1]:55338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSr7Y-0005Rr-0V for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 15:37:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSr6n-0005QH-6E for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:36:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSr6m-000152-6c for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:36:41 -0400 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:36566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSr6m-00014y-1h for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:36:40 -0400 Original-Received: by mail-oi0-x22b.google.com with SMTP id w18so77524959oiw.3 for ; Thu, 28 Jul 2016 12:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=xDYLZAhiHxemoULHv+wqvSm9zEddi7OYa2l9O2al8TM=; b=XvgCQIIlzuO0Y5b9QJKMid4F7GnqiXxCi0Ut9VHoR0XTtJbF6/GuiRuYEDcIhDVowm Cq2YiMree0aMP5sLl/KBiwYXLp4181afO6fwBXHi8v4pvVby2lfKrdcW8hTox3GJFi3a If2O5GsWxnc3kdrVoHuBFedoTYWabnqrJGMb9/mCJvPOlfAkZwPPNaQnf9jCgvZw6VXQ 14Uub6C+AUHqWv40JYbHluFNtrnUC4I4SFcFXDPJEbUqGfz7LIX7N7I4Pc425YePG3eP 3IMDsM2++zmqn0y2ZJuu9YH0MlTAgiZSvom+PWC4OSwh/7Sm06EH1t69YEssWZNRnM1+ 9Lvw== 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; bh=xDYLZAhiHxemoULHv+wqvSm9zEddi7OYa2l9O2al8TM=; b=AxhTQMTVZlDTc/5pIbX4rtwBiP1C54IsBLRUOH0CF6B82ndjAGc+WdeXQqCcVEUbxL Z+M7RXsgex+4SOYxXp9s3GE9jMQqkfK8zbd5KaAp7cVpgMey+wQZD5adNtVN6yNk8+RO H5DIDzcuv77Qt+IJLq+5g5+1QbNr/ZnbgWXVG0HshuXBq5Aekc4tbAQqgQ8SD5chVYo+ KEZW49bi6Fgk4Mw1bp7Ac+js3gx3yQ+14YPxf19584+AY7rHQHK2Cxm6fRjUbMUotT8T SL/DTh2oGRHjVAJWD0SuQjkavOUrCaEH2I1xzO4QXkOt5nMJxF/FOJMH1j5rSUs96QEr aBoA== X-Gm-Message-State: AEkoouv7xocUf3zvD11ig+XvikeqRVg7O3em3N2bCP3ai+CcsaaMWfot9t6tn3TTMgo6I/wAec7xHkWq3oblmA== X-Received: by 10.202.79.142 with SMTP id d136mr20343860oib.100.1469734599262; Thu, 28 Jul 2016 12:36:39 -0700 (PDT) Original-Received: by 10.157.62.135 with HTTP; Thu, 28 Jul 2016 12:36:37 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22b X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110976 Archived-At: Drew showed me how to bind a string to a variable, and that works great! However, when I tried it where I actually needed it I got an error saying a regex was expected. I have searched for emacs named regexps but have found nothing. Does anyone know how I can define a regex to be used in a function defined like this (from package imenu.el): (string regexp integer) So I want to use the function like this: ("Funcs" regex-var 1) but regex-var must be interpreted as a regex, not as a string. Any help is appreciated. Cheers! -Tom