diff options
| author | Joakim Verona | 2013-09-12 08:47:03 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-09-12 08:47:03 +0200 |
| commit | d400d0f25c3c9df2e9c1d26432b144779c81a684 (patch) | |
| tree | 813a1941cdee1a6900f015e265fe99cd10627e47 | |
| parent | a87e9c8f9fb3c2696bed6c1f8edb7542461d673c (diff) | |
| parent | 44915370e8c39adf7c9d65c29241269c454964aa (diff) | |
| download | emacs-d400d0f25c3c9df2e9c1d26432b144779c81a684.tar.gz emacs-d400d0f25c3c9df2e9c1d26432b144779c81a684.zip | |
merge from trunk
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 27 |
2 files changed, 24 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37005de6776..1713efc07e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> | 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * subr.el (do-after-load-evaluation): Also give compiler warnings | ||
| 4 | when obsolete files are used (except by obsolete files). | ||
| 5 | |||
| 3 | * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files | 6 | * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files |
| 4 | in the status output, assume `filename' is the first. (Bug#15322) | 7 | in the status output, assume `filename' is the first. (Bug#15322) |
| 5 | 8 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index de7c629b208..7df1e86b5bf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3907,12 +3907,27 @@ This function is called directly from the C code." | |||
| 3907 | (mapc #'funcall (cdr a-l-element)))) | 3907 | (mapc #'funcall (cdr a-l-element)))) |
| 3908 | ;; Complain when the user uses obsolete files. | 3908 | ;; Complain when the user uses obsolete files. |
| 3909 | (when (string-match-p "/obsolete/[^/]*\\'" abs-file) | 3909 | (when (string-match-p "/obsolete/[^/]*\\'" abs-file) |
| 3910 | (run-with-timer 0 nil | 3910 | ;; Maybe we should just use display-warning? This seems yucky... |
| 3911 | (lambda (file) | 3911 | (let* ((file (file-name-nondirectory abs-file)) |
| 3912 | (message "Package %s is obsolete!" | 3912 | (msg (format "Package %s is obsolete!" |
| 3913 | (substring file 0 | 3913 | (substring file 0 |
| 3914 | (string-match "\\.elc?\\>" file)))) | 3914 | (string-match "\\.elc?\\>" file))))) |
| 3915 | (file-name-nondirectory abs-file))) | 3915 | ;; Cribbed from cl--compiling-file. |
| 3916 | (if (and (boundp 'byte-compile--outbuffer) | ||
| 3917 | (bufferp (symbol-value 'byte-compile--outbuffer)) | ||
| 3918 | (equal (buffer-name (symbol-value 'byte-compile--outbuffer)) | ||
| 3919 | " *Compiler Output*")) | ||
| 3920 | ;; Don't warn about obsolete files using other obsolete files. | ||
| 3921 | (unless (and (stringp byte-compile-current-file) | ||
| 3922 | (string-match-p "/obsolete/[^/]*\\'" | ||
| 3923 | (expand-file-name | ||
| 3924 | byte-compile-current-file | ||
| 3925 | byte-compile-root-dir))) | ||
| 3926 | (byte-compile-log-warning msg)) | ||
| 3927 | (run-with-timer 0 nil | ||
| 3928 | (lambda (msg) | ||
| 3929 | (message "%s" msg)) msg)))) | ||
| 3930 | |||
| 3916 | ;; Finally, run any other hook. | 3931 | ;; Finally, run any other hook. |
| 3917 | (run-hook-with-args 'after-load-functions abs-file)) | 3932 | (run-hook-with-args 'after-load-functions abs-file)) |
| 3918 | 3933 | ||