(complete-with-action action obarray string pred)))
(lambda (sym)
(and (commandp sym)
- (or (null read-extended-command-predicate)
- (and (functionp read-extended-command-predicate)
- (funcall read-extended-command-predicate sym buffer)))))
+ (cond ((null read-extended-command-predicate))
+ ((functionp read-extended-command-predicate)
+ ;; Don't let bugs break M-x completion; interpret
+ ;; them as the absence of a predicate.
+ (condition-case-unless-debug err
+ (funcall read-extended-command-predicate sym buffer)
+ (error (message "read-extended-command-predicate: %s: %s"
+ sym (error-message-string err))))))))
t nil 'extended-command-history))))
(defun command-completion-using-modes-p (symbol buffer)