914 |
(when byte-compile-read-position |
(when byte-compile-read-position |
915 |
(let (last entry) |
(let (last entry) |
916 |
(while (progn |
(while (progn |
917 |
(setq last byte-compile-last-position |
(setq last byte-compile-last-position |
918 |
entry (assq sym read-symbol-positions-list)) |
entry (assq sym read-symbol-positions-list)) |
919 |
(when entry |
(when entry |
920 |
(setq byte-compile-last-position |
(setq byte-compile-last-position |
921 |
(+ byte-compile-read-position (cdr entry)) |
(+ byte-compile-read-position (cdr entry)) |
922 |
read-symbol-positions-list |
read-symbol-positions-list |
923 |
(byte-compile-delete-first |
(byte-compile-delete-first |
924 |
entry read-symbol-positions-list))) |
entry read-symbol-positions-list))) |
925 |
(or (and allow-previous (not (= last byte-compile-last-position))) |
(or (and allow-previous (not (= last byte-compile-last-position))) |
926 |
(> last byte-compile-last-position))))))) |
(> last byte-compile-last-position))))))) |
927 |
|
|
2714 |
(defun byte-compile-form (form &optional for-effect) |
(defun byte-compile-form (form &optional for-effect) |
2715 |
(setq form (macroexpand form byte-compile-macro-environment)) |
(setq form (macroexpand form byte-compile-macro-environment)) |
2716 |
(cond ((not (consp form)) |
(cond ((not (consp form)) |
|
(when (symbolp form) |
|
|
(byte-compile-set-symbol-position form)) |
|
2717 |
(cond ((or (not (symbolp form)) (byte-compile-const-symbol-p form)) |
(cond ((or (not (symbolp form)) (byte-compile-const-symbol-p form)) |
2718 |
|
(when (symbolp form) |
2719 |
|
(byte-compile-set-symbol-position form)) |
2720 |
(byte-compile-constant form)) |
(byte-compile-constant form)) |
2721 |
((and for-effect byte-compile-delete-errors) |
((and for-effect byte-compile-delete-errors) |
2722 |
|
(when (symbolp form) |
2723 |
|
(byte-compile-set-symbol-position form)) |
2724 |
(setq for-effect nil)) |
(setq for-effect nil)) |
2725 |
(t (byte-compile-variable-ref 'byte-varref form)))) |
(t (byte-compile-variable-ref 'byte-varref form)))) |
2726 |
((symbolp (car form)) |
((symbolp (car form)) |
2727 |
(let* ((fn (car form)) |
(let* ((fn (car form)) |
2728 |
(handler (get fn 'byte-compile))) |
(handler (get fn 'byte-compile))) |
|
(byte-compile-set-symbol-position fn) |
|
2729 |
(when (byte-compile-const-symbol-p fn) |
(when (byte-compile-const-symbol-p fn) |
2730 |
(byte-compile-warn "`%s' called as a function" fn)) |
(byte-compile-warn "`%s' called as a function" fn)) |
2731 |
(and (memq 'interactive-only byte-compile-warnings) |
(and (memq 'interactive-only byte-compile-warnings) |
2736 |
(or (not (byte-compile-version-cond |
(or (not (byte-compile-version-cond |
2737 |
byte-compile-compatibility)) |
byte-compile-compatibility)) |
2738 |
(not (get (get fn 'byte-opcode) 'emacs19-opcode)))) |
(not (get (get fn 'byte-opcode) 'emacs19-opcode)))) |
2739 |
(funcall handler form) |
(progn |
2740 |
|
(byte-compile-set-symbol-position fn) |
2741 |
|
(funcall handler form)) |
2742 |
(if (memq 'callargs byte-compile-warnings) |
(if (memq 'callargs byte-compile-warnings) |
2743 |
(byte-compile-callargs-warn form)) |
(byte-compile-callargs-warn form)) |
2744 |
(byte-compile-normal-call form)) |
(byte-compile-normal-call form)) |