From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: internal data structure
Date: Sat, 20 May 2017 16:27:42 +0200 [thread overview]
Message-ID: <20170520142742.GA14705@tuxteam.de> (raw)
In-Reply-To: <CALeZmBuo9VxG9nPBhdfBhix5N6msMbQ9WTJ0=2gyDZ4bxsVcZQ@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, May 20, 2017 at 02:54:23PM +0200, Alexander Doe wrote:
> Good day Ladies and Gentleman,
>
>
> which data structure is used by GNU/Emacs for storing and editing text
> strings on low-level? List, balanced tree, gap buffer, something else?
It's a gap buffer.
> Which language is used for programming this? C or ELisp?
The machinery is C, but there are some Lisp introspection functions:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Gap.html
If you have a source installation, then C-h f "describe function" on e.g.
"gap-position" will take you all the way to the C source (somewhere in
editfns.c).
Here's a link to an online resource, for your browsing convenience:
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/editfns.c?h=emacs-25#n1090
Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlkgUl4ACgkQBcgs9XrR2kY0IgCfV1ZksYeRDlZxkMbFaAlUrI7W
U5YAnjb/b7rBzaJIiXHa7NvI8C5GhVFz
=c3TR
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2017-05-20 14:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 12:54 internal data structure Alexander Doe
2017-05-20 14:27 ` tomas [this message]
2017-05-20 14:33 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170520142742.GA14705@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).