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
5a6037bb
Commit
5a6037bb
authored
Aug 28, 1996
by
Richard M. Stallman
Browse files
(byte-compile-funarg-2): New function,
(sort): Use byte-compile-funarg-2.
parent
f822bec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/bytecomp.el
+15
-1
No files found.
lisp/emacs-lisp/bytecomp.el
View file @
5a6037bb
...
...
@@ -10,7 +10,7 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
(defconst byte-compile-version "$Revision: 2.1
3
$")
(
defconst
byte-compile-version
"$Revision: 2.1
4
$"
)
;; This file is part of GNU Emacs.
...
...
@@ -2556,6 +2556,19 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(
cdr
(
cdr
form
))))
form
))))
(
defun
byte-compile-funarg-2
(
form
)
;; (sort ... '(lambda (x) ..)) ==> (sort ... (function (lambda (x) ..)))
;; for cases where it's guaranteed that second arg will be used as a lambda.
(
byte-compile-normal-call
(
let
((
fn
(
nth
2
form
)))
(
if
(
and
(
eq
(
car-safe
fn
)
'quote
)
(
eq
(
car-safe
(
nth
1
fn
))
'lambda
))
(
cons
(
car
form
)
(
cons
(
nth
1
form
)
(
cons
(
cons
'function
(
cdr
fn
))
(
cdr
(
cdr
(
cdr
form
))))))
form
))))
;; (function foo) must compile like 'foo, not like (symbol-function 'foo).
;; Otherwise it will be incompatible with the interpreter,
;; and (funcall (function foo)) will lose with autoloads.
...
...
@@ -2682,6 +2695,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(
byte-defop-compiler-1
mapcar
byte-compile-funarg
)
(
byte-defop-compiler-1
mapatoms
byte-compile-funarg
)
(
byte-defop-compiler-1
mapconcat
byte-compile-funarg
)
(
byte-defop-compiler-1
sort
byte-compile-funarg-2
)
(
byte-defop-compiler-1
let
)
(
byte-defop-compiler-1
let*
)
...
...
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