From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: saved user abbrevs and system abbrevs Date: Fri, 1 Dec 2006 12:50:36 -0800 (PST) Message-ID: <58374.128.165.123.18.1165006236.squirrel@webmail.lanl.gov> References: <2godqqnetw.fsf@fencepost.gnu.org> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1165006274 31015 80.91.229.2 (1 Dec 2006 20:51:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2006 20:51:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 01 21:51:10 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GqFLT-00058m-Dq for ged-emacs-devel@m.gmane.org; Fri, 01 Dec 2006 21:50:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqFLT-0004Ci-2U for ged-emacs-devel@m.gmane.org; Fri, 01 Dec 2006 15:50:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GqFLH-0004CA-V6 for emacs-devel@gnu.org; Fri, 01 Dec 2006 15:50:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GqFLF-0004BT-Vo for emacs-devel@gnu.org; Fri, 01 Dec 2006 15:50:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqFLF-0004BH-LQ for emacs-devel@gnu.org; Fri, 01 Dec 2006 15:50:41 -0500 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GqFLC-0003g4-MI; Fri, 01 Dec 2006 15:50:39 -0500 Original-Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id kB1KobC4032610; Fri, 1 Dec 2006 13:50:37 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay2.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id kB1Koadp016089; Fri, 1 Dec 2006 13:50:36 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id kB1KoaaZ032579; Fri, 1 Dec 2006 13:50:36 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id kB1KoaDb032577; Fri, 1 Dec 2006 12:50:36 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Fri, 1 Dec 2006 12:50:36 -0800 (PST) In-Reply-To: <2godqqnetw.fsf@fencepost.gnu.org> Original-To: "Glenn Morris" User-Agent: SquirrelMail/1.4.6-7.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63202 Archived-At: > Does anyone see a better fix than changing each mode that defines > abbrevs to use something like this: > > (defvar foo-abbrev-table nil) > > ;; Do not override any user abbrev for "foo". > (unless (abbrev-expansion "foo" foo-abbrev-table) > (define-abbrev foo-abbrev-table "foo" "foobar" nil 0 t)) Well, one thing that would make doing it manually much less painful would be to implement a trivial function allowing (populate-abbrev-table 'table-symbol '(("foo" "foobar" nil 0 t) ...)) Alternatively, the system abbrevs could be stored in some other file or files which major modes would load, similarly to the way that user abbrevs are already handled: (load-system-abbrev-table 'my-mode-abbrev-table) ...which would read either an entire file appropriate to the mode, or perhaps read that part of a master file (lisp/sys.abbrevs or so) that defined the table in question. WDOT? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.