From 474241f356c638bfd8d4eecb7138e3af76a8c036 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 8 May 2022 23:37:10 +0200 Subject: [PATCH] Remedy ineffective backslashes and fix regexps * lisp/info.el (Info-read-node-name-2): Double backslash for intended escaping effect. * lisp/term.el (term-send-function-key): Remove redundant `+`. * lisp/leim/quail/indian.el: * lisp/simple.el (scratch-buffer, get-scratch-buffer-create): Remove ineffective backslashes. --- lisp/info.el | 2 +- lisp/leim/quail/indian.el | 18 +++++++++--------- lisp/simple.el | 4 ++-- lisp/term.el | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 514cf7b3f47..e51f0b9537a 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1834,7 +1834,7 @@ list of valid filename suffixes for Info files. See ;; include it (without the suffix). (when (and (string-match suffix file) ;; But exclude subfiles of split Info files. - (not (string-match "\.info-[0-9]+" file)) + (not (string-match "\\.info-[0-9]+" file)) ;; And exclude backup files. (not (string-match "~\\'" file))) (push (substring file 0 (match-beginning 0)) diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 3bc03558c32..6c58fdd40be 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -730,10 +730,10 @@ Full key sequences are listed below:") ("`*" ?𑁙) ("9" ?𑁯) ("`9" ?9) - ("`\(" ?𑁚) + ("`(" ?𑁚) ("0" ?𑁦) ("`0" ?0) - ("`\)" ?𑁛) + ("`)" ?𑁛) ("`-" ?𑁜) ("`_" ?𑁝) ("`=" ?𑁞) @@ -780,8 +780,8 @@ Full key sequences are listed below:") ("P" ?𑀨) ("`p" ?𑁳) ("`P" ?𑁱) - ("`\[" ?𑁴) - ("`\{" ?𑁲) + ("`[" ?𑁴) + ("`{" ?𑁲) ("a" ?𑀸) ("A" ?𑀆) ("`a" ?𑀅) @@ -863,7 +863,7 @@ Full key sequences are listed below:") ("`9" ?9) ("0" ?०) ("`0" ?0) -("`\)" ?𑂻) +("`)" ?𑂻) ("`\\" ?𑃀) ("`|" ?𑃁) ("`" ?𑂗) @@ -965,7 +965,7 @@ Full key sequences are listed below:") ("`9" ?9) ("0" ?𑓐) ("`0" ?0) -("`\)" ?𑓆) +("`)" ?𑓆) ("`\\" ?।) ("`|" ?॥) ("`" ?𑒙) @@ -1071,7 +1071,7 @@ Full key sequences are listed below:") ("`9" ?9) ("0" ?𑇐) ("`0" ?0) -("`\)" ?𑇇) +("`)" ?𑇇) ("`\\" ?𑇅) ("`|" ?𑇆) ("`" ?𑆛) @@ -1188,9 +1188,9 @@ Full key sequences are listed below:") ("`8" ?𑗑) ("`*" ?𑗈) ("`9" ?𑗒) -("`\(" ?𑗉) +("`(" ?𑗉) ("`0" ?𑗓) -("`\)" ?𑗄) +("`)" ?𑗄) ("`\\" ?𑗂) ("`|" ?𑗃) ("`" ?𑖘) diff --git a/lisp/simple.el b/lisp/simple.el index edcc226bfa8..89fb0ea97ec 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10214,7 +10214,7 @@ the number of seconds east of Greenwich.") ) (defun get-scratch-buffer-create () - "Return the \*scratch\* buffer, creating a new one if needed." + "Return the *scratch* buffer, creating a new one if needed." (or (get-buffer "*scratch*") (let ((scratch (get-buffer-create "*scratch*"))) ;; Don't touch the buffer contents or mode unless we know that @@ -10227,7 +10227,7 @@ the number of seconds east of Greenwich.") scratch))) (defun scratch-buffer () - "Switch to the \*scratch\* buffer. + "Switch to the *scratch* buffer. If the buffer doesn't exist, create it first." (interactive) (pop-to-buffer-same-window (get-scratch-buffer-create))) diff --git a/lisp/term.el b/lisp/term.el index 640478b59a2..54e19a3ea92 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1430,7 +1430,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." (when (and (= (length key) 1) (symbolp (elt key 0))) (let ((name (symbol-name (elt key 0)))) - (when (string-match "\\`f\\([0-9]++\\)\\'" name) + (when (string-match "\\`f\\([0-9]+\\)\\'" name) (let* ((num (string-to-number (match-string 1 name))) (ansi (cond -- 2.39.2