(defun my-gds-set-breakpoint () "Create a new GDS breakpoint at point." (interactive) (save-excursion ;; Find the beginning of the current s-exp. (BACKWARD-UP-LIST will ;; raise an error for us in case of it couldn't find a valid upper ;; s-exp.) (backward-up-list) (or (gds-breakpoint-overlays-at (point)) ; Do we already have one? ;; Mark the position and save to breakpoints file. (and (gds-make-breakpoint-overlay (list gds-default-breakpoint-type 'at buffer-file-name (gds-line-and-column (point)))) (gds-write-breakpoints-file))))) (defun my-gds-delete-breakpoint () "Delete the GDS breakpoint set at point." (interactive) (save-excursion (forward-char) (backward-up-list) (if (gds-breakpoint-overlays-at (point)) (call-interactively (function gds-delete-breakpoint)))))