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: Mon, 17 Nov 2008 16:52:55 +0100 Message-ID: References: <0A57C1D8-D3D5-4EE1-9B12-313997ADCBDC@digg.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226937213 28892 80.91.229.12 (17 Nov 2008 15:53:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 15:53:33 +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 Mon Nov 17 16:54:34 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 1L26Qr-0000Y5-SA for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2008 16:54:34 +0100 Original-Received: from localhost ([127.0.0.1]:60467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L26Pj-0002gl-FF for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Nov 2008 10:53:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L26PQ-0002gE-Sh for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 10:53:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L26PP-0002fq-EA for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 10:53:04 -0500 Original-Received: from [199.232.76.173] (port=52701 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L26PP-0002fn-9r for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 10:53:03 -0500 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:33149) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L26PM-0000Lr-Uv for help-gnu-emacs@gnu.org; Mon, 17 Nov 2008 10:53:01 -0500 Original-Received: from thursday (BAH7a5a.bah.pppool.de [77.135.122.90]) by dd18200.kasserver.com (Postfix) with ESMTP id 619FE1810A82A; Mon, 17 Nov 2008 16:53:00 +0100 (CET) In-Reply-To: <0A57C1D8-D3D5-4EE1-9B12-313997ADCBDC@digg.com> (Ian Eure's message of "Thu\, 13 Nov 2008 11\:52\:28 -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:59867 Archived-At: Ian Eure wrote: > On Nov 13, 2008, at 11:33 AM, Nikolaj Schumacher wrote: > >> (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. :) >> > Alas, this doesn't solve the case I illustrated, since I want to > eliminate extra whitespace from the middle of the line, rather than > fix whitespace at the beginning. I think you misunderstood. The `indent-according-to-mode' part is just for compatibility for the old meaning of tab. The solution I use is: void prot function ^ With cursor at ^ I just use my command instead of space. So the second space is never added. regards, Nikolaj Schumacher