[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting abbrev table objects given a string with the same name
From: |
Kevin Rodgers |
Subject: |
Re: getting abbrev table objects given a string with the same name |
Date: |
Tue, 22 Jun 2004 14:54:36 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
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