From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch Date: Mon, 10 Feb 2014 14:43:30 +0200 Message-ID: <87r47bi1e5.fsf@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392036242 25559 80.91.229.3 (10 Feb 2014 12:44:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2014 12:44:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 10 13:44:10 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCqDY-0004Qn-KW for ged-emacs-devel@m.gmane.org; Mon, 10 Feb 2014 13:44:08 +0100 Original-Received: from localhost ([::1]:55223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCqDY-0006Yq-6p for ged-emacs-devel@m.gmane.org; Mon, 10 Feb 2014 07:44:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCqDO-0006RR-2F for emacs-devel@gnu.org; Mon, 10 Feb 2014 07:44:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCqDI-0003Hq-HJ for emacs-devel@gnu.org; Mon, 10 Feb 2014 07:43:57 -0500 Original-Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:45137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCqDI-0003Hg-AF for emacs-devel@gnu.org; Mon, 10 Feb 2014 07:43:52 -0500 Original-Received: by mail-ee0-f49.google.com with SMTP id d17so2936631eek.36 for ; Mon, 10 Feb 2014 04:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=3p7CYngtsI3AsTNsl1/Wwv5cFTzVWA4L73JZFM2FC8g=; b=pWUlIymtX6c4yIDlehI4vPwSMoCmMMypIYyByjktzV9DuNIeSvyrRbKgn691x/Iw9j XBGELPoKgku9qwA7AJUnAJhhUB9l+pnErsx4Cm/6/J0aiYcZJ2ysNTxVXLOhqH1+cO5w hF4ZBIZkHpCyzkXTD/MQdiMqiT3vcjRHn+bQ3V1QlpUwt8v2J+WpnJXPgyAPaG72OMCl 2zslA/jZ0FC07uCqkvhmbYgl13uW50IIUW7V3UYJQ1eZvAQh/yJVVLURmZeYAri/A6xv hllqn5q9fEPCeFmzG6c+QRkMA8poMUUQKPXrIGA+MbNaYv23cIlxxPPm7BxcIVihNpZN 2LuA== X-Received: by 10.15.64.69 with SMTP id n45mr250481eex.106.1392036231272; Mon, 10 Feb 2014 04:43:51 -0800 (PST) Original-Received: from axl (62-36-157.netrun.cytanet.com.cy. [62.228.36.157]) by mx.google.com with ESMTPSA id x2sm54077649eeo.8.2014.02.10.04.43.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Feb 2014 04:43:49 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 05 Sep 2010 00:51:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169503 Archived-At: Hi Stefan, Stefan Monnier writes: > - ;; Simple sanity check. > + ;; Simple sanity checks. > + (< (point) pos) ; backward-paragraph can fail here. Why `<' and not `<='? In mmm-mode, we call the default font-lock-fontify-region function with bounds of each subregion as arguments, and we also try to limit `syntax-ppss' to these regions, so the `syntax-begin-function' brings point to the beginning of the current subregion. So `mmm-beginning-of-syntax' won't move point at all if it's at the beginning of a subregion. And I think it's okay, and `syntax-ppss' should use the position obtained this way. Blast from the past over, Dmitry.