all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* While editing a CMake file, how to turn off smart indentation?
@ 2015-07-16  7:23 Yaron Cohen-Tal
  2015-07-16 22:55 ` Emanuel Berg
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Yaron Cohen-Tal @ 2015-07-16  7:23 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I just want each line to get the same indentation as the previous line, and
that TAB would indent 4 spaces. For C++ I managed it with:

    (setq-default indent-tabs-mode nil)
    (setq-default c-syntactic-indentation nil)
    (setq-default c-basic-offset 4)

In my `.emacs`, but for CMake files Emacs just indents the lines
automatically according to its own rules, and TAB has no effect at all.

Thanx,
Yaron


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: While editing a CMake file, how to turn off smart indentation?
@ 2015-07-17  4:18 Yaron Cohen-Tal
  2015-07-17  5:59 ` Vaidheeswaran C
  2015-07-17 23:34 ` Emanuel Berg
  0 siblings, 2 replies; 16+ messages in thread
From: Yaron Cohen-Tal @ 2015-07-17  4:18 UTC (permalink / raw)
  To: help-gnu-emacs

CMake files come with extension ".cmake" or with name "CMakeLists.txt". My
emacs seems to identify them correctly as CMAKE mode, and highlight them
accordingly.

Emanuel, let's say I borrow your idea. can u plz give me the ELisp code to
make "ctrl+TAB" (without numeric argument) insert exactly 4 spaces, and
make "shift+TAB" (without numeric argument) remove exactly 4 spaces (or any
4 characters)? Sorry but I'm not experienced with ELisp.


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

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

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16  7:23 While editing a CMake file, how to turn off smart indentation? Yaron Cohen-Tal
2015-07-16 22:55 ` Emanuel Berg
2015-07-16 23:55 ` Stefan Monnier
     [not found] ` <mailman.7023.1437087429.904.help-gnu-emacs@gnu.org>
2015-07-17  1:14   ` Dan Espen
2015-07-17  5:39 ` Vaidheeswaran C
2015-07-17 23:37   ` Emanuel Berg
2015-07-17  5:52 ` Vaidheeswaran C
2015-07-17 15:01 ` Ian Zimmerman
  -- strict thread matches above, loose matches on Subject: below --
2015-07-17  4:18 Yaron Cohen-Tal
2015-07-17  5:59 ` Vaidheeswaran C
2015-07-17 23:34 ` Emanuel Berg
2015-07-17 23:54   ` John Mastro
2015-07-18  0:26     ` Emanuel Berg
2015-07-18 17:58       ` Yaron Cohen-Tal
2015-07-18 19:18         ` John Mastro
2015-07-19 17:35           ` Yaron Cohen-Tal

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.