Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
44915370
Commit
44915370
authored
Sep 11, 2013
by
Glenn Morris
Browse files
* subr.el (do-after-load-evaluation): Also give compiler warnings
when obsolete files are used (except by obsolete files).
parent
8ffbc36b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/subr.el
lisp/subr.el
+21
-6
No files found.
lisp/ChangeLog
View file @
44915370
2013-09-12 Glenn Morris <rgm@gnu.org>
* subr.el (do-after-load-evaluation): Also give compiler warnings
when obsolete files are used (except by obsolete files).
* vc/vc-svn.el (vc-svn-parse-status): If there are multiple files
in the status output, assume `filename' is the first. (Bug#15322)
...
...
lisp/subr.el
View file @
44915370
...
...
@@ -3907,12 +3907,27 @@ This function is called directly from the C code."
(
mapc
#'
funcall
(
cdr
a-l-element
))))
;; Complain when the user uses obsolete files.
(
when
(
string-match-p
"/obsolete/[^/]*\\'"
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
)))
;; Maybe we should just use display-warning? This seems yucky...
(
let*
((
file
(
file-name-nondirectory
abs-file
))
(
msg
(
format
"Package %s is obsolete!"
(
substring
file
0
(
string-match
"\\.elc?\\>"
file
)))))
;; Cribbed from cl--compiling-file.
(
if
(
and
(
boundp
'byte-compile--outbuffer
)
(
bufferp
(
symbol-value
'byte-compile--outbuffer
))
(
equal
(
buffer-name
(
symbol-value
'byte-compile--outbuffer
))
" *Compiler Output*"
))
;; Don't warn about obsolete files using other obsolete files.
(
unless
(
and
(
stringp
byte-compile-current-file
)
(
string-match-p
"/obsolete/[^/]*\\'"
(
expand-file-name
byte-compile-current-file
byte-compile-root-dir
)))
(
byte-compile-log-warning
msg
))
(
run-with-timer
0
nil
(
lambda
(
msg
)
(
message
"%s"
msg
))
msg
))))
;; Finally, run any other hook.
(
run-hook-with-args
'after-load-functions
abs-file
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment