mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
* 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.
This commit is contained in:
parent
9a05edc4fc
commit
e0f57e6569
10 changed files with 67 additions and 74 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue