emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0d19e69: Initialize edebug-offset-indices to a cons


From: Alan Mackenzie
Subject: [Emacs-diffs] master 0d19e69: Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.
Date: Thu, 29 Dec 2016 09:25:05 +0000 (UTC)

branch: master
commit 0d19e69184cd3068279677fb04aa9fb2da6895e4
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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).
---
 lisp/emacs-lisp/edebug.el |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 04a493c..15b1389 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."
 (defvar edebug-stack-depth -1)
 ;; Index of last edebug-stack item.
 
-(defvar edebug-offset-indices nil)
+(defvar edebug-offset-indices (list 0))
 ;; Stack of offset indices of visited edebug sexps.
-;; Should be nil at the top level.
 ;; Each function adds one cons.  Top is modified with setcar.
-
+;; Should be nil at the top level.  No longer!  There are occasions
+;; when this variable is modified by setcar before a cons has been
+;; pushed by `edebug-enter', e.g. when instrumenting
+;; `c-font-lock-declarations' in .../lisp/progmodes/cc-fonts.el.  So
+;; this variable must be initialized to a cons.
 
 (defvar edebug-entered nil
   ;; Non-nil if edebug has already been entered at this recursive edit level.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]