From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lowell Kirsh Newsgroups: gmane.emacs.help Subject: Re: c and java indentation Date: Mon, 09 Feb 2004 17:30:56 -0800 Organization: Department of Computer Science, UBC Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: 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 1076377766 8922 80.91.224.253 (10 Feb 2004 01:49:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2004 01:49:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 10 02:49:23 2004 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 1AqN1f-0000JW-00 for ; Tue, 10 Feb 2004 02:49:23 +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 1AqN18-00015H-Kd for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Feb 2004 20:48:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cs.ubc.ca!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: lindemans.cs.ubc.ca Original-X-Trace: mughi.cs.ubc.ca 1076376656 2137 142.103.14.86 (10 Feb 2004 01:30:56 GMT) Original-X-Complaints-To: usenet@cs.ubc.ca Original-NNTP-Posting-Date: Tue, 10 Feb 2004 01:30:56 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031029 X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:120799 Original-To: help-gnu-emacs@gnu.org 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:16747 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16747 d'oh, I meant 'local'. Thanks. lowell Stefan Monnier wrote: >> (global-set-key [ return ] 'newline-and-indent))) > > > (local-set-key [(control ?m)] 'newline-and-indent) > > or for something a bit more obvious > > (local-set-key (kbd "RET") 'newline-and-indent) > > Why use `global-set-key' if you only want it in java-mode? > Or alternatively, why put it in java-mode-hook if you want it everywhere. > > > Stefan