From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.help Subject: Re: Insert appropriate line-end character (like ';' for C*) Date: Wed, 11 Jun 2008 15:03:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <10218ac7-1ba3-4ae7-9a19-3b199f78c80f@w7g2000hsa.googlegroups.com> References: <333b2bc9-8ad4-4f0e-b508-eb143fd9d2fe@c58g2000hsc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1213224059 9117 80.91.229.12 (11 Jun 2008 22:40:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Jun 2008 22:40:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 12 00:41:42 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6Z0Z-00018O-Aw for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jun 2008 00:41:35 +0200 Original-Received: from localhost ([127.0.0.1]:54719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6Yzl-0006EZ-QO for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jun 2008 18:40:45 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!w7g2000hsa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 12 Original-NNTP-Posting-Host: 83.67.23.108 Original-X-Trace: posting.google.com 1213221811 28906 127.0.0.1 (11 Jun 2008 22:03:31 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 11 Jun 2008 22:03:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w7g2000hsa.googlegroups.com; posting-host=83.67.23.108; posting-account=pYxWjwkAAACsHSUNDoi5N05LVCTP7PVM User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159395 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54746 Archived-At: On Jun 11, 8:09 pm, Josh wrote: > I know that emacs can't possibly know what my intention is, but it > _can_ know what the appropriate end-of-statement character is for the > current context. Sure, theoretically it can, but it doesn't. In c-mode and other derived modes, you'd set c-electric-flag to get the sort of behaviour you describe (bound to semi-colons, commas etc, rather than C-S-RET), but it is down to each mode to provide such a feature unless someone writes such a generic feature and encourages major mode authors to support it.