From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Backslash-escaped brackets in string literals Date: Fri, 24 Jan 2020 16:12:51 +0100 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_AF7D8DBF-7729-46EE-962E-D0A7FD5C7DA7" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="86718"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 24 16:13:33 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iv0eK-000MWX-Mc for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 16:13:32 +0100 Original-Received: from localhost ([::1]:43508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0eJ-00082R-QH for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Jan 2020 10:13:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51064) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iv0dn-0007WT-I9 for emacs-devel@gnu.org; Fri, 24 Jan 2020 10:13:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iv0dm-0004NW-FH for emacs-devel@gnu.org; Fri, 24 Jan 2020 10:12:59 -0500 Original-Received: from mail205c50.megamailservers.eu ([91.136.10.215]:44012 helo=mail193c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iv0dl-0004MJ-OF for emacs-devel@gnu.org; Fri, 24 Jan 2020 10:12:58 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1579878774; bh=ATKZHi96EBtDYaP6Yo4OaN4bC77Pl5No+we3KL7JsrQ=; h=From:Subject:Date:To:From; b=VkIdD40Fuwy2sqyMUVxB6P81YAXK9HliDhJc5n4eJFsSqTAgAKgk16SQfHAohZDjG ZTeGgO5rGcI4NpsZb7uLGDFDzVwPqvmQpGbj+V1ObNc6O3IGAhsa0A7fzJr5qfP1xZ 6DNNUxx9LcwRrmhhmOhgCMrnGTAXpjmJPo1tzvz0= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 00OFCqO5012249 for ; Fri, 24 Jan 2020 15:12:53 +0000 X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B0204.5E2B0976.000C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=SamJicZu c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=vkqUGvruyjiXeQ8Pv3cA:9 a=QEXdDO2ut3YA:10 a=ejWI_E8yOBpa3GnWRsAA:9 a=ITdVHhY7-e0A:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.215 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244570 Archived-At: --Apple-Mail=_AF7D8DBF-7729-46EE-962E-D0A7FD5C7DA7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The manual contains the advice: =E2=80=A2 If a line in a documentation string begins with an open-parenthesis, write a backslash before the open-parenthesis, like this: The argument FOO can be either a number \(a buffer position) or a string (a file name). This prevents the open-parenthesis from being treated as the start of a defun (*note Defuns: (emacs)Defuns.). First of all, is this still true? I rarely bother escaping brackets in = doc strings and it doesn't seem to cause any editing confusion. For = example, beginning-of-defun doesn't seem to be fooled by a '(' in column = 1 inside a doc string. (I do escape the (fn ...) annotation, probably out of superstition.) Moreover, these backslashes appear a bit everywhere (not just doc = strings), not only at bol, and not only before an opening bracket. They = make reading and editing the text a bit more difficult. More = importantly, they are a constant source of potential mistakes, = especially in regexps. I have a tool to scan for all of them (using the help-echo annotation by = emacs-lisp-mode), but it would be much more useful if we were to remove = all existing occurrences. A list of all red backslashes attached. --Apple-Mail=_AF7D8DBF-7729-46EE-962E-D0A7FD5C7DA7 Content-Disposition: attachment; filename=miscape.log Content-Type: application/octet-stream; x-unix-mode=0644; name="miscape.log" Content-Transfer-Encoding: 7bit -*- compilation -*- lisp/registry.el:224:65: Ineffective string escape `\(' lisp/registry.el:226:58: Ineffective string escape `\(' lisp/registry.el:328:49: Ineffective string escape `\(' lisp/subr.el:3937:66: Ineffective string escape `\(' lisp/subr.el:4027:36: Ineffective string escape `\(' lisp/subr.el:4035:16: Ineffective string escape `\(' lisp/subr.el:4037:58: Ineffective string escape `\(' lisp/gnus/gnus-registry.el:244:26: Ineffective string escape `\(' lisp/gnus/gnus-registry.el:244:36: Ineffective string escape `\(' lisp/gnus/nntp.el:140:4: Ineffective string escape `\(' lisp/gnus/message.el:372:10: Ineffective string escape `\(' lisp/gnus/gnus-art.el:5943:44: Ineffective string escape `\(' lisp/gnus/gnus.el:2256:55: Ineffective string escape `\(' lisp/gnus/gnus-group.el:444:39: Ineffective string escape `\(' lisp/gnus/spam-stat.el:450:39: Ineffective string escape `\(' lisp/gnus/spam-stat.el:487:49: Ineffective string escape `\(' lisp/gnus/gnus-bookmark.el:121:22: Ineffective string escape `\(' lisp/gnus/gnus-bookmark.el:134:22: Ineffective string escape `\(' lisp/gnus/gnus-bookmark.el:795:55: Ineffective string escape `\(' lisp/foldout.el:249:23: Ineffective string escape `\(' lisp/net/tramp.el:117:13: Ineffective string escape `\(' lisp/net/tramp.el:491:39: Ineffective string escape `\(' lisp/net/tramp.el:1097:11: Ineffective string escape `\(' lisp/net/tramp.el:1172:31: Ineffective string escape `\(' lisp/net/dbus.el:1153:19: Ineffective string escape `\(' lisp/net/quickurl.el:209:3: Ineffective string escape `\(' lisp/net/nsm.el:374:37: Ineffective string escape `\#' lisp/net/nsm.el:471:43: Ineffective string escape `\#' lisp/net/nsm.el:606:63: Ineffective string escape `\#' lisp/net/sasl-digest.el:57:38: Ineffective string escape `\(' lisp/net/ange-ftp.el:659:28: Ineffective string escape `\(' lisp/net/zeroconf.el:197:3: Ineffective string escape `\(' lisp/net/gnutls.el:128:12: Ineffective string escape `\(' lisp/eshell/esh-util.el:231:28: Ineffective string escape `\(' lisp/htmlfontify.el:1158:45: Ineffective string escape `\(' lisp/htmlfontify.el:1615:33: Ineffective string escape `\(' lisp/htmlfontify.el:1644:33: Ineffective string escape `\(' lisp/obsolete/iswitchb.el:387:15: Ineffective string escape `\(' lisp/obsolete/iswitchb.el:1396:21: Ineffective string escape `\*' lisp/obsolete/old-whitespace.el:386:18: Ineffective string escape `\(' lisp/obsolete/old-whitespace.el:386:52: Ineffective string escape `\)' lisp/obsolete/old-whitespace.el:387:19: Ineffective string escape `\(' lisp/obsolete/old-whitespace.el:387:53: Ineffective string escape `\)' lisp/obsolete/old-whitespace.el:388:22: Ineffective string escape `\(' lisp/obsolete/old-whitespace.el:388:75: Ineffective string escape `\)' lisp/obsolete/old-whitespace.el:389:30: Ineffective string escape `\(' lisp/obsolete/old-whitespace.el:389:65: Ineffective string escape `\)' lisp/obsolete/vi.el:1228:34: Ineffective string escape `\'' lisp/obsolete/vi.el:1228:44: Ineffective string escape `\'' lisp/obsolete/rcompile.el:92:7: Ineffective string escape `\)' lisp/obsolete/rcompile.el:92:28: Ineffective string escape `\(' lisp/obsolete/rcompile.el:92:34: Ineffective string escape `\)' lisp/obsolete/pgg-pgp.el:43:32: Ineffective string escape `\(' lisp/obsolete/vip.el:83:18: Ineffective string escape `\)' lisp/obsolete/vip.el:1513:26: Ineffective string escape `\(' lisp/obsolete/vip.el:1513:28: Ineffective string escape `\[' lisp/obsolete/vip.el:1722:38: Ineffective string escape `\(' lisp/obsolete/vip.el:1722:42: Ineffective string escape `\)' lisp/obsolete/vip.el:1733:38: Ineffective string escape `\(' lisp/obsolete/vip.el:1733:42: Ineffective string escape `\)' lisp/obsolete/vip.el:1744:33: Ineffective string escape `\(' lisp/obsolete/vip.el:1744:37: Ineffective string escape `\)' lisp/obsolete/vip.el:2165:18: Ineffective string escape `\(' lisp/obsolete/vip.el:2165:46: Ineffective string escape `\)' lisp/obsolete/vip.el:2671:42: Ineffective string escape `\(' lisp/obsolete/vip.el:2671:57: Ineffective string escape `\)' lisp/obsolete/pgg-pgp5.el:58:32: Ineffective string escape `\(' lisp/format.el:516:12: Ineffective string escape `\(' lisp/format.el:577:40: Ineffective string escape `\(' lisp/format.el:599:47: Ineffective string escape `\(' lisp/format.el:614:52: Ineffective string escape `\(' lisp/format.el:824:28: Ineffective string escape `\(' lisp/format.el:859:18: Ineffective string escape `\(' lisp/format.el:867:23: Ineffective string escape `\(' lisp/format.el:867:37: Ineffective string escape `\(' lisp/nxml/xmltok.el:114:23: Ineffective string escape `\(' lisp/nxml/xmltok.el:127:13: Ineffective string escape `\(' lisp/nxml/nxml-parse.el:91:18: Ineffective string escape `\(' lisp/nxml/rng-valid.el:228:47: Ineffective string escape `\(' lisp/nxml/rng-cmpct.el:244:24: Ineffective string escape `\(' lisp/textmodes/reftex.el:2374:39: Ineffective string escape `\(' lisp/textmodes/fill.el:1138:32: Ineffective string escape `\(' lisp/textmodes/ispell.el:602:58: Ineffective string escape `\(' lisp/textmodes/enriched.el:170:24: Ineffective string escape `\(' lisp/textmodes/enriched.el:450:17: Ineffective string escape `\(' lisp/textmodes/tex-mode.el:287:37: Ineffective string escape `\(' lisp/textmodes/tex-mode.el:288:49: Ineffective string escape `\(' lisp/files.el:269:7: Ineffective string escape `\(' lisp/files.el:3540:51: Ineffective string escape `\(' lisp/org/ox.el:1762:22: Ineffective string escape `\(' lisp/org/org.el:11413:14: Ineffective string escape `\[' lisp/org/org.el:11414:14: Ineffective string escape `\[' lisp/org/org-list.el:2014:16: Ineffective string escape `\(' lisp/org/org-list.el:2014:36: Ineffective string escape `\(' lisp/org/org-list.el:2014:45: Ineffective string escape `\(' lisp/org/org-list.el:2797:17: Ineffective string escape `\(' lisp/org/org-element.el:4895:2: Ineffective string escape `\[' lisp/org/ol.el:848:30: Ineffective string escape `\]' lisp/mail/rmail.el:316:8: Ineffective string escape `\(' lisp/mail/feedmail.el:638:24: Ineffective string escape `\(' lisp/mail/rmailedit.el:375:2: Ineffective string escape `\(' lisp/emulation/viper-macs.el:330:56: Ineffective string escape `\(' lisp/emulation/viper-util.el:1170:54: Ineffective string escape `\(' lisp/emulation/viper-mous.el:338:31: Ineffective string escape `\(' lisp/jka-cmpr-hook.el:291:17: Ineffective string escape `\(' lisp/jka-cmpr-hook.el:326:17: Ineffective string escape `\(' lisp/jka-cmpr-hook.el:341:17: Ineffective string escape `\(' lisp/follow.el:1699:41: Ineffective string escape `\(' lisp/image-dired.el:370:5: Ineffective string escape `\(' lisp/cedet/semantic/decorate/mode.el:48:19: Ineffective string escape `\(' lisp/comint.el:2771:31: Ineffective string escape `\(' lisp/char-fold.el:214:17: Ineffective string escape `\(' lisp/char-fold.el:225:5: Ineffective string escape `\(' lisp/help.el:889:10: Ineffective string escape `\(' lisp/hi-lock.el:365:10: Ineffective string escape `\(' lisp/vc/ediff-ptch.el:92:49: Ineffective string escape `\(' lisp/vc/vc-rcs.el:1129:7: Ineffective string escape `\(' lisp/vc/vc-rcs.el:1130:61: Ineffective string escape `\(' lisp/vc/vc-rcs.el:1133:42: Ineffective string escape `\(' lisp/vc/diff-mode.el:887:6: Ineffective string escape `\(' lisp/vc/ediff-util.el:1806:46: Ineffective string escape `\(' lisp/vc/ediff-util.el:2370:43: Ineffective string escape `\(' lisp/vc/ediff-wind.el:207:13: Ineffective string escape `\(' lisp/vc/ediff-wind.el:207:34: Ineffective string escape `\(' lisp/vc/vc-cvs.el:846:3: Ineffective string escape `\(' lisp/ps-print.el:1668:52: Ineffective string escape `\(' lisp/select.el:288:24: Ineffective string escape `\(' lisp/select.el:325:55: Ineffective string escape `\(' lisp/desktop.el:955:3: Ineffective string escape `\(' lisp/newcomment.el:1120:10: Ineffective string escape `\(' lisp/vcursor.el:575:55: Ineffective string escape `\(' lisp/woman.el:691:41: Ineffective string escape `\(' lisp/dired-aux.el:955:32: Ineffective string escape `\(' lisp/type-break.el:667:65: Ineffective string escape `\(' lisp/isearch.el:258:26: Ineffective string escape `\(' lisp/isearch.el:2825:33: Ineffective string escape `\(' lisp/view.el:452:21: Ineffective string escape `\(' lisp/erc/erc.el:261:26: Ineffective string escape `\(' lisp/erc/erc.el:267:26: Ineffective string escape `\(' lisp/erc/erc.el:268:3: Ineffective string escape `\(' lisp/erc/erc.el:275:26: Ineffective string escape `\(' lisp/erc/erc.el:276:3: Ineffective string escape `\(' lisp/erc/erc.el:2553:26: Ineffective string escape `\(' lisp/font-lock.el:1041:26: Ineffective string escape `\(' lisp/auth-source.el:334:33: Ineffective string escape `\(' lisp/auth-source.el:828:15: Ineffective string escape `\(' lisp/auth-source.el:830:7: Ineffective string escape `\(' lisp/progmodes/elisp-mode.el:1166:41: Ineffective string escape `\(' lisp/progmodes/elisp-mode.el:1346:48: Ineffective string escape `\(' lisp/progmodes/idlwave.el:4284:9: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:245:12: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:280:25: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:532:22: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:534:38: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:536:28: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:543:26: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:551:42: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:558:23: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:562:32: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:563:52: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:592:15: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:600:36: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:635:22: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:649:22: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:1621:8: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:1659:23: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:1660:29: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:1661:6: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:1817:52: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2003:42: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2059:10: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2076:23: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2076:30: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2140:23: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2140:44: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2186:6: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2188:23: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2192:22: Ineffective string escape `\(' lisp/progmodes/antlr-mode.el:2233:35: Ineffective string escape `\(' lisp/progmodes/sql.el:675:15: Ineffective string escape `\(' lisp/progmodes/cc-cmds.el:66:20: Ineffective string escape `\(' lisp/progmodes/cc-langs.el:494:12: Ineffective string escape `\(' lisp/progmodes/cc-langs.el:533:61: Ineffective string escape `\(' lisp/progmodes/cc-langs.el:1569:62: Ineffective string escape `\(' lisp/progmodes/idlw-shell.el:710:37: Ineffective string escape `\(' lisp/progmodes/idlw-shell.el:3172:29: Ineffective string escape `\(' lisp/progmodes/idlw-shell.el:3172:45: Ineffective string escape `\(' lisp/progmodes/cmacexp.el:159:42: Ineffective string escape `\(' lisp/international/mule-cmds.el:2460:41: Ineffective string escape `\(' lisp/international/quail.el:961:8: Ineffective string escape `\(' lisp/international/quail.el:2881:51: Ineffective string escape `\(' lisp/emacs-lisp/timer.el:181:13: Ineffective string escape `\(' lisp/emacs-lisp/check-declare.el:137:37: Ineffective string escape `\(' lisp/emacs-lisp/map-ynp.el:47:40: Ineffective string escape `\(' lisp/emacs-lisp/map-ynp.el:59:40: Ineffective string escape `\(' lisp/emacs-lisp/ert-x.el:191:51: Ineffective string escape `\(' lisp/emacs-lisp/shadow.el:71:52: Ineffective string escape `\(' lisp/emacs-lisp/shadow.el:73:54: Ineffective string escape `\(' lisp/emacs-lisp/subr-x.el:172:50: Ineffective string escape `\(' lisp/emacs-lisp/subr-x.el:173:6: Ineffective string escape `\(' lisp/emacs-lisp/bytecomp.el:534:7: Ineffective string escape `\(' test/lisp/textmodes/conf-mode-tests.el:165:14: Ineffective string escape `\[' test/lisp/help-fns-tests.el:59:39: Ineffective string escape `\.' test/lisp/help-fns-tests.el:64:51: Ineffective string escape `\.' test/lisp/help-fns-tests.el:69:51: Ineffective string escape `\.' test/lisp/help-fns-tests.el:74:56: Ineffective string escape `\.' test/lisp/help-fns-tests.el:80:59: Ineffective string escape `\.' test/lisp/simple-tests.el:430:20: Ineffective string escape `\c' test/lisp/ibuffer-tests.el:85:41: Ineffective string escape `\<' test/lisp/ibuffer-tests.el:85:46: Ineffective string escape `\>' test/lisp/international/ucs-normalize-tests.el:302:13: Ineffective string escape `\)' test/lisp/emacs-lisp/ert-x-tests.el:228:21: Ineffective string escape `\(' test/src/regex-emacs-tests.el:164:26: Ineffective string escape `\[' test/src/regex-emacs-tests.el:330:12: Ineffective string escape `\{' test/src/regex-emacs-tests.el:330:21: Ineffective string escape `\}' --Apple-Mail=_AF7D8DBF-7729-46EE-962E-D0A7FD5C7DA7--