From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70163: 29.3; hexl-mode incorrect docstring Date: Sat, 06 Apr 2024 16:21:44 -0400 Message-ID: References: <871q7mlc9v.fsf@posteo.net> <86plv68myf.fsf@gnu.org> <878r1ucsgq.fsf@igel.home> <87a5mal6nv.fsf@posteo.net> <86le5u8g9z.fsf@gnu.org> <87r0fly8zn.fsf@posteo.net> <86r0fl723w.fsf@gnu.org> <86edbl6z3d.fsf@gnu.org> <8734s1as3k.fsf@posteo.net> <86o7ao5pkw.fsf@gnu.org> <87le5s9vaa.fsf@posteo.net> <86v84u1n66.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40867"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: thievol@posteo.net, 70163@debbugs.gnu.org, schwab@linux-m68k.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 06 22:23:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rtCZL-000AOB-13 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Apr 2024 22:23:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtCZ0-0008Hf-2g; Sat, 06 Apr 2024 16:22:58 -0400 Original-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 1rtCYy-0008HW-Vm for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:22:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtCYy-0008Hx-Ny for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:22:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtCZ4-0004jr-GY for bug-gnu-emacs@gnu.org; Sat, 06 Apr 2024 16:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Apr 2024 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70163 X-GNU-PR-Package: emacs Original-Received: via spool by 70163-submit@debbugs.gnu.org id=B70163.171243493018005 (code B ref 70163); Sat, 06 Apr 2024 20:23:02 +0000 Original-Received: (at 70163) by debbugs.gnu.org; 6 Apr 2024 20:22:10 +0000 Original-Received: from localhost ([127.0.0.1]:41029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtCYD-0004gK-1E for submit@debbugs.gnu.org; Sat, 06 Apr 2024 16:22:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtCY7-0004f4-No for 70163@debbugs.gnu.org; Sat, 06 Apr 2024 16:22:07 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2C8841000DD; Sat, 6 Apr 2024 16:21:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712434905; bh=aADlAyCoscKC9TZqx8zJ9jPepSieZqfuUWk/YY04qOk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Lob/q/6w2R+IEh4fjVF51LiCNCgRtnkXHKERuL4DvO8jun+BfqDbEkfKApFGKCLYU MfaxwUgAZzi/JI7sgqXadME1q3gMDuSICfcAItT2nQeLj2b0Nwtb7iR2Bdooe9/jjU x/i1M3ZBtimny7IFIhRCaxe2A9Ozfoc30NmFRCjhrSFrGZnZ4oHIQ1jWNAT5XZWMTu GVp+akxLzLrkXIYiImbE1uo/LaV78/zklhxiD1sEkETSJaCxHqXShi0zjZ/svIqf2B 3xkaK8HwZ15N93YPdLxQJsgCR0BJSdK+nnhjDCXYGto3GopnlFpUMQYOxRsP4GAHzL l0oq+QtJuQeZw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9AB82100048; Sat, 6 Apr 2024 16:21:45 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6AEDC120749; Sat, 6 Apr 2024 16:21:45 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sat, 06 Apr 2024 16:01:49 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282824 Archived-At: >> What is "the more appropriate place", and how will you find it, given >> that some doc strings are auto-generated, either in part or in full? > Right after the next \n ? As in the patch below. Stefan diff --git a/lisp/help.el b/lisp/help.el index 1ef46e394f3..c2a278bc0a0 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1380,6 +1380,7 @@ substitute-command-keys ;; itself. (let ((keymap overriding-local-map) (inhibit-modification-hooks t) + (delayed ()) (orig-buf (current-buffer))) (with-temp-buffer (insert string) @@ -1496,11 +1497,17 @@ substitute-command-keys (symbol-value name))))) (cond ((null this-keymap) - (insert "\nUses keymap " - (substitute-quotes "`") - (symbol-name name) - (substitute-quotes "'") - ", which is not currently defined.\n") + ;; Insert a warning on the next line (bug#70163). + (let ((pos (copy-marker (line-beginning-position 2)))) + (push (lambda () + (goto-char pos) + (unless (bolp) (insert "\n")) + (insert "Uses keymap " + (substitute-quotes "`") + (symbol-name name) + (substitute-quotes "'") + ", which is not currently defined.\n")) + delayed)) (unless generate-summary (setq keymap nil))) ((not generate-summary) @@ -1527,6 +1534,7 @@ substitute-command-keys (delete-char 1)) ;; 3. Nothing to do -- next character. (t (forward-char 1))))) + (mapc #'funcall delayed) (buffer-string))))) (defun substitute-quotes (string)