Variable: byte-compile-form-stack

byte-compile-form-stack is a variable defined in macroexp.el.gz.

Value

nil

Documentation

Dynamic list of successive enclosing forms.

This is used by the warning message routines to determine a source code position. The most accessible element is the current most deeply nested form.

Normally a form is manually pushed onto the list at the beginning of byte-compile-form, etc., and manually popped off at its end. This is to preserve the data in it in the event of a condition-case handling a signaled error.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/macroexp.el.gz
;;; macroexp.el --- Additional macro-expansion support -*- lexical-binding: t -*-
;;
;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: lisp, compiler, macros

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:
;;
;; This file contains macro-expansions functions that are not defined in
;; the Lisp core, namely `macroexpand-all', which expands all macros in
;; a form, not just a top-level one.

;;; Code:

(defvar byte-compile-form-stack nil
  "Dynamic list of successive enclosing forms.
This is used by the warning message routines to determine a
source code position.  The most accessible element is the current
most deeply nested form.

Normally a form is manually pushed onto the list at the beginning
of `byte-compile-form', etc., and manually popped off at its end.
This is to preserve the data in it in the event of a
`condition-case' handling a signaled error.")