From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#19946: 24.4; js-mode, indentation Date: Sun, 20 Mar 2016 20:01:00 +0100 Message-ID: <1458500460.1739128.554550090.7C772DCA@webmail.messagingengine.com> References: <1424858977.3139392.232164745.05CFB51D@webmail.messagingengine.com> <87r3f6unew.fsf@gmail.com> <6420dbed-587e-87e1-e167-73359a65bf6b@yandex.ru> Reply-To: jostein@kjonigsen.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458500543 27845 80.91.229.3 (20 Mar 2016 19:02:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2016 19:02:23 +0000 (UTC) Cc: jostein@kjonigsen.net, 19946@debbugs.gnu.org, dan.colascione@gmail.com To: Dmitry Gutov , Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 20 20:02:12 2016 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 1ahic7-0006tI-Rr for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 20:02:11 +0100 Original-Received: from localhost ([::1]:54125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahic7-0000LB-68 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Mar 2016 15:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahic3-0000L6-PZ for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahibz-0002uf-8s for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:02:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahiby-0002ua-QF for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ahiby-0003H2-ES for bug-gnu-emacs@gnu.org; Sun, 20 Mar 2016 15:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Mar 2016 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19946 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19946-submit@debbugs.gnu.org id=B19946.145850046212511 (code B ref 19946); Sun, 20 Mar 2016 19:02:02 +0000 Original-Received: (at 19946) by debbugs.gnu.org; 20 Mar 2016 19:01:02 +0000 Original-Received: from localhost ([127.0.0.1]:55814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahib0-0003Fj-G1 for submit@debbugs.gnu.org; Sun, 20 Mar 2016 15:01:02 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahiaz-0003FE-Eo for 19946@debbugs.gnu.org; Sun, 20 Mar 2016 15:01:01 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 26B7D220F1 for <19946@debbugs.gnu.org>; Sun, 20 Mar 2016 15:01:01 -0400 (EDT) Original-Received: from web5 ([10.202.2.215]) by compute5.internal (MEProxy); Sun, 20 Mar 2016 15:01:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-transfer-encoding :content-type:date:from:in-reply-to:message-id:mime-version :references:reply-to:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=VvKp+fEdmrE+TP0nYa3YTF27ijg=; b=Ax48uSpPMICog/qpR+b+8setf+3e rTcGGxfxwAb5tSTWhor3nLLCR6cmnRe3jrX2GtX7Tofll9ul/THvi/dWriJ74ZsE dxyfTu4hHlP6P+kIIeiw3/Ldecv8JG5Vv4Bz26zbx4dudj6rtHQayEz3eefuVnCL U6ql4UuUGW3JMv4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=VvKp+f EdmrE+TP0nYa3YTF27ijg=; b=gTq3ExXaog8kt0xjiZHSfktOzuTn32BMhGV+ac mY/kMyhzPUGxzbGa5ssMNpQLXSXy8yDqAbNZnfAYrHwHMPKHIolOliZZ+vsratKh ypIIT8nLbE0JAInaHayAkxDwxEzD21beTvH09fTPgTTbPy4YCqEgUvegoSKbxUCt 1n+Rk= Original-Received: by web5.nyi.internal (Postfix, from userid 99) id DF979A6951E; Sun, 20 Mar 2016 15:01:00 -0400 (EDT) X-Sasl-Enc: FTS6M6np7eimdfn9Ew3ZA2oHesqQcaJPxskaDRLRaLNf 1458500460 X-Mailer: MessagingEngine.com Webmail Interface - ajax-872772a7 In-Reply-To: <6420dbed-587e-87e1-e167-73359a65bf6b@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:115165 Archived-At: On Sun, Mar 20, 2016, at 02:27 AM, Dmitry Gutov wrote: > On 03/20/2016 12:13 AM, Simen Heggest=F8yl wrote: > I do not mind, but I'm not sure if we actually want to support this=20 > usage. There are a lot regexps in lisp/progmodes that use $. There are=20 > several in js-mode, aside from this one. >=20 > Some modes try to match [\r\n] (like CC Mode), but in general they seem=20 > to be a minority, and even CC Mode doesn't do that consistently. I really don't see how that argument makes sense. By following the cardinal rule of good software, that is produce the least amont of astonishment, cc-mode does what's right: it produces the expected outcome, no matter what kind of file it's working with. The result: A happy user. In my point of view, this should be the aim for all *-modes found in Emacs, no matter what its current state of affair or conventions is. The solution to this is either a bunch of hacky patches replacing $ with \r\n (as above) or actually addressing what's probably the root cause (as observed by Andreas) > I wonder why ?\r doesn't have whitespace syntax in the first place. Make ?\r be interpreted as white-space, because once you put Emacs outside a GNU/Linux system honestly nothing else makes sense. Is there any specific reason for its current behaviour? Or put the other way: Are there known pieces of code which depends on \r semantically not being white-space to function correctly? As someone authoring two major modes, every time $ does not work as expected and I need to write hacks, it breaks my heart. As of now, I can't really use $ if I want my modes to work and that's just silly (but at least now I know why). -- Jostein Kj=F8nigsen