From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Running just-one-space after expand-abbrev Date: Thu, 13 Nov 2008 20:33:25 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226604911 15409 80.91.229.12 (13 Nov 2008 19:35:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2008 19:35:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ian Eure Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 13 20:36:14 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L0hzA-0005qi-UQ for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Nov 2008 20:36:13 +0100 Original-Received: from localhost ([127.0.0.1]:47149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0hy2-0001mW-TR for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Nov 2008 14:35:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0hwa-0001H9-C0 for help-gnu-emacs@gnu.org; Thu, 13 Nov 2008 14:33:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0hwY-0001GH-P3 for help-gnu-emacs@gnu.org; Thu, 13 Nov 2008 14:33:32 -0500 Original-Received: from [199.232.76.173] (port=35011 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0hwY-0001G2-I4 for help-gnu-emacs@gnu.org; Thu, 13 Nov 2008 14:33:30 -0500 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:57228) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0hwY-0006XC-BP for help-gnu-emacs@gnu.org; Thu, 13 Nov 2008 14:33:30 -0500 Original-Received: from thursday (dslb-084-057-156-237.pools.arcor-ip.net [84.57.156.237]) by dd18200.kasserver.com (Postfix) with ESMTP id D0EEE1802F49B; Thu, 13 Nov 2008 20:33:30 +0100 (CET) In-Reply-To: (Ian Eure's message of "Wed\, 12 Nov 2008 09\:49\:56 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59751 Archived-At: Ian Eure wrote: > The problem is that the M-d leaves the whitespace to the left of > "function," and the SPC to expand the abbrev gives another, so now I > have two spaces. This has annoyed me as well in the past. I took a different route in the solution. just-one-space would collide with my finger memory when inserting something in the middle. Instead I chose to give the tab key an additional function (defun tab-command () "Do the right thing for the tab key." (interactive) (or (expand-abbrev) (indent-according-to-mode))) My tab-command does in fact do many more things depending on context. This is the abridged version. :) regards, Nikolaj Schumacher