GNU bug report logs -
#62892
proposal to extend mark-sexp to go forward and backward on command
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> If this is to be accepted, why not extend it to all like mark functions,
> listed below? Implementing them should be pretty similar, and you might
> even be able to reuse the same helper for all these variants. Also, the
> helper function might need to contain a double-dash in its name because
> this is inherently a private function.
This makes sense to me, although I have not found the same need for these
to be marked. I'm happy to extend them as such; I'll add that in a later
patch.
> Please use `quote' to quote things in Emacs docstrings. Also, both here
> and in other docstrings, the newline immediately after the first line,
> while seems necessary, is usually redundant in Emacs docstrings. And
> there is a typo: "amrk" -> "mark".
>
> I also think you shouldn't use wildcard-like elements in quotes (in your
> case, you reuse part of the name in the quote), but I'm not sure.
Done. Updated patch attached.
On Sun, Apr 16, 2023 at 11:17 PM Ruijie Yu <ruijie <at> netyu.xyz> wrote:
>
> Zachary Kanfer <zkanfer <at> gmail.com> writes:
>
> > Attached is a patch to add #'mark-sexp-forwards and
> #'mark-sexp-backwards. These functions extend the region by sexps forward
> and
> > backward. They are mutually incremental: you can call mark-sexp-fowards,
> then mark-sexp-backwards twice, then mark-sexp-forwards. After
> > this, the region will consist of the two sexps before point and the two
> sexps after point.
>
> If this is to be accepted, why not extend it to all like mark functions,
> listed below? Implementing them should be pretty similar, and you might
> even be able to reuse the same helper for all these variants. Also, the
> helper function might need to contain a double-dash in its name because
> this is inherently a private function.
>
> - `mark-defun'
> - `mark-page'
> - `mark-paragraph'
> - `mark-word'
>
> > +(defun mark-sexp-helper (number-of-expressions)
> > + "A helper function for 'mark-sexp-[forward, backward]'.
> > +
> > +If NUMBER-OF-EXPRESSIONS is positive, mark that many sexps forward;
> > +otherwise, amrk backward."
>
> Please use `quote' to quote things in Emacs docstrings. Also, both here
> and in other docstrings, the newline immediately after the first line,
> while seems necessary, is usually redundant in Emacs docstrings. And
> there is a typo: "amrk" -> "mark".
>
> I also think you shouldn't use wildcard-like elements in quotes (in your
> case, you reuse part of the name in the quote), but I'm not sure.
>
> --
> Best,
>
>
> RY
>
[Message part 2 (text/html, inline)]
[0001-Add-mark-sexp-forward-mark-sexp-backward.patch (text/x-patch, attachment)]
This bug report was last modified 2 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.