From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: sigurd@12move.de (Karl =?iso-8859-1?q?Pfl=E4sterer?=) Newsgroups: gmane.emacs.help Subject: Re: Tabs (yikes) Date: Tue, 18 Mar 2003 19:40:32 +0100 Organization: Lemis World Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1048013254 6808 80.91.224.249 (18 Mar 2003 18:47:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 18:47:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 18 19:47:30 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vM7W-0001l9-00 for ; Tue, 18 Mar 2003 19:47:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vM5S-0004Bd-04 for gnu-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2003 13:45:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!p62.246.146.132.tisdip.tiscali.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: p62.246.146.132.tisdip.tiscali.de (62.246.146.132) Original-X-Trace: fu-berlin.de 1048013045 74132234 62.246.146.132 (16 [72790]) X-Orig-Path: wintendo.pflaesterer.de!not-for-mail X-Face: #iIcL\6>Qj/G*F@AL9T*v/R$j@7Q`6#FU&Flg6u6aVsLdWf(H$U5>:; &*>oy>jOIWgA%8w* A!V7X`\fEGoQ[@D'@i^*p3FCC6&Rg~JT/H_*MOX;"o~flADb8^ User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Hamster/2.0.0.1 Cancel-Lock: sha1:aksHjyFVRKmQibnrbFw20davx30= Original-Xref: shelby.stanford.edu gnu.emacs.help:111187 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7688 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7688 On 18 Mar 2003, Tony Vitonis <- vitonis@comcast.deletethis.net wrote: >(define-key text-mode-map [tab] 'tab-to-tab-stop) >(setq tab-stop-list '(3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 >51 54 57 60 63 66 69 72 75 78)) >But I can *not* seem to find a way to make it happen using my >default-tab-width, which I've specified this way: >Is there any way to make this happen without typing in the long dreary >list of tab stops? Thanks very much. You could write a function which computes the list for you. Here are two solutions. The first uses recursion, the second one uses iteration but if you have Gnu Emacs you would have to write `(require 'cl)' to be able to use it. (defun return-tabslist (start end &optional step) (if (< end start) nil (cons start (return-tabslist (+ start (or step default-tab-width)) end)))) (defun return-tabslist (start end &optional step) (loop for x from start to end by (or step default-tab-width) collect x)) bye KP -- "But it has nothing to do with what a _value_ is. This has to do with whether you pass whatever-a-value-is or wherever-whatever-is-a-value-is whenever you pass an argument to a function. (Call it the Shakira theory. :)" [Erik Naggum in cll über call-by-value und call-by-reference]