]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the M-x obsoletion check more robust
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 May 2021 16:50:24 +0000 (18:50 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 May 2021 16:50:24 +0000 (18:50 +0200)
* lisp/simple.el (read-extended-command): Make the obsoletion
check more robust.

lisp/simple.el

index 0255f69e42710c448f1feff303ab6d741e17d4f4..fc3a4bd909d972199c06632a06057b5556033726 100644 (file)
@@ -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)