aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Don't quote nil and t in doc strings and commentsLars Ingebrigtsen2021-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/minibuf-tests.el (test-try-completion-ignore-case): * test/lisp/url/url-auth-tests.el (url-auth-test-digest-auth-retrieve-cache): * test/lisp/subr-tests.el (subr-tests-add-hook-depth): * test/lisp/so-long-tests/so-long-tests.el (so-long-tests-invisible-buffer-function): * test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort): * src/xfaces.c: * src/process.c (Finterrupt_process): (syms_of_process): * src/minibuf.c (Fread_from_minibuffer): (Fcompleting_read): (syms_of_minibuf): * src/dispnew.c (syms_of_display): * src/data.c: * lisp/so-long.el (so-long--hack-local-variables): * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): (elisp--xref-find-definitions): * lisp/org/ox-html.el (org-html-htmlize-output-type): * lisp/org/org-agenda.el (org-agenda-do-in-region): * lisp/net/tramp.el: * lisp/minibuffer.el (set-minibuffer-message): * lisp/isearch.el (isearch-wrap-pause): (isearch-repeat-on-direction-change): * lisp/emacs-lisp/timer.el (timer): * lisp/emacs-lisp/package.el (package-read-archive-contents): * lisp/emacs-lisp/faceup.el (faceup-next-property-change): * lisp/emacs-lisp/comp.el (comp-func): * lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p): * lisp/emacs-lisp/cl-macs.el (cl-do): (cl-do*): (cl--self-tco): * lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions): (byte-compile-cond-jump-table): Don't quote t and nil.
* Avoid segfault in command-modesBasil L. Contovounesios2021-09-041-0/+2
| | | | | | * src/data.c (Fcommand_modes): Check that bytecode object is interactive before accessing its interactive spec to avoid segfaulting (bug#50376).
* Quit minibuffers without aborting kmacrosMiha Rihtaršič2021-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Quitting): Document `minibuffer-quit' (Recursive Editing): Document throwing of function values to `exit'. * doc/lispref/errors.texi (Standard Errors): Document `minibuffer-quit' * lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function. * lisp/simple.el (minibuffer-error-function): Do not abort keyboard macro execution if is minibuffer-quit is signaled (bug#48603). * src/data.c (syms_of_data): New error symbol `minibuffer-quit' * src/keyboard.c (recursive_edit_1): Implement throwing of function values to `exit`. In that case, the function will be called without arguments before returning from the command loop. (cmd_error): (Fcommand_error_default_function): Do not abort keyboard macro execution if minibuffer-quit is signaled. (command_loop_2): New argument HANDLERS. * src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of command_loop_1. * src/minibuf.c (Fabort_minibuffers): Use it.
* Merge from origin/emacs-27Glenn Morris2021-07-161-4/+4
|\ | | | | | | | | | | | | 7ac411ae2c (origin/emacs-27) ; * src/data.c (Fcar, Fcdr): Doc fix. 0d9e1826f7 One more minor update of the Emacs manual for 19th printing 92616d30e0 ; Fix let-alist Texinfo markup c13acf8e34 ; * doc/emacs/mule.texi (International Chars): Mention 'de...
| * ; * src/data.c (Fcar, Fcdr): Doc fix.Eli Zaretskii2021-07-141-4/+4
| |
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Add new convenience function `buffer-local-boundp'Lars Ingebrigtsen2021-05-311-1/+3
| | | | | | | | | | | | | | * doc/lispref/variables.texi (Creating Buffer-Local): Document it. * lisp/subr.el (buffer-local-boundp): New function. * src/data.c (Flocal_variable_p): Mention it.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-03-311-0/+1
|\ \
| * | Protect add-variable-watcher from incorrect usageEli Zaretskii2021-03-291-0/+1
| | | | | | | | | | | | | | | * src/data.c (Fadd_variable_watcher): Avoid crashes if SYMBOL isn't. (Bug#47462)
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-02-211-1/+11
|\ \ \ | |/ /
| * | Faster, more compact, and readable closure creationMattias Engdegård2021-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify closure creation by calling a single function at run time instead of putting it together from small pieces. This is faster (by about a factor 2), takes less space on disk and in memory, and makes internal functions somewhat readable in disassembly listings again. This is done by creating a prototype function at compile-time whose closure variables are placeholder values V0, V1... which can be seen in the disassembly. The prototype is then cloned at run time using the new make-closure function that replaces the placeholders with the actual closure variables. * lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Generate call to make-closure from a prototype function. * src/alloc.c (Fmake_closure): New function. (syms_of_alloc): Defsubr it. * src/data.c (syms_of_data): Defsym byte-code-function-p.
| * | Change how (declare (modes store the dataLars Ingebrigtsen2021-02-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Change from being a predicate to storing the modes. This allows using the modes for positive command discovery, too. * src/data.c (Fcommand_modes): Look at the `command-modes' symbol property, too.
* | | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-02-171-5/+82
|\ \ \ | |/ /
| * | Revert the bit about command_modes in previous patch setLars Ingebrigtsen2021-02-141-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (Fcommand_modes): Remove the subr bit -- it's not necessary since it can just use a predicate. * src/lisp.h (GCALIGNED_STRUCT): Remove command_modes. * src/lread.c (defsubr): Remove command_modes.
| * | Extend the syntax of `interactive' to list applicable modesLars Ingebrigtsen2021-02-141-5/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Using Interactive): Document the extended `interactive' form. * doc/lispref/loading.texi (Autoload): Document list-of-modes form. * lisp/emacs-lisp/autoload.el (make-autoload): Pick the list of modes from `interactive' out of the functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Allow for the extended `interactive' form. * src/callint.c (Finteractive): Document the extended form. * src/data.c (Finteractive_form): Return the interactive form in the old format (even when there's an extended `interactive') to avoid having other parts of Emacs be aware of this. (Fcommand_modes): New defun. * src/emacs-module.c (GCALIGNED_STRUCT): Allow for modules to return command modes. * src/lisp.h: New function module_function_command_modes.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-02-101-1/+3
|\ \ \ | |/ /
| * | Add cross-references to defvar-localStefan Kangas2021-02-011-1/+3
| | | | | | | | | | | | | | | * src/data.c (Fmake_variable_buffer_local): * src/eval.c (Fdefvar): Add cross-references to 'defvar-local'.
* | | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-01-161-0/+3
|\ \ \ | |/ /
| * | Add a new variable `inhibit-interaction'Lars Ingebrigtsen2021-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/elisp.texi (Top): Add a link. * doc/lispref/errors.texi (Standard Errors): Mention the new error. * doc/lispref/minibuf.texi (Minibuffers): Add a link. (Inhibiting Interaction): New node. * src/data.c (syms_of_data): Define the `inhibited-interaction' error. * src/lisp.h: Export the barfing function. * src/lread.c (Fread_char, Fread_event, Fread_char_exclusive): Barf if inhibited. * src/minibuf.c (barf_if_interaction_inhibited): New function. (Fread_from_minibuffer, Fread_no_blanks_input): Barf if inhibited. (syms_of_minibuf): Define the `inhibit-interaction' variable.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-01-021-1/+1
|\ \ \ | |/ /
| * | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | | Store function type and expose it with `subr-type'Andrea Corallo2020-12-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Subr): Add 'type' field. (SUBR_TYPE): New inline accessor. * src/pdumper.c (dump_subr): Update for 'type' field. * src/data.c (Fsubr_type): New primitive. (syms_of_data): Update. * src/comp.c (ABI_VERSION): Bump new ABI version. (make_subr): Set type. (Fcomp__register_lambda, Fcomp__register_subr) (Fcomp__late_register_subr): Receive and pass subr type to 'make_subr'. * src/alloc.c (mark_object): Mark subr type. * lisp/emacs-lisp/comp.el (comp-func): Change slot type into mvar. (comp-emit-for-top-level, comp-emit-lambda-for-top-level): Pass type mvar to subr register functions. (comp-compute-function-type): Fix-up subr type mvars. * test/src/comp-tests.el (comp-tests-check-ret-type-spec): Use `subr-type'.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-12-121-2/+3
|\ \ \ | |/ /
| * | Clarify the default-boundp doc stringLars Ingebrigtsen2020-12-091-2/+3
| | | | | | | | | | | | * src/data.c (Fdefault_boundp): Doc string clarification (bug#44141).
* | | Vanilla build warning clean-upAndrea Corallo2020-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/disass.el (native-comp-unit-file) (subr-native-comp-unit): Declare function. * lisp/progmodes/elisp-mode.el (native-compile): Likewise. * lisp/emacs-lisp/package.el (comp-el-to-eln-filename): Likewise. * lisp/startup.el (normal-top-level): Silence warning. * src/data.c (syms_of_data): 'Ssubr_native_lambda_list' is always defined. * src/pdumper.c (dump_cold_native_subr): Move under ifdefs. (dump_drain_cold_data): Add ifdefs.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-11-221-4/+8
|\ \ \ | |/ /
| * | Avoid a compilation warning about an ambiguous elseLars Ingebrigtsen2020-11-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (set_internal): Avoid compilation warning. data.c:1443:9: error: suggest explicit braces to avoid ambiguous ‘else’ 1443 | if (idx > 0 && bindflag == SET_INTERNAL_SET | ^
| * | * src/data.c (set_internal): Fix bug#44733Stefan Monnier2020-11-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the default value when `set` encounters a PER_BUFFER variable which has been let-bound globally, to match the behavior seen with `make-variable-buffer-local`. * test/src/data-tests.el (binding-test--let-buffer-local): Add corresponding test. (data-tests--set-default-per-buffer): Add tentative test for the performance problem encountered in bug#41029.
* | | Make primitive redefinition effective through trampoline synthesisAndrea Corallo2020-10-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/loadup.el (dump-mode): Set `comp-enable-subr-trampolines' when finished bootstrap. * src/data.c (Ffset): Call `comp-enable-subr-trampolines' when redefining a subr. * src/comp.c (syms_of_comp): Define `comp-subr-trampoline-install' symbol. (syms_of_comp): Define `comp-enable-subr-trampolines' variable.
* | | Make CHECK_SUBR publicAndrea Corallo2020-09-231-6/+0
| | | | | | | | | | | | | | | * src/data.c (CHECK_SUBR): Move from here to... * src/lisp.h (CHECK_SUBR): ...to here.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-09-211-0/+9
|\ \ \ | |/ /
| * | Fix builds without modulesGlenn Morris2020-09-131-0/+2
| | | | | | | | | | | | | | | * src/data.c (Finteractive_form): * src/eval.c (Fcommandp): Fix builds without modules.
| * | Add facility to make module functions interactive (Bug#23486).Philipp Stephani2020-09-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/module-env-28.h: Add field for 'make_interactive' function. * src/emacs-module.c (Lisp_Module_Function): Add new field holding the interactive form. (allocate_module_function): Adapt to structure layout change. (module_make_interactive, module_function_interactive_form): New functions. (initialize_environment): Use them. * src/eval.c (Fcommandp): * src/data.c (Finteractive_form): Also handle interactive module functions. * test/data/emacs-module/mod-test.c (Fmod_test_identity): New test function. (emacs_module_init): Create two interactive module test functions. * test/src/emacs-module-tests.el (module/interactive/return-t) (module/interactive/return-t-int, module/interactive/identity): New unit tests. * doc/lispref/internals.texi (Module Functions): Document new function. Rework paragraph about wrapping module functions, as the example no longer applies. * etc/NEWS: Document new facility.
* | | * src/data.c (subr-native-lambda-list): Defined it unconditionally (bug#43255)Andrea Corallo2020-09-061-2/+2
| | |
* | | Rework native compiled lisp/d lambda list accessorAndrea Corallo2020-09-011-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (help-function-arglist): Logic update for new 'Fsubr_native_lambda_list'. * src/data.c (Fsubr_native_dyn_p): Remove. (Fsubr_native_lambda_list): Return t when the input is not a compiled lisp/d subr. (syms_of_data): Update for 'Fsubr_native_dyn_p' removal.
* | | Fix describe function arglist for native compiled lisp/d (bug#42572)Andrea Corallo2020-08-311-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (help-function-arglist): Handle the case of native compiled lisp/d. * src/data.c (syms_of_data): Register new subrs. (Fsubr_native_dyn_p, Fsubr_native_lambda_list): New primitives. * test/src/comp-tests.el (comp-tests-dynamic-help-arglist): New test.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-08-091-6/+0
|\ \ \ | |/ /
| * | Simplify use of __lsan_ignore_objectPaul Eggert2020-08-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Use AC_CHECK_FUNCS_ONCE for __lsan_ignore_object. * src/buffer.c, src/data.c, src/emacs-module.c, src/regex-emacs.c: * src/search.c: Use __lsan_ignore_object unconditionally, and don’t include sanitizer/lsan_interface.h. * src/lisp.h (__lsan_ignore_object): Provide a dummy in the typical case where leak sanitization is not available.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-08-021-0/+7
|\ \ \ | |/ /
| * | Use a more precise check for '__lsan_ignore_object'Philipp Stephani2020-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Add check for __lsan_ignore_object. * src/buffer.c (enlarge_buffer_text): * src/data.c (make_blv): * src/emacs-module.c (Fmodule_load, initialize_environment): * src/regex-emacs.c (regex_compile): * src/search.c (newline_cache_on_off): Use new configuration macro.
| * | Suppress leak detector in some casesPhilipp Stephani2020-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We intentionally leak some objects. Prevent the ASan leak detector from raising false alarms in these cases. * configure.ac: Search for lsan_interface.h header. * src/data.c (make_blv): Allow leaking of buffer-local values. * src/buffer.c (enlarge_buffer_text): Allow leaking of buffer text. * src/emacs-module.c (Fmodule_load, initialize_environment): Allow intentional leak of runtime and environment objects if module assertions are enabled.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-05-061-4/+16
|\ \ \ | |/ /
| * | Merge from origin/emacs-27Glenn Morris2020-05-061-4/+16
| |\ \ | | |/ | | | | | | f9fa726ced Improve doc strings of makunbound and fmakunbound
| | * Improve doc strings of makunbound and fmakunboundStefan Kangas2020-05-031-4/+16
| | | | | | | | | | | | | | | * src/data.c (Fmakunbound, Ffmakunbound): Improve doc strings. (Bug#41026)
* | | * src/data.c (syms_of_data): Fix #ifdef HAVE_NATIVE_COMP position.Andrea Corallo2020-04-251-1/+1
| | |
* | | * src/comp.c (native-comp-unit-set-file): New function.Andrea Corallo2020-04-121-0/+11
| | |
* | | * src/comp.c (native-comp-unit-file): Better parameter name.Andrea Corallo2020-04-121-3/+4
| | |
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-03-291-36/+41
|\ \ \ | |/ /
| * | Refactor and fix typo in CHECK_*_COERCE_MARKERPaul Eggert2020-03-261-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (check_integer_coerce_marker) (check_number_coerce_marker): New functions. Also, fix a typo in the former, by having it use Qinteger_or_marker_p not Qnumber_or_marker_p. (arithcompare, floatop_arith_driver, bignum_arith_driver) (arith_driver, Fplus, Fminus, Ftimes, Fquo, Frem, Fmod) (minmax_driver, Flogand, Flogior, Flogxor, Fadd1, Fsub1): Use them in place of the similarly-named macros. * src/lisp.h (CHECK_NUMBER_COERCE_MARKER) (CHECK_INTEGER_COERCE_MARKER): Remove; no longer used.
* | | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-03-231-1/+1
|\ \ \ | |/ /