[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/relint a1c7bf5 06/11: Describe the ineffective backslas

From: Mattias Engdegård
Subject: [elpa] externals/relint a1c7bf5 06/11: Describe the ineffective backslash warning in README
Date: Sat, 20 Jun 2020 05:57:41 -0400 (EDT)

branch: externals/relint
commit a1c7bf56c03b0dac12a54c75e7183db9257497f1
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Describe the ineffective backslash warning in README
 README | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/README b/README
index 7d25c5e..98e8a1d 100644
--- a/README
+++ b/README
@@ -214,6 +214,23 @@ skip-syntax-backward.
     In general, A?, where A matches the empty string, can be
     simplified to just A.
+  - Ineffective string escape '\X'
+    A backslash precedes a character that does not need escaping in a
+    string literal (any string, not just regexps), like in "hot\-dog".
+    If the backslash should be part of the string then it probably
+    needs to be doubled; otherwise, it is pointless and should be
+    removed to avoid confusion.
+    In Emacs versions older than 27.1, a left round or square bracket,
+    '(' or '[', at the very start of a line in a multi-line string
+    could sometimes fool the Emacs-Lisp mode into believing it to be
+    the start of a function, thus people sometimes precede such
+    brackets with an otherwise unnecessary backslash. However, there
+    is usually no reason to put backslashes before brackets in strings
+    in general.
   - Suspect range '+-X' or 'X-+'
     A character range with '+' as one of its endpoints is more often an

reply via email to

[Prev in Thread] Current Thread [Next in Thread]