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
49fec531
Commit
49fec531
authored
Sep 15, 2009
by
Stefan Monnier
Browse files
(byte-compile-refresh-preloaded): New function.
parent
0e328d37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/bytecomp.el
+22
-1
No files found.
lisp/ChangeLog
View file @
49fec531
2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): New function.
* loadup.el: Use after-load-functions to GC after loading each file.
Remove the explicit GC calls that used to be sprinkled around.
...
...
lisp/emacs-lisp/bytecomp.el
View file @
49fec531
...
...
@@ -4103,7 +4103,8 @@ that suppresses all warnings during execution of BODY."
(
byte-compile-form
(
cons
'progn
(
cdr
form
)))))
;; Warn about misuses of make-variable-buffer-local.
(
byte-defop-compiler-1
make-variable-buffer-local
byte-compile-make-variable-buffer-local
)
(
byte-defop-compiler-1
make-variable-buffer-local
byte-compile-make-variable-buffer-local
)
(
defun
byte-compile-make-variable-buffer-local
(
form
)
(
if
(
and
(
eq
(
car-safe
(
car-safe
(
cdr-safe
form
)))
'quote
)
(
byte-compile-warning-enabled-p
'make-local
))
...
...
@@ -4393,6 +4394,26 @@ already up-to-date."
(
prin1-to-string
(
cdr
err
)))
nil
))))
;;;###autoload
(
defun
byte-compile-refresh-preloaded
()
"Reload any Lisp file that was changed since Emacs was dumped.
Use with caution."
(
let*
((
argv0
(
car
command-line-args
))
(
emacs-file
(
executable-find
argv0
)))
(
if
(
not
(
and
emacs-file
(
file-executable-p
emacs-file
)))
(
message
"Can't find %s to refresh preloaded Lisp files"
argv0
)
(
dolist
(
f
(
reverse
load-history
))
(
setq
f
(
car
f
))
(
if
(
string-match
"elc\\'"
f
)
(
setq
f
(
substring
f
0
-1
)))
(
when
(
and
(
file-readable-p
f
)
(
file-newer-than-file-p
f
emacs-file
))
(
message
"Reloading stale %s"
(
file-name-nondirectory
f
))
(
condition-case
nil
(
load
f
'noerror
nil
'nosuffix
)
;; Probably shouldn't happen, but in case of an error, it seems
;; at least as useful to ignore it as it is to stop compilation.
(
error
nil
)))))))
;;;###autoload
(
defun
batch-byte-recompile-directory
(
&optional
arg
)
"Run `byte-recompile-directory' on the dirs remaining on the command line.
...
...
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