diff --git a/lisp/subr.el b/lisp/subr.el index 3b536f2e7d6..03d12fec2a9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3943,9 +3943,7 @@ This function is called directly from the C code." ;; discard the file name regexp (mapc #'funcall (cdr a-l-element)))) ;; Complain when the user uses obsolete files. - (when (save-match-data - (and (string-match "/obsolete/\\([^/]*\\)\\'" abs-file) - (not (equal "loaddefs.el" (match-string 1 abs-file))))) + (when (string-match-p "/obsolete/\\([^/]*\\)\\'" abs-file) ;; Maybe we should just use display-warning? This seems yucky... (let* ((file (file-name-nondirectory abs-file)) (msg (format "Package %s is obsolete!"