summaryrefslogtreecommitdiff
path: root/src/emacs.c
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* Fix the -x switch in non-X buildsEli Zaretskii2023-08-101-16/+8
| | | | | | | * src/emacs.c (main): Move the handling of the -x switch out of the HAVE_X_WINDOWS condition, and simplify the rest of the code by avoiding code duplication in HAVE_X_WINDOWS and !HAVE_X_WINDOWS cases. (Bug#65048)
* Fix value history shown for 'gc-cons-percentage'Eli Zaretskii2023-03-121-1/+1
| | | | | | | | | | | When Emacs is built, temacs is run in batch mode, so if we enlarge 'gc-cons-percentage' in that case, the enlarged value will be "remembered" by the dumped Emacs, and will show confusing information in "C-h v", claiming that the original value was 1.0. Keeping the value at 0.1 during dumping avoids that. * src/emacs.c (main): Increase 'gc-cons-percentage' in batch mode only if we are not initializing (a.k.a. "dumping") Emacs.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix restart-emacs alarms (Bug#60220)Paul Eggert2022-12-241-0/+1
| | | | | * src/emacs.c (Fkill_emacs): Turn timers off before execing, so that the re-execed Emacs doesn’t get a timer alarm.
* Revert "; * src/emacs.c (main): Improvements to last change."Po Lu2022-12-091-2/+0
| | | | | | | This reverts commit c774e83e36784ab96539c5c083b3bcb6d0158a8c. It causes crashes on GNU/Linux systems using libgmp, as there a shared library initializer is used to set the malloc functions on startup, so they are not dumped.
* ; * src/emacs.c (main): Improvements to last change.Po Lu2022-12-081-0/+2
|
* Fix crash on Windows 9XPo Lu2022-12-081-0/+6
| | | | * src/emacs.c (main): Call init_bignum before init_window_once.
* ; * src/emacs.c (usage_message): Fix typoPhilip Kaludercic2022-11-241-1/+1
| | | | Author:
* * src/emacs.c (usage_message): Add missing --init-directory entryPhilip Kaludercic2022-11-241-0/+1
|
* Merge remote-tracking branch 'savannah/master' into feature/tree-sitterYuan Fu2022-11-211-3/+5
|\
| * itree.c: Make the iterator reentrant (bug#59183)Stefan Monnier2022-11-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the global iterator object and instead allocate a separate iterator for every loop. This still uses the "duplicate iterator" code, including the old iterator which needs a stack, make ITREE_FOREACH a bit more expensive than we'd like. * src/itree.h (init_itree, forget_itree, itree_iterator_busy_p): Delete declarations. (itree_iterator_start): Add iterator arg and remove `line` and `file` args. (struct itree_iterator): Move from `itree.c`. Remove `line` and `file` fields. (ITREE_FOREACH): Stack allocate an iterator object and pass it to `itree_iterator_start`. * src/itree.c (struct itree_iterator): Move to itree.h. (iter): Delete global variable. (itree_iterator_create, init_itree, forget_itree, itree_iterator_busy_p): Delete functions. (itree_contains): Adjust assertion. (itree_iterator_finish): Deallocate the iterator's stack. (itree_iterator_start): Take the (uninitialized) iterator as argument. Allocate a fresh new stack. Remove `file` and `line` arguments. Don't check `running` any more since the iterator is not expected to be initialized at all. * src/eval.c (signal_or_quit): * src/alloc.c (garbage_collect): Don't check `itree_iterator_busy_p` any more. * src/emacs.c (main): No need to `init_itree` any more. (Fdump_emacs): No need to `forget_itree` any more.
| * Avoid dumping core upon SIGHUP in non-interactive sessionsEli Zaretskii2022-11-101-3/+3
| | | | | | | | | | * src/emacs.c (terminate_due_to_signal): Don't special-case SIGINT. Patch by Paul Eggert <eggert@cs.ucla.edu>. (Bug#58956)
| * Fix the unexec buildEli Zaretskii2022-11-051-0/+2
| | | | | | | | | | * src/itree.c (forget_itree): New function. * src/emacs.c (Fdump_emacs): Call 'forget_itree'.
| * Port interval trees to --enable-checking=structsBasil L. Contovounesios2022-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some names under the interval_* namespace were renamed under the itree_* namespace in commits: 0. f421b58db5 of 2022-10-19 "Prefix all itree.h type names with itree_". 1. 37a1145410 of 2022-10-19 "Rename all exported itree.h functions with the itree_ prefix" Further, some values still referenced in commentary were removed in commits: 2. 258e618364 of 2022-10-17 "Delete the itree_null sentinel node, use NULL everywhere." 3. 2c4a3910b3 of 2022-10-02 "itree: Use a single iterator object" * src/emacs.c (main): Allocate global itree iterator once and for all. * src/alloc.c (mark_overlay): * src/buffer.c (set_overlays_multibyte): * src/itree.c (itree_destroy): Update commentary. (interval_stack_ensure_space, itree_insert_gap): Prefer unsigned-to-unsigned comparisons over signed-to-unsigned. (interval_stack_push_flagged, interval_tree_insert) (interval_tree_contains, itree_iterator_start) (itree_iterator_finish, itree_iterator_next, itree_iterator_narrow): Improve assertions. (itree_init): Rename... (init_itree): ...to this, for consistency with other global init functions. (itree_create): Stop leaking a global iterator allocation on each call. (interval_tree_init): Complete renames of interval_tree -> itree_tree and interval_tree_clear -> itree_clear. (interval_tree_remove_fix): Fix indentation. * src/itree.h: Declare init_itree. (ITREE_FOREACH): Fix typo in commentary. * src/pdumper.c [CHECK_STRUCTS] (dump_interval_node): Use the correct name in the HASH condition and #error message. (dump_overlay, dump_buffer): Update HASH (bug#58975).
| * Set `comp-no-spawn' earlier using -no-comp-spawnAndrea Corallo2022-10-261-0/+1
| | | | | | | | | | | | | | | | * src/emacs.c (standard_args): Add '-no-comp-spawn' cmd line option. * lisp/startup.el (command-line): Parse '-no-comp-spawn' cmd line option. * lisp/emacs-lisp/comp.el (comp-run-async-workers, comp-final): Use '-no-comp-spawn'.
* | Make Emacs compile without tree-sitter libraryYuan Fu2022-10-281-5/+4
| | | | | | | | | | * lisp/treesit.el: Add function declaration forms. * src/emacs.c: Always include syms_of_treesit.
* | Merge branch 'master' into feature/tree-sitterYuan Fu2022-10-051-12/+10
|\|
| * Merge from origin/emacs-28Stefan Kangas2022-10-041-3/+7
| |\ | | | | | | | | | | | | | | | | | | a78af3018e * src/emacs.c (load_pdump): Propery handle case when execu... # Conflicts: # src/emacs.c
| | * * src/emacs.c (load_pdump): Propery handle case when executableAndreas Schwab2022-10-041-3/+7
| | | | | | | | | | | | wasn't found.
| * | Merge from origin/emacs-28Stefan Kangas2022-10-041-10/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 992611b10a Fix documentation of 'TAB' in cc-mode 08e485a2a5 Fix 'org-export-dispatch' command name in manual e5a49f44ff * src/emacs.c (load_pdump): Fix use of xpalloc. 7ff5207624 Avoid assertion violation in 'xpalloc' # Conflicts: # src/emacs.c
| | * * src/emacs.c (load_pdump): Fix use of xpalloc.Andreas Schwab2022-10-021-5/+4
| | |
| | * Avoid assertion violation in 'xpalloc'Eli Zaretskii2022-10-021-1/+1
| | | | | | | | | | | | | | | * src/emacs.c (load_pdump): Ensure the 3rd argument of xpalloc is always positive. (Bug#58232)
| * | ; * src/emacs.c (usage_message): Remove stray tabs.Augusto Stoffel2022-09-141-1/+1
| | |
* | | Merge remote-tracking branch 'origin/master' into feature/tree-sitterYuan Fu2022-08-291-17/+23
|\| |
| * | Allow dropping more data types on PGTKPo Lu2022-06-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/loadup.el (featurep): Load `pgtk-dnd'. * lisp/pgtk-dnd.el: New file. (pgtk-dnd-test-function, pgtk-dnd-types-alist) (pgtk-dnd-known-types, pgtk-dnd-use-offix-drop) (pgtk-dnd-current-state, pgtk-get-selection-internal) (pgtk-register-dnd-targets, pgtk-dnd-empty-state) (pgtk-dnd-init-frame, pgtk-dnd-get-state-cons-for-frame) (pgtk-dnd-get-state-for-frame, pgtk-dnd-default-test-function) (pgtk-dnd-current-type, pgtk-dnd-forget-drop) (pgtk-dnd-maybe-call-test-function, pgtk-dnd-save-state) (pgtk-dnd-handle-moz-url, pgtk-dnd-insert-utf8-text) (pgtk-dnd-insert-utf16-text, pgtk-dnd-insert-ctext) (pgtk-dnd-handle-uri-list, pgtk-dnd-handle-file-name) (pgtk-dnd-choose-type, pgtk-dnd-drop-data) (pgtk-dnd-handle-drag-n-drop-event, pgtk-update-drop-status) (pgtk-drop-finish, pgtk-dnd-handle-gdk, pgtk-dnd): New variables and functions and library. * lisp/term/pgtk-win.el (special-event-map): Load `drag-n-drop-event'. (after-make-frame-functions): Register DND after make frame functions. * src/emacs.c (main): Stop calling empty init_pgtkterm function. * src/pgtkselect.c (Fpgtk_register_dnd_targets, Fpgtk_drop_finish) (Fpgtk_update_drop_status): New functions. (syms_of_pgtkselect): Register new functions. * src/pgtkterm.c (struct event_queue_t): Fix coding style of definition. (symbol_to_drag_action, drag_action_to_symbol) (pgtk_update_drop_status, pgtk_finish_drop): New functions. (drag_data_received): Delete function. (pgtk_set_event_handler): Register for DND correctly. (syms_of_pgtkterm): New defsyms for DND types. (init_pgtkterm): Delete function. * src/pgtkterm.h: Update prototypes, fix prototype coding style.
| * | Fix previous -batch change for gc-cons-percentageLars Ingebrigtsen2022-06-211-2/+1
| | | | | | | | | | | | | | | * src/emacs.c (main): Reset the default for gc-cons-percentage in interactive Emacs.
| * | Increase gc-cons-percentage in -batch EmacsLars Ingebrigtsen2022-06-211-0/+6
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Batch Mode): Document it. * src/emacs.c (main): Use a gc-cons-percentage of 1.0 in noninteractive Emacsen.
| * | Merge from origin/emacs-28Stefan Kangas2022-06-211-14/+18
| |\| | | | | | | | | | | | | 2eb738f2b8 Support builds configured with a separate --bindir cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.
| | * Support builds configured with a separate --bindirEli Zaretskii2022-06-201-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | * src/emacs.c (load_pdump): Don't overwrite the leading directories of the Emacs executable just because the pdumper file was not found in the expected directory relative to the binary. This is needed to support builds with a separate --bindir configure-time option and native-compilation. (Bug#55741)
| * | Fix running temacs on HaikuPo Lu2022-06-201-2/+2
| | | | | | | | | | | | * src/emacs.c (main): Run init_haiku_select at the right place.
* | | Merge remote-tracking branch 'savannah/master' into feature/tree-sitterYuan Fu2022-06-141-63/+104
|\| |
| * | ; * src/emacs.c (main): Move -version output after initialization.Eli Zaretskii2022-06-021-79/+97
| | |
| * | Avoid segfaults on MS-Windows when invoked with --versionEli Zaretskii2022-06-011-0/+5
| | | | | | | | | | | | | | | | | | * src/emacs.c (main): If invoked with --version, call 'init_bignum' before calling 'format-time-string', as that is needed for safe manipulation of bignums in timefns.c.
| * | Make the nativecomp test eln directory more reliably be removedLars Ingebrigtsen2022-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/startup.el (startup-redirect-eln-cache, normal-top-level): Don't create the nativecomp directory here, because this led to brittle deletions of the directory -- there would be several instances of the directory left over after a test run. * lisp/emacs-lisp/ert.el (ert-run-tests-batch-and-exit): Create the nativecomp directory.
| * | Fix coding style of recent changePo Lu2022-05-231-15/+18
| | | | | | | | | | | | | | | * src/emacs.c (main): Fix coding style by putting the = operator on the right row.
| * | Include development data in --version outputLars Ingebrigtsen2022-05-231-3/+18
| | | | | | | | | | | | | | | * src/emacs.c (main): Include development into in --version output (bug#38657).
| * | Merge from origin/emacs-28Stefan Kangas2022-05-161-1/+1
| |\| | | | | | | | | | | | | | | | f928330fa8 Update to Org 9.5.3-6-gef41f3 007bf9a34c Hide temporary FUSE files in Tramp 5dbaddc729 ; Fix some typos
| | * ; Fix some typosStefan Kangas2022-05-151-1/+1
| | |
| * | Fix merging of anonymous faces with an `:extend' property on unexecPo Lu2022-05-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | * src/emacs.c (main): Unconditionally call `init_xfaces'. * src/lisp.h: Enable `init_xfaces' on unexec builds too. * src/xfaces.c (init_xfaces): Move fix for bug#34226 into pdumper-specific section leaving the initialization of `face_attr_sym' intact.
* | | ; Merge from master.Yuan Fu2022-05-071-46/+132
|\| |
| * | Get rid of autorelease warnings during building on GNUstepPo Lu2022-04-251-0/+10
| | | | | | | | | | | | | | | | | | | | | * src/emacs.c (decode_env_path): * src/nsfns.m (ns_appkit_version_str): * src/nsterm.m (ns_term_shutdown): Setup autorelease when objects might be autoreleased during building.
| * | Make it easier to use Emacs as a script interpreterLars Ingebrigtsen2022-04-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/cmdargs.texi (Initial Options): Document -x. * lisp/startup.el (command-line-1): Add new -scripteval. (command-line--eval-script): New function. * src/emacs.c (main): Transform -x to -scripteval. (standard_args): Add -x (bug#20682).
| * | Make `restart-emacs' work when Emacs is started with --chdirLars Ingebrigtsen2022-04-181-35/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/emacs.c (find_emacs_executable): Rename from load_pdump_find_executable and always define. (load_pdump): Return the executable. (main): Store the executable. (Fkill_emacs): Use the stored executable so that --chdir works with relative executable names, and so that we attempt to restart the same executable and not some other Emacs from PATH.
| * | Improve `restart-emacs' error reportingLars Ingebrigtsen2022-04-181-4/+16
| | | | | | | | | | | | * src/emacs.c (Fkill_emacs): Do better error reporting on restarting.
| * | Make "restart" erroring slightly more reliableLars Ingebrigtsen2022-04-181-2/+2
| | | | | | | | | | | | | | | | | | * src/emacs.c (Fkill_emacs): Use emacs_perror for the "restart" errors -- we've already shut down Emacs at this point, so the normal erroring machinery isn't reliable.
| * | ; Minor fix for 'restart-emacs' on MS-WindowsEli Zaretskii2022-04-171-1/+1
| | | | | | | | | | | | | | | * src/w32.c (w32_reexec_emacs): Fail if in -nw session. * src/emacs.c (Fkill_emacs): Fix a typo.
| * | Fix 'restart-emacs' on MS-WindowsEli Zaretskii2022-04-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32.c (w32_reexec_emacs): New function, emulation of 'execvp' on Posix systems. * src/w32.h (w32_reexec_emacs): Add prototype. * src/emacs.c (main) [WINDOWSNT]: Save the original command line and working directory. (Fkill_emacs) [WINDOWSNT]: Call 'w32_reexec_emacs' instead of 'execvp'. (Bug#17036)
| * | Add a `restart-emacs' sanity checkLars Ingebrigtsen2022-04-171-0/+4
| | | | | | | | | | | | * src/emacs.c (Fkill_emacs): Add a sanity check for argv.
| * | Check whether we can restart in Fkill_emacsLars Ingebrigtsen2022-04-171-1/+2
| | | | | | | | | | | | * src/emacs.c (Fkill_emacs): Report an error if we can't restart.