From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: add-mode-abbrev writes to fundamental table only Date: 28 Feb 2005 13:03:11 -0800 Organization: http://groups.google.com Message-ID: <1109624591.857708.243780@f14g2000cwb.googlegroups.com> References: <1109358818.758581.83330@l41g2000cwc.googlegroups.com> <38h95vF5nvi4iU1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1109624813 24072 80.91.229.2 (28 Feb 2005 21:06:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Feb 2005 21:06:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 28 22:06:53 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D5s3M-0001L3-2Z for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Feb 2005 22:03:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5sLm-0003xb-CO for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Feb 2005 16:22:46 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 198.74.20.118 Original-X-Trace: posting.google.com 1109624599 3755 127.0.0.1 (28 Feb 2005 21:03:19 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 28 Feb 2005 21:03:19 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=198.74.20.118; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:128897 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24440 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24440 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)))