From 34744278ba44d78d2a3718135ac20f2dada303e4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 20 Oct 2019 14:09:36 +0200 Subject: [PATCH] Add a new edebug-breakpoint face * doc/lispref/edebug.texi (Breakpoints): Mention it. * lisp/emacs-lisp/edebug.el (edebug-breakpoint): New face. --- doc/lispref/edebug.texi | 3 ++- etc/NEWS | 4 ++++ lisp/emacs-lisp/edebug.el | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index e081833e242..03efa985ba9 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -497,7 +497,8 @@ Edebug commands for breakpoints: Set a breakpoint at the stop point at or after point (@code{edebug-set-breakpoint}). If you use a prefix argument, the breakpoint is temporary---it turns off the first time it stops the -program. +program. An overlay with the @code{edebug-breakpoint} face is put at +the breakpoint. @item u Unset the breakpoint (if any) at the stop point at or after diff --git a/etc/NEWS b/etc/NEWS index aec27b93613..46ed40dfcba 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1462,6 +1462,10 @@ the Elisp manual for documentation of the new mode and its commands. ** Edebug +*** New face 'edebug-breakpoint' +When setting breakpoints in Edebug, an overlay with this face is +placed over the point in question. + +++ *** New command 'edebug-unset-breakpoints' To clear all breakpoints in the current form, the 'U' command in diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index f59123094ac..a3ab23c1a1e 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -63,6 +63,9 @@ "A source-level debugger for Emacs Lisp." :group 'lisp) +(defface edebug-breakpoint '((t :inherit highlight)) + "Face used to mark breakpoints." + :version "27.1") (defcustom edebug-setup-hook nil "Functions to call before edebug is used. @@ -3226,7 +3229,7 @@ the breakpoint." (let* ((pos (+ start (aref offsets (car breakpoint)))) (overlay (make-overlay pos (1+ pos)))) (overlay-put overlay 'edebug t) - (overlay-put overlay 'face 'highlight)))))) + (overlay-put overlay 'face 'edebug-breakpoint)))))) (defun edebug--overlay-breakpoints-remove (start end) (dolist (overlay (overlays-in start end)) -- 2.39.2