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
b7a5a208
Commit
b7a5a208
authored
Jan 03, 2006
by
Stefan Monnier
Browse files
(byte-compile-file-form-defalias):
Optimize the body of a defalias like any other code.
parent
355ebcbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
lisp/ChangeLog
lisp/ChangeLog
+6
-3
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/bytecomp.el
+10
-2
No files found.
lisp/ChangeLog
View file @
b7a5a208
2006-01-03 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-file-form-defalias):
Optimize the body of a defalias like any other code.
* font-lock.el (font-lock-fontify-buffer, font-lock-fontify-region):
Make sure we've setup font-lock's vars. It may influence which
function we then call.
...
...
@@ -13,10 +16,10 @@
2006-01-02 J.D. Smith <jdsmith@as.arizona.edu>
* mouse.el (mouse-drag-track): Rename
d
, from
* mouse.el (mouse-drag-track): Rename, from
`mouse-drag-region-1'. Includes optional argument required to
enable post-drag event processing (e.g. delete region keys).
Can
be used without this argument to track a mouse region and operate
enable post-drag event processing (e.g. delete region keys).
Can
be used without this argument to track a mouse region and operate
on it as soon as the drag completes.
(mouse-drag-region): Use `mouse-drag-track'.
...
...
lisp/emacs-lisp/bytecomp.el
View file @
b7a5a208
;;; bytecomp.el --- compilation of Lisp code into byte code
;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002,
;; 2003, 2004, 2005 Free Software Foundation, Inc.
;; 2003, 2004, 2005
, 2006
Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
...
...
@@ -3785,7 +3785,15 @@ that suppresses all warnings during execution of BODY."
(push (cons (nth 1 (nth 1 form))
(if constant (nth 1 (nth 2 form)) t))
byte-compile-function-environment)))
(byte-compile-normal-call form))
;; We used to jus do: (byte-compile-normal-call form)
;; But it turns out that this fails to optimize the code.
;; So instead we now do the same as what other byte-hunk-handlers do,
;; which is to call back byte-compile-file-form and then return nil.
;; Except that we can't just call byte-compile-file-form since it would
;; call us right back.
(byte-compile-keep-pending form)
;; Return nil so the form is not output twice.
nil)
;; Turn off warnings about prior calls to the function being defalias'd.
;; This could be smarter and compare those calls with
...
...
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