diff options
| author | Alan Mackenzie | 2017-01-01 08:28:04 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2017-01-01 08:28:04 +0000 |
| commit | 620e5a3cd4464aaffaa3568d6f6b89764de5cfbd (patch) | |
| tree | 1bb99c1425f8bad8b2f99a391dd16c79d4464a0d | |
| parent | 535ef18ed523862db405d22ec4bea0bbfd4172ce (diff) | |
| download | emacs-620e5a3cd4464aaffaa3568d6f6b89764de5cfbd.tar.gz emacs-620e5a3cd4464aaffaa3568d6f6b89764de5cfbd.zip | |
Give eval-and-compile a correct edebug spec. Fixes bug #16184 properly.
* lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit
from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug.
* lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from
t to (&rest def-form).
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 9d2a048f365..e680ebbdc58 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -474,7 +474,7 @@ load time. In interpreted code, this is entirely equivalent to | |||
| 474 | `progn', except that the value of the expression may be (but is | 474 | `progn', except that the value of the expression may be (but is |
| 475 | not necessarily) computed at load time if eager macro expansion | 475 | not necessarily) computed at load time if eager macro expansion |
| 476 | is enabled." | 476 | is enabled." |
| 477 | (declare (debug t) (indent 0)) | 477 | (declare (debug (&rest def-form)) (indent 0)) |
| 478 | ;; When the byte-compiler expands code, this macro is not used, so we're | 478 | ;; When the byte-compiler expands code, this macro is not used, so we're |
| 479 | ;; either about to run `body' (plain interpretation) or we're doing eager | 479 | ;; either about to run `body' (plain interpretation) or we're doing eager |
| 480 | ;; macroexpansion. | 480 | ;; macroexpansion. |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 15b1389c2f7..04a493c826f 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -2052,14 +2052,11 @@ 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 (list 0)) | 2055 | (defvar edebug-offset-indices nil) |
| 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. | ||
| 2057 | ;; Each function adds one cons. Top is modified with setcar. | 2058 | ;; Each function adds one cons. Top is modified with setcar. |
| 2058 | ;; Should be nil at the top level. No longer! There are occasions | 2059 | |
| 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. | ||
| 2063 | 2060 | ||
| 2064 | (defvar edebug-entered nil | 2061 | (defvar edebug-entered nil |
| 2065 | ;; Non-nil if edebug has already been entered at this recursive edit level. | 2062 | ;; Non-nil if edebug has already been entered at this recursive edit level. |