From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Abbrev tables in elisp with some extra stuff (was: Abbrev should preserve case) Date: Fri, 12 Oct 2007 11:59:09 -0400 Message-ID: References: <200706201948.06271.andreas.roehler@online.de> <4nvedib77v.fsf@fencepost.gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1192205615 14381 80.91.229.12 (12 Oct 2007 16:13:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 16:13:35 +0000 (UTC) Cc: rgm@gnu.org, andreas.roehler@online.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 18:13:24 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IgMwe-00017a-7o for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 18:01:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgMwX-0003T4-T1 for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 12:00:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgMut-0002eg-V9 for emacs-devel@gnu.org; Fri, 12 Oct 2007 11:59:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgMut-0002e2-8s for emacs-devel@gnu.org; Fri, 12 Oct 2007 11:59:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgMus-0002dh-Tp for emacs-devel@gnu.org; Fri, 12 Oct 2007 11:59:10 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IgMus-0000WD-Md for emacs-devel@gnu.org; Fri, 12 Oct 2007 11:59:10 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IgMur-00013M-Ve; Fri, 12 Oct 2007 11:59:09 -0400 In-reply-to: (message from Stefan Monnier on Wed, 10 Oct 2007 17:14:01 -0400) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:80717 Archived-At: - :case-preserve non-nil means that abbreviations are lookedup without case-folding, and the expansion is not capitalized/upcased. It seems like a mistake to make this a per-table decision. In every abbrev table, abbrevs should preserve case by default. To define an abbrev that is only detected in a particular case is an exception, so each abbrev needs to be marked if it is to work that way. - :syntax-table holds the syntax table to use to find the relevant word. Why do we want this? - :abbrev-before-point-function holds a function to use to find the abbrev at point. Why do we want this? - :enable-function can be set to a function of no argument which returns non-nil iff the abbrevs in this table should be used for this instance of `expand-abbrev'. Useful to disable skeleton-abbrevs in strings and comments. That feature is useful, but shouldn't it be per-abbrev, not per-table? If we have some abbrevs that are from skeletons, and some abbrevs that are not, we don't want to have to put them in different abbrev tables. - allow local-abbrev-table to hold a list of abbrev tables so minor modes can add their own abbrev tables as well (useful for mailabbrev.el). The right way to do this is to have minor-mode-abbrev-table-alist which would work like minor-mode-map-alist. +(defvar abbrev-auto-activated-tables t + ;; Could be expanded to be a predicate. + "List of abbrev tables that can be used when `expand-abbrev' is called implicitly. +If t, use all installed tables.") Is this the best way to design the feature so that `mail-abbrevs-only' can use it? Ideally we want some hook function to test `mail-abbrevs-only' and DTRT, so that setting or binding `mail-abbrevs-only' in any fashion has the right effect. That is the case with the current code in mailabbrev.el. I don't want to take a step backwards.