From unknown Tue Jun 17 20:21:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#65580 <65580@debbugs.gnu.org> To: bug#65580 <65580@debbugs.gnu.org> Subject: Status: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp. Reply-To: bug#65580 <65580@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:21:34 +0000 retitle 65580 [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix reg= exp. reassign 65580 emacs submitter 65580 Eshel Yaron severity 65580 normal tag 65580 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 28 08:02:45 2023 Received: (at submit) by debbugs.gnu.org; 28 Aug 2023 12:02:45 +0000 Received: from localhost ([127.0.0.1]:47269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaaxA-0002zT-Uj for submit@debbugs.gnu.org; Mon, 28 Aug 2023 08:02:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaax8-0002zF-V3 for submit@debbugs.gnu.org; Mon, 28 Aug 2023 08:02:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaawr-00084A-SP for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2023 08:02:27 -0400 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaawp-0001or-JM for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2023 08:02:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1693224141; bh=1gRqD9kJ4trjfWKGE90lfCBj7e1DbWT9bJFgEcGVMdE=; h=From:To:Subject:Date:From; b=xUxVmBfVCPsWj4/jDOce0XZD5fXBSzYG+lfQ5SIHZ32e4Mv9TF1dz7Mx+VLz723OU 2Z5IdHK1fgOuoLBJpMnLwu8xXC/AgGo0Guu35qKXUa+aUzxwTsbiQ44JtoS00g/ML8 w7+d1wSMC3Vompgr0mEd9TjxjnQNeJkU8cUnOLsodoceLnqgZJo7oKdSsV+i3nqYeN 9QRdvt2wQR5ND701DB8qOJvG5sLYlCGZFk/DLufrrEImVPG4r+FzXYe6wx8i7PLdWS qHL2AvjtQ7Gg1UuYgjar+RF6XG7o8oBhnWAnbDaJj4J+0WFisXLYIUYR5qMJwgYwCv Dn+pACWJB6g2Q== From: Eshel Yaron To: bug-gnu-emacs@gnu.org Subject: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp. X-Hashcash: 1:20:230828:bug-gnu-emacs@gnu.org::hUQ0V3UPxG+WZWGv:8bdI Date: Mon, 28 Aug 2023 14:02:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain 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' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-lisp-help-fns.el-help-do-arg-highlight-Fix-regexp.patch >From 1d7fcb5cb407f3b9c6d2040307d2bdad2632456c Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 28 Aug 2023 13:43:52 +0200 Subject: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp. Avoid highlighting (parts of) the function name as arguments in the output of 'describe-function' when the function has an argument with the same name. Do achieve this, refine the regular expression that 'help-do-arg-highlight' uses such that it doesn't match anything in the function name. --- lisp/help-fns.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 609bed18f2f..b34778773a9 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -369,7 +369,8 @@ help-do-arg-highlight (setq doc (replace-regexp-in-string ;; This is heuristic, but covers all common cases ;; except ARG1-ARG2 - (concat "\\<" ; beginning of word + (concat "([^ ]+ .*" ; skip function name + "\\<" ; beginning of word "\\(?:[a-z-]*-\\)?" ; for xxx-ARG "\\(" (regexp-quote arg) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 14:33:02 2023 Received: (at 65580-done) by debbugs.gnu.org; 1 Sep 2023 18:33:02 +0000 Received: from localhost ([127.0.0.1]:33854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc8x4-0002VC-IH for submit@debbugs.gnu.org; Fri, 01 Sep 2023 14:33:02 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:53295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc8x2-0002Ug-Tv for 65580-done@debbugs.gnu.org; Fri, 01 Sep 2023 14:33:01 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-500cfb168c6so3924442e87.2 for <65580-done@debbugs.gnu.org>; Fri, 01 Sep 2023 11:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693593165; x=1694197965; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=a/5ua/O8sSvShqxba+pnrJl5qa+6WFEPV0I8aKb1vr8=; b=sRNczsdXffrDwqRZpFz1eDjOG51pfFJOOceC4qH0/YE4J9HnsnKZTkCXyJwszOI1pm AnLAAsko5ao+sp0JeVOVLnrrPOokwFRH1lFtjUCao/3e7//sq1IktOCw8UGF9I//O41e Xn6neL8NqX9NaMgJuxk1YBImexw9VgevT8DrGx4MkslXvKI9C9cZHMrJvpIB/Y3i/eVz S6wYkeBZT3gxCstDgXYGaIylY4gVO4ikhmFiSP6AQ2UDTxROIKu2MXnVneA6+D3p+n+g 9z10nQ8VVL6Muj0Ck4mgdIuRzRRdGvK57DSf0QEG5t59nKNZ2eX+WpxKf0xfn6gISc+R L1WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693593165; x=1694197965; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a/5ua/O8sSvShqxba+pnrJl5qa+6WFEPV0I8aKb1vr8=; b=CmNoab9UKhHbuJyV/NDrx+5F7NTPEGB4cC1OV+dZlHid3LAdcbkupGLEBffDQND61X ho6dL5YJg4tcMvASptxV1q3YtndKdwuzmhKCKdFJAfnHvQOIPfml8A/4UMiZ0EDi21dJ CAx6jXEsy86hzjoyWaEkEfnmS4ZWqjEv32mHxTtfP+wa4pUNKEG+IkVjQpe9q1kDYLBv 7PqE8/xcIonXqbuJeak0o+mn+Np2VheySfiKOptBAukm7U76QzogFeUVhaC9+4bj3pbr II6gJ7VrbXfi6CoPwiVTf0PWhSxShpMfrxsS0pa92QpCxcu/EAZQjPjqbMXan+/zuVqe YQ2g== X-Gm-Message-State: AOJu0Ywm1WQ8MimBpVlKHiAapaNvhOqDDjKcttwYsUCSrO+gRoeIBZTn KywZmXjPFRVaG5uw9ZnrDnLAflJK2E4Ugxr/RMk= X-Google-Smtp-Source: AGHT+IG4nwir9NOEy+0nP2cNwtXm2OM16M8Bcf5EUjU1LyC0ChjFHKqzyqO6CHldQBHHgzYvIPuOnddbRvdAsNM7L4A= X-Received: by 2002:a19:4f4f:0:b0:500:a1e4:fc44 with SMTP id a15-20020a194f4f000000b00500a1e4fc44mr2047695lfk.61.1693593165275; Fri, 01 Sep 2023 11:32:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Stefan Kangas Date: Fri, 1 Sep 2023 20:32:33 +0200 Message-ID: Subject: Re: bug#65580: [PATCH] ; * lisp/help-fns.el (help-do-arg-highlight): Fix regexp. To: Eshel Yaron Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65580-done Cc: 65580-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Tue Jun 17 20:21:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 Sep 2023 11:24:29 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator