all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Auto-indentation
@ 2012-04-20 12:57 Richard H Lee
  2012-04-21  8:39 ` Auto-indentation Mark Skilbeck
  0 siblings, 1 reply; 14+ messages in thread
From: Richard H Lee @ 2012-04-20 12:57 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to use auto-indentation in emacs.

When I C-j in C syntax it add an extra indent if it is expecting an 
extra code block. It also does so if I type an opening curly bracket.

E.g

for(;;;)
   {

I just want emacs to keep the indent of the line I'm on, that is all. I 
don't need emacs to predict indentation for me.

Richard



^ permalink raw reply	[flat|nested] 14+ messages in thread
* Auto-indentation
@ 2006-02-10 13:27 Marcus Husar
  2006-02-10 17:30 ` Auto-indentation Kevin Rodgers
  0 siblings, 1 reply; 14+ messages in thread
From: Marcus Husar @ 2006-02-10 13:27 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]

I no searched 2 hours for auto-indentation in emacs. I couldn't find anything. Could someone please tell me how it works?

here is my .emacs:

(setq case-fold-search t)
(global-font-lock-mode t)
(mouse-wheel-mode t)
(setq auto-fill-mode 1)
(setq display-time-day-and-date t)
(display-time)

(setq c-mode-hook
      (function (lambda ()
		  (c-set-style "K&R")
		  (setq c-basic-offset 8))))
(setq objc-mode-hook
      (function (lambda ()
		  (c-set-style "K&R")
		  (setq c-basic-offset 8))))
(setq c++-mode-hook
      (function (lambda ()
		  (c-set-style "K&R")
		  (setq c-basic-offset 8))))
(setq java-mode-hook
      (function (lambda ()
		  (c-set-style "K&R")
		  (setq c-basic-offset 8))))

-- 
Marcus Husar: mail@marcus-husar.de

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

end of thread, other threads:[~2012-04-21 22:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.124.1139578896.2885.help-gnu-emacs@gnu.org>
2006-02-10 14:02 ` Auto-indentation Zhang Wei
2006-02-10 17:34 ` Auto-indentation Stefan Monnier
2006-02-10 19:24 ` Auto-indentation Alan Mackenzie
2006-02-13  0:26   ` Auto-indentation Paul Whitfield
2006-02-13  0:30     ` Auto-indentation Paul Whitfield
2006-02-13  8:07     ` Auto-indentation Alan Mackenzie
2006-02-14  1:04       ` Auto-indentation Paul Whitfield
2012-04-20 12:57 Auto-indentation Richard H Lee
2012-04-21  8:39 ` Auto-indentation Mark Skilbeck
2012-04-21 12:58   ` Auto-indentation Richard H Lee
2012-04-21 13:51     ` Auto-indentation Richard H Lee
2012-04-21 22:38       ` Auto-indentation Ludwig, Mark
  -- strict thread matches above, loose matches on Subject: below --
2006-02-10 13:27 Auto-indentation Marcus Husar
2006-02-10 17:30 ` Auto-indentation Kevin Rodgers

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.