help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: internal data structure


From: tomas
Subject: Re: internal data structure
Date: Sat, 20 May 2017 16:27:42 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----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-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]