Karl Fogel [Sun, 8 Nov 2015 19:16:43 +0000 (14:16 -0500)]
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.
Alan Modra [Sun, 8 Nov 2015 17:29:00 +0000 (09:29 -0800)]
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.
Alan Modra [Sun, 8 Nov 2015 17:29:00 +0000 (09:29 -0800)]
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)
Alan Modra [Sun, 8 Nov 2015 17:29:00 +0000 (09:29 -0800)]
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.
Alan Modra [Sun, 8 Nov 2015 17:29:00 +0000 (09:29 -0800)]
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.
Alan Modra [Sun, 8 Nov 2015 17:28:59 +0000 (09:28 -0800)]
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.
Alan Modra [Sun, 8 Nov 2015 17:28:59 +0000 (09:28 -0800)]
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.
Alan Modra [Sun, 8 Nov 2015 17:28:59 +0000 (09:28 -0800)]
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.
Michael Albinus [Sun, 8 Nov 2015 14:22:09 +0000 (15:22 +0100)]
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)
Paul Eggert [Sun, 8 Nov 2015 07:52:17 +0000 (23:52 -0800)]
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.
David Reitter [Sat, 7 Nov 2015 13:32:59 +0000 (08:32 -0500)]
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.
Eli Zaretskii [Sat, 7 Nov 2015 13:32:45 +0000 (15:32 +0200)]
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.
Eli Zaretskii [Fri, 6 Nov 2015 15:19:39 +0000 (17:19 +0200)]
Don't invoke overlay modification hooks in wrong buffer
* src/buffer.c (report_overlay_modification): When called with
AFTER non-zero, don't invoke overlay modification hooks if the
buffer recorded in last_overlay_modification_hooks is different
from the current buffer. (Bug#21824)
Eli Zaretskii [Thu, 5 Nov 2015 18:12:19 +0000 (20:12 +0200)]
Add test for bug #21831
* test/automated/process-tests.el
(start-process-should-not-modify-arguments): New test. (Bug#21831)
Suggested by Nicolas Richard <youngfrog@members.fsf.org>
Stefan Monnier [Wed, 4 Nov 2015 14:42:20 +0000 (09:42 -0500)]
* lisp/emacs-lisp/eieio-compat.el: Typo caught by tests
(eieio--generic-static-object-generalizer): Fix typo.
* test/automated/eieio-tests.el: Byte-compile it again.
It looks like the underlying cause of bug#17852 was fixed in the mean time.
Anders Lindgren [Wed, 4 Nov 2015 05:50:19 +0000 (06:50 +0100)]
Render fringe bitmaps correctly on NextStep (bug#21301).
The fringe bitmaps were inverted, the background was not transparent,
the image data was horizontally mirrored, and periodic fringe bitmaps
were not supported.
* nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]): When
both background and foreground colors are 0, set the background
alpha channel to 0 (making the background transparent). When
copying the image data, do this from the most significant bit
(leftmost) to the least (rightmost), to avoid mirroring.
* nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits. Add
support for periodic images (e.g. the empty line indicator).
Stephen Leake [Tue, 3 Nov 2015 14:37:53 +0000 (08:37 -0600)]
Fix Bug#21816; case insensitive file system in elisp-mode-tests.el
* test/automated/elisp-mode-tests.el (xref-elisp-test-run): Use
case-insensitive string compare for file names.
(emacs-test-dir): Add 'downcase' to cause case differences (at least on
my system).
Ken Brown [Mon, 2 Nov 2015 16:22:51 +0000 (11:22 -0500)]
Document behavior of collation on Cygwin
* test/automated/fns-tests.el (fns-tests-collate-sort): Mark as
expected failure on Cygwin.
* doc/lispref/strings.texi (Text Comparison): Document that
punctuation and whitespace are not ignored for sorting on Cygwin.
Michael Albinus [Sun, 1 Nov 2015 12:43:35 +0000 (13:43 +0100)]
Improve completion in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names):
Renamed from `tramp-zeroconf-parse-service-device-names'.
(tramp-zeroconf-parse-webdav-device-names): Removed. Code merged
with `tramp-zeroconf-parse-device-names'.
(tramp-gvfs-parse-device-names): New defun.
(top): Use it when `tramp-zeroconf-parse-device-names' is not
applicable.
* lisp/net/tramp.el (tramp-set-completion-function): The argument
could also be a zeroconf service type.
* lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with
`eql' instead of `=' to accommodate the case that (syntax-after (point))
returns nil.
* test/automated/python-tests.el (python-indent-inside-paren-7):
New test.
(python-tests-with-temp-buffer, python-tests-with-temp-file):
Bind `python-indent-guess-indent-offset' to nil.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
# modified: test/automated/python-tests.el
#
Paul Eggert [Sat, 31 Oct 2015 02:21:29 +0000 (19:21 -0700)]
Merge from gnulib.
This incorporates:
2015-10-30 intprops: add WRAPV and const flavors for GCC 5
2015-10-25 stdalign: port to Sun C 5.9
* doc/misc/texinfo.tex, lib/intprops.h, lib/stdalign.in.h:
Copy from gnulib.
Artur Malabarba [Fri, 30 Oct 2015 15:00:37 +0000 (15:00 +0000)]
* lisp/faces.el: Refactor common code and fix a bug
(faces--attribute-at-point): New function. Fix a bug when the
face at point is a list of faces and the desired attribute is not
on the first one.
(foreground-color-at-point, background-color-at-point): Use it.
Michael Albinus [Fri, 30 Oct 2015 12:11:35 +0000 (13:11 +0100)]
Some minor fixes for tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
An attribute returned by gvfs-info might be empty. In case of
undetermined uid or gid, return "UNKNOWN" or -1, respectively.
(tramp-zeroconf-parse-service-device-names): New defun.
Derived from `tramp-zeroconf-parse-workstation-device-names'.
(top): Add completion functions for "afp" and "smb" methods.
Eli Zaretskii [Fri, 30 Oct 2015 10:28:00 +0000 (12:28 +0200)]
Describe known problems with pinning Emacs to taskbar
* etc/PROBLEMS: Describe the problem with pinning Emacs to taskbar
on Windows 10. For the details, see the discussion starting at
http://lists.gnu.org/archive/html/help-emacs-windows/2015-09/msg00000.html.