summaryrefslogtreecommitdiff
path: root/src/emacs.c
Commit message (Collapse)AuthorAgeFilesLines
* If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.Dmitry Antipov2014-09-161-3/+3
| | | | | | | | | | | | | | | | | * charset.c (load_charset_map_from_file): Use scoped_list2 and build_local_string. * buffer.c (Fother_buffer, other_buffer_safely, init_buffer): * emacs.c (init_cmdargs, decode_env_path): * fileio.c (Fexpand_file_name): * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]: * frame.c (x_get_arg): * keyboard.c (safe_run_hooks_error): * lread.c (load_warn_old_style_backquotes): * xdisp.c (Fcurrent_bidi_paragraph_direction): * xfns.c (x_default_scroll_bar_color_parameter, select_visual): * xselect.c (x_clipboard_manager_error_1) (x_clipboard_manager_save_all): * xterm.c (x_term_init): Use build_local_string.
* Clean up extern decls a bit.Paul Eggert2014-08-311-8/+2
| | | | | | | | | | | | | | | | | * configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs. While we're at it, don't disable -Wlogical-op either. * src/bytecode.c: Include blockinput.h and keyboard.h rather than rolling their APIs by hand. * src/emacs.c: Include regex.h and rely on its and lisp.h's API rather than rolling them by hand. * src/lastfile.c: Include lisp.h, to check this file's API. * src/lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static): New decls. * src/regex.h (re_max_failures): New decl. * src/unexcw.c, src/unexmacosx.c, src/unexw32.c: Rely on lisp.h's API rather than rolling it by hand. * src/vm-limit.c (__after_morecore_hook, __morecore, real_morecore): Declare at top level, to pacify GCC -Wnested-externs.
* Add support for HYBRID_MALLOC, allowing the use of gmalloc beforeKen Brown2014-08-281-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dumping and the system malloc after dumping. (Bug#18222) * configure.ac (HYBRID_MALLOC): New macro; define to use gmalloc before dumping and the system malloc after dumping. Define on Cygwin. * src/conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]: Define as macros, expanding to hybrid_malloc, etc. (HYBRID_GET_CURRENT_DIR_NAME): New macro. (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as macro. * src/gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a full implementation on Cygwin. Remove Cygwin-specific code that is no longer needed. (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]: Redefine as macros expanding to gmalloc, grealloc, etc. (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros. (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine. (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define. (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC || HAVE_POSIX_MEMALIGN)]: New functions. * src/alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC || HAVE_POSIX_MEMALIGN)]: Define as macro expanding to hybrid_aligned_alloc; declare. (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC || HAVE_POSIX_MEMALIGN)]: Define. (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing. * src/sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as macro, expanding to gget_current_dir_name, and define the latter. * src/emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or malloc_enable_thread(). Don't initialize malloc. * src/lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is no longer defined on Cygwin). (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare. * src/sheap.c (bss_sbrk_buffer_end): New variable. * src/unexcw.c (__malloc_initialized): Remove variable. * src/ralloc.c: Throughout, treat HYBRID_MALLOC the same as SYSTEM_MALLOC. * src/xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check Vmemory_full.
* * configure.ac (G_SLICE_ALWAYS_MALLOC): Remove obsolete macro.Ken Brown2014-08-251-6/+0
| | | | | * src/emacs.c (main): Remove use of obsolete macro G_SLICE_ALWAYS_MALLOC.
* Use binary-io module, O_BINARY, and "b" flag.Paul Eggert2014-07-141-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add binary-io. It was already present implicitly; this just makes the dependence explicit. * lib-src/etags.c, lib-src/hexl.c, lib-src/make-docfile.c: Include binary-io.h instead of fcntl.h and/or io.h. (main): Use set_binary_mode or SET_BINARY in place of handcrafted code. * lib-src/etags.c (main) [DOS_NT]: * lib-src/movemail.c (main) [WINDOWSNT]: Don't mess with _fmode. * lib-src/etags.c (main, process_file_name, analyse_regex): Use fopen/popen's "b" flag instead. * lib-src/movemail.c (main, popmail): Use open/lk_open/mkostemp's O_BINARY instead. * src/callproc.c (create_temp_file): Use mkostemp's O_BINARY flag. * src/emacs.c [MSDOS]: * src/emacs.c (main) [DOS_NT]: Don't mess with _fmode. (main) [MSDOS]: Use SET_BINARY instead of setmode. * src/minibuf.c: Include binary-io.h instead of fcntl.h. (read_minibuf_noninteractive): Use set_binary_mode instead of handcrafted code. Don't call emacs_set_tty if emacs_get_tty failed. * src/sysdep.c, src/systty.h (emacs_get_tty): Return int, not void. * src/sysdep.c (emacs_open, emacs_pipe): Use O_BINARY. * src/w32.c (pipe2): Adjust eassert to include O_BINARY. Fixes: debbugs:18006
* * emacs.c: Include "sysselect.h", to define its inline functions.Paul Eggert2014-06-031-0/+1
| | | | | Problem reported by Glenn Morris in: http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
* Fix bug #17622 with crashes in mmap routines.Eli Zaretskii2014-05-291-1/+2
| | | | | | | | | | | src/buffer.c (init_buffer): Accept an argument 'initialized'. [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset mmap_regions and mmap_fd, to avoid referencing stale data from the dump phase. Add an assertion for buffer text of buffers created in temacs before this function is called. (mmap_regions_1, mmap_fd_1): Remove unused variables. src/lisp.h (init_buffer): Update prototype. src/emacs.c (main): Pass 'initialized' as the argument to init_buffer.
* Use mmap(2) emulation for buffer text on MS-Windows.Fabrice Popineau2014-05-271-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from configure. (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used. src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero for MinGW, since it no longer uses gmalloc. src/buffer.c: Do not define mmap allocations functions for Windows. Remove mmap_find which is unused. Remove mmap_set_vars which does nothing useful. [WINDOWSNT]: Include w32heap.h. (init_buffer): Always allocate new memory for buffers. src/emacs.c: Remove mmap_set_vars calls. src/image.c (free_image): Undef free for Windows because it is redirected to our private version. src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility. (copy_executable_and_dump_data): Remove dumping the heap section. (unexec): Restore using_dynamic_heap after dumping. src/w32heap.c (dumped_data_commit, malloc_after_dump) (malloc_before_dump, realloc_after_dump, realloc_before_dump) (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc) (mmap_free): New functions. src/w32heap.h: Declare dumped_data and mmap_* function prototypes. nt/inc/ms-w32.h: Switch to the system heap allocation scheme instead of GNU malloc and ralloc. nt/inc/sys/mman.h: New file. nt/INSTALL: Update for the new build requirements. etc/NEWS: Mention build changes on MS-Windows. configure.ac (C_HEAP_SWITCH) define for different values of dumped heap size depending on 32/64bits arch on Windows. Don't check for pthreads.h on MinGW32/64, it gets in the way. Use mmap(2) for buffers and system malloc for MinGW32/64.
* Assume C99 or later.Paul Eggert2014-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | * lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4: Remove. * configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure' smaller. (gl_PROG_CC_C99): Use this to get C99 or later. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * admin/merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool. (GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool. * doc/lispref/internals.texi (C Dialect): Document this. * etc/NEWS: Document this. * nt/gnulib.mk: Remove stdarg and stdbool modules. * src/bytecode.c (B__dummy__): Remove. * src/conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool. (FLEXIBLE_ARRAY_MEMBER): Now always empty. * src/dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]: * src/regex.c (DEBUG_PRINT): Assume varargs macros. * src/lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99. Fixes: debbugs:17487
* Merge from emacs-24; up to 2014-04-16T15:28:06Z!eggert@cs.ucla.eduJuanma Barranquero2014-04-191-7/+0
|\
| * * emacs.c (close_output_streams): Don't clear and restore errno.Paul Eggert2014-04-171-7/+0
| |
* | Merge from emacs-24; up to 2014-04-16T15:28:26Z!monnier@iro.umontreal.caPaul Eggert2014-04-161-0/+7
|\ \ | |/
| * Fix the MSDOS build.Eli Zaretskii2014-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/unexcoff.c [MSDOS]: Include libc/atexit.h. (copy_text_and_data): Zero out the atexit chain pointer before dumping Emacs. src/termhooks.h (encode_terminal_code): Update prototype. src/term.c (encode_terminal_code) [DOS_NT]: Make it externally visible for all DOS_NT ports, not just WINDOWSNT. (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS. src/sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD unless it is defined. (emacs_pipe) [MSDOS]: Redirect to 'pipe'. src/process.c (close_on_exec, accept4, process_socket): Move into the "ifdef subprocesses" part. (catch_child_signal): Condition by "ifdef subprocesses". (syms_of_process) <Qinternal_default_process_sentinel> <Qinternal_default_process_filter>: Condition by "ifdef subprocesses". src/msdos.h: Add prototypes for new functions. (EINPROGRESS): Define. (O_CLOEXEC): Define to zero. src/msdos.c (check_window_system): Remove unnecessary an incompatible duplicate function. (sys_opendir, readlinkat, faccessat, fstatat, unsetenv): New functions in support of new functionality. src/menu.c (single_menu_item): Add visual indication of submenu also for menus on MSDOS frames. (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS. src/lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define when async subprocesses aren't supported. src/font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition. src/emacs.c (close_output_streams): Zero out errno before calling close_stream. src/dired.c [MSDOS]: Include msdos.h. src/conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir. (DATA_START) [MSDOS]: Define. (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K. src/callproc.c (block_child_signal, unblock_child_signal) [MSDOS]: Ifdef away for MSDOS. (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS. (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant for MSDOS. (call_process) [MSDOS]: Fix call sequence of dostounix_filename. Use temporary file template that is compatible with mkostemp. Move vfork-related portions under #ifndef MSDOS. (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT. lisp/term/pc-win.el (x-list-fonts, x-get-selection-value): Provide doc strings, as required by snarf-documentation. msdos/sedlisp.inp: msdos/sedlibmk.inp: msdos/sedleim.inp: msdos/sed3v2.inp: msdos/sed2v2.inp: msdos/sed1v2.inp: Update Sed scripts for Emacs 24.4. msdos/inttypes.h: Add PRIdMAX. msdos/INSTALL: Update for Emacs 24.4. msdos/sedadmin.inp: New file.
* | Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.Paul Eggert2014-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (memory_full): * charset.c (syms_of_charset): * doc.c (Fsnarf_documentation): * emacs.c (main): * font.c (BUILD_STYLE_TABLE): * keyboard.c (make_lispy_event): * profiler.c (setup_cpu_timer): * xgselect.c (xg_select): * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): Use ARRAYELTS. * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. Replace the only use with ARRAYELTS (font_property_table). * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
* | Rename EARRAYSIZE to ARRAYELTSDaniel Colascione2014-04-031-2/+2
| |
* | Clean up array size calculationsDaniel Colascione2014-04-031-3/+2
| |
* | Improve usage of AC_INITGlenn Morris2014-03-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (AC_INIT): Add "GNU" in package, add bug address. (PACKAGE_BUGREPORT): Use it. * src/emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION. (emacs_bugreport): New variable. (usage_message): Use PACKAGE_BUGREPORT. (syms_of_emacs) <report-emacs-bug-address>: New variable. * lisp/cus-start.el (report-emacs-bug-address): Set custom properties. * lisp/mail/emacsbug.el (report-emacs-bug-address): Variable is now defined in emacs.c.
* | Add system-configuration-features, summarising some configure resultsGlenn Morris2014-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (ACL_SUMMARY): Rename from acl_summary, for consistency. (EMACS_CONFIG_FEATURES): New define. * src/emacs.c (syms_of_emacs) <system-configuration-features>: New var. * lisp/mail/emacsbug.el (report-emacs-bug): Include system-configuration-features. * etc/NEWS: Mention this.
* | Remove the build-time option CLASH_DETECTIONGlenn Morris2014-03-251-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every platform supports it, and the runtime option `create-lockfiles' replaces it. * configure.ac (CLASH_DETECTION): Remove option. * lisp/files.el (lock-buffer, unlock-buffer, file-locked-p): Remove fallback aliases, since they are always defined now. * src/buffer.c (Frestore_buffer_modified_p, Fkill_buffer): * src/emacs.c (shut_down_emacs): * src/fileio.c (Finsert_file_contents, write_region): * src/filelock.c (top-level, syms_of_filelock): * src/insdel.c (prepare_to_modify_buffer_1): CLASH_DETECTION is always defined now. * admin/CPP-DEFINES: Remove CLASH_DETECTION.
* | Move might_dump assignment earlier in initializationDaniel Colascione2014-03-211-4/+4
| |
* | Do not allow a dumped Emacs to be dumpedDaniel Colascione2014-03-211-0/+10
|/
* temacs --daemon fixPaul Eggert2014-02-171-3/+3
| | | | | | | * emacs.c (main): Initialize daemon_pipe[1] here ... (syms_of_emacs): ... instead of here. Fixes: debbugs:16599
* Fix spelling of "GNUstep"Glenn Morris2014-01-201-1/+1
|
* Fix file name handling on MS-Windows 9X.Eli Zaretskii2014-01-181-0/+6
| | | | | | | | | | | | | | | | | src/w32.c (maybe_load_unicows_dll): New function. src/emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early on, to make sure we can convert file names to and from UTF-8 on Windows 9X. This fixes a failure to start up because Emacs cannot find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>. src/w32font.c [WINDOWSNT]: Include w32.h. (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead of implementing the same stuff. Remove now unused g_b_init_is_windows_9x. src/w32.h (maybe_load_unicows_dll): Add prototype. nt/runemacs.c (ensure_unicows_dll): Don't tell in the message box that "emacs -nw" can do without UNICOWS.DLL on Windows 9X. See w32.c:maybe_load_unicows_dll and its callers for the reason.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-2/+2
|
* * src/emacs.c (main): [DAEMON_MUST_EXEC]: Restore close-on-exec after exec.Paul Eggert2013-12-281-0/+1
| | | | Fixes: debbugs:16262
* Fix pipe bug with OS X emacs --daemon (Bug#16262).Paul Eggert2013-12-281-0/+2
| | | | | * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec flags on the daemon pipe ends before execing.
* Minor fixes for recent openp changes.Paul Eggert2013-12-181-1/+1
| | | | | | | | * lisp.h (GCPRO7): New macro. * lread.c (openp): Use bool for boolean; all callers changed. Protect save_string from GC. Don't assume that file descriptors are nonzero. Redo save_mtime comparison to avoid bogus GCC warning about uninitialized variable.
* Add load-prefer-newer option, to load .el if newer than .elcGlenn Morris2013-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (Fload): Pass load_prefer_newer to openp. Don't bother checking mtime if openp already did it. (openp): Add `newer' argument, to check all suffixes and find the newest file. (syms_of_lread) <load_prefer_newer>: New option. * src/callproc.c (call_process): * src/charset.c (load_charset_map_from_file): * src/emacs.c (init_cmdargs): * src/image.c (x_create_bitmap_from_file, x_find_image_file): * src/lisp.h (openp): * lread.c (Flocate_file_internal): * src/process.c (Fformat_network_address): * src/sound.c (Fplay_sound_internal): * src/w32.c (check_windows_init_file): * src/w32proc.c (sys_spawnve): Update for new arg spec of openp. * lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. * etc/NEWS: Mention this. Fixes: debbugs:2061
* * src/emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.Glenn Morris2013-12-171-1/+0
|
* Minor fix in Windows-specific code in decode_env_path.Eli Zaretskii2013-12-151-2/+3
| | | | | src/emacs.c (decode_env_path): Fix bogus comparison against emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
* Merge from trunk.Eli Zaretskii2013-12-091-0/+5
|\
| * * emacs.c (main): Call fixup_locale a second time for GNUStep.Jan Djärv2013-12-081-0/+5
| |
* | Merge from trunk.Eli Zaretskii2013-12-071-27/+38
|\ \ | |/
| * Fix bug #15933 with crashes in file-notify-tests on MS-Windows.Eli Zaretskii2013-11-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support w32 file notifications in batch mode. src/w32proc.c (sys_select): Don't wait on interrupt_handle if it is invalid (which happens in batch mode). If non-interactive, call handle_file_notifications to store file notification events in the input queue. src/w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well. src/w32inevt.c (handle_file_notifications): Now external, not static. src/w32term.h (handle_file_notifications): Provide prototype. src/emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call init_crit, since init_display, which does that otherwise, is not called.
| * Empty elements in EMACSLOADPATH now stand for the defaultGlenn Morris2013-11-221-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lread.c (load_path_check): Take path to check as argument. (load_path_default): New, split from init_lread. (init_lread): Move calc of default load-path to load_path_default. Empty elements in EMACSLOADPATH now stand for the default. (load-path): Doc fix. * src/emacs.c (decode_env_path): Add option to treat empty elements as nil rather than ".". * src/callproc.c (init_callproc_1, init_callproc): * src/image.c (Vx_bitmap_file_path): * src/lisp.h (decode_env_path): * lread.c (Vsource_directory): Update for new argument spec of decode_env_path. * leim/Makefile.in (RUN_EMACS): Empty EMACSLOADPATH rather than unsetting. * lisp/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting. * test/automated/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting. * doc/emacs/cmdargs.texi (General Variables): Empty elements in EMACSLOADPATH now mean the default load-path. * doc/lispref/loading.texi (Library Search): Empty elements in EMACSLOADPATH now mean the default load-path. * etc/NEWS: Mention this. Fixes: debbugs:12100
* | Fixed initialization code and default-printer-name.Eli Zaretskii2013-12-071-1/+31
| |
* | Tested subprogram invocation, fixed decode_env_path.Eli Zaretskii2013-12-071-2/+31
| |
* | Merge from mainline.Eli Zaretskii2013-11-181-16/+36
|\ \ | |/
| * Fix bug #15260 with building and installing Emacs in non-ASCII directories.Eli Zaretskii2013-11-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/xdisp.c (message3_nolog, message_with_string): Encode the string before writing it to the terminal in a non-interactive session. src/lread.c (openp): If both FILENAME and SUFFIX are unibyte, make sure we concatenate them into a unibyte string. src/fileio.c (make_temp_name): Encode PREFIX, and decode the resulting temporary name before returning it to the caller. (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY is a unibyte string, convert NAME to a unibyte string to ensure that the result is also a unibyte string. src/emacs.c (init_cmdargs): Use build_unibyte_string to make sure we create unibyte strings from default paths and directory/file names. src/coding.h (ENCODE_FILE): Do not attempt to encode a unibyte string. src/callproc.c (init_callproc): Use build_unibyte_string to make sure we create unibyte strings from default paths and directory/file names. src/buffer.c (init_buffer): Don't store default-directory of *scratch* in multibyte form. The original problem which led to that is described in http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html, but it was solved long ago. lisp/startup.el (normal-top-level): Move setting eol-mnemonic-unix, eol-mnemonic-mac, eol-mnemonic-dos, and also setup of the locale environment and decoding all of the default-directory's to here from command-line. (command-line): Decode also argv[0]. lisp/loadup.el: Error out if default-directory is a multibyte string when we are dumping. lisp/Makefile.in (emacs): Don't set LC_ALL=C. leim/Makefile.in (RUN_EMACS): Don't set LC_ALL=C. configure.ac: Don't disallow builds in non-ASCII directories.
| * * src/emacs.c (usage_message): Mention that `-L :...' appends.Glenn Morris2013-11-031-1/+1
| |
| * * emacs.c (original_pwd): Remove global var by making it local.Paul Eggert2013-11-011-6/+8
| | | | | | | | (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
| * * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).Jan Djärv2013-10-311-1/+1
| |
| * Fix setting of invocation-directory with --chdir and relative argv[0]Glenn Morris2013-10-311-7/+16
| | | | | | | | | | | | | | | | | | * src/emacs.c (original_pwd): New char. (main): If using --chdir, store original_pwd. (init_cmdargs): When setting Vinvocation_directory based on a relative argv[0], use original_pwd if set. Fixes: debbugs:15768
| * Fix part of bug #15260 with from directory with a non-ASCII name.Eli Zaretskii2013-10-261-1/+5
| | | | | | | | | | src/emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments before passing them to 'unexec'.
| * * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,Jan Djärv2013-10-201-3/+6
| | | | | | | | | | | | chdir to HOME. Fixes: debbugs:15607
* | Adapted dostounix_filename. w32-short/long-filename work with wide APIs.Eli Zaretskii2013-11-021-3/+16
|/
* Make VALMASK visible to GDB even if clang is used.Paul Eggert2013-10-161-0/+1
| | | | | | | | * emacs.c (MAIN_PROGRAM): New macro. * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros. (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. Fixes: debbugs:15574
* A simpler, centralized INLINE.Paul Eggert2013-09-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/profile.c (INLINE): New macro. (SYSTIME_INLINE): Remove. * src/conf_post.h (INLINE): Define only if not already defined. This allows us to use a single INLINE, defined by one file per executable. * src/emacs.c (INLINE): Define it. Also, include category.h, charset.h, composite.h, dispextern.h, syntax.h, systime.h, so that their INLINE definitions are expanded properly for Emacs. * src/blockinput.h, src/keyboard.c (BLOCKINPUT_INLINE): * src/buffer.h, src/buffer.c (BUFFER_INLINE): * src/category.h, src/category.c (CATEGORY_INLINE): * src/character.h, src/character.c (CHARACTER_INLINE): * src/charset.h, src/charset.c (CHARSET_INLINE): * src/composite.h, src/composite.c (COMPOSITE_INLINE): * src/dispextern.h, src/dispnew.c (DISPEXTERN_INLINE): * src/frame.h, src/frame.c (FRAME_INLINE): * src/intervals.h, src/intervals.c (INTERVALS_INLINE): * src/keyboard.h, src/keyboard.c (KEYBOARD_INLINE): * src/lisp.h, src/alloc.c (LISP_INLINE): * src/process.h, src/process.c (PROCESS_INLINE): * src/syntax.h, src/syntax.c (SYNTAX_INLINE): * src/systime.h, src/sysdep.c (SYSTIME_INLINE): * src/termhooks.h, src/terminal.h (TERMHOOKS_INLINE): * src/window.h, src/window.c (WINDOW_INLINE): Remove. All uses replaced with INLINE.
* * src/emacs.c (usage_message): Possessive apostrophe tweak.Glenn Morris2013-09-111-3/+3
| | | | Likewise in some comments.