From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: Generality of defvar Date: Thu, 28 Jul 2022 09:06:16 +0200 Message-ID: References: <87r127h40s.fsf@posteo.net-N7wjq17--3-2> <87pmhqbuoo.fsf@dataswamp.org> Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16941"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlmarcos@tutanota.com, Emanuel Berg , help-gnu-emacs To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 28 09:22:32 2022 Return-path: Envelope-to: geh-help-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 1oGxqq-0004Fh-EF for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 09:22:32 +0200 Original-Received: from localhost ([::1]:54392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGxqp-0000jT-0a for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 03:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGxbM-0001rc-D8 for help-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:06:32 -0400 Original-Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:45573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGxbK-0003rI-BG for help-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:06:32 -0400 Original-Received: by mail-io1-xd2b.google.com with SMTP id y197so770918iof.12 for ; Thu, 28 Jul 2022 00:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=yn1YLhnT9i7Ex+x+54TXvWYx2/8WgV+8wXQX0hQMXbQ=; b=JtdQi93nQDDbVyG/4z5iqBkROnaufdxkAv9RFlHEfVpNV0ji6JtlYgZq1zqA9cEliT 394MmbtivfesraU77+TJd3nplCbkcCK4/EYOsGAzB6+TL0CPWnd2pWB0lP32x+lIT+C5 IxLBI4hUw6As6b1vX5VLbpdLj3hS1f8FBj8Siha3GalOeuYY2/XhUlHMlC86tSAuKQZ1 b7cvhvaV6tLkN9t8huzH0e1kWEL6RY+sWAjcE+PtVtG/4G6lOymUSXKdTvKNmoaIFwO6 4rkQvmrKoNeHEUSrNlxof8Mx9BgEhduA38MxvBQ0KzlSd1dZV5moOjL4r9UJWJuVYNCt kPfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=yn1YLhnT9i7Ex+x+54TXvWYx2/8WgV+8wXQX0hQMXbQ=; b=5vcryhSdE5+4t5SRmAbSJ7kwnHkFa+uGUU090khVAsLH+9EZgc4JWTUM8xWB3eIGkM cV/6SBSjx71zfV1yDN8pHzt7ixpvIgPCNmOi83pcJ0H+gzjbRsVmY0JFfoEVV6MK3Q3I SoeWFiwqSBhPMxQmQHtLRvLCljmKwp7SqW0ygzGqGx1JdE9+ORWBDmnHphoAZ3Or+Tqz Yz33KbJuZHgZDu9T+al5TbRak0BE9HctzQlGW9Za5BKdT82rW+k+1Gd/LO2VnjGBIeIu 9LjWri3UxcogWHR2ddofWVQGwdvE+KpT69MKFuNAv6JNAjn07oXhk0pAfcxJQ84q3FsQ q22A== X-Gm-Message-State: AJIora/Vh4lr8uUPDcmNi7qdae27v1EXL86Iybn6b34I4ZGNy5nTKPYl Oof4QFm1E3jV4rv5Z5QV3osioCsPXj5wlZ7GOAE= X-Google-Smtp-Source: AGRyM1sR+6OkTNdT66FPyCURqBudhUnq/x7VByOJPnbz9SWC54/prMJYYUmJRyCuWZbVVCol1WwX96ohpq9BUMRU7M8= X-Received: by 2002:a05:6638:1694:b0:33f:8178:53c4 with SMTP id f20-20020a056638169400b0033f817853c4mr10214910jat.7.1658991988538; Thu, 28 Jul 2022 00:06:28 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=thibaut.verron@gmail.com; helo=mail-io1-xd2b.google.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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138653 Archived-At: Le jeu. 28 juil. 2022 =C3=A0 08:42, Christopher Dimech a = =C3=A9crit : > > *Sent:* Thursday, July 28, 2022 at 4:39 AM > *From:* "Thibaut Verron" > *To:* "Christopher Dimech" > *Cc:* carlmarcos@tutanota.com, "Emanuel Berg" , > "help-gnu-emacs" > *Subject:* Re: Generality of defvar > Le mer. 27 juil. 2022 =C3=A0 18:29, Christopher Dimech a > =C3=A9crit : > >> >> >> > Sent: Thursday, July 28, 2022 at 1:47 AM >> > From: "Thibaut Verron" >> > To: carlmarcos@tutanota.com >> > Cc: "Emanuel Berg" , "help-gnu-emacs" < >> help-gnu-emacs@gnu.org> >> > Subject: Re: Generality of defvar >> > >> > Le mer. 27 juil. 2022 =C3=A0 15:24, a =C3=A9= crit : >> > >> > > >> > > Jul 27, 2022, 13:21 by thibaut.verron@gmail.com: >> > > >> > > > Le mer. 27 juil. 2022 =C3=A0 14:52, carlmarcos--- via Users list f= or the >> GNU >> > > Emacs text editor <> help-gnu-emacs@gnu.org> > a =C3=A9crit : >> > > > >> > > >> >> > > >> >> > > >> Jul 27, 2022, 12:34 by >> incal@dataswamp.org>> : >> > > >> >> > > >> > carlmarcos--- via Users list for the GNU Emacs text editor >> wrote: >> > > >> > >> > > >> >> (defun enable-error-diagnostics () >> > > >> >> "Enable error diagnostics with backtrace buffer. >> > > >> >> One can exit the debugger with the q command." >> > > >> >> >> > > >> > >> > > >> > You can refer to keys in docstrings like this: >> > > >> > >> > > >> > \\[forward-word] >> > > >> > >> > > >> > That way, it isn't hardcoded so if later changed/configured >> > > >> > it'll still show the right key. >> > > >> > >> > > >> How can I figure out what key to use in the docstring for exitin= g >> the >> > > backtrace buffer? >> > > >> >> > > > >> > > > The function bound to 'q' is quit-window. But since this function >> > > doesn't have a global binding, you need to tell the docstring to use >> the >> > > appropriate keymap to look the binding up. >> > > > >> > > > Something like >> > > > >> > > > "Enable error diagnostics with backtrace buffer. >> > > > >> > > > \\ (note: this is the part telling emacs where >> to >> > > look for the key) >> > > > One can exit the debugger with the `quit-window' command (bound to >> > > \\[quit-window])." >> > > > >> > > > >> > > Although quit-window is bound to q, the command \\[quit-window] just >> > > inserts >> > > M-x quit-window, rather than q. >> > > >> > >> > Yes, that's precisely because quit-window doesn't have a global bindin= g. >> > You need to add \\ somewhere in the docstring to >> tell >> > emacs to show bindings for the backtrace buffers, rather than global >> > bindings. >> > >> > Best wishes, >> > Thibaut >> >> Sounds good advice, but the result could be >> >> Uses keymap =E2=80=98backtrace-mode-map=E2=80=99, which is not currently= defined. > > > My bad, it should have been debugger-mode-map. > > > Not quite right yet. > I guess one should also put (require 'debug) at some point along with the function definition? Best wishes, Thibaut