emacs-devel
[Top][All Lists]
Advanced

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

Re: Plug treesit.el into other emacs constructs


From: Stefan Monnier
Subject: Re: Plug treesit.el into other emacs constructs
Date: Mon, 26 Dec 2022 17:51:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> +  (let* ((aux (if special mover
>> +            (lambda (x)
>> +              (cons (progn (funcall mover x) (point))
>> +                    (progn (funcall mover (- x)) (point))))))
>
> If `mover` is changed to return a pair of positions, than the above can
> just be:

[ ... and here I hit `C-c C-c` i.s.o `C-x C-x`, sorry.  ]

    (let* ((aux (if special mover
                  (lambda (x)
                    (let ((pos (progn (funcall mover x) (point))))
                      (if (consp pos) pos
                        (cons pos
                              (progn (funcall mover (- x)) (point))))))))

-- Stefan




reply via email to

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