From efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 14 May 2021 18:50:24 +0200 Subject: [PATCH] Make the M-x obsoletion check more robust * lisp/simple.el (read-extended-command): Make the obsoletion check more robust. --- lisp/simple.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 0255f69e427..fc3a4bd909d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2020,8 +2020,13 @@ This function uses the `read-extended-command-predicate' user option." ;; Has a current-name. (functionp (car obsolete)) ;; when >= emacs-major-version - (>= (car (version-to-list (caddr obsolete))) - emacs-major-version)))))) + (condition-case nil + (>= (car (version-to-list + (caddr obsolete))) + emacs-major-version) + ;; If the obsoletion version isn't + ;; valid, include the command. + (error t))))))) pred))) (complete-with-action action obarray string pred)))) (lambda (sym) -- 2.39.5