unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: Tabs (yikes)
Date: Tue, 18 Mar 2003 19:40:32 +0100	[thread overview]
Message-ID: <m31y14plld.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: sJGdnbGJpLOm1eqjXTWcpQ@comcast.com

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]

  reply	other threads:[~2003-03-18 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 16:24 Tabs (yikes) Tony Vitonis
2003-03-18 18:40 ` Karl Pflästerer [this message]
2003-03-18 18:44 ` Benjamin Rutt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31y14plld.fsf@hamster.pflaesterer.de \
    --to=sigurd@12move.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).