summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-05-14 18:50:24 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-05-14 18:50:24 +0200
commitefc24f1e0bb127481bcc9c3054c57c4cd3c99aa9 (patch)
tree65d02599b9fcb90ac23dd4a6aad11645a3cf2d2b /lisp
parent780b1db126fcfdbb50da5c1acf24b3c6e614dd9f (diff)
downloademacs-efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9.tar.gz
emacs-efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9.tar.bz2
emacs-efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9.zip
Make the M-x obsoletion check more robust
* lisp/simple.el (read-extended-command): Make the obsoletion check more robust.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el9
1 files 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)