all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: C-x TAB indent-rigidly default set to 4 columns, not to 1
Date: Mon, 17 May 2004 20:12:18 GMT	[thread overview]
Message-ID: <m3zn86ertp.fsf@eric.rossnet.com> (raw)
In-Reply-To: 2gpt2tF5glsvU1@uni-berlin.de

nospam55 <nospa@no.yahoo.no> writes:

>Hi! The 
>
>    (global-set-key [f1] 'indent-rigidly) ; 
>
>works and is convenient, however I would like to make a mutation irFrequent of
>indent-rigidly which defaults to indenting by 4 columns instead of 1 , and then

You want your third argument to be the optional prefix-arg, and then
using the raw prefix arg specifier, P, in the interactive form for
that argument, you'll get a nil if it's not specified.  The
(or width 4) form will evaluate to width if width is non-nil, 4 otherwise.

Try this:

(defun irFrequent (beg end &optional width)
  "`indent-rigidly' region with 4 spaces, or prefix-arg spaces if provided"
  (interactive "r\nP")
  (indent-rigidly beg end (or width 4)))

-- 
Mike Slass

  parent reply	other threads:[~2004-05-17 20:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-16 21:19 C-x TAB indent-rigidly default set to 4 columns, not to 1 nospam55
2004-05-17 12:53 ` nospam55
2004-05-17 14:59 ` Dale Worley
2004-05-17 21:20   ` nospam55
2004-05-17 20:12 ` Michael Slass [this message]
2004-05-18 23:40   ` nospam55
2004-05-18 22:03     ` Michael Slass
2004-05-18 22:14     ` Michael Slass
2004-05-19  0:41       ` nospam55

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

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

  git send-email \
    --in-reply-to=m3zn86ertp.fsf@eric.rossnet.com \
    --to=miknrene@drizzle.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.