]> git.eshelyaron.com Git - emacs.git/commitdiff
* lread.c (Fload): Don't output a message after loading an obsolete
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2009 03:35:40 +0000 (03:35 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2009 03:35:40 +0000 (03:35 +0000)
package any more (done in Lisp now).
* subr.el (do-after-load-evaluation): Warn the user after loading an
obsolete package.

lisp/ChangeLog
lisp/subr.el
src/ChangeLog
src/lread.c

index 50aea7a570fd693822d761bd0771d2eb27210768..33d7ca2f3ea81016fe0d1ca141f38b23f5c24e2b 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (do-after-load-evaluation): Warn the user after loading an
+       obsolete package.
+
 2009-09-12  Glenn Morris  <rgm@gnu.org>
 
        * proced.el (proced-mark-alt): Remove alias.
index ae19a644ee110f8df8f5cbd802232305f8f62461..d42382d15d36d5bae11c7c6b1053223cedb8101f 100644 (file)
@@ -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.
index ff940d6ea8badce359617528c53bd006447fd851..3d3403645b1f0191ea1e35cbab056fe7258090b5 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lread.c (Fload): Don't output a message after loading an obsolete
+       package any more (done in Lisp now).
+
 2009-09-12  Chong Yidong  <cyd@stupidchicken.com>
 
        * fns.c (syms_of_fns): Doc fix (Bug#4227).
index 10bc4ad3c5e89137a59b2df372b705839b7b9ae7..92b1b432acd40d42b49be28c34d0191738bcb3d4 100644 (file)
@@ -1307,11 +1307,6 @@ Return t if the file exists and loads successfully.  */)
        message_with_string ("Loading %s...done", file, 1);
     }
 
-  if (!NILP (Fequal (build_string ("obsolete"),
-                    Ffile_name_nondirectory
-                    (Fdirectory_file_name (Ffile_name_directory (found))))))
-    message_with_string ("Package %s is obsolete", file, 1);
-
   return Qt;
 }