[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add-mode-abbrev writes to fundamental table only
From: |
rgb |
Subject: |
Re: add-mode-abbrev writes to fundamental table only |
Date: |
28 Feb 2005 13:03:11 -0800 |
User-agent: |
G2/0.2 |
Kevin Rodgers wrote:
> rgb wrote:
> >>I'm finding when I have entered any mode (Here we use sh-mode)
that
> >>running `add-mode-abbrev' will only write my new abbrev to the
> >>Fundamental-mode-abbrev-table.
> >
> > I just had this problem in a mode I'm writing. I found that
> > it occurs when local-abbrev-table is not set.
> > local-abbrev-table is buffer local when set but if it's not
> > set the default is usually fundamental-mode.
>
> What version of Emacs doesn't set local-abbrev-table?
It might just be an unwanted side effect of something in OP's .emacs.
For example I saw the code below on emacswiki. It would cause these
symptoms and a user may not connect the two without understanding the
connection between add-mode-abbrev and local-abbrev-table.
(defun sql-pre-abbrev-expand-hook ()
;; Allow our abbrevs only in a code context.
(setq local-abbrev-table
(if (sql-in-code-context-p)
sql-mode-abbrev-table)))