[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generality of defvar
From: |
Christopher Dimech |
Subject: |
Re: Generality of defvar |
Date: |
Thu, 28 Jul 2022 09:34:40 +0200 |
Sent: Thursday, July 28, 2022 at 7:06 PM
From: "Thibaut Verron" <thibaut.verron@gmail.com>
To: "Christopher Dimech" <dimech@gmx.com>
Cc: carlmarcos@tutanota.com, "Emanuel Berg" <incal@dataswamp.org>,
"help-gnu-emacs" <help-gnu-emacs@gnu.org>
Subject: Re: Generality of defvar
Le jeu. 28 juil. 2022 à 08:42, Christopher Dimech <[1]dimech@gmx.com> a
écrit :
Sent: Thursday, July 28, 2022 at 4:39 AM
From: "Thibaut Verron" <[2]thibaut.verron@gmail.com>
To: "Christopher Dimech" <[3]dimech@gmx.com>
Cc: [4]carlmarcos@tutanota.com, "Emanuel Berg"
<[5]incal@dataswamp.org>, "help-gnu-emacs" <[6]help-gnu-emacs@gnu.org>
Subject: Re: Generality of defvar
Le mer. 27 juil. 2022 à 18:29, Christopher Dimech <[7]dimech@gmx.com> a
écrit :
> Sent: Thursday, July 28, 2022 at 1:47 AM
> From: "Thibaut Verron" <[8]thibaut.verron@gmail.com>
> To: [9]carlmarcos@tutanota.com
> Cc: "Emanuel Berg" <[10]incal@dataswamp.org>, "help-gnu-emacs"
<[11]help-gnu-emacs@gnu.org>
> Subject: Re: Generality of defvar
>
> Le mer. 27 juil. 2022 à 15:24, <[12]carlmarcos@tutanota.com> a
écrit :
>
> >
> > Jul 27, 2022, 13:21 by [13]thibaut.verron@gmail.com:
> >
> > > Le mer. 27 juil. 2022 à 14:52, carlmarcos--- via Users list
for the GNU
> > Emacs text editor <> [14]help-gnu-emacs@gnu.org> > a écrit :
> > >
> > >>
> > >>
> > >> Jul 27, 2022, 12:34 by >> [15]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
exiting 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.
> > >
> > > \\<backtrace-mode-map> (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
binding.
> You need to add \\<backtrace-mode-map> 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 ‘backtrace-mode-map’, 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?
Seems more bother than it solves. Cannot see how users would be able
to figure all this complication
out.
References
1. mailto:dimech@gmx.com
2. mailto:thibaut.verron@gmail.com
3. mailto:dimech@gmx.com
4. mailto:carlmarcos@tutanota.com
5. mailto:incal@dataswamp.org
6. mailto:help-gnu-emacs@gnu.org
7. mailto:dimech@gmx.com
8. mailto:thibaut.verron@gmail.com
9. mailto:carlmarcos@tutanota.com
10. mailto:incal@dataswamp.org
11. mailto:help-gnu-emacs@gnu.org
12. mailto:carlmarcos@tutanota.com
13. mailto:thibaut.verron@gmail.com
14. mailto:help-gnu-emacs@gnu.org
15. mailto:incal@dataswamp.org
- Re: Generality of defvar, (continued)
- Message not available
- Re: Generality of defvar, carlmarcos, 2022/07/27
- Re: Generality of defvar, Emanuel Berg, 2022/07/27
- Re: Generality of defvar, carlmarcos, 2022/07/27
- Re: Generality of defvar, Thibaut Verron, 2022/07/27
- Re: Generality of defvar, carlmarcos, 2022/07/27
- Re: Generality of defvar, Thibaut Verron, 2022/07/27
- Re: Generality of defvar, Christopher Dimech, 2022/07/27
- Re: Generality of defvar, Thibaut Verron, 2022/07/27
- Re: Generality of defvar, Christopher Dimech, 2022/07/28
- Re: Generality of defvar, Thibaut Verron, 2022/07/28
- Re: Generality of defvar,
Christopher Dimech <=
- Re: Generality of defvar, thibaut . verron, 2022/07/28
- Re: Generality of defvar, Christopher Dimech, 2022/07/28
Re: Generality of defvar, Emanuel Berg, 2022/07/26