- 04 Dec, 2019 1 commit
-
-
Philipp Stephani authored
As described in the new comment added to emacs-module.c, using GMP directly in the module interface has significant downsides: it couples the module interface directly to the implementation and requires module authors to link their module against the same GMP library as Emacs itself, which is often difficult and an unnecessary burden. By picking a representation for the magnitude that often matches the one used by GMP, we can avoid overhead when converting from and to GMP in most cases. Loading the test module in test/data/emacs-module and evaluating (dotimes (_ 10000) (mod-test-double (* 2 most-negative-fixnum))) under Callgrind shows that on my (GNU/Linux) machine Emacs only spends 10% of the CPU time of mod-test-double in mpz_import and mpz_export combined, even though that function does little else. (By contrast, 30% is spent in allocate_pseudovector.) * src/emacs-module.h.in: Don't check EMACS_MODULE_GMP. Don't include gmp.h. Remove emacs_mpz structure. Instead, define type alias emacs_limb_t and macro EMACS_LIMB_MAX. * src/module-env-27.h: Change interface of extract_big_integer and make_big_integer to take a sign-magnitude representation instead of mpz_t. * src/emacs-module.c: Don't check EMACS_MODULE_GMP or EMACS_MODULE_HAVE_MPZ_T. Add a comment about the chosen implementation. (module_extract_big_integer, module_make_big_integer): Reimplement without using mpz_t in the interface. * doc/lispref/internals.texi (Module Values): Adapt function documentation and example. Stop mentioning GMP and EMACS_MODULE_GMP. * test/data/emacs-module/mod-test.c: Don't define EMACS_MODULE_GMP or EMACS_MODULE_HAVE_MPZ_T. (memory_full, extract_big_integer, make_big_integer): New helper functions, identical to example in the Info documentation. (Fmod_test_nanoseconds, Fmod_test_double): Adapt to new interface.
-
- 15 Oct, 2019 1 commit
-
-
Robert Pluim authored
* doc/lispref/text.texi (Base 64): * doc/lispref/internals.texi (Window Internals): Remove duplicated words.
-
- 13 Oct, 2019 1 commit
-
-
Juri Linkov authored
* lisp/startup.el (x-apply-session-resources): Enable tab-bar-mode when X resource "tabBar" class "TabBar" is "on", "yes" or "1". * doc/man/emacs.1.in: * doc/emacs/xresources.texi (Table of Resources): Document X resource "tabBar" (class "TabBar").
-
- 09 Oct, 2019 2 commits
-
-
Robert Pluim authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Add description of DEFVAR_* arguments. Describe variable naming conventions. Explain how to express quoting of symbols in C, plus 'specbind' and how to create buffer-local variables.
-
Eli Zaretskii authored
* doc/lispref/errors.texi (Standard Errors): Fix incorrect usage of @xref commands. (Bug#37660) * doc/lispref/internals.texi (Buffer Internals): Fix markup. (Bug#37639)
-
- 14 Sep, 2019 1 commit
-
-
Paul Eggert authored
* doc/lispref/internals.texi (Garbage Collection), etc/NEWS: Warn that control over GC is only approximate.
-
- 23 Jul, 2019 1 commit
-
-
Paul Eggert authored
Say that pdumping cannot redump unless -batch is used. Say that the traditional unexec dumping method is by default not available, and is deprecated. Don't call dump files "portable", as dump files are not any more portable than the Emacs executables themselves. Just call them "dump files". Similar, prefer "portable dumper" (since the dumper code is portable) to "portable dumping" (since the dump file is not). Be more systematic about calling them "dump files" instead of "dumped images" or whatnot.
-
- 07 Jul, 2019 1 commit
-
-
Paul Eggert authored
printmax_t etc. were needed only for platforms that lacked support for printing intmax_t. These platforms are now so obsolete that they are no longer practical porting targets. * src/image.c (gs_load): Fix unlikely buffer overrun discovered while making these changes. It was introduced in 2011-07-17T00:34:43!eggert@cs.ucla.edu. * src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx): Remove. All uses replaced by their standard counterparts intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
-
- 26 Jun, 2019 2 commits
-
-
Basil L. Contovounesios authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Update some of the sample code listings, fixing argument lists and parentheses. Replace ... with @dots{}. Describe UNEVALLED special forms as taking a single argument. (bug#36392)
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Clarify the issue with relocation of buffer or string text as side effect of Lisp evaluation. (Bug#36392)
-
- 28 Apr, 2019 1 commit
-
-
Philipp Stephani authored
This is useful if module authors want to support multiple versions of emacs-module.h. * configure.ac (emacs_major_version): Define substitution. * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro. * doc/lispref/internals.texi (Module Initialization): Document EMACS_MAJOR_VERSION preprocessor macro. * test/data/emacs-module/mod-test.c (emacs_module_init): Verify behavior of EMACS_MAJOR_VERSION.
-
- 24 Apr, 2019 4 commits
-
-
Philipp Stephani authored
-
Philipp Stephani authored
* doc/lispref/internals.texi (Module Values): Clarify that the truncation is towards negative infinity. * test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
-
Philipp Stephani authored
* src/module-env-27.h: Add new module functions to convert big integers. * src/emacs-module.h.in (emacs_mpz): Define if GMP is available. * src/emacs-module.c (module_extract_big_integer) (module_make_big_integer): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_double): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-double): New unit test. * doc/lispref/internals.texi (Module Values): Document new functions.
-
Philipp Stephani authored
Time values are a fundamental data type, and such conversions are hard to implement within modules because of the various forms of time values in Emacs Lisp. Adding dedicated conversion functions can significantly simplify module code dealing with times. This approach uses nanosecond precision. While Emacs in theory has support for higher-precision time values, in practice most languages and standards, such as POSIX, C, Java, and Go, have settled on nanosecond-precision integers to represent time. * src/emacs-module.h.in: Add header for struct timespec. * src/module-env-27.h: Add module functions for time conversion. * src/emacs-module.c (module_extract_time, module_make_time): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid) (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New unit tests. * doc/lispref/internals.texi (Module Values): Document time conversion functions.
-
- 22 Apr, 2019 2 commits
-
-
Basil L. Contovounesios authored
For discussion, see thread starting at: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html * doc/lispref/customize.texi (Composite Types): Do not overspecify :match-alternatives predicates. * doc/lispref/eval.texi (Intro Eval): Anchor definition of "side effect" for cross-referencing... * doc/lispref/functions.texi (What Is a Function): ...from here. Define what a pure function is. * doc/lispref/internals.texi (Writing Emacs Primitives): Describe currently preferred approach to marking primitives as pure and side-effect-free. * doc/lispref/symbols.texi (Standard Properties): Expand description of pure and side-effect-free properties. (cherry picked from commit 4430a9b5)
-
Basil L. Contovounesios authored
For discussion, see thread starting at: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html * doc/lispref/customize.texi (Composite Types): Do not overspecify :match-alternatives predicates. * doc/lispref/eval.texi (Intro Eval): Anchor definition of "side effect" for cross-referencing... * doc/lispref/functions.texi (What Is a Function): ...from here. Define what a pure function is. * doc/lispref/internals.texi (Writing Emacs Primitives): Describe currently preferred approach to marking primitives as pure and side-effect-free. * doc/lispref/symbols.texi (Standard Properties): Expand description of pure and side-effect-free properties.
-
- 18 Apr, 2019 1 commit
-
-
Philipp Stephani authored
* doc/lispref/internals.texi (Module Values): Update documentation for 'make_integer' and 'extract_integer' for bignum support.
-
- 25 Mar, 2019 1 commit
-
-
Basil L. Contovounesios authored
* doc/lispref/internals.texi (Module Nonlocal): Fix typo in return type of non_local_exit_get.
-
- 24 Feb, 2019 1 commit
-
-
Philipp Stephani authored
pending_signals is often set if no quit is pending. This results in bugs in module code if the module returns but no quit is actually pending. As a better alternative, add a new process_input environment function for Emacs 27. That function processes signals (like maybe_quit). * configure.ac: Add module snippet for Emacs 27. * src/module-env-27.h: New file. * src/emacs-module.h.in: Add process_input function to environment interface. * src/emacs-module.c (module_should_quit): Use QUITP macro to check whether the caller should quit. (module_process_input): New function. (initialize_environment): Use it. * src/eval.c: Remove obsolete comment. * test/data/emacs-module/mod-test.c (signal_wrong_type_argument) (signal_errno): New helper functions. (Fmod_test_sleep_until): New test module function. * test/src/emacs-module-tests.el (mod-test-sleep-until): New unit test. * doc/lispref/internals.texi (Module Misc): Document process_input.
-
- 29 Jan, 2019 1 commit
-
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Building Emacs): Correct the directory where the pdump file is installed. (Bug#34244)
-
- 19 Jan, 2019 2 commits
-
-
Paul Eggert authored
* doc/lispref/internals.texi (pdumper-stats): * src/pdumper.c (pdumper_load): Return seconds, not milliseconds. Minimize rounding errors in the usual case.
-
Eli Zaretskii authored
* src/pdumper.c (Fpdumper_stats): Improve formatting and wording of the doc string. Decode the pdump file name and expand-file-name it. * doc/lispref/internals.texi (Building Emacs): Document 'pdumper-stats'.
-
- 18 Jan, 2019 1 commit
-
-
Eli Zaretskii authored
* src/pdumper.c (Fdump_emacs_portable): Improve the doc string and the error messages. * doc/lispref/internals.texi (Building Emacs): Document portable dumping and the 'dump-emacs-portable' function.
-
- 01 Jan, 2019 1 commit
-
-
Paul Eggert authored
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
-
- 03 Dec, 2018 1 commit
-
-
Martin Rudalics authored
* doc/lispref/internals.texi (Window Internals): Add a few more items and clarify description of some others.
-
- 20 Nov, 2018 1 commit
-
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Buffer Internals) (Window Internals, Process Internals): Update the descriptions of Lisp objects.
-
- 14 Oct, 2018 1 commit
-
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Module Functions): Fix confusing wording. Reported by Basil L. Contovounesios <contovob@tcd.ie>.
-
- 11 Oct, 2018 2 commits
-
-
Eli Zaretskii authored
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Writing Dynamic Modules) (Module Initialization, Module Functions, Module Values) (Module Misc, Module Nonlocal): New nodes. * doc/lispref/loading.texi (Dynamic Modules): Add cross-reference to the new node. * doc/lispref/internals.texi (GNU Emacs Internals): * doc/lispref/elisp.texi (Top): Update menus for the new nodes.
-
- 07 Sep, 2018 1 commit
-
-
Paul Eggert authored
Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-09/msg00222.html * doc/lispref/internals.texi (Garbage Collection): Document vector sizes and slot counts more accurately. * src/lisp.h: Omit header_size sanity check that was too picky. Add some less-picky checks.
-
- 14 Aug, 2018 1 commit
-
-
Paul Eggert authored
Remove misc-objects-consed and the misc component of memory-use-count, since misc objects no longer exist. * doc/lispref/internals.texi, etc/NEWS: Mention this, and adjust better to recent removal of misc objects. * src/alloc.c (MEM_TYPE_MISC): Remove; no longer used. (Fmemory_use_counts): Omit misc count, since miscs no longer exist. (misc-objects-consed): Remove.
-
- 12 Aug, 2018 2 commits
-
-
Paul Eggert authored
-
Paul Eggert authored
Eliminate the category of miscellaneous objects, and turn all such objects into pseudovectors. The immediate motivation for this change is to free up an enum Lisp_Type tag value, a scarce resource that can be better used elsewhere. However, this change is worthwhile in its own right, as it improves performance slightly on my platform, 0.3% faster for 'make compile-always' on Fedora 28, and it simplifies the garbage collector and interpreter (Bug#32405). * doc/lispref/internals.texi (Garbage Collection): * etc/NEWS: Document change to garbage-collect return value. * src/alloc.c (total_markers, total_free_markers): (union aligned_Lisp_Misc, MARKER_BLOCK_SIZE) (struct marker_block, marker_block, marker_block_index) (misc_free_list, allocate_misc, live_misc_holding) (live_misc_p, sweep_misc): * src/lisp.h (lisp_h_MARKERP, lisp_h_MISCP, MARKERP, MISCP) (Lisp_Misc, enum Lisp_Misc_Type, Lisp_Misc_Free) (Lisp_Misc_Marker, Lisp_Misc_Overlay, Lisp_Misc_Finalizer) (Lisp_Misc_Ptr, Lisp_Misc_User_Ptr, Lisp_Misc_Limit) (Lisp_Misc_Bignum) (XSETMISC, struct Lisp_Misc_Any, XMISCANY, XMISCTYPE) (struct Lisp_Free, union Lisp_Misc, XMISC): Remove. All uses removed. (cleanup_vector): Clean up objects that were formerly misc and are now pseudovectors. (make_misc_ptr, build_overlay, Fmake_marker, build_marker) (make_bignum_str, make_number, make_pure_bignum) (make_user_ptr, Fmake_finalizer): Build as pseudovectors, not as misc objects. (mark_finalizer_list, queue_doomed_finalizers) (compact_undo_list, mark_overlay, mark_object) (unchain_dead_markers): Mark as vector-like objects, not as misc objects. (mark_maybe_object, mark_maybe_pointer, valid_lisp_object_p) (total_bytes_of_live_objects, survives_gc_p): * src/fns.c (sxhash): No need to worry about misc objects. (garbage_collect_1): Do not generate a 'misc' component. (syms_of_alloc): No need for 'misc' symbol. * src/buffer.c (overlays_at, overlays_in, overlay_touches_p) (overlay_strings, recenter_overlay_lists) (fix_start_end_in_overlays, fix_overlays_before) (Foverlay_lists, report_overlay_modification) (evaporate_overlays): * src/editfns.c (overlays_around): * src/data.c (Ftype_of): * src/fns.c (internal_equal): * src/lisp.h (mint_ptrp, xmint_pointer, FINALIZERP) (XFINALIZER, MARKERP, XMARKER, OVERLAYP, XOVERLAY, USER_PTRP) (XUSER_PTR, BIGNUMP, XBIGNUM): * src/print.c (print_vectorlike, print_object): * src/undo.c (record_marker_adjustments): * src/xdisp.c (load_overlay_strings): Formerly misc objects are now pseudovectors. * src/lisp.h (PVEC_MARKER, PVEC_OVERLAY, PVEC_FINALIZER) (PVEC_BIGNUM, PVEC_MISC_PTR, PVEC_USER_PTR): New constants, replacing their misc versions. All uses changed. (struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Misc_Ptr) (struct Lisp_Bignum, struct Lisp_User_Ptr, struct Lisp_Finalizer): Make usable as a pseudovector by using a pseudovector header, replacing any DIY components, and putting Lisp_Object members first. All uses changed.
-
- 25 Jun, 2018 1 commit
-
-
Karl Fogel authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Switch to a simple parenthetical cross-reference, following up to my commit 9a53b6d4 of 2018-06-24. See discussion: https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00826.html From: Eli Zaretskii Subject: Re: [Emacs-diffs] \ emacs-26 9a53b6d4: Say how to override a primitive interactive spec To: Karl Fogel CC: Stefan Monnier, Emacs Devel Date: Mon, 25 Jun 2018 17:41:53 +0300 Message-Id: <83r2kvrkr2.fsf@gnu.org>
-
- 24 Jun, 2018 1 commit
-
-
Karl Fogel authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Mention that the `interactive-form' property can be used to override a primitive interactive specification, and refer to the detailed documentation for setting that property. From this thread on Emacs Devel: https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00923.html From: Eli Zaretskii To: Karl Fogel CC: Juri Linkov, Emacs Devel Subject: Re: [Emacs-diffs] \ master b88e7c8b: Make transpose-regions interactive (Bug#30343) Date: Thu, 29 Mar 2018 14:38:15 +0300 Message-Id: <834lkzdsd4.fsf@gnu.org>
-
- 16 Jun, 2018 1 commit
-
-
Paul Eggert authored
Have it return Emacs virtual memory size, not the sbrk value which is often useless newadays. * doc/lispref/internals.texi (Garbage Collection): * etc/NEWS: Document this. * lisp/subr.el (memory-limit): New implementation in Lisp, written in terms of process-attributes, and which returns virtual memory size. * src/alloc.c (Fmemory_limit): Remove C implementation.
-
- 13 Apr, 2018 1 commit
-
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Writing Emacs Primitives): * doc/lispref/display.texi (Temporary Displays): Fix typos. * doc/lispref/text.texi (Filling, Changing Properties) (Transposition): Clarify and fix typos. * doc/lispref/positions.texi (Screen Lines): Improve wording. * doc/lispref/modes.texi (Minor Mode Conventions) (Font Lock Multiline): Fix typos. * doc/lispref/variables.texi (Dynamic Binding Tips): Fix a cross-reference. Fix a typo. * doc/lispref/sequences.texi (Sequence Functions): Fix typos. (Bug#31143)
-
- 22 Mar, 2018 1 commit
-
-
Eli Zaretskii authored
* doc/lispref/internals.texi (Writing Emacs Primitives): Document specification of function attributes in DEFUN.
-
- 21 Mar, 2018 1 commit
-
-
Charles A. Roelli authored
-