1. 14 Sep, 2016 1 commit
    • Eli Zaretskii's avatar
      Avoid aborts in GC due to abort_on_gc · 5ad238bf
      Eli Zaretskii authored
      * src/lisp.h:
      * src/print.c (Fprin1_to_string):
      * src/eval.c (signal_or_quit):
      * src/alloc.c (garbage_collect_1): Remove declarations, setting,
      and testing the value of abort_on_gc.  It is no longer needed, and
      using it causes rare aborts in GC for no good reason.  (Bug#23912)
      5ad238bf
  2. 13 Sep, 2016 1 commit
  3. 12 Sep, 2016 4 commits
  4. 11 Sep, 2016 1 commit
    • Paul Eggert's avatar
      copy-file now uses GNU/Linux file cloning · 9b21d9f9
      Paul Eggert authored
      From a suggestion by Kieran Colford (see Bug#23904).
      * configure.ac: Check for linux/fs.h.
      * src/fileio.c [HAVE_LINUX_FS_H]: Include sys/ioctl.h and linux/fs.h.
      (clone_file): New function.
      (Fcopy_file): Use it.
      9b21d9f9
  5. 10 Sep, 2016 1 commit
  6. 09 Sep, 2016 4 commits
    • Michal Nazarewicz's avatar
      Remove dead loop iterations in regex.c · 0e7eb640
      Michal Nazarewicz authored
      RE_CHAR_TO_MULTIBYTE(c) yields c for ASCII characters and a byte8
      character for c ≥ 0x80.  Furthermore, CHAR_BYTE8_P(c) is true only
      for byte8 characters.  This means that
      
      	c = RE_CHAR_TO_MULTIBYTE (ch);
      	if (! CHAR_BYTE8_P (c) && re_iswctype (c, cc))
      
      is equivalent to:
      
      	c = c;
      	if (! false && re_iswctype (c, cc))
      
      for 0 ⪬ c < 0x80, and
      
      	c = BYTE8_TO_CHAR (c);
      	if (! true && re_iswctype (c, cc))
      
      for 0x80 ⪬ c < 0x100.  In other words, the loop never executes for
      c ≥ 0x80 and RE_CHAR_TO_MULTIBYTE call is unnecessary for c < 0x80.
      
      * src/regex.c (regex_compile): Simplyfy a for loop by eliminating
      dead iterations and unnecessary macro calls.
      0e7eb640
    • Michal Nazarewicz's avatar
      Replace decimalnump with alphanumericp · c579b28f
      Michal Nazarewicz authored
      decimalnump was used in regex.c only in ISALNUM macro which ored it with
      alphabeticp.  Because both of those functions require Unicode general
      category lookup, this resulted in unnecessary lookups (if alphabeticp
      return false decimalp had to perform another lookup).  Drop decimalnump
      in favour of alphanumericp which combines decimelnump with alphabeticp.
      
      * src/character.c (decimalnump): Remove in favour of…
      (alphanumericp): …new function.
      
      * src/regex.c (ISALNUM): Use alphanumericp.
      c579b28f
    • Michal Nazarewicz's avatar
      Remove inaccurate comment in regex.c · b1c4c005
      Michal Nazarewicz authored
      * src/regex.c (regex_compile): Remove comment indicating that wctype of
      some character classes may be negative.  All wctypes are in fact
      non-negative.
      b1c4c005
    • Michal Nazarewicz's avatar
      STRING_CHAR does not unify characters; update documentation · 3ffc5f44
      Michal Nazarewicz authored
      * src/character.h (STRING_CHAR): Update doc.
      * src/buffer.h (FETCH_MULTIBYTE_CHAR): Update doc.  While at it, change
      the function to use BYTE_POS_ADDR instead of open-coding it.
      3ffc5f44
  7. 08 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Port flexible array members to GCC + valgrind · d2f1971d
      Paul Eggert authored
      These changes are needed to conform to the C standard's rule for
      allocating structs containing flexible array members.  C11 says
      that malloc (offsetof (struct s, m) + n) does not suffice to
      allocate a struct with an n-byte tail; instead, malloc’s arg
      should be rounded up to the nearest multiple of alignof (struct s).
      Although this is arguably a defect in C11, gcc -O2 + valgrind
      sometimes complains when this rule is violated, and when debugging
      it’s better to keep valgrind happy.
      For details please see the thread containing the message at:
      https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html
      * lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c:
      Include flexmember.h.
      * lib-src/ebrowse.c (add_sym, add_member, make_namespace)
      (register_namespace_alias):
      * src/alloc.c (SDATA_SIZE, allocate_string_data):
      * src/image.c (xpm_cache_color, imagemagick_create_cache):
      * src/process.c (Fmake_network_process):
      Use FLEXSIZEOF instead of offsetof and addition.
      * src/alloc.c (SDATA_SIZE, vector_alignment):
      Use FLEXALIGNOF instead of sizeof (ptrdiff_t).
      * src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR):
      Remove, as alloc.c can now calculate this on its own.
      d2f1971d
  8. 07 Sep, 2016 1 commit
    • Paul Eggert's avatar
      Use DEV_TTY more consistently · 5d2ac743
      Paul Eggert authored
      * src/conf_post.h (DEV_TTY): Move from here ...
      * src/keyboard.c, src/keyboard.h: ... to here, as it doesn’t need
      to be visible everywhere.  Make it a constant.
      * src/keyboard.c (handle_interrupt, Fset_quit_char):
      * src/process.c (create_process): Prefer DEV_TTY to "/dev/tty".
      5d2ac743
  9. 06 Sep, 2016 1 commit
    • Eli Zaretskii's avatar
      Avoid assertion violations when using marker positions · 644f77b5
      Eli Zaretskii authored
      * src/intervals.c (set_point_from_marker): If MARKER comes from
      another buffer, recalculate its byte position before using it to
      set point.
      * src/marker.c (set_marker_internal): If POSITION is a marker from
      another buffer, recalculate its byte position before using it.
      (Bug#24368)
      644f77b5
  10. 05 Sep, 2016 2 commits
    • Eli Zaretskii's avatar
      Avoid assertion violations when scrolling narrowed buffer · 6acff252
      Eli Zaretskii authored
      * src/window.c (window_scroll_pixel_based):
      * src/xdisp.c (pos_visible_p): Don't allow simulated redisplay to
      start outside the accessible portion of the buffer.  This avoids
      assertion violations when some Lisp narrows the buffer to less
      than the current window, and then attempts to scroll the buffer.
      6acff252
    • Eli Zaretskii's avatar
      Treat SIGINT correctly in GUI sessions on MS-Windows · cfaf18a2
      Eli Zaretskii authored
      * src/w32proc.c (sys_signal): Don't reject SIGINT, as it is
      supported by MS runtime.
      * src/term.c (DEV_TTY): Move from here ...
      * src/conf_post.h (DEV_TTY): ... to here.  Separate definitions
      for WINDOWSNT and for the rest.
      * src/keyboard.c (handle_interrupt_signal): Use DEV_TTY instead of
      a literal "/dev/tty".
      
      * etc/NEWS: Mention the behavior change.
      cfaf18a2
  11. 04 Sep, 2016 1 commit
  12. 02 Sep, 2016 2 commits
    • Stefan Monnier's avatar
      Check actual contents before promting about changed file · 5a4bffb6
      Stefan Monnier authored
      * lisp/userlock.el (userlock--check-content-unchanged)
      (userlock--ask-user-about-supersession-threat): New functions.
      * src/filelock.c (lock_file): Use them to avoid spurious prompting.
      * doc/lispref/buffers.texi (Modification Time): Update doc of
      ask-user-about-supersession-threat.
      5a4bffb6
    • Paul Eggert's avatar
      Don’t create fd >= FD_SETSIZE · a5509099
      Paul Eggert authored
      This avoids a potential crash if too many subprocesses (Bug#24325).
      * src/process.c [HAVE_SETRLIMIT]: Include <sys/resource.h>.
      (init_process_emacs): If ulimit -n is greater than FD_SETSIZE,
      set it to FD_SETSIZE.
      a5509099
  13. 01 Sep, 2016 1 commit
  14. 31 Aug, 2016 2 commits
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      Minor doc quoting fixes · 6f40b8b2
      Paul Eggert authored
      * doc/misc/htmlfontify.texi (Interactive):
      * lisp/htmlfontify.el (htmlfontify-buffer):
      Spell out character names, for clarity.  The old doc string
      generated the *Help* text ‘^L ([FF]) or ¤ (244)’, where ‘[FF]’
      stands for a form feed character; this was confusing.
      * lisp/electric.el (electric-quote-mode):
      * src/doc.c (syms_of_doc):
      * src/editfns.c (Fformat_message):
      Remove no-longer-necessary ‘\=’s in doc strings.
      6f40b8b2
  15. 29 Aug, 2016 2 commits
  16. 28 Aug, 2016 1 commit
    • Paul Eggert's avatar
      Memory allocator alignment fixes · 7fcce24e
      Paul Eggert authored
      These changes remove some assumptions about heap allocator
      alignment that may not be true on unusual platforms.
      * src/alloc.c (POWER_OF_2): New macro.
      (ROUNDUP): Use it.
      (BLOCK_ALIGN): Verify that it is a power of 2.
      (aligned_alloc): Check that alignment passed to posix_memalign
      satisfies POSIX restrictions.
      (lisp_align_malloc): Check that size passed to aligned_alloc
      satisfies C11 restrictions.
      (MALLOC_IS_GC_ALIGNED): Check that GCALIGNMENT is 8, since the
      code has not been verified to work with other GCALIGNMENT values
      and the ice is thin here.  On GNU/Linux, malloc can return a value
      that is a multiple of 8 but not 16, even though __alignof__
      (max_align_t) is 16.  See:
      https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01902.html
      (lmalloc) [USE_ALIGNED_ALLOC]: Use aligned_alloc only if size
      is a multiple of alignment, since C11 says the behavior is
      undefined otherwise.
      (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in
      general this macro is restricted to signed types.  Remove
      assertion that the result is a multiple of GCALIGNMENT, as that
      need not be true.
      7fcce24e
  17. 25 Aug, 2016 1 commit
  18. 24 Aug, 2016 2 commits
    • Alan Third's avatar
      Fix macOS 12 deprecation notices · 53328576
      Alan Third authored
      * src/nsterm.h: Add #defines to allow older versions of macOS to use the
      new constant names.
      * src/nsmenu.m: Replace old constant names with
      new.
      (fillWithWidgetValue): Remove calls to deprecated
      setMenuChangedMessagesEnabled.
      * src/nsterm.m: Replace old constant names with new.
      * src/nsfns.m: Replace old constant names with new.
      53328576
    • Noah Friedman's avatar
      * src/xfns.c (Fx_change_window_property): Modify previous change. · 90d258c5
      Noah Friedman authored
      Instead of forcing format to 8 for strings, check that the length of
      the string is appropriate for whatever format given.
      (Fx_window_property_attributes): If prop isn't found on frame's inner window,
      try its outer window.  This mimics the behavior of Fx_window_property.
      90d258c5
  19. 22 Aug, 2016 2 commits
  20. 21 Aug, 2016 4 commits
    • Noah Friedman's avatar
      Fix interpretation of signed vs unsigned values when retrieving X · 7a6b3d0f
      Noah Friedman authored
      Window properties, and make sure the full value is returned when not
      parsed.
      
      New subr to export type and format information about X Window
      properties to lisp.
      
      * src/xselect.c (selection_data_to_lisp_data): Treat any data as
      unsigned unless its actual type is INTEGER.
      CARDINALs, in particular, are unsigned.
      
      * src/xfns.c (Fx_change_window_property): If value is a string, ignore
      any provided format and force to 8.
      (x_window_property_intern): If returning value as a string, the length
      is actual_size times the actual format of each element, which is not
      necessarily bytes.
      (Fx_window_property_attributes): New subr.
      (syms_of_xfns): Declare it.
      7a6b3d0f
    • Paul Eggert's avatar
      ; ChangeLog spelling fixes · 73cbb813
      Paul Eggert authored
      73cbb813
    • Paul Eggert's avatar
      Minor text-quoting-style fixes · b1601a95
      Paul Eggert authored
      * src/charset.c (check_iso_charset_parameter):
      * src/frame.c (store_frame_param):
      * src/xselect.c (x_fill_property_data):
      Use grave accent for left single quote in ‘error’ format strings.
      b1601a95
    • Martin Rudalics's avatar
      Fix semantics of 'minibuffer' frame parameter · 1a1062d6
      Martin Rudalics authored
      The 'minibuffer' frame parameter is now t for a normal frame
      (a frame with a root window plus a minibuffer window) and the
      frame's minibuffer window for a minibuffer-less frame (a frame
      whose minibuffer window is on another frame).  See also:
      https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg01259.html
      
      * src/frame.c (make_frame, make_frame_without_minibuffer)
      (make_minibuffer_frame): When assigning the frame's minibuffer
      window also store corresponding 'minibuffer' frame parameter.
      (store_frame_param): Move the 'minibuffer' parameter checks to
      the beginning so we can silently override the value before it
      gets stored in the parameter alist.  Fix error handling.
      (Fframe_parameters): Return value of 'minibuffer' parameter
      unmodified.
      
      * lisp/frameset.el (frameset-filter-minibuffer): When the cdr of
      the parameter is a minibuffer window, save (minibuffer . nil)
      instead of (minibuffer . t).
      (frameset--reuse-frame): To find a non-minibuffer-only frame
      look out for a frame whose 'minibuffer' parameter is t instead
      of that frame's minibuffer window.
      (frameset-minibufferless-first-p): To find a minibuffer-less
      frame look out for a frame whose 'minibuffer' parameter is a
      window instead of nil.
      1a1062d6
  21. 20 Aug, 2016 1 commit
    • Philipp Stephani's avatar
      Some assorted documentation clarifications · 9b99772c
      Philipp Stephani authored
      * src/fileio.c (Fwrite_region): Clarify that END is ignored if
      START is nil.
      * src/editfns.c (Fbuffer_size): Add short discussion about
      narrowing.
      * src/callproc.c (Fcall_process_region): Discuss behavior when
      START and END are not buffer positions.
      9b99772c
  22. 18 Aug, 2016 1 commit
    • Eli Zaretskii's avatar
      Improve commentary in src/character.h · 37d4723f
      Eli Zaretskii authored
      * src/character.h (BYTES_BY_CHAR_HEAD, MULTIBYTE_LENGTH)
      (MULTIBYTE_LENGTH_NO_CHECK, STRING_CHAR_AND_LENGTH): Remove stale
      info from commentary and improve it.
      37d4723f
  23. 17 Aug, 2016 1 commit
  24. 16 Aug, 2016 2 commits