all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* indentation (Indent More)
@ 2015-07-12  6:03 Russ P.
  2015-07-15 20:34 ` Bobby Casey
       [not found] ` <mailman.6971.1436992476.904.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Russ P. @ 2015-07-12  6:03 UTC (permalink / raw)
  To: help-gnu-emacs

I recently decided to decrease my indentation from 4 spaces to 2 spaces (as recommended for Scala). I have the following in my .emacs file:

(global-set-key "\t" 'tab-to-tab-stop) ; "normal" tab key
(setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36))
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)

It works fine, but when I try to use

Edit/Text Properties/Indentation/Indent More

it still adds 4 spaces. How can I change that to 2 spaces? Thanks



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: indentation (Indent More)
  2015-07-12  6:03 indentation (Indent More) Russ P.
@ 2015-07-15 20:34 ` Bobby Casey
       [not found] ` <mailman.6971.1436992476.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Bobby Casey @ 2015-07-15 20:34 UTC (permalink / raw)
  To: Russ P.; +Cc: help-gnu-emacs

On Sun, Jul 12, 2015 at 2:03 AM, Russ P. <russ.paielli@gmail.com> wrote:
> I recently decided to decrease my indentation from 4 spaces to 2 spaces (as recommended for Scala). I have the following in my .emacs file:
>
> (global-set-key "\t" 'tab-to-tab-stop) ; "normal" tab key
> (setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36))
> (setq-default indent-tabs-mode nil)
> (setq-default tab-width 2)
>
> It works fine, but when I try to use
>
> Edit/Text Properties/Indentation/Indent More
>
> it still adds 4 spaces. How can I change that to 2 spaces? Thanks
>

According to the help for `increase-left-margin' the variable
`standard-indent' is used to specify spacing.  Setting that to 2
should fix the issue.

As an aside, are you sure you want two spaces for everything rather
than just in scala-mode?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: indentation (Indent More)
       [not found] ` <mailman.6971.1436992476.904.help-gnu-emacs@gnu.org>
@ 2015-07-15 21:41   ` Russ P.
  2015-07-19  0:34     ` Robert Thorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Russ P. @ 2015-07-15 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday, July 15, 2015 at 1:34:38 PM UTC-7, Bobby Casey wrote:
> On Sun, Jul 12, 2015 at 2:03 AM, Russ P. <russ.p@gmail.com> wrote:
> > I recently decided to decrease my indentation from 4 spaces to 2 spaces (as recommended for Scala). I have the following in my .emacs file:
> >
> > (global-set-key "\t" 'tab-to-tab-stop) ; "normal" tab key
> > (setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36))
> > (setq-default indent-tabs-mode nil)
> > (setq-default tab-width 2)
> >
> > It works fine, but when I try to use
> >
> > Edit/Text Properties/Indentation/Indent More
> >
> > it still adds 4 spaces. How can I change that to 2 spaces? Thanks
> >
> 
> According to the help for `increase-left-margin' the variable
> `standard-indent' is used to specify spacing.  Setting that to 2
> should fix the issue.
> 
> As an aside, are you sure you want two spaces for everything rather
> than just in scala-mode?

I only want it in scala-mode, but I don't really care enough to bother changing it unless there is a dirt-simple way to do it. Thanks for the help.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: indentation (Indent More)
  2015-07-15 21:41   ` Russ P.
@ 2015-07-19  0:34     ` Robert Thorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Thorpe @ 2015-07-19  0:34 UTC (permalink / raw)
  To: Russ P.; +Cc: help-gnu-emacs

"Russ P." <russ.paielli@gmail.com> writes:

> On Wednesday, July 15, 2015 at 1:34:38 PM UTC-7, Bobby Casey wrote:
>> On Sun, Jul 12, 2015 at 2:03 AM, Russ P. <russ.p@gmail.com> wrote:
>> > I recently decided to decrease my indentation from 4 spaces to 2 spaces (as recommended for Scala). I have the following in my .emacs file:
>> >
>> > (global-set-key "\t" 'tab-to-tab-stop) ; "normal" tab key
>> > (setq tab-stop-list '(2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36))
>> > (setq-default indent-tabs-mode nil)
>> > (setq-default tab-width 2)
>> >
>> > It works fine, but when I try to use
>> >
>> > Edit/Text Properties/Indentation/Indent More
>> >
>> > it still adds 4 spaces. How can I change that to 2 spaces? Thanks
>> >
>> 
>> According to the help for `increase-left-margin' the variable
>> `standard-indent' is used to specify spacing.  Setting that to 2
>> should fix the issue.
>> 
>> As an aside, are you sure you want two spaces for everything rather
>> than just in scala-mode?
>
> I only want it in scala-mode, but I don't really care enough to bother
> changing it unless there is a dirt-simple way to do it. Thanks for the
> help.

Look in the scala-mode documentation.

There are two aspects to tabs:

* How a tab character is displayed.
This is controlled by the variable tab-width.  Usually in a programming
mode, the only way you can insert a tab character is with C-q TAB or C-q
C-i though.  By default Emacs binds TAB to a command.

* What pressing tab inserts.
If a mode doesn't have an indentation convention then this is defined by
tab-stops-list and tab-to-tab-stop.  If the mode does have an
indentation convention then that takes over and it's defined by a mode
specific variable.

So, Your editing of tab-stops-list, tab-to-tab-stop doesn't help you.
Editing tab-width only helps if scala-mode is inserting tabs and it's
probably inserting spaces.  So, check scala-mode's sources.

I couldn't even find scala-mode on the web, only scala-mode2.

BR,
Robert Thorpe



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-19  0:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-12  6:03 indentation (Indent More) Russ P.
2015-07-15 20:34 ` Bobby Casey
     [not found] ` <mailman.6971.1436992476.904.help-gnu-emacs@gnu.org>
2015-07-15 21:41   ` Russ P.
2015-07-19  0:34     ` Robert Thorpe

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.