unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37368: Enhancement in master: Add debug declaration to widget-specify-insert
@ 2019-09-10 10:15 Tobias Zawada
  2019-09-14 12:20 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Zawada @ 2019-09-10 10:15 UTC (permalink / raw)
  To: 37368

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-14 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-10 10:15 bug#37368: Enhancement in master: Add debug declaration to widget-specify-insert Tobias Zawada
2019-09-14 12:20 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).