@@ -70,8 +70,7 @@ Each time it is set to a new value, Edebug will call those functions
70
70
once and then reset `edebug-setup-hook' to nil. You could use this
71
71
to load up Edebug specifications associated with a package you are
72
72
using, but only when you also use Edebug."
73
- :type 'hook
74
- :group 'edebug )
73
+ :type 'hook )
75
74
76
75
; ; edebug-all-defs and edebug-all-forms need to be autoloaded
77
76
; ; because the byte compiler binds them; as a result, if edebug
@@ -88,8 +87,7 @@ You can use the command `edebug-all-defs' to toggle the value of this
88
87
variable. You may wish to make it local to each buffer with
89
88
\( make-local-variable \\= 'edebug-all-defs) in your
90
89
`emacs-lisp-mode-hook' ."
91
- :type 'boolean
92
- :group 'edebug )
90
+ :type 'boolean )
93
91
94
92
; ; edebug-all-defs and edebug-all-forms need to be autoloaded
95
93
; ; because the byte compiler binds them; as a result, if edebug
@@ -100,8 +98,7 @@ variable. You may wish to make it local to each buffer with
100
98
" Non-nil means evaluation of all forms will instrument for Edebug.
101
99
This doesn't apply to loading or evaluations in the minibuffer.
102
100
Use the command `edebug-all-forms' to toggle the value of this option."
103
- :type 'boolean
104
- :group 'edebug )
101
+ :type 'boolean )
105
102
106
103
(defcustom edebug-eval-macro-args nil
107
104
" Non-nil means all macro call arguments may be evaluated.
@@ -110,8 +107,7 @@ macro call arguments as if they will be evaluated.
110
107
For each macro, an `edebug-form-spec' overrides this option.
111
108
So to specify exceptions for macros that have some arguments evaluated
112
109
and some not, use `def-edebug-spec' to specify an `edebug-form-spec' ."
113
- :type 'boolean
114
- :group 'edebug )
110
+ :type 'boolean )
115
111
116
112
(defcustom edebug-max-depth 150
117
113
" Maximum recursion depth when instrumenting code.
@@ -122,7 +118,6 @@ the error message \"Too deep - perhaps infinite loop in spec?\".
122
118
Make this limit larger to countermand that, but you may also need to
123
119
increase `max-lisp-eval-depth' and `max-specpdl-size' ."
124
120
:type 'integer
125
- :group 'edebug
126
121
:version " 26.1" )
127
122
128
123
(defcustom edebug-save-windows t
@@ -134,8 +129,7 @@ If the value is a list, only the listed windows are saved and
134
129
restored.
135
130
136
131
`edebug-toggle-save-windows' may be used to change this variable."
137
- :type '(choice boolean (repeat string))
138
- :group 'edebug )
132
+ :type '(choice boolean (repeat string)))
139
133
140
134
(defcustom edebug-save-displayed-buffer-points nil
141
135
" If non-nil, save and restore point in all displayed buffers.
@@ -148,8 +142,7 @@ window, the buffer's point will be changed to the window's point.
148
142
Saving and restoring point in all buffers is expensive, since it
149
143
requires selecting each window twice, so enable this only if you
150
144
need it."
151
- :type 'boolean
152
- :group 'edebug )
145
+ :type 'boolean )
153
146
154
147
(defcustom edebug-initial-mode 'step
155
148
" Initial execution mode for Edebug, if non-nil.
@@ -159,8 +152,7 @@ go, Go-nonstop, trace, Trace-fast, continue, and Continue-fast."
159
152
:type '(choice (const step) (const next) (const go)
160
153
(const Go-nonstop) (const trace)
161
154
(const Trace-fast) (const continue)
162
- (const Continue-fast))
163
- :group 'edebug )
155
+ (const Continue-fast)))
164
156
165
157
(defcustom edebug-trace nil
166
158
" Non-nil means display a trace of function entry and exit.
@@ -169,8 +161,7 @@ function entry or exit per line, indented by the recursion level.
169
161
170
162
You can customize by replacing functions `edebug-print-trace-before'
171
163
and `edebug-print-trace-after' ."
172
- :type 'boolean
173
- :group 'edebug )
164
+ :type 'boolean )
174
165
175
166
(defcustom edebug-test-coverage nil
176
167
" If non-nil, Edebug tests coverage of all expressions debugged.
@@ -180,36 +171,30 @@ results are found.
180
171
181
172
Use `edebug-display-freq-count' to display the frequency count and
182
173
coverage information for a definition."
183
- :type 'boolean
184
- :group 'edebug )
174
+ :type 'boolean )
185
175
186
176
(defcustom edebug-continue-kbd-macro nil
187
177
" If non-nil, continue defining or executing any keyboard macro.
188
178
Use this with caution since it is not debugged."
189
- :type 'boolean
190
- :group 'edebug )
179
+ :type 'boolean )
191
180
192
181
193
182
(defcustom edebug-print-length 50
194
183
" If non-nil, default value of `print-length' for printing results in Edebug."
195
- :type '(choice integer (const nil ))
196
- :group 'edebug )
184
+ :type '(choice integer (const nil )))
197
185
(defcustom edebug-print-level 50
198
186
" If non-nil, default value of `print-level' for printing results in Edebug."
199
- :type '(choice integer (const nil ))
200
- :group 'edebug )
187
+ :type '(choice integer (const nil )))
201
188
(defcustom edebug-print-circle t
202
189
" If non-nil, default value of `print-circle' for printing results in Edebug."
203
- :type 'boolean
204
- :group 'edebug )
190
+ :type 'boolean )
205
191
206
192
(defcustom edebug-unwrap-results nil
207
193
" Non-nil if Edebug should unwrap results of expressions.
208
194
That is, Edebug will try to remove its own instrumentation from the result.
209
195
This is useful when debugging macros where the results of expressions
210
196
are instrumented expressions."
211
- :type 'boolean
212
- :group 'edebug )
197
+ :type 'boolean )
213
198
214
199
(defcustom edebug-on-error t
215
200
" Value bound to `debug-on-error' while Edebug is active.
@@ -225,30 +210,25 @@ After execution is resumed, the error is signaled again."
225
210
(repeat :menu-tag " When"
226
211
:value (nil )
227
212
(symbol :format " %v" ))
228
- (const :tag " always" t ))
229
- :group 'edebug )
213
+ (const :tag " always" t )))
230
214
231
215
(defcustom edebug-on-quit t
232
216
" Value bound to `debug-on-quit' while Edebug is active."
233
- :type 'boolean
234
- :group 'edebug )
217
+ :type 'boolean )
235
218
236
219
(defcustom edebug-global-break-condition nil
237
220
" If non-nil, an expression to test for at every stop point.
238
221
If the result is non-nil, then break. Errors are ignored."
239
222
:type 'sexp
240
- :risky t
241
- :group 'edebug )
223
+ :risky t )
242
224
243
225
(defcustom edebug-sit-for-seconds 1
244
226
" Number of seconds to pause when execution mode is `trace' or `continue' ."
245
- :type 'number
246
- :group 'edebug )
227
+ :type 'number )
247
228
248
229
(defcustom edebug-sit-on-break t
249
230
" Whether or not to pause for `edebug-sit-for-seconds' on reaching a break."
250
231
:type 'boolean
251
- :group 'edebug
252
232
:version " 26.1" )
253
233
254
234
; ;; Form spec utilities.
@@ -547,8 +527,13 @@ already is one.)"
547
527
(edebug-read-top-level-form )))))
548
528
549
529
530
+ (defvar edebug-active nil ) ; ; Non-nil when edebug is active
531
+
550
532
(defun edebug-read-top-level-form ()
551
- (let ((starting-point (point )))
533
+ (let ((starting-point (point ))
534
+ ; ; Don't enter Edebug while doing that, in case we're trying to
535
+ ; ; instrument things like end-of-defun.
536
+ (edebug-active t ))
552
537
(end-of-defun )
553
538
(beginning-of-defun )
554
539
(prog1
@@ -586,7 +571,7 @@ already is one.)"
586
571
(defun edebug-uninstall-read-eval-functions ()
587
572
(interactive )
588
573
(remove-function load-read-function #'edebug--read )
589
- (advice-remove 'eval-defun 'edebug-eval-defun ))
574
+ (advice-remove 'eval-defun # 'edebug-eval-defun ))
590
575
591
576
; ;; Edebug internal data
592
577
@@ -2225,8 +2210,6 @@ into `edebug--cl-macrolet-defs' which is checked in `edebug-list-form-args'."
2225
2210
2226
2211
; ;; The debugger itself
2227
2212
2228
- (defvar edebug-active nil ) ; ; Non-nil when edebug is active
2229
-
2230
2213
(defvar edebug-stack nil )
2231
2214
; ; Stack of active functions evaluated via edebug.
2232
2215
; ; Should be nil at the top level.
@@ -2304,8 +2287,8 @@ and run its entry function, and set up `edebug-before' and
2304
2287
`edebug-after' ."
2305
2288
(cl-letf* ((behavior (get func 'edebug-behavior ))
2306
2289
(functions (cdr (assoc behavior edebug-behavior-alist)))
2307
- ((symbol-function # 'edebug-before ) (nth 1 functions))
2308
- ((symbol-function # 'edebug-after ) (nth 2 functions)))
2290
+ ((symbol-function 'edebug-before ) (nth 1 functions))
2291
+ ((symbol-function 'edebug-after ) (nth 2 functions)))
2309
2292
(funcall (nth 0 functions) func args body)))
2310
2293
2311
2294
(defun edebug-default-enter (function args body )
@@ -2335,7 +2318,7 @@ and run its entry function, and set up `edebug-before' and
2335
2318
(debug-on-error (or debug-on-error edebug-on-error))
2336
2319
(debug-on-quit edebug-on-quit))
2337
2320
(unwind-protect
2338
- (let ((signal-hook-function 'edebug-signal ))
2321
+ (let ((signal-hook-function # 'edebug-signal ))
2339
2322
(setq edebug-execution-mode (or edebug-next-execution-mode
2340
2323
edebug-initial-mode
2341
2324
edebug-execution-mode)
@@ -2905,7 +2888,7 @@ See `edebug-behavior-alist' for implementations.")
2905
2888
(recursive-edit ) ; <<<<<<<<<< Recursive edit
2906
2889
2907
2890
; ; Do the following, even if quit occurs.
2908
- (setq signal-hook-function 'edebug-signal )
2891
+ (setq signal-hook-function # 'edebug-signal )
2909
2892
(if edebug-backtrace-buffer
2910
2893
(kill-buffer edebug-backtrace-buffer))
2911
2894
@@ -3810,15 +3793,15 @@ Options:
3810
3793
(if (consp setting)
3811
3794
(set (car setting) (cdr setting))
3812
3795
(kill-local-variable setting))))
3813
- (remove-hook 'kill-buffer-hook 'edebug-kill-buffer t ))
3796
+ (remove-hook 'kill-buffer-hook # 'edebug-kill-buffer t ))
3814
3797
(pcase-dolist (`(, var . , val ) '((buffer-read-only . t )))
3815
3798
(push
3816
3799
(if (local-variable-p var) (cons var (symbol-value var)) var)
3817
3800
edebug--mode-saved-vars)
3818
3801
(set (make-local-variable var) val))
3819
3802
; ; Append `edebug-kill-buffer' to the hook to avoid interfering with
3820
3803
; ; other entries that are unguarded against deleted buffer.
3821
- (add-hook 'kill-buffer-hook 'edebug-kill-buffer t t )))
3804
+ (add-hook 'kill-buffer-hook # 'edebug-kill-buffer t t )))
3822
3805
3823
3806
(defun edebug-kill-buffer ()
3824
3807
" Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code."
@@ -4016,7 +3999,7 @@ This should be a list of `edebug---frame' objects.")
4016
3999
(pop-to-buffer edebug-backtrace-buffer)
4017
4000
(unless (derived-mode-p 'backtrace-mode )
4018
4001
(backtrace-mode)
4019
- (add-hook 'backtrace-goto-source-functions 'edebug--backtrace-goto-source ))
4002
+ (add-hook 'backtrace-goto-source-functions # 'edebug--backtrace-goto-source ))
4020
4003
(setq edebug-instrumented-backtrace-frames
4021
4004
(backtrace-get-frames 'edebug-debugger
4022
4005
:constructor #'edebug--make-frame )
@@ -4396,8 +4379,8 @@ With prefix argument, make it a temporary breakpoint."
4396
4379
; ; We still want to run unload-feature to completion
4397
4380
(run-with-idle-timer 0 nil #' (lambda () (unload-feature 'edebug )))))
4398
4381
(remove-hook 'called-interactively-p-functions
4399
- 'edebug--called-interactively-skip )
4400
- (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read )
4382
+ # 'edebug--called-interactively-skip )
4383
+ (remove-hook 'cl-read-load-hooks # 'edebug--require-cl-read )
4401
4384
(edebug-uninstall-read-eval-functions )
4402
4385
; ; Continue standard unloading.
4403
4386
nil )
0 commit comments