From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Adam Hardy Newsgroups: gmane.emacs.help Subject: Re: Indent and CSS Date: Thu, 18 Dec 2003 12:28:46 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3FE18F6E.5020607@cyberspaceroad.com> References: <87r7z318s1.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1071748299 31068 80.91.224.253 (18 Dec 2003 11:51:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2003 11:51:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 12:51:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWwgq-00083B-00 for ; Thu, 18 Dec 2003 12:51:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWxUc-0007Lo-Li for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Dec 2003 07:43:02 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AWxTm-0007L3-Lx for help-gnu-emacs@gnu.org; Thu, 18 Dec 2003 07:42:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AWxRZ-0006yZ-2H for help-gnu-emacs@gnu.org; Thu, 18 Dec 2003 07:40:25 -0500 Original-Received: from [212.227.126.185] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWxJH-0005zo-GY for help-gnu-emacs@gnu.org; Thu, 18 Dec 2003 07:31:19 -0500 Original-Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1AWwLj-00045P-00 for help-gnu-emacs@gnu.org; Thu, 18 Dec 2003 12:29:47 +0100 Original-Received: from [80.128.29.168] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1AWwLi-00060n-00 for help-gnu-emacs@gnu.org; Thu, 18 Dec 2003 12:29:47 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210 X-Accept-Language: en, en-us, de-de In-Reply-To: <87r7z318s1.fsf@emptyhost.emptydomain.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:7be52423742ce504c1b541fa1f258887 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15410 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15410 On 12/17/2003 09:36 PM Kai Grossjohann wrote: > digits writes: > > >>I'm all fresh on Emacs, I have now tried to get Emacs to intent in CSS >>files all day and I can't get it to work. > > > Did you look for a css Emacs mode? www.emacswiki.org might be a good > starting point, as might be the Emacs Lisp List. > > >>This is what I want: >>body { >>font-size: 10px; >>} >> >>h1 { >>font-weight: bold; >>} > > > If you have a css mode, then you need to tell it to use an indentation > step of N and you also need to set tab-width to the same N. (Usually, > the indentation step is 2 or 4 but tab-width is 8 by default.) And > you need to set indent-tabs-mode to t, but that's the default. > > >>I know that I can get return-and-indent with C-j, but I would like to >>have it bound to RET when on a line with { as last char. > > > Isn't it enough to always have RET do like C-j? Why do you want RET > to behave differently if the last char is something else? > > (require 'css-mode) > (define-key css-mode-map (kbd "RET") 'newline-and-indent) > > Maybe you need to change css-mode and css-mode-map, depending on the > actual css mode that you are using. one css mode: http://camalott.com/~jtpolk/emacs.html -- GNU Emacs 21.3.1 on Linux 2.4.20 Debian