]> git.eshelyaron.com Git - emacs.git/commitdiff
; Further minor simplification of rx form in bytecomp.el
authorStefan Kangas <stefan@marxist.se>
Mon, 22 Nov 2021 15:11:45 +0000 (16:11 +0100)
committerStefan Kangas <stefan@marxist.se>
Mon, 22 Nov 2021 15:14:01 +0000 (16:14 +0100)
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Simplify even more.  Thanks to Mattias EngdegĂ„rd <mattiase@acm.org>.

lisp/emacs-lisp/bytecomp.el

index 5dc03eac92b53ff3f4822cb21650b6f836467094..566a3fdf99ca5084f8fd42b220819d2406e4ee98 100644 (file)
@@ -1672,12 +1672,12 @@ URLs."
     ;; known at compile time.  So instead, we assume that these
     ;; substitutions are of some length N.
     (replace-regexp-in-string
-     (rx "\\" (seq "[" (* (not "]")) "]"))
+     (rx "\\[" (* (not "]")) "]")
      (make-string byte-compile--wide-docstring-substitution-len ?x)
      ;; For literal key sequence substitutions (e.g. "\\`C-h'"), just
      ;; remove the markup as `substitute-command-keys' would.
      (replace-regexp-in-string
-      (rx "\\" (seq "`" (group (* (not "'"))) "'"))
+      (rx "\\`" (group (* (not "'"))) "'")
       "\\1"
       docstring)))))