emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/macrostep 2473a6f 094/110: Pass START and END args to sexp


From: ELPA Syncer
Subject: [nongnu] elpa/macrostep 2473a6f 094/110: Pass START and END args to sexp-at-point-function
Date: Sat, 7 Aug 2021 09:18:10 -0400 (EDT)

branch: elpa/macrostep
commit 2473a6f762ded3de4e7f281bd25eb055435e040c
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>

    Pass START and END args to sexp-at-point-function
---
 macrostep.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/macrostep.el b/macrostep.el
index 7efd4c1..38e8512 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -395,10 +395,10 @@ Emacs Lisp, and may be suitable for other Lisp-like 
languages.")
     #'macrostep-sexp-at-point
   "Function to return the macro form at point for expansion.
 
-It will be called with no arguments, with point positioned at the
-START position returned by `macrostep-sexp-bounds-function', and
-should return a value suitable for passing as the first argument
-to `macrostep-expand-1-function'.
+It will be called with two arguments, the values of START and END
+returned by `macrostep-sexp-bounds-function', and with point
+positioned at START.  It should return a value suitable for
+passing as the first argument to `macrostep-expand-1-function'.
 
 The default value, `macrostep-sexp-at-point', implements this for
 Emacs Lisp, and may be suitable for other Lisp-like languages.")
@@ -546,7 +546,7 @@ behaviors."
   (cl-destructuring-bind (start . end)
       (funcall macrostep-sexp-bounds-function)
     (goto-char start)
-    (let* ((sexp (funcall macrostep-sexp-at-point-function))
+    (let* ((sexp (funcall macrostep-sexp-at-point-function start end))
            (end (copy-marker end))
            (text (buffer-substring start end))
            (env (funcall macrostep-environment-at-point-function))
@@ -743,7 +743,7 @@ Returns a cons of buffer positions, (START . END)."
              (error "Text at point is not a macro form."))))))
     (cons (point) (scan-sexps (point) 1))))
 
-(defun macrostep-sexp-at-point ()
+(defun macrostep-sexp-at-point (&rest ignore)
   "Return the sexp near point for purposes of macro-stepper expansion.
 
 If the sexp near point is part of a macro expansion, returns the



reply via email to

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