From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: character syntax of linefeed? Date: Tue, 24 Nov 2009 09:12:10 -0500 Message-ID: References: <874ookw69w.fsf@freebits.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259072176 16829 80.91.229.12 (24 Nov 2009 14:16:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 14:16:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Tobias C. Rittweiler" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 24 15:16:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NCwBc-00023q-5X for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2009 15:16:08 +0100 Original-Received: from localhost ([127.0.0.1]:33129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCwBb-0002mf-FR for ged-emacs-devel@m.gmane.org; Tue, 24 Nov 2009 09:16:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCw7t-0007Ed-1d for emacs-devel@gnu.org; Tue, 24 Nov 2009 09:12:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCw7o-0007BC-4L for emacs-devel@gnu.org; Tue, 24 Nov 2009 09:12:16 -0500 Original-Received: from [199.232.76.173] (port=47491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCw7n-0007B6-T7 for emacs-devel@gnu.org; Tue, 24 Nov 2009 09:12:11 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:60344 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCw7n-0002lY-Ku for emacs-devel@gnu.org; Tue, 24 Nov 2009 09:12:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEALt4C0tFxIFC/2dsb2JhbACBTdcBhDkEigk X-IronPort-AV: E=Sophos;i="4.47,279,1257138000"; d="scan'208";a="49915093" Original-Received: from 69-196-129-66.dsl.teksavvy.com (HELO pastel.home) ([69.196.129.66]) by ironport2-out.pppoe.ca with ESMTP; 24 Nov 2009 09:12:10 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7561B80E5; Tue, 24 Nov 2009 09:12:10 -0500 (EST) In-Reply-To: <874ookw69w.fsf@freebits.de> (Tobias C. Rittweiler's message of "Tue, 24 Nov 2009 11:45:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117676 Archived-At: > However, if I open, say, an empty foo.el or foo.c file, press RET > and then M-: (list (string (char-before)) > (string (char-syntax (char-before)))) > I get (" > " ">"), i.e. a syntax of type 'endcomment'. Elisp has comments of the form ;...\n, so clearly LF needs to be an end-comment marker. The same will hold for any major mode where there are comments that end at LF. > Can I count on it being ">"? In Elisp mode, yes. In general of course not: that's why we have syntax-tables: so that its contents can be different in different situations. Stefan