Fix search error in woman.el

* lisp/woman.el (woman-if-body): Avoid signaling an error
if "el }" is not found.  (Bug#68852)
This commit is contained in:
Thierry Volpiatto 2024-01-31 13:54:16 +00:00 committed by Eli Zaretskii
parent 4adb4b2ac5
commit d0766c0999

View file

@ -2566,7 +2566,8 @@ If DELETE is non-nil then delete from point."
;; "\\(\\\\{\\)\\|\\(\n[.']\\)?[ \t]*\\\\}[ \t]*"
;; Interpret bogus `el \}' as `el \{',
;; especially for Tcl/Tk man pages:
"\\(\\\\{\\|el[ \t]*\\\\}\\)\\|\\(\n[.']\\)?[ \t]*\\\\}[ \t]*")
"\\(\\\\{\\|el[ \t]*\\\\}\\)\\|\\(\n[.']\\)?[ \t]*\\\\}[ \t]*"
nil t)
(match-beginning 1))
(re-search-forward "\\\\}"))
(delete-region (if delete from (match-beginning 0)) (point))