From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#20859: 25.0.50; css-mode: Comments within URIs Date: Sat, 20 Jun 2015 17:04:38 +0200 Message-ID: <1434812678.1585.2@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-lq/pSlQFk5fxZPZn3jHo" X-Trace: ger.gmane.org 1434812736 25109 80.91.229.3 (20 Jun 2015 15:05:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Jun 2015 15:05:36 +0000 (UTC) To: 20859@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 20 17:05:24 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Z6KKg-0003Xv-Os for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jun 2015 17:05:23 +0200 Original-Received: from localhost ([::1]:33633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KKg-0004xE-0y for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jun 2015 11:05:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KKZ-0004wC-3q for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:05:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6KKO-0003Fv-L7 for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:05:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KKO-0003FN-Hi for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z6KKN-0003QI-Tg for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:05:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jun 2015 15:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20859 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143481269513138 (code B ref -1); Sat, 20 Jun 2015 15:05:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jun 2015 15:04:55 +0000 Original-Received: from localhost ([127.0.0.1]:52790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6KKE-0003Pp-Ts for submit@debbugs.gnu.org; Sat, 20 Jun 2015 11:04:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z6KKC-0003Pc-SO for submit@debbugs.gnu.org; Sat, 20 Jun 2015 11:04:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6KK6-00035a-Da for submit@debbugs.gnu.org; Sat, 20 Jun 2015 11:04:47 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KK6-00035W-Af for submit@debbugs.gnu.org; Sat, 20 Jun 2015 11:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KK4-0004pE-Sr for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:04:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6KK1-00034z-MX for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:04:44 -0400 Original-Received: from mail-lb0-x22c.google.com ([2a00:1450:4010:c04::22c]:36286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6KK1-000348-DV for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2015 11:04:41 -0400 Original-Received: by lbbqq2 with SMTP id qq2so86883088lbb.3 for ; Sat, 20 Jun 2015 08:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:message-id:mime-version:content-type; bh=kXXTlTORmWFdYNKSi4ytO+l8GrDtH8SRkcb1pPxVsZ4=; b=rhmuliKwMuSX5xUlUZhnhDEXh1oK8jh0kG2heYaC2AQN9vuBofedNTxWbh/NGAM4Xr BJ0RLQQO55dtJZy7WVj8ahuNynYShKLUfNcYbglIh/0rBJ9nnxQEIjiLhzZNY4rKJIeC pdE1FPhqNSYXirk9HKuZ1AOF0MATUMt0pSHePHuwFWt4p3HydENwpiZlhMsu4uP1WTnZ eZPzv+z8NGITniXJ5zJ77AtgdPYDF90FLgQwOaeVuv1DFofoYN6kTebNLdDJbExLyXd1 bdl4stc93/5dY7qxJm/MrUpwJkKIsLrO1tn21AJWxwT+/mcswfEbnge678txLB+je7iD E//A== X-Received: by 10.152.1.227 with SMTP id 3mr22399412lap.61.1434812680634; Sat, 20 Jun 2015 08:04:40 -0700 (PDT) Original-Received: from x240 (1x-193-157-214-80.uio.no. [193.157.214.80]) by mx.google.com with ESMTPSA id jr1sm3290721lbc.43.2015.06.20.08.04.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Jun 2015 08:04:39 -0700 (PDT) X-Mailer: geary/0.10.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104151 Archived-At: --=-lq/pSlQFk5fxZPZn3jHo Content-Type: text/plain; charset=utf-8; format=flowed In CSS, the syntax of URIs is described as follows: The format of a URI value is 'url(' followed by optional white space followed by an optional single quote (') or double quote (") character followed by the URI itself, followed by an optional single quote (') or double quote (") character followed by optional white space followed by ')'. The two quote characters must be the same. [1] This means that all of the following are legal URI entries: url("http://www.example.com/") url('http://www.example.com/') url(http://www.example.com/) However, css-mode doesn't currently interpret the stuff between the parenthesis in the quote-less form as strings. This means that URIs containing /* (or // in scss-mode, which is more common for URIs) will be interpreted as comment starters by Emacs. I attempted to fix this by setting syntax-propertize-function to the following: (syntax-propertize-rules ("url\\(\(\\)[[:space:]]*[[:graph:]]*[[:space:]]*\\(\)\\)" (1 "|") (2 "|"))) This almost solves the problem, but with the quirk that "(" and ")" are interpreted as part of the string. Would it be possible to assign string syntax to the stuff between the two parenthesis without having any visible string delimiters? I'm thankful for any hints for getting closer to a solution! -- Simen [1] http://www.w3.org/TR/CSS21/syndata.html#uri --=-lq/pSlQFk5fxZPZn3jHo Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
In CSS, the syntax of URIs is described as follows:

  The format of a URI value is 'url(' followed by optional whit= e space
  followed by an optional single quote (') or double= quote (")
  character followed by the URI itself, followed = by an optional single
  quote (') or double quote (") charac= ter followed by optional white
  space followed by ')'. The = two quote characters must be the
  same. [1]

<= /div>
This means that all of the following are legal URI entries:
=


How= ever, css-mode doesn't currently interpret the stuff between the
= parenthesis in the quote-less form as strings. This means that URIs
containing /* (or // in scss-mode, which is more common for URIs) will
be interpreted as comment starters by Emacs.

<= div>I attempted to fix this by setting syntax-propertize-function to the
following:

  (syntax-propertize-rules=
     ("url\\(\(\\)[[:space:]]*[[:graph:]]*[[:spac= e:]]*\\(\)\\)"
      (1 "|") (2 "|")))
<= br>
This almost solves the problem, but with the quirk that "(" a= nd ")"
are interpreted as part of the string.

Would it be possible to assign string syntax to the stuff between the=
two parenthesis without having any visible string delimiters? I'= m
thankful for any hints for getting closer to a solution!
<= div>
-- Simen


= --=-lq/pSlQFk5fxZPZn3jHo--