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

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

Re: abbrev again


From: harven
Subject: Re: abbrev again
Date: Tue, 21 Jul 2009 14:04:23 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

"A.Politz" <politza@googlemail.com> writes:

> On Jul 20, 4:04 pm, harven <har...@free.fr> wrote:
>> I would like to use some abbrev table for one file only.
>> The table is defined in my .emacs. I tried to put in the file
>> -*- abbrev-mode: t; local-abbrev-table: my-abbrev-table -*-
>>
>> When the file is loaded, abbreviation mode is activated,
>> but my table is not recognized. If I then evaluate
>> (setq local-abbrev-table my-abbrev-table)
>> then it works.
>>
>> How can I specify which abbrev table should be loaded in the file itself ?
>
>
> I think the problem is, that the values of file-local-variables
> are not evaluated. This in effect assigns the symbol `my-abbrev-table'
> to the variable `local-abbrev-table' rather than its value
> (the actual table).
>
> One way of fixing it is using the special eval form
>
> -*- eval: (setq local-abbrev-table my-abbrev-table); abbrev-mode: t -
> *-
>
> and adding this form (and forms for other table-symbols you plan to
> use in this way) to `safe-local-eval-forms'.
>
> (push '(setq local-abbrev-table my-abbrev-table) safe-local-eval-
> forms)
>
> -ap

That works, thanks.


reply via email to

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