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 10:24:53 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1370183135 13286 80.91.229.3 (2 Jun 2013 14:25:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Jun 2013 14:25:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 02 16:25:35 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 1Uj9Dz-0001lN-5s for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 16:25:35 +0200 Original-Received: from localhost ([::1]:53101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj9Dy-0002Wi-PI for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 10:25:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj9Dn-0002WS-MT for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 10:25:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uj9Dm-0008HB-T5 for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 10:25:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:59364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj9Dm-0008Gy-M3 for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 10:25:22 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uj9Dl-0001fd-0o for help-gnu-emacs@gnu.org; Sun, 02 Jun 2013 16:25:21 +0200 Original-Received: from 69-165-139-76.dsl.teksavvy.com ([69.165.139.76]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jun 2013 16:25:21 +0200 Original-Received: from monnier by 69-165-139-76.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Jun 2013 16:25:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-165-139-76.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:Fz8Ip1oUqtvk2KcVLBF4JnPANZM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:91227 Archived-At: > Here's what I put in my init file: > (define-abbrev-table 'global-abbrev-table '( > ("$->" "→") > ("$=>" "⇒") > ("$foo" "X") > ) > "custom abbrev table" > :regexp (rx (or bos bol space) (group (+ (not space))))) > (setq save-abbrevs nil) > (setq-default abbrev-mode t) > But only the $foo substitution works and I can't figure out why. 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). Stefan