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
2546bcdd
Commit
2546bcdd
authored
Nov 22, 2007
by
Stefan Monnier
Browse files
(byte-compile-file-form-custom-declare-variable): Simplify.
parent
d1a3873f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/bytecomp.el
+9
-10
No files found.
lisp/ChangeLog
View file @
2546bcdd
2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el
(byte-compile-file-form-custom-declare-variable): Simplify.
2007-11-22 Juanma Barranquero <lekktu@gmail.com>
* cus-edit.el (custom-mode): Define with `define-derived-mode'.
...
...
lisp/emacs-lisp/bytecomp.el
View file @
2546bcdd
...
...
@@ -2277,18 +2277,17 @@ list that represents a doc string reference.
(byte-compile-nogroup-warn form))
(when (byte-compile-warning-enabled-p 'free-vars)
(push (nth 1 (nth 1 form)) byte-compile-bound-variables))
;; Don't compile the expression because it may be displayed to the user.
;; (when (eq (car-safe (nth 2 form)) 'quote)
;; ;; (nth 2 form) is meant to evaluate to an expression, so if we have the
;; ;; final value already, we can byte-compile it.
;; (setcar (cdr (nth 2 form))
;; (byte-compile-top-level (cadr (nth 2 form)) nil 'file)))
(let ((tail (nthcdr 4 form)))
(while tail
;; If there are any (function (lambda ...)) expressions, compile
;; those functions.
(if (and (consp (car tail))
(eq (car (car tail)) 'function)
(consp (nth 1 (car tail))))
(setcar tail (byte-compile-lambda (nth 1 (car tail))))
;; Likewise for a bare lambda.
(if (and (consp (car tail))
(eq (car (car tail)) 'lambda))
(setcar tail (byte-compile-lambda (car tail)))))
(unless (keywordp (car tail)) ;No point optimizing keywords.
;; Compile the keyword arguments.
(setcar tail (byte-compile-top-level (car tail) nil 'file)))
(setq tail (cdr tail))))
form)
...
...
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