unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: getting abbrev table objects given a string with the same name
Date: Tue, 22 Jun 2004 14:54:36 -0600	[thread overview]
Message-ID: <40D89C8C.30408@yahoo.com> (raw)
In-Reply-To: 87isdj5ygl.fsf@osu.edu

Benjamin Rutt wrote:
 > How can I do something like the following:
 >
 > (define-abbrev (concat "c-mode" "-abbrev-table") "foo" "bar" nil)
 >
 > What I want is to define an abbrev based on an abbrev table name that
 > is dyamically built.  The problem is, the 1st arg to define-abbrev
 > must be an abbrev table, not a string.  So, the problem becomes, how
 > can I get an abbrev table, given a string with the same name.

You need to get from a string, to a symbol with the same name (with
intern), to it's value (with symbol-value):

(symbol-value (intern (concat "c-mode" "-abbrev-table")))

-- 
Kevin Rodgers

      parent reply	other threads:[~2004-06-22 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 16:50 getting abbrev table objects given a string with the same name Benjamin Rutt
2004-06-22 17:47 ` Thien-Thi Nguyen
2004-06-22 21:06   ` Benjamin Rutt
2004-06-22 20:54 ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40D89C8C.30408@yahoo.com \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).