help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I use a var as a string?


From: Tom Browder
Subject: Re: How do I use a var as a string?
Date: Fri, 29 Jul 2016 11:52:10 -0500

On Thu, Jul 28, 2016 at 11:42 AM, Tom Browder <address@hidden> wrote:
> I want to bind a string to a variable and then use the variable name as the
> string when a string is expected.  I have tried variations of this:
>
> (defvar my-str (concat "my " "string"))

Here is the best I can do for the moment to show my actual problem.
The code is from an attempt at modifying the following code chunk
which is part of the file "perl6-imenu.el" (branch "my-branch") found
at my github account at:

  https://github.com/tbrowder/perl6-mode

The working code chunk is at:

  https://gist.github.com/tbrowder/effb3ed0540591506015846b0511a045

and the chunk I'm trying to replace it with is here:

  https://gist.github.com/tbrowder/7959e77fcf5aee4be3edb342503cc282

The substitution of the explicit regex with the string var doesn't
work.  It may be because of some problem with the scope of the
variables, and that is WAY beyond my elisp understanding at the
moment.

If someone can show me a short, complete example that shows a var
replacing an explicit regex that works I would greatly appreciate it.

I have attached a short Perl 6 test file for testing the perl6-mode if
anyone is interested (file 'test-imenu.p6'; it does NOT require Perl 6
to be installed).

Best regards,

-Tom

Attachment: test-imenu.p6
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]