summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-02-19 00:10:33 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-02-19 00:10:33 -0500
commite0f57e65692ed73a86926f737388b60faec92767 (patch)
treecd119f7a6f2a04673f304fbf8cfaf8fc7c0896f2 /lisp/emacs-lisp/bytecomp.el
parent9a05edc4fcf1eff8966ac327e479bb8f9ca219a9 (diff)
downloademacs-e0f57e65692ed73a86926f737388b60faec92767.tar.gz
emacs-e0f57e65692ed73a86926f737388b60faec92767.tar.bz2
emacs-e0f57e65692ed73a86926f737388b60faec92767.zip
* lisp/subr.el (save-window-excursion): New macro, moved from C.
* lisp/emacs-lisp/lisp-mode.el (save-window-excursion): Don't touch. * lisp/emacs-lisp/cconv.el (cconv-closure-convert-rec, cconv-analyse-form): Don't handle save-window-excursion any more. * lisp/emacs-lisp/bytecomp.el (interactive-p, save-window-excursion): Don't use the byte-code any more. (byte-compile-form): Check macro expansion was done. (byte-compile-save-window-excursion): Remove. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Ignore save-window-excursion. Don't macroepand any more. * src/window.c (Fsave_window_excursion): Remove. Moved to Lisp. (syms_of_window): Don't defsubr it. * src/window.h (Fsave_window_excursion): Don't declare it. * src/bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el18
1 files changed, 4 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d3ac50a671a..54a1912169a 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -586,7 +586,6 @@ Each element is (INDEX . VALUE)")
(byte-defop 114 0 byte-save-current-buffer
"To make a binding to record the current buffer")
(byte-defop 115 0 byte-set-mark-OBSOLETE)
-(byte-defop 116 1 byte-interactive-p)
;; These ops are new to v19
(byte-defop 117 0 byte-forward-char)
@@ -622,8 +621,6 @@ otherwise pop it")
(byte-defop 138 0 byte-save-excursion
"to make a binding to record the buffer, point and mark")
-(byte-defop 139 0 byte-save-window-excursion
- "to make a binding to record entire window configuration")
(byte-defop 140 0 byte-save-restriction
"to make a binding to record the current buffer clipping restrictions")
(byte-defop 141 -1 byte-catch
@@ -2955,6 +2952,10 @@ That command is designed for interactive use only" bytecomp-fn))
custom-declare-face))
(byte-compile-nogroup-warn form))
(byte-compile-callargs-warn form))
+ (if (and (fboundp (car form))
+ (eq (car-safe (indirect-function (car form))) 'macro))
+ (byte-compile-report-error
+ (format "Forgot to expand macro %s" (car form))))
(if (and bytecomp-handler
;; Make sure that function exists. This is important
;; for CL compiler macros since the symbol may be
@@ -3167,7 +3168,6 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
(byte-defop-compiler bobp 0)
(byte-defop-compiler current-buffer 0)
;;(byte-defop-compiler read-char 0) ;; obsolete
-(byte-defop-compiler interactive-p 0)
(byte-defop-compiler widen 0)
(byte-defop-compiler end-of-line 0-1)
(byte-defop-compiler forward-char 0-1)
@@ -3946,7 +3946,6 @@ binding slots have been popped."
(byte-defop-compiler-1 save-excursion)
(byte-defop-compiler-1 save-current-buffer)
(byte-defop-compiler-1 save-restriction)
-(byte-defop-compiler-1 save-window-excursion)
(byte-defop-compiler-1 with-output-to-temp-buffer)
(byte-defop-compiler-1 track-mouse)
@@ -4047,15 +4046,6 @@ binding slots have been popped."
(byte-compile-body-do-effect (cdr form))
(byte-compile-out 'byte-unbind 1))
-(defun byte-compile-save-window-excursion (form)
- (pcase (cdr form)
- (`(:fun-body ,f)
- (byte-compile-form `(list (list 'funcall ,f))))
- (body
- (byte-compile-push-constant
- (byte-compile-top-level-body body for-effect))))
- (byte-compile-out 'byte-save-window-excursion 0))
-
(defun byte-compile-with-output-to-temp-buffer (form)
(byte-compile-form (car (cdr form)))
(byte-compile-out 'byte-temp-output-buffer-setup 0)