Subject: 30.0.50: Emacs don't, start sends an erroneous error

From: Andreas Röhler <[email-masked]>
Date: Thu, 16 Mar 2023 19:08:49 +0100

Emacs don't start sending an erroneous error, backtrace at the end of 
this report.

Error points to the docstring of the function below, notably at the 
escaped ‘x’:

---
(defun lean-input-compose (f g)
   "\x -> concatMap F (G x)"
   (lexical-let ((f1 f) (g1 g))
     (lambda (x) (lean-input-concat-map f1 (funcall g1 x)))))
---

Debugger entered--Lisp error: (error "Invalid escape character syntax")
   read(#<buffer  *load*-183932>)
   eval-buffer(#<buffer  *load*-183932> nil 
"/home/my-name/.emacs.d/straight/build/lean-mode/lean..." nil t) ; 
Reading at buffer position 2036
load-with-code-conversion("/home/my-name/.emacs.d/straight/build/lean-mode/lean..." 
"/home/my-name/.emacs.d/straight/build/lean-mode/lean-input.el" nil t)
   require(lean-input)
   eval-buffer(#<buffer  *load*-311253> nil 
"/home/my-name/.emacs.d/straight/build/lean-mode/lean..." nil t) ; 
Reading at buffer position 1185
load-with-code-conversion("/home/my-name/.emacs.d/straight/build/lean-mode/lean..." 
"/home/my-name/.emacs.d/straight/build/lean-mode/lean..." nil t)
   require(lean-mode)
   eval-buffer(#<buffer  *load*-80552> nil "/home/my-name/.gnu-emacs25" 
nil t)  ; Reading at buffer position 10520
   load-with-code-conversion("/home/my-name/.gnu-emacs25" 
"/home/my-name/.gnu-emacs25" nil nil)
   load("/home/my-name/.gnu-emacs25")
   (cond ((string-match "^23" emacs-version) (setq custom-file 
(expand-file-name "~/.gnu-emacs23-cvs-custom")) (load (expand-file-name 
"~/.gnu-emacs23-all-cvs"))) ((string-match "^24" emacs-version) (setq 
custom-file (expand-file-name "~/.gnu-emacs24-custom")) (load 
(expand-file-name "~/.gnu-emacs24"))) (t (setq custom-file 
(expand-file-name "~/.gnu-emacs25-custom")) (load (expand-file-name 
"~/.gnu-emacs25"))))
   eval-buffer(#<buffer  *load*> nil "/home/my-name/.emacs" nil t)  ; 
Reading at buffer position 840
   load-with-code-conversion("/home/my-name/.emacs" 
"/home/my-name/.emacs" t t)
   load("~/.emacs" noerror nomessage)
   startup--load-user-init-file(#f(compiled-function () #<bytecode 
-0x19c7dbe75dab1fbb>) #f(compiled-function () #<bytecode 
-0x1f3c61addc0bc175>) t)
   command-line()
   normal-top-level()

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.16.0) of 2023-03-16