summaryrefslogtreecommitdiff
path: root/src/lread.c
Commit message (Collapse)AuthorAgeFilesLines
* Port to C compilers that lack size-0 arraysPaul Eggert2021-12-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The C standard does not allow size-zero arrays, so redo struct Lisp_Subr to not use size-zero arrays when native compilation is not being used. Formerly, the code was using size-zero arrays (a GNU C extension) to avoid using memory unnecessarily when HAVE_NATIVE_COMP is not defined. Replace this hack with the more-traditional hack of putting the relevant members inside ‘#ifdef HAVE_NATIVE_COMP’. * src/alloc.c (cleanup_vector, mark_object): * src/comp.c (make_subr): * src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit): * src/eval.c (init_eval_once, funcall_lambda): * src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP) (SUBR_TYPE): * src/lread.c (Fload): Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of with ‘if (NATIVE_COMP_FLAG)’. Redo members like native_comp_u[0] to be plain native_comp_u. Put all uses of these members inside ‘#ifdef HAVE_NATIVE_COMP’. * src/lisp.h (struct Lisp_Subr): Members native_comp_u, native_c_name, lambda_list, type are now all ifdeffed out if HAVE_NATIVE_COMP is not defined, instead of being size-zero arrays. All uses changed. * src/pdumper.c (dump_subr, dump_cold_native_subr) (dump_do_dump_relocation): * src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
* ; Fix last change related to shorthandsEli Zaretskii2021-10-121-5/+6
| | | | | | | * src/lread.c (read1): Minor stylistic fixes of the last change, including the wording of the comment. * doc/lispref/symbols.texi (Shorthands): Fix wording and typos.
* Don't apply shorthands to punctuation-only symbols (bug#51089)João Távora2021-10-111-1/+6
| | | | | | | | | | | | | | | This includes symbols used for arithmetic functions such as -, /=, etc. Using "-" or "/=" is still possible but doing so won't shadow those functions. * doc/lispref/symbols.texi (Shorthand, Exceptions): New subsubsection. * src/lread.c (read1): Exempt punctionation-only symbols from oblookup_considering_shorthand. * test/lisp/progmodes/elisp-mode-tests.el (elisp-dont-shadow-punctuation-only-symbols): Tweak test.
* Rename elisp-shorthands to read-symbol-shorthandsJoão Távora2021-10-031-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new name fits better in the family of variables that affect the Lisp reader. Suggested-by: Po Lu <luangruo@yahoo.com> * doc/lispref/symbols.texi (Shorthands): Mention read-symbol-shorthands * lisp/shorthands.el (hack-read-symbol-shorthands) (hack-read-symbol-shorthands) (shorthands-font-lock-shorthands): Use read-symbol-shorthands * lisp/progmodes/elisp-mode.el (elisp--completion-local-symbols) (elisp--completion-local-symbols) (elisp-shorthands): Use read-symbol-shorthands * src/lread.c: (syms_of_lread): Define Vread_symbol_shorthands (oblookup_considering_shorthand): Use Vread_symbol_shorthands. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer): (elisp-shorthand-read-from-string): Use read-symbol-shorthands * test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el Use new symbol name read-symbol-shorthands.
* Minor stylistic fixes of shorthand code in CEli Zaretskii2021-09-271-73/+84
| | | | | | | | * src/lread.c (oblookup_considering_shorthand): Now static. Move prototype to where it belongs. (read1, Fintern, Fintern_soft, Funintern) (oblookup_considering_shorthand, syms_of_lread): Fix style of braces and indentation, comments, and doc strings.
* Add #_ reader macro to escape shorthand renamingJoão Távora2021-09-271-3/+15
| | | | | | | | | | | | * src/lread.c (read1): Add skip_shorthand variable. Add a '#_' case. If skip_shorthand call oblookup instead of oblookup_considering_shorthand. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-escape): New test. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (#_f-test4---): New fixture function.
* Consider shorthands in Elisp's elisp-completion-at-pointJoão Távora2021-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of referencing obarray directly, that function has to consider a collection of completions which includes the shorthand versions of some of the symbols. That collection changes from buffer to buffer, depending on the choice of elisp-shorthands. To make this process efficient, and avoid needless recalculation of the above collection, a new obarray-specific cache was invented. The Elisp variable obarray-cache is immediately nullified if something touches the obarray. * lisp/progmodes/elisp-mode.el : New helper. (elisp-completion-at-point): Use new helpers. (elisp--completion-local-symbols) (elisp--fboundp-considering-shorthands) (elisp--bboundp-considering-shorthands): New helpers * src/lread.c (intern_driver): Nullify Qobarray_cache. (syms_of_lread): Add Qobarray_cache. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): New test. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test-complete-me): New fixture.
* Rework Elisp shorthands to only allow only prefix substitutionJoão Távora2021-09-271-41/+129
| | | | | | | | | | | | | | | | | | | This simplification in requirements makes for more complex C code but that code is much less wasteful in Lisp strings than the previous implementation. * src/lread.c (read1): Rework. (Fintern): Rework. (Fintern_soft): Rework. (Funintern): Rework. (oblookup_considering_shorthand): Rewrite. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer) (elisp-shorthand-read-from-string): Use new format of elisp-shorthands. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test) (f-test2, f-test3): Use new form of elisp-shorthands.
* Move most of the shorthand implementation to C codeJoão Távora2021-09-271-18/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It passes the tests designed for the previous Elisp implementation. Likely, this isn't the final form of the implementation. For one, the reader is much slower and allocates a Lisp string for every atom read, regardless if its already interned or not. This has the potential to be catastrophic in terms of GC. Also rename the main variable to elisp-shorthands, from the repetitive shorthand-shorthands. For some reason, I had to put 'hack-elisp-shorthands' and 'load-with-shorthands-and-code-conversion', the new source-file loading functions, in lisp/international/mule.el. Otherwise, lisp/loadup.el wouldn't see them, for some reason that I didn't investigate. This should probably be fixed. * lisp/shorthand.el: Remove. * test/lisp/shorthand-tests.el: Remove. * src/lread.c: (read1, Fintern, Fintern_soft, Funintern): Use oblookup_considering_shorthand. (oblookup_considering_shorthand): New helper. (syms_of_lread): Declare elisp-shorthands. * lisp/progmodes/elisp-mode.el (elisp-shorthands): Put a safe-local-variable spec. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer) (elisp-shorthand-read-from-string) (elisp-shorthand-byte-compile-a-file) (elisp-shorthand-load-a-file): New tests. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el: New file * lisp/loadup.el (load-source-file-function): Set to load-with-shorthands-and-code-conversion. * lisp/international/mule.el (hack-elisp-shorthands): Move here. (load-with-shorthands-and-code-conversion): And here.
* Initialise unread bufferMattias Engdegård2021-09-191-1/+2
| | | | | | | | | | | | The reader has an extra 1-char unread buffer that was incorrectly initialised to 0, which means that the first character read would always be NUL. As this is often the code that looks for the lexical-binding cookie, the first loaded source module would be treated as dynamically bound. During bootstrapping this is loadup.el and so its local variables got dumped into the global environment. * src/lread.c (unread_char): Initialise to empty. (Fload): Initialise here too just in case.
* ; * src/lread.c (load_path_default): Remove unused variable.Eli Zaretskii2021-06-261-1/+0
|
* Fix NS native compilation buildsAlan Third2021-06-261-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (ns_applibexecdir): (ns_applibdir): (ns_appdir): New variables. (.PHONY): Include new rule. (epaths-force-ns-self-contained): Remove the app bundle directory from all paths. * configure.ac (NS_SELF_CONTAINED): Set the default site-lisp directory instead of hard-coding it in the ObjC code, and use the new epaths generating make rule. * src/callproc.c (init_callproc_1): (init_callproc): Remove all the NS specific code as the special cases are now handled by decode_env_path. * src/emacs.c (load_pdump): (decode_env_path): Use ns_relocate to find the correct directory after relocation. * src/lread.c (load_path_default): Remove all the NS specific code as the special cases are now handled by decode_env_path. * src/nsterm.h: Update function definitions. * src/nsterm.m (ns_etc_directory): (ns_exec_path): (ns_load_path): Remove functions that are no longer needed. (ns_relocate): New function to calculate paths within the NS app bundle. * nextstep/Makefile.in (ns_applibexecdir): New variable, and update anything relying on the libexec location.
* Fix lexing of numbers with trailing decimal point and exponentMattias Engdegård2021-05-271-5/+5
| | | | | | | | | | | | | | Numbers with a trailing dot and an exponent were incorrectly read as integers (with the exponent ignored) instead of the floats they should be. For example, 1.e6 was read as the integer 1, not 1000000.0 as every sane person would agree was meant. (Bug#48678) Numbers with a trailing dot but no exponent are still read as integers. * src/lread.c (string_to_number): Fix float lexing. * test/src/lread-tests.el (lread-float): Add test. * doc/lispref/numbers.texi (Float Basics): Clarify syntax.
* Make searching for files faster under WindowsNicolás Bértolo2021-05-131-1/+11
| | | | | | * src/lread.c (openp): Use faccessat to check that a file exists before opening it on Windows (bug#41646). This speeds up searching for files.
* Rename comp-eln-load-path → native-comp-eln-load-pathAndrea Corallo2021-05-061-1/+1
| | | | | | | | | | | | * src/comp.c (Fcomp_el_to_eln_filename): Rename comp-eln-load-path → native-comp-eln-load-path. * src/lread.c (maybe_swap_for_eln): Likewise. * lisp/startup.el (native-comp-eln-load-path) (normal-top-level): Likewise. * lisp/emacs-lisp/comp.el (comp-spill-lap-function, comp-final) (comp-eln-load-path-eff, comp-trampoline-compile) (comp-clean-up-stale-eln, comp-run-async-workers) (comp-lookup-eln, batch-byte-native-compile-for-bootstrap): Likewise.
* Rename comp-warning-on-missing-sourceAndrea Corallo2021-05-061-1/+2
| | | | | | | | | * src/lread.c (maybe_swap_for_eln): Rename comp-warning-on-missing-source → native-comp-warning-on-missing-source. * src/comp.c (syms_of_comp): Likewise. * lisp/emacs-lisp/comp.el (native-comp-warning-on-missing-source): Likewise.
* Output native compiled preloaded files into the 'preloaded' subfolderAndrea Corallo2021-04-041-26/+47
| | | | | | | | | * src/comp.c (fixup_eln_load_path): Account the fact that the file can be dumped in the 'preloaded' subfolder. * lisp/loadup.el: Likewise. * src/lread.c (maybe_swap_for_eln1): New function. (maybe_swap_for_eln): Handle 'preloaded' subfolder. * src/Makefile.in (LISP_PRELOADED): Export preloaded files.
* Issue a warning when eln look-up fails due to missing .el source file.Andrea Corallo2021-04-011-2/+10
| | | | | | | | | * lisp/emacs-lisp/comp.el (comp-warning-on-missing-source): New customize. * src/lread.c (maybe_swap_for_eln): Issue a warning when eln look-up fails due to missing .el source file. * src/comp.c (syms_of_comp): Define 'Qcomp_warning_on_missing_source'.
* Do not defer compilation when bytecode is explicitly requested (bug#46617)Andrea Corallo2021-03-311-0/+6
| | | | | | | | | | | * src/comp.c (maybe_defer_native_compilation): Check if the file is registered in 'V_comp_no_native_file_h'. (syms_of_comp): 'V_comp_no_native_file_h' new global. * src/lread.c (maybe_swap_for_eln): Register files in 'V_comp_no_native_file_h'. * lisp/faces.el (tty-run-terminal-initialization): Do not explicitly load .elc file to not exclude .eln being loaded in place.
* * Prevent stale eln loading checking file timestamp before load (bug#46617)Andrea Corallo2021-03-261-10/+19
| | | | | * src/lread.c (maybe_swap_for_eln): Add file timestamp check. (openp): Update 'maybe_swap_for_eln' call sites.
* * src/lread.c (maybe_swap_for_eln): Fix eln filename (bug#bug#47337).Andrea Corallo2021-03-241-1/+3
|
* Prevent unnecessary multiple .el hashing in 'maybe_swap_for_eln'Andrea Corallo2021-03-211-10/+12
| | | | | | | | | * src/comp.c (Fcomp_el_to_eln_rel_filename): New function. (Fcomp_el_to_eln_filename): Make use of. (syms_of_comp): Register 'Scomp_el_to_eln_rel_filename'. * src/lread.c (maybe_swap_for_eln): Make use of 'Fcomp_el_to_eln_rel_filename' to hash prevent unnecessary multiple hashing.
* Do not load native code when `load' is explicitly called on a .elc fileAndrea Corallo2021-03-191-8/+16
| | | | | | | | | | | | | | | | | | | * src/lread.c (Fload): Do not load native code when `load' is explicitly called on a .elc file. (Flocate_file_internal): Update 'openp' call sites. (maybe_swap_for_eln): Add new 'no_native' parameter. (openp): Likewise + update 'maybe_swap_for_eln' and 'openp' call sites. * src/lisp.h: Update 'openp' signature. * src/w32proc.c (sys_spawnve): Update 'openp' call sites. * src/w32.c (check_windows_init_file): Likewise. * src/sound.c (Fplay_sound_internal): Likewise. * src/process.c (Fmake_process): Likewise. * src/image.c (image_create_bitmap_from_file) (image_find_image_fd): Likewise. * src/emacs.c (set_invocation_vars): Likewise. * src/charset.c (load_charset_map_from_file): Likewise. * src/callproc.c (call_process): Likewise.
* Fix typos and doc strings in native-compilation filesEli Zaretskii2021-03-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose) (comp-always-compile, comp-deferred-compilation-deny-list) (comp-bootstrap-deny-list, comp-never-optimize-functions) (comp-async-jobs-number, comp-async-cu-done-hook) (comp-async-all-done-hook, comp-async-env-modifier-form) (comp-pass, comp-native-compiling, comp-post-pass-hooks) (comp-known-predicate-p, comp-pred-to-cstr) (comp-symbol-values-optimizable, comp-limple-assignments) (comp-limple-calls, comp-limple-branches, comp-block) (comp-vec--verify-idx, comp-vec-aref, comp-vec-append) (comp-vec-prepend, comp-block-preds) (comp-ensure-native-compiler, comp-log, comp-log-func) (comp-loop-insn-in-block, comp-byte-frame-size) (comp-add-func-to-ctxt, comp-spill-lap-function, comp-spill-lap) (comp-lap-fall-through-p, comp-new-frame, comp-emit-set-call) (comp-copy-slot, comp-latch-make-fill, comp-emit-cond-jump) (comp-body-eff, comp-op-case, comp-prepare-args-for-top-level) (comp-limplify-top-level, comp-negate-arithm-cmp-fun) (comp-emit-assume, comp-cond-cstrs-target-mvar) (comp-function-foldable-p, comp-function-call-maybe-fold) (comp-form-tco-call-seq, comp-clean-up-stale-eln) (comp-delete-or-replace-file, comp--native-compile) (native--compile-async, native-compile) (batch-byte-native-compile-for-bootstrap): Fix typos, wording, and punctuation in doc strings. * lisp/loadup.el: Fix typos. * src/lread.c (syms_of_lread): Doc fix.
* Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2021-02-101-44/+73
|\
| * Note that the `values' variable is now obsoleteLars Ingebrigtsen2021-02-091-1/+2
| | | | | | | | | | | | | | * src/lread.c (syms_of_lread): Note that it's obsolete in the doc string (because we can't mark it as obsolete "properly" yet, because that leads to compilation warnings when somebody (let (values) ... values).
| * Avoid overwriting minibuffer prompt by keystrokes echoEli Zaretskii2021-02-041-3/+12
| | | | | | | | | | | | * src/lread.c (Fread_char, Fread_event, Fread_char_exclusive): Call cancel_echoing to make sure the prompt is not obscured by keystrokes echo. (Bug#46243)
| * Fix up invalid_syntax error signallingLars Ingebrigtsen2021-02-021-8/+7
| | | | | | | | | | | | | | * src/lread.c (invalid_syntax_lisp): Instead of putting the line/column in a string, signal an error containing the numbers as data. This allows for easier post-processing and is how other similar errors (like (forward-sexp 1)) do it.
| * Make syntax errors say the line/column they appear atLars Ingebrigtsen2021-02-011-40/+60
| | | | | | | | | | | | | | | | | | | | | | * src/lisp.h: Add count_lines prototype. * src/lread.c (invalid_syntax_lisp): New function (bug#36970). (invalid_syntax): Extend function to take a readcharfun parameter. (read_emacs_mule_char, character_name_to_code): Pass in. (read_escape, invalid_radix_integer, read1): Ditto. * src/xdisp.c (count_lines): Add a more succinct shim over display_count_lines.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-01-161-4/+25
|\|
| * Make libraries works with xterm-mouse-mode.Jared Finder2021-01-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change calls from 'read-event' to 'read-key' in libraries expecting mouse events. Do this only when 'xterm-mouse-mode' is enabled. That way those libraries read decoded mouse events instead of the underlying escape sequence. Add a parameter to 'read-key' that avoids running any of the unbound fallbacks in 'read-key-sequence' so the libraries can read mouse button-down events. For backward compatibility purposes, the above logic is contained in a new internal-only function: 'read--potential-mouse-event'. * doc/lispref/commands.texi (Reading One Event): Document new parameter to 'read-key'. Mention that non-character events on terminals need 'read-key'. * lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'. (read-key): Add new parameter 'fallbacks-disabled' to prevent running any of the unbound fallbacks normally run by 'read-key-sequence'. (read--potential-mouse-event): Add new function that calls 'read-key' or 'read-event' depending on if 'xterm-mouse-mode' is set. * lisp/foldout.el (foldout-mouse-swallow-events): * lisp/isearch.el (isearch-pre-command-hook): * lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag): * lisp/mouse.el (mouse-drag-secondary): * lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column) (ruler-mode-mouse-drag-any-column-iteration): * lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke): * lisp/textmodes/artist.el (artist-mouse-draw-continously) (artist-mouse-draw-poly, artist-mouse-draw-2points): * lisp/vc/ediff-wind.el (ediff-get-window-by-clicking): * lisp/wid-edit.el (widget-button--check-and-call-button) (widget-button-click): Call 'read--potential-mouse-event' instead of 'read-event'. * lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key' with 'fallbacks-disabled' set instead of 'read-event'. Unlike above changes, this is unconditionally applied so it works for function keys too. Apply 'local-function-key-map' instead of 'function-key-map' as that contains the full terminal translations. * lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if a mouse is available. * src/lread.c (Fread_event): Recommend 'read-key' in docstring for 'read-event' for non-character events.
| * Add a new variable `inhibit-interaction'Lars Ingebrigtsen2021-01-121-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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".
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-12-201-1/+1
|\|
| * Make "Invalid modifier in string" ordinary invalid-read-syntax errorZajcev Evgeny2020-12-171-1/+1
| | | | | | | | | | | | * src/lread.ec (read1): Raise "Invalid modifier in string" error as `invalid-read-syntax'. This fixes raise of unhandled error in `elisp--local-variables'
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-10-231-0/+7
|\|
| * Avoid assertion violations in malformed Unicode escapesEli Zaretskii2020-10-201-0/+7
| | | | | | | | | | | | | | * src/lread.c (read_escape): Produce better diagnostic for malformed \u Unicode escapes, while avoiding assertion violation when READCHAR returns -1 because the input is exhausted. (Bug#44084)
* | * Do not check eln timestamp as superseded by source hashing (bug#43532)Andrea Corallo2020-10-151-16/+10
| | | | | | | | | | | | * src/lread.c (maybe_swap_for_eln): Remove eln file timestamp check given is now unnecessary. (openp): Update for new 'maybe_swap_for_eln' signature.
* | Clean-up some now unnecessary diff against masterAndrea Corallo2020-09-291-20/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/autoload.el (update-directory-autoloads): .eln files have been moved so remove the '.eln' match. * lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): Likewise. * lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up as '.eln' is no more in `load-suffixes'. * lisp/help-fns.el (find-lisp-object-file-name): Clean-up as `symbol-file' will return the '.elc' file. * src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not anymore in load-suffixes. (openp): Two spaces.
* | Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo2020-09-211-0/+3
|\|
| * Make (let ((:key 'foo)) :key) signal an error in lexical elisp, tooLars Ingebrigtsen2020-09-201-0/+3
| | | | | | | | * src/lread.c (intern_sym): Mark keywords as special (bug#38872).
| * Remove code checked in to lread.c by mistakeLars Ingebrigtsen2020-09-201-1/+0
| | | | | | | | | | * src/lread.c (intern_sym): Remove code under development inadvertently checked in.
| * Terminate `comint-password-function' testsdickmao2020-09-201-0/+1
| | | | | | | | | | | | | | | | | | * test/lisp/comint-tests.el (comint-test-no-password-function) (comint-test-password-function-with-value) (comint-test-password-function-with-nil): refactor (comint-tests/test-password-function): actually test `comint-send-invisible' and inhibit inadvertent interactive query (bug#38825).
* | * Fix `load-filename' for installed instance (bug#43089)Andrea Corallo2020-09-011-40/+22
| | | | | | | | | | | | | | | | * src/lread.c (parent_directory): Remove function as now unnecessary. (compute_found_effective): New function. (Fload): Make use of 'compute_found_effective' and fix `load-filename' computation.
* | * src/lread.c (Fload): Fix for manual eln load.Andrea Corallo2020-08-311-3/+9
| |
* | Have .elc files in `load-history' when loading native code (bug#43089)Andrea Corallo2020-08-291-9/+15
| | | | | | | | | | | | | | | | * src/lread.c (Fload): Add the corresponding .elc file to `load-history' when loading native code. * lisp/subr.el (eval-after-load): Use `load-file-name' instead of `load-true-file-name'.
* | * Back using `load-file-name' when reading '#$' (bug#42961)Andrea Corallo2020-08-291-5/+7
| | | | | | | | | | | | * src/lread.c (read1, read_list): Use again load-file-name when reading '#$'. (syms_of_lread): Update `load-file-name' doc.
* | * src/lread.c (Fload): Bind load-file-name to the .elc filename.Andrea Corallo2020-08-291-2/+4
| |
* | Rework eln hash filename strategyAndrea Corallo2020-08-231-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate eln filename hashing also the source file content in the form: /absolute/path/filename.el + content -> eln-cache/filename-path_hash-content_hash.eln * src/lread.c (maybe_swap_for_eln): Always call Fcomp_el_to_eln_filename on an existing source file. * src/comp.c (md5.h, sysstdio.h, zlib.h): New include. (comp_hash_string): Use md5 instead of sha512. (MD5_BLOCKSIZE): New macro. (accumulate_and_process_md5, final_process_md5, md5_gz_stream) (comp_hash_source_file): New functions. (Fcomp_el_to_eln_filename): Rework for hasing using also source file content. * src/lread.c (maybe_swap_for_eln): Rename el_name -> src_name as this can be also a have .el.gz extention.