bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37368: Enhancement in master: Add debug declaration to widget-specif


From: Tobias Zawada
Subject: bug#37368: Enhancement in master: Add debug declaration to widget-specify-insert
Date: Tue, 10 Sep 2019 12:15:33 +0200 (CEST)

Hello,
It would improve the development of user-defined `editable-list`-like widget 
types very much if you could add a debug declaration to `widget-specify-insert`.

Usage-Example: Recently I added a modified set of buttons to the user-defined 
widget `elgrep-menu-call-list' in 
`https://github.com/TobiasZawada/elgrep/blob/master/elgrep.el'. In that 
use-case function `widget-editable-list-entry-create` needs to be imitated. The 
macro `widget-specify-insert` is used there. It is inconvenient if edebug jumps 
over the body when debugging such a function. I had to define my own version of 
`widget-specify-insert` with added debug declaration for avoiding that effect.

Thanks in advance for considering the enhancement.

The diff 
https://github.com/TobiasZawada/emacs/commit/f8eeec3ccd9bcbc4895ab88c3ef2d9c7759b70bf
 shows a possible change in `lisp/wid-edit.el`:

@@ -414,6 +414,7 @@ the :notify function can't know the new value.")

  (defmacro widget-specify-insert (&rest form)
    "Execute FORM without inheriting any text properties."
+   (declare (debug body))
    `(save-restriction
      (let ((inhibit-read-only t)
          (inhibit-modification-hooks t))

Best regards,
Tobias Zawada





reply via email to

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