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

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

Re: abbrev again


From: A.Politz
Subject: Re: abbrev again
Date: Mon, 20 Jul 2009 16:11:03 -0700 (PDT)
User-agent: G2/1.0

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


reply via email to

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