From 4e2fd354cc38c910da6aa60a05a5d250f100eb97 Mon Sep 17 00:00:00 2001 From: lloyd at c436f Date: Fri, 8 Jul 2022 12:45:05 +0800 Subject: [PATCH] ignore-errors when vai is nil --- quail-cin.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quail-cin.el b/quail-cin.el index 3caae08..87ce1ee 100644 --- a/quail-cin.el +++ b/quail-cin.el @@ -105,14 +105,14 @@ DEFAULT will be returned when some candidates are not in the ATTRS." (defun cin-safe-quote (val) "Return a quoted string built from VAL." - (replace-regexp-in-string - ";" (regexp-quote (regexp-quote "\\;")) - (replace-regexp-in-string - "\\\\" (regexp-quote (regexp-quote "\\\\")) + (ignore-errors (replace-regexp-in-string - "\"" "#-#\\\"" - val t t))) - ) + ";" (regexp-quote (regexp-quote "\\;")) + (replace-regexp-in-string + "\\\\" (regexp-quote (regexp-quote "\\\\")) + (replace-regexp-in-string + "\"" "#-#\\\"" + val t t))))) (defun cin-filename-p (file-name &optional allow-dir) "Return t if the FILE-NAME is a valid cin file or a directory if ALLOW-DIR is t."