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: Tabs for Indent and Spaces for Align Date: Wed, 22 Oct 2008 22:13:57 +0200 Message-ID: References: <812fec5a0810211315v16d88aeay6daa6536779e910d@mail.gmail.com> <812fec5a0810220749k194daa9cy9b3b45f1c7e4a009@mail.gmail.com> <812fec5a0810221127n6b85345fl86ec1cbd08503b15@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224706470 12058 80.91.229.12 (22 Oct 2008 20:14:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2008 20:14:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Luke Hoersten" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 22:15:30 2008 connect(): Connection refused 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 1Ksk76-0008Sb-C4 for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Oct 2008 22:15:28 +0200 Original-Received: from localhost ([127.0.0.1]:60217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ksk60-0001in-HM for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Oct 2008 16:14:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ksk5i-0001if-DP for help-gnu-emacs@gnu.org; Wed, 22 Oct 2008 16:14:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ksk5g-0001i8-QR for help-gnu-emacs@gnu.org; Wed, 22 Oct 2008 16:14:02 -0400 Original-Received: from [199.232.76.173] (port=52251 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ksk5g-0001i3-Nk for help-gnu-emacs@gnu.org; Wed, 22 Oct 2008 16:14:00 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:43069) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ksk5g-0004Vs-Co for help-gnu-emacs@gnu.org; Wed, 22 Oct 2008 16:14:00 -0400 Original-Received: from thursday (BAH554c.bah.pppool.de [77.135.85.76]) by dd18200.kasserver.com (Postfix) with ESMTP id C4E82180291A9; Wed, 22 Oct 2008 22:14:03 +0200 (CEST) In-Reply-To: <812fec5a0810221127n6b85345fl86ec1cbd08503b15@mail.gmail.com> (Luke Hoersten's message of "Wed\, 22 Oct 2008 13\:27\:17 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (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:59043 Archived-At: "Luke Hoersten" wrote: > ;; use only spaces for alignment > (defun align-with-spaces (beg end) > "Align selected using only spaces for whitespace." > (interactive "r") > (let (tabs-mode (indent-tabs-mode)) > (setq indent-tabs-mode nil) > (align beg end) > (setq indent-tabs-mode tabs-mode))) > > I'd love if an elisp expert could do something better though =) You can shorten that to: (defun align-with-spaces (beg end) "Align selected using only spaces for whitespace." (interactive "r") (let ((indent-tabs-mode nil)) (align beg end))) regards, Nikolaj Schumacher