From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Using punctuation in abbrev Date: Sun, 02 Jun 2013 13:56:53 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1370195827 2271 80.91.229.3 (2 Jun 2013 17:57:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Jun 2013 17:57:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?iso-8859-1?Q?Aur=E9lien?= Aptel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 02 19:57:06 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UjCWg-0003Pl-ID for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 19:57:06 +0200 Original-Received: from localhost ([::1]:39921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjCWg-0003RU-5x for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 13:57:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjCWV-0003RO-Qc for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 13:56:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjCWV-0003R1-0V for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 13:56:55 -0400 Original-Received: from relais.videotron.ca ([24.201.245.36]:42865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjCWU-0003Q6-T1 for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 13:56:54 -0400 Original-Received: from ceviche.home ([184.163.196.74]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MNS00HKG1UT3590@VL-VM-MR004.ip.videotron.ca> for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 13:56:54 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id A45E166107; Sun, 02 Jun 2013 13:56:53 -0400 (EDT) In-reply-to: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 24.201.245.36 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91235 Archived-At: >> Actually, if you call M-x expand-abbrev RET explicitly, you'll see they >> all work. What doesn't work for the first two is the "press space after >> it to cause expansion", because this is only performed right after >> a word char (hence it works for "$foo" because the last char is a word >> char). > I see, thanks. > I've just looked at it: it's done in src/cmds.c:434 so behavior can't > be changed from Lisp, too bad. The code that calls expand-abbrev from self-insert-command is indeed in C, so you can't change it from Elisp, but that code also runs post-self-insert-hook, so you can add a function to that hook which will call expand-abbrev for the missing case. Stefan