diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-12 03:35:40 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-09-12 03:35:40 +0000 |
commit | 5766c380eec20a19844253cbb511922b6c70fc0b (patch) | |
tree | 39a49c35b87f18beab2f864fe6eefd1747f3da8b /lisp/subr.el | |
parent | d6549da4bd175e808876d8cf7303cddebb37f4e3 (diff) | |
download | emacs-5766c380eec20a19844253cbb511922b6c70fc0b.tar.gz |
* lread.c (Fload): Don't output a message after loading an obsolete
package any more (done in Lisp now).
* subr.el (do-after-load-evaluation): Warn the user after loading an
obsolete package.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index ae19a644ee1..d42382d15d3 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1688,13 +1688,25 @@ This function makes or adds to an entry on `after-load-alist'." (defun do-after-load-evaluation (abs-file) "Evaluate all `eval-after-load' forms, if any, for ABS-FILE. -ABS-FILE, a string, should be the absolute true name of a file just loaded." +ABS-FILE, a string, should be the absolute true name of a file just loaded. +This function is called directly from the C code." + ;; Run the relevant eval-after-load forms. (mapc #'(lambda (a-l-element) (when (and (stringp (car a-l-element)) (string-match-p (car a-l-element) abs-file)) ;; discard the file name regexp (mapc #'eval (cdr a-l-element)))) - after-load-alist)) + after-load-alist) + ;; Complain when the user uses obsolete files. + (when (equal "obsolete" + (file-name-nondirectory + (directory-file-name (file-name-directory abs-file)))) + (run-with-timer 0 nil + (lambda (file) + (message "Package %s is obsolete!" + (substring file 0 + (string-match "\\.elc?\\>" file)))) + (file-name-nondirectory abs-file)))) (defun eval-next-after-load (file) "Read the following input sexp, and run it whenever FILE is loaded. |