unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How do I use a var as a string?
@ 2016-07-28 16:42 Tom Browder
  2016-07-28 16:47 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Tom Browder @ 2016-07-28 16:42 UTC (permalink / raw)
  To: help-gnu-emacs

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"))
(print my-str)

and get an error about void symbol my-str.

I have tried putting an apostrophe in front of various places but haven't
yet found a working solution.  So how can I define a variable whose value
is a string and then access the actual string value by using the variable
name?

Thanks.

Best regards,

-Tom


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-07-29 18:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2209.1469724157.26859.help-gnu-emacs@gnu.org>
2016-07-28 16:46 ` How do I use a var as a string? Emanuel Berg
2016-07-28 16:42 Tom Browder
2016-07-28 16:47 ` Drew Adams
2016-07-28 17:11   ` Tom Browder
     [not found]   ` <mailman.2218.1469725870.26859.help-gnu-emacs@gnu.org>
2016-07-29  2:39     ` Emanuel Berg
2016-07-29 14:50 ` Tom Browder
2016-07-29 14:59   ` Drew Adams
2016-07-29 15:06     ` Tom Browder
2016-07-29 16:52 ` Tom Browder
2016-07-29 17:20   ` John Mastro
2016-07-29 17:24     ` John Mastro
2016-07-29 17:56       ` Tom Browder
2016-07-29 18:39         ` Tom Browder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).