1. 10 Nov, 2015 18 commits
  2. 09 Nov, 2015 6 commits
    • Karl Fogel's avatar
      When VC detects a conflict, specify which file · 3c3aad73
      Karl Fogel authored
      * lisp/vc/vc.el (vc-message-unresolved-conflicts): New function.
      * lisp/vc/vc-svn.el (vc-svn-find-file-hook):
      * lisp/vc/vc-hg.el (vc-hg-find-file-hook):
      * lisp/vc/vc-bzr.el (vc-bzr-find-file-hook):
      * lisp/vc/vc-git.el (vc-git-find-file-hook): Use above new function
        to display a standard message that specifies the conflicted file.
      
      Before this change, the message VC used for indicating a conflicted
      file was just "There are unresolved conflicts in this file" without
      naming the file (and this language was duplicated in several places).
      After this change, it's "There are unresolved conflicts in file FOO"
      (and this language is now centralized in one function in vc.el).
      
      Justification: It's important for the message to name the conflicted
      file because the moment when VC realizes a file is conflicted does not
      always come interactively.  For example, some people automatically
      find a set of Org Mode files on startup, and may keep those .org files
      under version control.  If any of the files are conflicted, the user
      just sees some messages fly by, and might later check the "*Messages*"
      buffer to find out what files were conflicted.  I'm not saying this
      happened to me or anything; it's a purely hypothetical example.
      3c3aad73
    • Eli Zaretskii's avatar
      Fix assertion violation in define-key · 86c19714
      Eli Zaretskii authored
      * src/keymap.c (store_in_keymap): Don't use XFASTINT on non-character
      objects.  Reported by Drew Adams <drew.adams@oracle.com>
      and Juanma Barranquero <lekktu@gmail.com>.
      86c19714
    • Dima Kogan's avatar
      Fix a memory leak in GC of font cache · c6c16fb3
      Dima Kogan authored
      * src/alloc.c (compact_font_cache_entry): Don't GC unmarked font
      entities if some of the fonts it references are marked.  This
      plugs a memory leak.  (Bug#21556)
      c6c16fb3
    • Paul Eggert's avatar
      Use INT_ADD_WRAPV etc. to check integer overflow · 10873055
      Paul Eggert authored
      * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string):
      * src/buffer.c (record_overlay_string, overlay_strings):
      * src/casefiddle.c (casify_object):
      * src/ccl.c (Fccl_execute_on_string):
      * src/character.c (char_width, c_string_width, lisp_string_width)
      (count_size_as_multibyte, string_escape_byte8):
      * src/coding.c (coding_alloc_by_realloc, produce_chars):
      * src/data.c (arith_driver):
      * src/dispnew.c (realloc_glyph_pool, init_display):
      * src/editfns.c (styled_format):
      * src/fns.c (Ffillarray):
      * src/ftfont.c (ftfont_shape_by_flt):
      * src/gnutls.c (gnutls_hex_string):
      * src/gtkutil.c (get_utf8_string):
      * src/image.c (x_to_xcolors, x_detect_edges, png_load_body):
      * src/keymap.c (Fkey_description):
      * src/lisp.h (SAFE_ALLOCA_LISP):
      * src/term.c (encode_terminal_code):
      * src/tparam.c (tparam1):
      * src/xselect.c (x_property_data_to_lisp):
      * src/xsmfns.c (smc_save_yourself_CB):
      * src/xterm.c (x_term_init):
      When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to
      more-complicated code involving division and/or
      INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and
      subtraction and/or INT_ADD_OVERFLOW.
      * src/casefiddle.c (casify_object): Simplify multibyte size check.
      * src/character.c: Remove some obsolete ‘#ifdef emacs’s.
      * src/data.c (arith_driver): Also check for division overflow,
      as that’s now possible given that the accumulator can now contain
      any Emacs integer.
      * src/lisp.h (lisp_word_count): Remove; no longer used.
      10873055
    • Dmitry Gutov's avatar
      Make sure that the ignore file exists · e4c190b2
      Dmitry Gutov authored
      * lisp/vc/vc.el (vc-default-ignore-completion-table):
      Make sure that the ignore file exists.
      e4c190b2
    • Michael Sperber's avatar
      * gnus-sum.el (gnus-summary-backend-map): Bind B-backspace to · bcca6a2a
      Michael Sperber authored
      `gnus-summary-delete-article` in a way that also works on XEmacs.
      bcca6a2a
  3. 08 Nov, 2015 16 commits
    • Juanma Barranquero's avatar
      ; ChangeLog.2 fixes · e133eeaa
      Juanma Barranquero authored
      e133eeaa
    • Simen Heggestøyl's avatar
      Add support for retrieving paths to JSON elements · 29d740aa
      Simen Heggestøyl authored
      Add support for retrieving the path to a JSON element. This can for
      instance be useful to retrieve paths in deeply nested JSON
      structures.
      
      * lisp/json.el (json-pre-element-read-function)
      (json-post-element-read-function): New variables to hold pre- and post
      read callback functions for `json-read-array' and `json-read-object'.
      (json--path): New variable used internally by `json-path-to-position'.
      (json--record-path, json--check-position): New functions used
      internally by `json-path-to-position'.
      (json-path-to-position): New function for retrieving the path to a
      JSON element at a given position.
      (json-read-object, json-read-array): Call
      `json-pre-element-read-function' and `json-post-element-read-function'
      when set.
      
      * test/automated/json-tests.el (test-json-path-to-position-with-objects)
      (test-json-path-to-position-with-arrays)
      (test-json-path-to-position-no-match): New tests for
      `json-path-to-position'.
      29d740aa
    • Karl Fogel's avatar
      * etc/NEWS: Mention new `bookmark-set-no-overwrite'. · 5193ad1b
      Karl Fogel authored
      This really should been part of my previous commit
      (Sun Nov 8 14:16:43 2015 -0500, git commit 3812e179).
      5193ad1b
    • Karl Fogel's avatar
      Offer non-overwrite bookmark setter (Bug#15746) · 3812e179
      Karl Fogel authored
      * lisp/bookmark.el (bookmark-set-internal): New helper function to do
        what `bookmark-set' used to do, but with more choices for overwrite
        vs push, and with minor changes to the interactive prompt format.
        (bookmark-set): Rewrite as wrapper around above.
        If overwriting, inform the user of that in the prompt.
        (bookmark-set-no-overwrite): New function, also done as wrapper.
        Bind to "M" in `ctl-x-r-map' autoloads.
        (bookmark-map): Similarly bind "M" here.
      3812e179
    • Paul Eggert's avatar
    • Alan Modra's avatar
      ELF unexec: Don't insert a new section · 3008c521
      Alan Modra authored
      Reuse the .bss section instead, making it SHT_PROGBITS.  This way we
      don't need to mess with symbol st_shndx, or section sh_link and
      sh_info.
      
      This does lead to eu-elflint complaints about symbols defined in .bss
      with a needed version, because normally it is undefined symbols that
      have needed versions;  Defined symbols have version definitions.
      The exception is symbols defined by the linker in .dynbss for
      variables copied from a shared library in order to avoid text
      relocations, with copy relocs to copy their initial values from the
      shared library.  These symbols are both defined and have needed
      versions, and eu-elflink only expects to see them in SHT_NOBITS
      sections.  Of course there is no real problem with having such symbols
      in SHT_PROGBITS sections.  glibc ld.so handles them fine.
      
      * unexelf.c: Delete outdated comments.
      (PATCH_INDEX): Delete.
      (find_section): Delete.
      (unexec): Don't add a new section.  Instead reuse the last bss
      section, extending it to cover dumped data.  Make bss sections
      SHT_PROGBITS.  Remove all patching of sh_link, sh_info and
      st_shndx.  Rename bss sections.
      3008c521
    • Alan Modra's avatar
      ELF unexec: Drive from PT_LOAD header rather than sections · 0d644226
      Alan Modra authored
      This rewrites bss handling in the ELF unexec code.  Finding bss
      sections by name results in complicated code that
      - does not account for all names of possible bss sections,
      - assumes specific ordering of bss sections,
      - can wrongly choose a SHT_NOBITS section not in the bss segment,
      - incorrectly calculates bss size (no accounting for alignment gaps),
      - assumes .data and .bss are in the same segment.
      
      All of these problems and more are solved by finding the bss segment
      in PT_LOAD headers, ie. the address range included in p_memsz but not
      p_filesz of the last PT_LOAD header, then matching SHT_NOBITS sections
      in that address range.
      
      * unexelf.c: Delete old ppc comment.
      (OLD_PROGRAM_H): Define.
      (round_up): Delete.
      (unexec): Don't search for bss style sections by name.  Instead,
      use the last PT_LOAD header address range covered by p_memsz
      but not p_filesz and match any SHT_NOBITS section in that
      address range.  Simplify initialisation of section header vars.
      Don't assume that section headers are above bss segment.  Move
      copying of bss area out of section loop.  Align .data2 section
      to 1, since it now covers the entire bss area.  For SHT_NOBITS
      sections in the bss segment, leave sh_addr and sh_addralign
      unchanged, but correct sh_offset.  Clear memory corresponding
      to SHT_NOBITS .plt section.  Delete comment and hacks for
      sections partly overlapping bss range now that the full range
      is properly calculated.  Delete now dead .sbss code.
      (Bug#20614)
      0d644226
    • Alan Modra's avatar
      ELF unexec: R_*_NONE relocs · 8285c2ab
      Alan Modra authored
      These should be ignored on all targets.
      
      * unexelf.c (unexec): Ignore R_*_NONE relocs for any target,
      not just Alpha.  Comment on reloc size assumption.
      8285c2ab
    • Alan Modra's avatar
      ELF unexec: _OBJC_ symbols in bss sections · 3ff9fc0e
      Alan Modra authored
      This code assumed that there was only one bss section.  Rather than
      checking for a particular index, check the section type.  Also, handle
      the possibility that the section was SHT_NOBITS originally and is
      unchanged, in which case no clearing is needed (and sh_offset isn't
      necessarily valid, which can lead to a wild memset).
      
      * unexelf.c (unexec): Properly handle _OBJC_ symbols in bss sections.
      3ff9fc0e
    • Alan Modra's avatar
      ELF unexec: Symbol table patching · 190b968f
      Alan Modra authored
      No st_shndx value larger than SHN_LORESERVE should be changed.
      * unexelf.c (unexec): Don't adjust any st_shndx larger than
      SHN_LORESERVE.  Error on SHN_XINDEX.
      190b968f
    • Alan Modra's avatar
      ELF unexec: Merge Alpha and MIPS COFF debug handling · 47c6e303
      Alan Modra authored
      * unexelf.c (unexec): Merge Alpha and MIPS COFF debug handling.
      Don't find .mdebug section index, find the section in the loop.
      Allow for unlikely possibility that .mdebug is located at sh_offset
      before bss segment, by calculating move from difference in
      sh_offset rather than just assuming new_data2_size.  Simplify
      cbLineOffset handling.
      47c6e303
    • Alan Modra's avatar
      ELF unexec: Tidy code · 856f4eab
      Alan Modra authored
      Separate out some of the more mechanical changes so following patches
      are smaller.
      
      * unexelf.c (unexec): Rearrange initialisation of program
      header vars.  Use pointer vars in loops rather than indexing
      section header array via macros.  Simplify _OBJC_ sym code
      and reloc handling code.
      856f4eab
    • Alan Modra's avatar
      ELF unexec: Correct section header index · 0bcd08ef
      Alan Modra authored
      First a small fix.  The code incorrectly uses "NEW_SECTION_H (n)" when
      it should have been using "NEW_SECTION_H (nn)" to find the name of the
      section currently being processed.  Of course, before the bss
      sections, n and nn have the same value, so this doesn't matter except
      in the case of .sbss.  For .sbss this probably meant .bss (most likely
      the next section) was copied from memory.  A later patch removes the
      bogus .sbss handling anyway.
      
      * unexelf.c (unexec): Use correct index to look up names.
      0bcd08ef
    • Michael Albinus's avatar
      Fix Bug#21841 · 82c1b368
      Michael Albinus authored
      * lisp/filenotify.el (file-notify--rm-descriptor):
      Use `descriptor' instead of computing its value.
      (file-notify--descriptor): Additional argument FILE.  Adapt all callees.
      (file-notify-rm-watch): Use `descriptor' when calling file name handler.
      (Bug#21841)
      82c1b368
    • Dmitry Gutov's avatar
      Remove dirs in vc project roots from the the vc project library roots · cad0490b
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-library-roots): Remove
      directories inside the project roots from the result.
      (http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00536.html)
      cad0490b
    • Dmitry Gutov's avatar
      ; project-library-roots: Update docstring · aeae5875
      Dmitry Gutov authored
      aeae5875