unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tabs with cperl-mode
@ 2005-06-08 11:18 Martin Barth
  2005-06-08 13:56 ` Peter Dyballa
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Barth @ 2005-06-08 11:18 UTC (permalink / raw)


hi everyone,

I need to just use tabs for indentiation with emacs and cperl_mode to stick
to our coding style guide.
I've search quite a while but i didnt found anything that could help me.

in http://www.gnu.org/software/emacs/manual/emacs.html#Just%20Spaces is
decribed to use only spaces - i need the conserve way.

any suggestions?

thanks
Martin Barth

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

* Re: tabs with cperl-mode
  2005-06-08 11:18 tabs with cperl-mode Martin Barth
@ 2005-06-08 13:56 ` Peter Dyballa
  2005-06-08 14:14   ` Martin Barth
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Dyballa @ 2005-06-08 13:56 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 08.06.2005 um 13:18 schrieb Martin Barth:

> I need to just use tabs for indentiation with emacs and cperl_mode to 
> stick
> to our coding style guide.

C-q TAB ? Would this work? OTOH: couldn't you switch off cperl-mode, 
i.e. remove Perl files from auto-mode-alist?

--
Mit friedvollen Grüßen

   Pete

For some reason, this fortune reminds everyone of Marvin Zelkowitz.

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

* Re: tabs with cperl-mode
  2005-06-08 13:56 ` Peter Dyballa
@ 2005-06-08 14:14   ` Martin Barth
  2005-06-08 16:49     ` Matthias Förste
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Barth @ 2005-06-08 14:14 UTC (permalink / raw)
  Cc: help-gnu-emacs

Hi,

> C-q TAB ? Would this work? OTOH: couldn't you switch off cperl-mode,
> i.e. remove Perl files from auto-mode-alist?
well, C-q TAB would be something like a workaround since I am using
cperl-mode because I write perl code *g*.

and I like the cperl-mode indent function with TAB but i need only \t
instead of spaces.

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

* Re: tabs with cperl-mode
  2005-06-08 14:14   ` Martin Barth
@ 2005-06-08 16:49     ` Matthias Förste
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Förste @ 2005-06-08 16:49 UTC (permalink / raw)


"Martin Barth" <martin@senfdax.de> writes:

> Hi,
>
>> C-q TAB ? Would this work? OTOH: couldn't you switch off cperl-mode,
>> i.e. remove Perl files from auto-mode-alist?
> well, C-q TAB would be something like a workaround since I am using
> cperl-mode because I write perl code *g*.
>
> and I like the cperl-mode indent function with TAB but i need only \t
> instead of spaces.

Maybe you could replace indentation spaces with tabs in a
write-file-hook ?

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

* Re: tabs with cperl-mode
       [not found] <mailman.3836.1118229884.25862.help-gnu-emacs@gnu.org>
@ 2005-06-08 20:00 ` Ilya Zakharevich
  2005-06-08 20:23   ` Martin Barth
  2005-06-08 21:44 ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Ilya Zakharevich @ 2005-06-08 20:00 UTC (permalink / raw)


[A complimentary Cc of this posting was sent to
Martin Barth
<martin@senfdax.de>], who wrote in article <mailman.3836.1118229884.25862.help-gnu-emacs@gnu.org>:
> hi everyone,
> 
> I need to just use tabs for indentiation with emacs and cperl_mode to stick
> to our coding style guide.
> I've search quite a while but i didnt found anything that could help me.
> 
> in http://www.gnu.org/software/emacs/manual/emacs.html#Just%20Spaces is
> decribed to use only spaces - i need the conserve way.
> 
> any suggestions?

Stop asking Emacs to indent with spaces.  The default on Emacs is to
indent with tabs.  CPerl does not indent itself, it just calculates
the amount of indentation, and asks Emacs to make the indentation.

Hope this helps,
Ilya

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

* Re: tabs with cperl-mode
  2005-06-08 20:00 ` Ilya Zakharevich
@ 2005-06-08 20:23   ` Martin Barth
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Barth @ 2005-06-08 20:23 UTC (permalink / raw)


> Stop asking Emacs to indent with spaces.  
i never did that. ( well i think so )

> The default on Emacs is to indent with tabs.

even with no emacs config files there are spaces and tabs for indentation.
( if I indent for 8 "spaces" there is a \t instead of the spaces in the
files i saved.

maybe I'll try the save hock thing.. if i figure out how it works..

Thanks so far :)
Martin Barth

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

* Re: tabs with cperl-mode
       [not found] <mailman.3836.1118229884.25862.help-gnu-emacs@gnu.org>
  2005-06-08 20:00 ` Ilya Zakharevich
@ 2005-06-08 21:44 ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2005-06-08 21:44 UTC (permalink / raw)


> hi everyone, I need to just use tabs for indentiation with emacs and
> cperl_mode to stick to our coding style guide.  I've search quite a while
> but i didnt found anything that could help me.

> in http://www.gnu.org/software/emacs/manual/emacs.html#Just%20Spaces is
> decribed to use only spaces - i need the conserve way.

By default Emacs places TABs wherever it can when indenting lines.
So all you need to do is to make sure that it can always use TABs.
Since a TAB has a width corresponding to 8 characters, it means that you
should configure your major mode (in this case cperl-mode) to align
everything on multiples of 8.  I.e. start by setting cperl-indent-level
to 8.


        Stefan

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

end of thread, other threads:[~2005-06-08 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-08 11:18 tabs with cperl-mode Martin Barth
2005-06-08 13:56 ` Peter Dyballa
2005-06-08 14:14   ` Martin Barth
2005-06-08 16:49     ` Matthias Förste
     [not found] <mailman.3836.1118229884.25862.help-gnu-emacs@gnu.org>
2005-06-08 20:00 ` Ilya Zakharevich
2005-06-08 20:23   ` Martin Barth
2005-06-08 21:44 ` Stefan Monnier

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).