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: Patch: Syntax and Hard Newlines Date: Tue, 14 Nov 2006 22:58:07 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163563225 7294 80.91.229.2 (15 Nov 2006 04:00:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Nov 2006 04:00:25 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 15 05:00:22 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GkBwe-0004cy-Bs for ged-emacs-devel@m.gmane.org; Wed, 15 Nov 2006 05:00:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GkBwd-00077Z-Ls for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2006 23:00:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GkBwP-00074Y-Lh for emacs-devel@gnu.org; Tue, 14 Nov 2006 23:00:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GkBwM-000718-Kh for emacs-devel@gnu.org; Tue, 14 Nov 2006 23:00:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GkBwM-00070V-Br for emacs-devel@gnu.org; Tue, 14 Nov 2006 22:59:58 -0500 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GkBvU-0003BN-2f; Tue, 14 Nov 2006 22:59:04 -0500 Original-Received: from pastel.home ([74.12.204.152]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061115035814.CXYG18394.tomts5-srv.bellnexxia.net@pastel.home>; Tue, 14 Nov 2006 22:58:14 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 15D4C8146; Tue, 14 Nov 2006 22:58:08 -0500 (EST) Original-To: "Herbert Euler" In-Reply-To: (Herbert Euler's message of "Wed\, 15 Nov 2006 09\:32\:51 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) 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:62313 Archived-At: > *************** (defun longlines-wrap-line () > *** 243,248 **** > --- 245,257 ---- > (progn (insert-before-markers ?\n) > (backward-char 1) > (delete-char -1) > + (let* ((point (point)) > + (state (syntax-ppss point))) > + (if (nth 4 state) > + ;; We are in a comment context. > + (add-text-properties point > + (1+ point) > + '(syntax-table (14))))) > (forward-char 1) > nil) > (if (longlines-merge-lines-p) Why not just unconditionally do (put-text-property (point) (1+ (point)) 'syntax-table '(0)) Or even just: (progn (insert-before-markers (propertize "\n" 'syntax-table '(0))) ...) -- Stefan