diff options
| author | Alan Mackenzie | 2016-12-29 09:22:36 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-12-29 09:22:36 +0000 |
| commit | 0d19e69184cd3068279677fb04aa9fb2da6895e4 (patch) | |
| tree | 6d247a864afe776a6e13ea1911d29a3dd7d62453 | |
| parent | 112460da705c2a6716d7b6bc72501de0a3757259 (diff) | |
| download | emacs-0d19e69184cd3068279677fb04aa9fb2da6895e4.tar.gz emacs-0d19e69184cd3068279677fb04aa9fb2da6895e4.zip | |
Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.
This is because there are times when this variable is changed by setcar before
an atom is pushed onto it by debug-enter. This happens, for example, whilst
instrumenting c-font-lock-declarations in .../lisp/progmodes/cc-fonts.el.
* lisp/emacs-lisp/edebug.el (edebug-offset-indices): initialize to '(0).
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 04a493c826f..15b1389c2f7 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -2052,11 +2052,14 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 2052 | (defvar edebug-stack-depth -1) | 2052 | (defvar edebug-stack-depth -1) |
| 2053 | ;; Index of last edebug-stack item. | 2053 | ;; Index of last edebug-stack item. |
| 2054 | 2054 | ||
| 2055 | (defvar edebug-offset-indices nil) | 2055 | (defvar edebug-offset-indices (list 0)) |
| 2056 | ;; Stack of offset indices of visited edebug sexps. | 2056 | ;; Stack of offset indices of visited edebug sexps. |
| 2057 | ;; Should be nil at the top level. | ||
| 2058 | ;; Each function adds one cons. Top is modified with setcar. | 2057 | ;; Each function adds one cons. Top is modified with setcar. |
| 2059 | 2058 | ;; Should be nil at the top level. No longer! There are occasions | |
| 2059 | ;; when this variable is modified by setcar before a cons has been | ||
| 2060 | ;; pushed by `edebug-enter', e.g. when instrumenting | ||
| 2061 | ;; `c-font-lock-declarations' in .../lisp/progmodes/cc-fonts.el. So | ||
| 2062 | ;; this variable must be initialized to a cons. | ||
| 2060 | 2063 | ||
| 2061 | (defvar edebug-entered nil | 2064 | (defvar edebug-entered nil |
| 2062 | ;; Non-nil if edebug has already been entered at this recursive edit level. | 2065 | ;; Non-nil if edebug has already been entered at this recursive edit level. |