[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x TAB indent-rigidly default set to 4 columns, not to 1
From: |
Michael Slass |
Subject: |
Re: C-x TAB indent-rigidly default set to 4 columns, not to 1 |
Date: |
Mon, 17 May 2004 20:12:18 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
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