From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Burkhard Schultheis Newsgroups: gmane.emacs.help Subject: Re: Spaces please! Date: Tue, 01 Dec 2009 19:21:04 +0100 Message-ID: <7nl54mF3mcig6U1@mid.individual.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259696890 31885 80.91.229.12 (1 Dec 2009 19:48:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2009 19:48:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 01 20:48:03 2009 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 1NFYhf-0001Ma-2F for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Dec 2009 20:48:03 +0100 Original-Received: from localhost ([127.0.0.1]:47121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFYhe-0000Fe-Qi for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Dec 2009 14:48:02 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-X-Trace: individual.net 9oh/alQrzezBTeXVOxMJ2g0r5q3UyGPmcYQ2p/EmXfa3BVGmpM Cancel-Lock: sha1:Y+i69yd6jip70Q1bjjMxu/I7AiY= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091121 Thunderbird/3.0 In-Reply-To: Original-Xref: news.stanford.edu gnu.emacs.help:175214 X-Mailman-Approved-At: Tue, 01 Dec 2009 14:47:36 -0500 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:70291 Archived-At: Am 01.12.2009 17:19, schrieb andrea: > > I get sick sometimes to read something like > x=y+1*(2-3*a^2) > but I get even more sick to add spaces manually every time. > I ask help to you elisp gurus, should I use a regexp or a macro-like > function (go-here, do-this)? > > I think I should define some rules like: > - which operators want spaces (and if before or after) > - what is the arity of them > > One problem for example could arise from things like > > (-2)^10 > but we could have some operators that could be binary or unary and check > that somehow. I would do it with a beautifier like uncrustify with GUI universalident (. It can do that and much, much more! Regards Burkhard