unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: <tpeplt@gmail.com>
Cc: 69720-done@debbugs.gnu.org
Subject: bug#69720: 29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions
Date: Sat, 16 Mar 2024 13:08:57 +0200	[thread overview]
Message-ID: <865xxm77sm.fsf@gnu.org> (raw)
In-Reply-To: <8734sx2aav.fsf@gmail.com> (tpeplt@gmail.com)

> From: <tpeplt@gmail.com>
> Date: Sun, 10 Mar 2024 14:47:52 -0400
> 
> Emacs Maintainers,
> 
>    The function ‘shortdoc-copy-function-as-kill’ copies the
> function name of the function of the shortdoc item in
> which point is located.  This works as expected when a
> function has arguments, but when a function does not have
> arguments, then ‘shortdoc-copy-function-as-kill’ copies the
> trailing parenthesis (that is, the ‘)’).
> 
>    So, for example in the shortdoc function summary for
> ‘buffer’, when point is in the item for ‘current-buffer’,
> then ‘shortdoc-copy-function-as-kill’ (mapped to ‘w’) will
> copy the text "current-buffer)", rather than the expected
> "current-buffer".  The same error occurs for ‘point’,
> ‘point-min’, ‘point-max’, and so on.
> 
>    In the definition of ‘shortdoc-copy-function-as-kill’,
> the specification of the regular expression that is used to
> match the function name searches for a space (" ") to find
> the end of the name, rather than searching for a space or
> right parenthesis (" )").  That is, the expression (in " ")
> in the ‘when-let*’ expression:
> 
>     (when-let* ((re (rx bol "(" (group (+ (not (in " "))))))...
> 
> A possible fix is to change (in " ") to (in " )"):
> 
>     (when-let* ((re (rx bol "(" (group (+ (not (in " )"))))))...

Thanks, fixed on the emacs-29 branch, and closing the bug.





      parent reply	other threads:[~2024-03-16 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10 18:47 bug#69720: 29.2; `shortdoc-copy-function-as-kill' copies the ')' for some functions tpeplt
2024-03-14 16:16 ` tpeplt
2024-03-16 11:08 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865xxm77sm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69720-done@debbugs.gnu.org \
    --cc=tpeplt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).