GNU bug report logs - #65580
[PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp.

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Mon, 28 Aug 2023 12:03:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65580 in the body.
You can then email your comments to 65580 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#65580; Package emacs. (Mon, 28 Aug 2023 12:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eshel Yaron <me <at> eshelyaron.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Aug 2023 12:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp.
Date: Mon, 28 Aug 2023 14:02:18 +0200
[Message part 1 (text/plain, inline)]
Tags: patch

Tags: patch

This patch addresses the following existing issue:

In the output of `C-h f with-delayed-message RET`, the word `message` in
the function name is incorrectly highlighted with `help-argument-name`.

This can be seen also with a definition such as:

--8<---------------cut here---------------start------------->8---
(defun foo-bar (baz)
    "Frobnicate BAZ.

\(fn (foo bar))"
  nil)
--8<---------------cut here---------------end--------------->8---

Now `C-h f foo-bar RET` shows both `foo` and `bar` in the function name
with `help-argument-name` (as well as the `foo` and `bar` arguments).

The attached patch tweaks the regular expression that
`help-do-arg-highlight` uses to find argument occurrences such that it
skips the function name.

In GNU Emacs 30.0.50 (build 3, x86_64-apple-darwin22.5.0, NS
 appkit-2299.60 Version 13.4 (Build 22F66)) of 2023-08-27
Repository revision: c122cc831869a9a11f50187c5cf999389b223eee
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.4

Configured using:
 'configure 'CFLAGS=-g0 -O3' --with-native-compilation --with-json
 --with-imagemagick --with-tree-sitter --enable-link-time-optimization'

[0001-lisp-help-fns.el-help-do-arg-highlight-Fix-regexp.patch (text/patch, attachment)]

Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Fri, 01 Sep 2023 18:34:02 GMT) Full text and rfc822 format available.

Notification sent to Eshel Yaron <me <at> eshelyaron.com>:
bug acknowledged by developer. (Fri, 01 Sep 2023 18:34:02 GMT) Full text and rfc822 format available.

Message #10 received at 65580-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 65580-done <at> debbugs.gnu.org
Subject: Re: bug#65580: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight):
 Fix regexp.
Date: Fri, 1 Sep 2023 20:32:33 +0200
Version: 30.1

> This patch addresses the following existing issue:
>
> In the output of `C-h f with-delayed-message RET`, the word `message` in
> the function name is incorrectly highlighted with `help-argument-name`.
>
> This can be seen also with a definition such as:
>
> --8<---------------cut here---------------start------------->8---
> (defun foo-bar (baz)
>     "Frobnicate BAZ.
>
> \(fn (foo bar))"
>   nil)
> --8<---------------cut here---------------end--------------->8---
>
> Now `C-h f foo-bar RET` shows both `foo` and `bar` in the function name
> with `help-argument-name` (as well as the `foo` and `bar` arguments).
>
> The attached patch tweaks the regular expression that
> `help-do-arg-highlight` uses to find argument occurrences such that it
> skips the function name.

Thanks, pushed to master.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 11:24:29 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.