1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00
Commit Graph

123309 Commits

Author SHA1 Message Date
Dmitry Gutov
82d59f1b3b * lisp/progmodes/project.el: Update Commentary. 2015-11-10 02:56:55 +02:00
Dmitry Gutov
0be6fb8e17 Merge branch 'project-next' 2015-11-10 02:47:46 +02:00
Dmitry Gutov
1c72afb7aa Fold project-ask-user' into project-current'
* lisp/progmodes/project.el (project-find-functions): Remove
`project-ask-user'.
(project-ask-user): Remove function and the corresponding
`project-roots' implementation.
(project-current): Add a new argument, MAYBE-PROMPT.  Prompt the
user in case there's no project in the current directory.  Update
all callers.
2015-11-10 02:41:06 +02:00
Karl Fogel
3c3aad7335 When VC detects a conflict, specify which file
* 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.
2015-11-09 15:57:29 -06:00
Eli Zaretskii
86c19714b0 Fix assertion violation in define-key
* 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>.
2015-11-09 20:31:45 +02:00
Dima Kogan
c6c16fb3f8 Fix a memory leak in GC of font cache
* 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)
2015-11-09 18:36:05 +02:00
Paul Eggert
1087305574 Use INT_ADD_WRAPV etc. to check integer overflow
* 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.
2015-11-08 22:48:28 -08:00
Dmitry Gutov
e4c190b28d Make sure that the ignore file exists
* lisp/vc/vc.el (vc-default-ignore-completion-table):
Make sure that the ignore file exists.
2015-11-09 04:32:36 +02:00
Michael Sperber
bcca6a2a02 * gnus-sum.el (gnus-summary-backend-map): Bind B-backspace to
`gnus-summary-delete-article` in a way that also works on XEmacs.
2015-11-09 01:59:24 +00:00
Juanma Barranquero
e133eeaa97 ; ChangeLog.2 fixes 2015-11-08 23:15:25 +01:00
Simen Heggestøyl
29d740aac9 Add support for retrieving paths to JSON elements
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'.
2015-11-08 21:44:21 +01:00
Karl Fogel
5193ad1bcb * etc/NEWS: Mention new `bookmark-set-no-overwrite'.
This really should been part of my previous commit
(Sun Nov 8 14:16:43 2015 -0500, git commit 3812e17978).
2015-11-08 14:40:35 -05:00
Karl Fogel
3812e17978 Offer non-overwrite bookmark setter (Bug#15746)
* 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.
2015-11-08 14:18:53 -05:00
Paul Eggert
2ce0c0674e * src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614). 2015-11-08 10:01:00 -08:00
Alan Modra
3008c52174 ELF unexec: Don't insert a new section
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.
2015-11-08 10:01:00 -08:00
Alan Modra
0d6442265e ELF unexec: Drive from PT_LOAD header rather than sections
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)
2015-11-08 10:01:00 -08:00
Alan Modra
8285c2ab80 ELF unexec: R_*_NONE relocs
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.
2015-11-08 10:01:00 -08:00
Alan Modra
3ff9fc0e8d ELF unexec: _OBJC_ symbols in bss sections
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.
2015-11-08 10:00:59 -08:00
Alan Modra
190b968f18 ELF unexec: Symbol table patching
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.
2015-11-08 10:00:59 -08:00
Alan Modra
47c6e3035b ELF unexec: Merge Alpha and MIPS COFF debug handling
* 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.
2015-11-08 10:00:59 -08:00
Alan Modra
856f4eaba8 ELF unexec: Tidy code
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.
2015-11-08 10:00:59 -08:00
Alan Modra
0bcd08ef05 ELF unexec: Correct section header index
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.
2015-11-08 10:00:59 -08:00
Michael Albinus
82c1b368a2 Fix Bug#21841
* 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)
2015-11-08 15:22:09 +01:00
Dmitry Gutov
cad0490b01 Remove dirs in vc project roots from the the vc project library roots
* 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)
2015-11-08 14:46:22 +02:00
Dmitry Gutov
aeae5875f9 ; project-library-roots: Update docstring 2015-11-08 14:20:26 +02:00
Glenn Morris
d5f110e369 ; Auto-commit of ChangeLog files. 2015-11-08 06:23:33 -05:00
Paul Eggert
8a8613bcf4 Prefer xpalloc to doubling buffers by hand
* src/lread.c (grow_read_buffer): New function, which uses xpalloc.
(read1): Use it for simplicity.
* src/macros.c (store_kbd_macro_char):
* src/minibuf.c (read_minibuf_noninteractive):
* src/term.c (encode_terminal_code):
* src/xrdb.c (magic_db):
Prefer xpalloc to growing buffers by hand.
This doesn’t fix any bugs, but simplifies the code a bit.
2015-11-07 23:52:57 -08:00
Paul Eggert
6ea4ff5a36 Merge from gnulib
This incorporates:
2015-11-05 timespec-sub: fix overflow bug; add tests
2015-11-04 intprops: revise _WRAPV macros, revert _OVERFLOW
2015-11-03 intprops: add parentheses
* lib/intprops.h, lib/timespec-add.c, lib/timespec-sub.c:
Copy from gnulib.
2015-11-07 23:37:07 -08:00
Eli Zaretskii
b9acb9502f ;* test/automated/abbrev-tests.el: Fix a typo in a comment 2015-11-08 05:43:00 +02:00
David Reitter
35cd518145 Provide NS notification objects where required to eliminate warnings
* nsterm.m (windowDidResize:, toggleFullScreen:):
Call notification functions with notification objects
as per delegate APIs.
2015-11-07 20:46:58 -05:00
Dmitry Gutov
3a37d99e97 Move and rename xref-find-regexp to the project package
* lisp/progmodes/project.el (project-find-regexp)
(project--read-regexp)
(project--find-regexp-in): New functions.

* lisp/progmodes/xref.el (xref--find-xrefs): Extract from
xref--show-xrefs.  Use in existing callers in place of that
function.
(xref--show-xrefs): Only do the "show" part.
(xref-find-regexp): Rename, more or less, to
project-or-libraries-find-regexp.
2015-11-08 03:07:09 +02:00
Eli Zaretskii
ea88d874a4 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2015-11-07 20:05:43 +02:00
Noam Postavsky
76be8f28eb Add test for bug #21824
* test/automated/buffer-tests.el: New file.
(overlay-modification-hooks-message-other-buf): New test.
2015-11-07 20:04:00 +02:00
Kelvin White
044991f6c6 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2015-11-07 13:03:03 -05:00
Kelvin White
ae24d821fa erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 2015-11-07 13:02:26 -05:00
l3thal
7a187017d0 erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771 2015-11-07 12:54:58 -05:00
Thomas Fitzsimmons
88733e67df ; ChangeLog.2: Fix formatting of ntlm.el 2.0.0 entry 2015-11-07 09:10:20 -05:00
Thomas Fitzsimmons
2dc91e65b4 ; ChangeLog.2: Fix entry for soap-client 3.0.0 sync 2015-11-07 08:59:20 -05:00
Eli Zaretskii
0ea647d80d ; * lisp/abbrev.el (copy-abbrev-table): Remove forgotten debug code. 2015-11-07 15:50:40 +02:00
David Reitter
53def55b43 Ignore fullscreen exit notifications on NS when frame is dead
* nsterm.m (windowDidResize:,windowWillExitFullScreen:)
  (windowDidExitFullScreen:): Return if frame is dead.
  These functions may be called when a fullscreen frame
  is closed; they are called before, not after.

May address Bug#21428.
2015-11-07 08:40:13 -05:00
Eli Zaretskii
fc61ea4fd7 Speed up lookup in redisplay--variables
* lisp/frame.el (redisplay--variables): Make it a hash-table.

* src/xdisp.c (maybe_set_redisplay): Access redisplay--variables
as a hash-table.  This speeds up this function by an order of
magnitude: where previously a setq was slowed down by 100% by
introducing the maybe_set_redisplay test, it is now only 5%
slower.
(syms_of_xdisp) <redisplay--variables>: Doc fix.
2015-11-07 15:32:45 +02:00
Artur Malabarba
b74c8847e8 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug
The defsubst was being created as:
    (cl-defsubst name (args) ("DOC") ...)

* test/automated/cl-lib-tests.el (cl-lib-struct-constructors): Add test
2015-11-07 13:55:16 +00:00
Mihai Olteanu
e21e3b6ba9 Update doc string of hexl-mode
* lisp/hexl.el (hexl-mode): Doc fix.  (Bug#21800)

Copyright-paperwork-exempt: yes
2015-11-07 14:35:10 +02:00
Eli Zaretskii
bede518c38 Fix error in copy-abbrev-table
* lisp/abbrev.el (define-abbrev): Don't erase the :abbrev-table-modiff
property of the abbrev-table.  (Bug#21828)

* test/automated/abbrev-tests.el: New file.
2015-11-07 13:32:33 +02:00
Michael Albinus
b29be62888 Add test to auto-revert-tests.el for Bug#21841
* test/automated/auto-revert-tests.el
(auto-revert-test01-auto-revert-several-files): New test.
(auto-revert-test02-auto-revert-tail-mode)
(auto-revert-test03-auto-revert-mode-dired): Rename them.
2015-11-07 11:05:03 +01:00
Martin Rudalics
07178f43e1 * doc/lispref/windows.texi (Coordinates and Windows): Fix typo. 2015-11-07 09:19:03 +01:00
Martin Rudalics
e5a98644f8 In x_consider_frame_title don't set title of tooltip frames
* src/xdisp.c (x_consider_frame_title): Return immediately for
tooltip frames to avoid displaying empty tooltips.
2015-11-07 08:51:28 +01:00
Anders Lindgren
60959975b1 Fixed NextStep fullscreen problem (bug#21770).
* nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen
frames.
2015-11-06 22:39:02 +01:00
Eli Zaretskii
19e09cfab6 Ensure redisplay after evaluation
* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Revert
last change.
* lisp/frame.el (redisplay--variables): Populate the
redisplay--variables list.
* src/xdisp.c (maybe_set_redisplay): New function.
(syms_of_xdisp) <redisplay--variables>: New variable.
* src/window.h (maybe_set_redisplay): Declare prototype.
* src/data.c (set_internal): Call maybe_set_redisplay.  (Bug#21835)
2015-11-06 21:21:52 +02:00
Artur Malabarba
8025fdbbea * test/automated/subr-tests.el (subr-test-when): Fix again 2015-11-06 16:18:32 +00:00