- 31 Aug, 2014 2 commits
-
-
Ken Brown authored
* src/gmalloc.c: Don't include <stdlib.h>. Declare system malloc and friends before defining hybrid_malloc and friends if HYBRID_MALLOC is defined. (Bug#18368)
-
Paul Eggert authored
Needed on AIX when 'configure' infers MAKE=gmake.
-
- 30 Aug, 2014 6 commits
-
-
Paul Eggert authored
-
Paul Eggert authored
It's not safe to call qsort or qsort_r, since they have undefined behavior if the user-specified predicate is not a total order. Also, watch out for garbage-collection while sorting vectors. * admin/merge-gnulib (GNULIB_MODULES): Add vla. * configure.ac (qsort_r): Remove, as we no longer use qsort-like functions. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/vla.h, m4/vararrays.m4: New files, copied from gnulib. * lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating: 2014-08-29 qsort_r: new module, for GNU-style qsort_r The previous two files' changes are boilerplate generated by admin/merge-gnulib, and should not affect Emacs. * src/fns.c: Include <vla.h>. (sort_vector_predicate) [!HAVE_QSORT_R]: Remove. (sort_vector_compare): Remove, replacing with .... (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy): ... these new functions. (sort_vector): Rewrite to use the new functions. GCPRO locals, since the predicate can invoke the GC. Since it's in-place return void; caller changed. (merge): Use 'inorder', for clarity. Fixes: debbugs:18361
-
Paul Eggert authored
One can't hoist this out of the 'if', because intervening calls to newlocale, twolower, etc. can change errno.
-
Eli Zaretskii authored
-
Eli Zaretskii authored
-
Eli Zaretskii authored
src/sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the wording of the error messages. (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings sets errno. src/w32proc.c (get_lcid_callback): Accept locale specifications without the country part, as in "enu" vs "enu_USA". (w32_compare_strings): Signal an error if a locale was specified, but couldn't be translated into a valid LCID.
-
- 29 Aug, 2014 17 commits
-
-
Leo Liu authored
-
Michael Albinus authored
-
Michael Heerdegen authored
name instead of variable name in hook docstring. (Bug#18349)
-
Paul Eggert authored
errno's value is not specified after towlower_l. Instead, assume that towlower_l returns its argument on failure, which is portable in practice.
-
Eli Zaretskii authored
src/fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix. src/w32proc.c (w32_compare_strings): Accept additional argument IGNORE_CASE. Set up the flags for CompareStringW to ignore case if requested. If w32-collate-ignore-punctuation is non-nil, add NORM_IGNORESYMBOLS to the flags. (LINGUISTIC_IGNORECASE): Define if not already defined. (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable. src/sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface change. src/w32.h: Adjust prototype of w32_compare_strings. etc/NEWS: Mention w32-collate-ignore-punctuation. Fixes: debbugs:18051
-
Eli Zaretskii authored
-
Eli Zaretskii authored
-
Michael Albinus authored
-
Michael Albinus authored
* fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Add optional arguments LOCALE and IGNORE-CASE. * lisp.h (str_collate): Adapt argument list. * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l): Define substitutes for platforms that lack them. (str_collate): Add arguments locale and ignore_case.
-
Dmitry Antipov authored
-
Dmitry Antipov authored
* sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]: Conditionally define to match system's qsort_r signature. (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
-
Dmitry Antipov authored
-
Dmitry Antipov authored
description of sort ... * doc/lispref/sequences.texi (Sequence Functions): ... and generalize it for sequences. Add an example. * src/fns.c (Fsort): Use more natural Qsequencep error. * test/automated/fns-tests.el (fns-tests-sort): Minor style rewrite.
-
Martin Rudalics authored
* window.el (display-buffer-at-bottom): Prefer bottom-left window to other bottom windows. Reuse a bottom window if it shows the buffer already. Suggested by Juri Linkov <juri@jurta.org> in discussion of (Bug#18181).
-
Dmitry Antipov authored
* configure.ac (AC_CHECK_FUNCS): Check for qsort_r. * src/fns.c (sort_vector, sort_vector_compare): New functions. (sort_list): Likewise, refactored out of ... (Fsort): ... adjusted user. Mention vectors in docstring. (sort_vector_predicate) [!HAVE_QSORT_R]: New variable. * src/alloc.c (make_save_int_obj): New function. * src/lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ. (make_save_int_obj): Add prototype. * test/automated/fns-tests.el (fns-tests-sort): New test.
-
Michael Albinus authored
-
Leo Liu authored
append to minibuffer-setup-hook. Fixes: debbugs:18341
-
- 28 Aug, 2014 11 commits
-
-
Stefan Monnier authored
-
Stefan Monnier authored
byte-compiler. (lookup-syntax-properties): Silence byte-compiler. (c-lang-defconst): Quote the code with `lambda' rather than with `quote'. (c-lang-const): Avoid unneeded setq. (c-lang-constants-under-evaluation): Add docstring. (c-lang--novalue): New constant. (c-find-assignment-for-mode): Use it instead of c-lang-constants. (c-get-lang-constant): Same here. Get the mode's value using `funcall' now that the code is quoted with `lambda'.
-
Michael Albinus authored
Fixes: debbugs:18326
-
Martin Rudalics authored
-
Ken Brown authored
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.
-
Martin Rudalics authored
* w32term.c (w32_horizontal_scroll_bar_handle_click): In `event->y' return entire range (the size of the scroll bar minus that of the thumb). * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole' return entire range (the scaled size of the scroll bar minus that of the slider). In `portion' return the scaled position of the slider. (xaw_jump_callback): Restore part of code for vertical scroll bar broken in change from 2014-07-27. (xaw_scroll_callback): Provide incremental scrolling with horizontal scroll bars. (x_scroll_bar_handle_click): Fix typo introduced in change from 2014-07-27. * scroll-bar.el (scroll-bar-horizontal-drag-1): Handle new interpretation of `portion-whole'.
-
Glenn Morris authored
* Makefile.in (appdatadir): New variable. (install-etc, uninstall, clean): Handle etc/emacs.appdata.xml.
-
Glenn Morris authored
-
Glenn Morris authored
See the interminable bug discussion if you have nothing better to do.
-
Glenn Morris authored
Ref: http://people.freedesktop.org/~hughsient/appdata/ The description is adapted from the Emacs homepage.
-
Paul Eggert authored
Fixes: debbugs:18051
-
- 27 Aug, 2014 4 commits
-
-
Eli Zaretskii authored
src/syntax.c (scan_lists): Don't examine positions before BEGV.
-
Paul Eggert authored
* configure.ac (newlocale): Check for this, not for uselocale. * src/sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t) (newlocale, wcscoll_l): Define substitutes for platforms that lack them, so as to simplify the mainline code. (str_collate): Simplify the code by assuming the above definitions. Use wcscoll_l, not uselocale, as uselocale is too fragile. For example, the old version left the Emacs in the wrong locale if wcscoll reported an error. Use 'int', not ptrdiff_t, for the int result. Report an error if newlocale fails. Fixes: debbugs:18051
-
Michael Albinus authored
* sysdep.c (str_collate): Return int. (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
-
Dmitry Antipov authored
Vinternal__top_level_message, as suggested by Stefan Monnier in http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html All related users changed. * lisp/startup.el (normal-top-level): Now use internal--top-level-message. * doc/lispref/eval.texi (Eval): Mention possible recovery from stack overflow.
-