From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-15?q?R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Abbrev tables in elisp with some extra stuff Date: Mon, 15 Oct 2007 20:04:51 +0200 Message-ID: <200710152004.51960.andreas.roehler@online.de> References: <200706201948.06271.andreas.roehler@online.de> <200710141945.56341.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1192475212 17479 80.91.229.12 (15 Oct 2007 19:06:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2007 19:06:52 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 15 21:06:42 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 1IhUFE-0000Km-8G for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2007 20:00:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhUF7-00013w-Ig for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2007 14:00:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IhUF4-00012B-Ix for emacs-devel@gnu.org; Mon, 15 Oct 2007 14:00:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IhUF2-0000yy-W7 for emacs-devel@gnu.org; Mon, 15 Oct 2007 14:00:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhUF2-0000yd-JD for emacs-devel@gnu.org; Mon, 15 Oct 2007 14:00:36 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IhUEx-0002wI-OC; Mon, 15 Oct 2007 14:00:32 -0400 Original-Received: from noname (p54BEAA23.dip0.t-ipconnect.de [84.190.170.35]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1IhUEv07vg-0008IT; Mon, 15 Oct 2007 20:00:29 +0200 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX1+4n9pd8GSgNuI4SPsUUyVPxJuYjgXJLtR6UTV tXacjDbQEclHnWcsD+qFFQ32W8fM+hCOpxAMNGcwEJicHmvBx+ DJR9A5hwUJucduuDPkC6A== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:80944 Archived-At: Am Montag, 15. Oktober 2007 18:04 schrieb Richard Stallman: > BTW: when doing translations it might be of interest to > expand the word/phrase after point instead before. > > I would rather not add a feature solely for the goal of maximum generalit= y. > So let's leave this out. > It's not for the sake of generalisation. Below a first draft and example --with some explanation for the less experienced--: Put these definitions at the right place in your =2Eabbrev_defs, M-x read-abbrev-file, evaluate the function, put the cursor at the beginning of the example sentence below: The first call of `expand-abbrev-after-point' should deliver "No expansion available" - because no translation/abbreviation was defined. But the cursor moved and with repeated calls that sentence is translated word by word. ("is" "ist" nil 0)=20 ("the" "der" nil 0)=20 ("extensible" "erweiterbare" nil 0)=20 ("customizable" "einrichtbare" nil 0)=20 ("self-documenting" "selbsterkl=E4rende" nil 0)=20 ("real-time" "Echtzeit" nil 0)=20 ("display" "Display" nil 0)=20 ("editor" "Editor" nil 0)=20 (defun expand-abbrev-after-point () "Expand abbrev after point if any. " (interactive "*") (forward-word 1) (or (expand-abbrev) (message "%s" "No translation available"))) Emacs is the extensible, customizable, self-documenting real-time display=20 editor. =20 Gr=FC=DFe Andreas R=F6hler