]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agolisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.
Alan Mackenzie [Wed, 18 Nov 2015 21:14:30 +0000 (21:14 +0000)]
lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall.

8 years agoFirst commit to scratch/follow. Make Isearch work with Follow Mode, etc.
Alan Mackenzie [Wed, 11 Nov 2015 12:02:48 +0000 (12:02 +0000)]
First commit to scratch/follow.  Make Isearch work with Follow Mode, etc.

doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
Windows" and new @defun selected-window-group.
(Window Start and End): Describe new &optional parameter GROUP and
...-group-function for window-start, window-end, set-window-start, and
pos-visible-in-window-p.
(Textual Scrolling) Describe the same for recenter.
doc/lispref/positions.texi (Screen Lines): Describe the same for
move-to-window-line.

src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
(Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
new optional parameter "group".  At the beginning of each, check whether the
corresponding ...-group-function is set to a function, and if so execute this
function in place of the normal processing.
(syms_of_window): Define symbols for the six new variables below.
(window-start-group-function, window-end-group-function)
(set-window-start-group-function, recenter-group-function)
(pos-visible-in-window-p-group-function, move-to-window-line-group-function):
New permanent local buffer local variables.
src/keyboard.c (Fposn_at_point): Add extra parameter in call to
Fpos_visible_in_window_p.

lisp/window.el (selected-window-group-function): New permanent local buffer
local variable.
(selected-window-group): New function.

lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
enable, kill them at mode disable.  Add/remove follow-after-change to/from
after-change-functions.
(follow-start-end-invalid): New variable.
(follow-redisplay): Manipulate follow-start-end-invalid.
(follow-after-change, follow-window-start, follow-window-end)
(follow-set-window-start, follow-pos-visible-in-window-p)
(follow-move-to-window-line, follow-sit-for): New functions.

lisp/isearch.el (isearch-call-message): New macro.
(isearch-update, with-isearch-suspended, isearch-del-char)
(isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
(with-isearch-suspended): Rearrange code such that isearch-call-message is
invoked before point is moved.
(isearch-message): Add comment about where point must be at function call.
(isearch-search): Remove call to isearch-message.
(isearch-lazy-highlight-window-group): New variable.
(isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
the battery of tests to ...
(isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
Note: (sit-for 0) is still called.
(isearch-lazy-highlight-update): Check membership of
isearch-lazy-highlight-window-group.  Don't set the `window' overlay
property.
(isearch-update, isearch-done, isearch-string-out-of-window)
(isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
(isearch-lazy-highlight-search, isearch-lazy-highlight-update)
(isearch-lazy-highlight-update): Call the six amended primitives (see
src/window.c above) with the new `group' argument set to t, to cooperate
with Follow Mode.

8 years ago* CONTRIBUTE: Encourage adding tests.
Karl Fogel [Tue, 10 Nov 2015 21:28:40 +0000 (15:28 -0600)]
* CONTRIBUTE: Encourage adding tests.

Based on this post from John Wiegley:

  From: "John Wiegley" <johnw@newartisans.com>
  Subject: Re: [Emacs-diffs] master 1f02cbe: Fix bug#21766 and add test
  To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-diffs@gnu.org, bruce.connor.am@gmail.com,
      emacs-devel <emacs-devel@gnu.org>
  Date: Wed, 28 Oct 2015 18:45:29 -0700
  Message-ID: <m2y4emqwg6.fsf@newartisans.com>

  https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02372.html

8 years agoAvoid creating notification objects when possible
David Reitter [Tue, 10 Nov 2015 20:41:17 +0000 (15:41 -0500)]
Avoid creating notification objects when possible

* src/nsterm.m (windowWillEnterFullScreen, windowWillExitFullScreen:,
windowDidEnterFullScreen, windowDidExitFullScreen): provide
convenience functions that do not require a notification object.  When
needed, define NSWindowDidEnterFullScreenNotification to allow for
compilation on OS X 10.6.8.

8 years agoMove INTEGER_TO_CONS body out of .h file
Paul Eggert [Tue, 10 Nov 2015 20:46:22 +0000 (12:46 -0800)]
Move INTEGER_TO_CONS body out of .h file

* src/data.c (INTBIG_TO_LISP): New macro, with most
of the contents of the old INTEGER_TO_CONS.
(intbig_to_lisp, uintbig_to_lisp): New functions.
* src/lisp.h (INTEGER_TO_CONS):
Simplify by using EXPR_SIGNED and the new functions.
This shrinks code size a bit, and makes it easier to
put a breakpoint on handling of large integers.

8 years agoMerge from gnulib
Paul Eggert [Tue, 10 Nov 2015 20:42:06 +0000 (12:42 -0800)]
Merge from gnulib

This incorporates:
2015-11-10 intprops: new public macro EXPR_SIGNED
2015-11-10 intprops: fix typo in clang port
* lib/intprops.h: Copy from gnulib.

8 years agoSpelling fixes
Paul Eggert [Tue, 10 Nov 2015 18:22:29 +0000 (10:22 -0800)]
Spelling fixes

* lisp/net/soap-inspect.el (soap-inspect-xs-simple-type):
Fix misspelling in output.

8 years ago* doc/lispref/variables.texi (Directory Local Variables):
Artur Malabarba [Tue, 10 Nov 2015 13:47:42 +0000 (13:47 +0000)]
* doc/lispref/variables.texi (Directory Local Variables):

Document dir-locals wildcards

* lisp/files.el (dir-locals-file): Point to Info node.

* doc/emacs/custom.texi (Directory Variables):
Document dir-locals wildcards.

* etc/NEWS: Document new functionality.

8 years ago* lisp/files.el: Don't allow customization of dir-locals sorting
Artur Malabarba [Tue, 10 Nov 2015 13:26:00 +0000 (13:26 +0000)]
* lisp/files.el: Don't allow customization of dir-locals sorting

In retrospect, this is not a good idea for the same reason that
`dir-locals-file' is a defconst, because it is important that this
behaviour be "uniform across different environments and users".
Sure, the user can still change the sorting with a hack, but we
shouldn't encourage them to change it.

(dir-locals--all-files): Return list in the order returned by
`file-expand-wildcards'.
(file-expand-wildcards): Document the sorting predicate used.
(dir-locals-sort-predicate): Delete variable.

8 years ago* lisp/files.el (dir-locals-read-from-file): Better handle errors
Artur Malabarba [Tue, 10 Nov 2015 13:14:49 +0000 (13:14 +0000)]
* lisp/files.el (dir-locals-read-from-file): Better handle errors

8 years ago* lisp/isearch.el (search-default-regexp-mode): change default value
Artur Malabarba [Tue, 10 Nov 2015 13:04:02 +0000 (13:04 +0000)]
* lisp/isearch.el (search-default-regexp-mode): change default value

8 years ago* lisp/files.el (dir-locals-find-file): Don't stop at unreadable files
Artur Malabarba [Tue, 10 Nov 2015 04:13:25 +0000 (04:13 +0000)]
* lisp/files.el (dir-locals-find-file): Don't stop at unreadable files

`locate-dominating-file' will now keep looking if the files it finds in
a given directory are unreadable (or not files).

8 years ago* lisp/files.el (dir-locals-file): Allow wildcards
Artur Malabarba [Sat, 7 Nov 2015 13:54:56 +0000 (13:54 +0000)]
* lisp/files.el (dir-locals-file): Allow wildcards

(dir-locals-find-file, dir-locals-collect-variables)
(dir-locals-read-from-file): Update accordingly.
(hack-dir-local-variables): Rename a local variable.

* lisp/files-x.el (modify-dir-local-variable): Update accordingly

* lisp/help-fns.el (describe-variable): Update accordingly

* .gitignore: Add .dir-locals?.el

8 years ago* lisp/emacs-lisp/map.el (map-merge-with): New function
Artur Malabarba [Sat, 7 Nov 2015 12:45:18 +0000 (12:45 +0000)]
* lisp/emacs-lisp/map.el (map-merge-with): New function

* test/automated/map-tests.el (test-map-merge-with): New test

8 years ago; project-library-roots-function: Update the FIXME
Dmitry Gutov [Tue, 10 Nov 2015 02:39:32 +0000 (04:39 +0200)]
; project-library-roots-function: Update the FIXME

8 years agoFix some recently-perturbed bookmark autoloads
Karl Fogel [Tue, 10 Nov 2015 04:14:49 +0000 (22:14 -0600)]
Fix some recently-perturbed bookmark autoloads

* lisp/bookmark.el (bookmark-set-internal): Remove unnecessary autoload.
  (bookmark-set): Restore autoload.
  (bookmark-set-no-overwrite): Add autoload.

Thanks to Juanma Barranquero for noticing the autoload problems
introduced by my recent commit adding/changing the above functions
(Sun Nov 8 14:16:43 2015 -0500, git commit 3812e17978).

8 years ago(ydump-buffer): Handle case where gap is at the start of buffer.
Noah Friedman [Tue, 10 Nov 2015 01:34:40 +0000 (17:34 -0800)]
(ydump-buffer): Handle case where gap is at the start of buffer.
I don't recall if older versions of gdb were less strict but you
cannot dump a 0-length range in gdb 7.9.1.

8 years ago* lisp/progmodes/project.el: Update Commentary.
Dmitry Gutov [Tue, 10 Nov 2015 00:56:55 +0000 (02:56 +0200)]
* lisp/progmodes/project.el: Update Commentary.

8 years agoMerge branch 'project-next'
Dmitry Gutov [Tue, 10 Nov 2015 00:47:46 +0000 (02:47 +0200)]
Merge branch 'project-next'

8 years agoFold `project-ask-user' into `project-current'
Dmitry Gutov [Tue, 10 Nov 2015 00:41:06 +0000 (02:41 +0200)]
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.

8 years agoWhen VC detects a conflict, specify which file
Karl Fogel [Mon, 9 Nov 2015 21:57:23 +0000 (15:57 -0600)]
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.

8 years agoFix assertion violation in define-key
Eli Zaretskii [Mon, 9 Nov 2015 18:31:45 +0000 (20:31 +0200)]
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>.

8 years agoFix a memory leak in GC of font cache
Dima Kogan [Mon, 9 Nov 2015 16:36:05 +0000 (18:36 +0200)]
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)

8 years agoUse INT_ADD_WRAPV etc. to check integer overflow
Paul Eggert [Mon, 9 Nov 2015 06:47:01 +0000 (22:47 -0800)]
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.

8 years agoMake sure that the ignore file exists origin/project-next
Dmitry Gutov [Mon, 9 Nov 2015 02:32:36 +0000 (04:32 +0200)]
Make sure that the ignore file exists

* lisp/vc/vc.el (vc-default-ignore-completion-table):
Make sure that the ignore file exists.

8 years ago* gnus-sum.el (gnus-summary-backend-map): Bind B-backspace to
Michael Sperber [Mon, 9 Nov 2015 01:59:24 +0000 (01:59 +0000)]
* gnus-sum.el (gnus-summary-backend-map): Bind B-backspace to
`gnus-summary-delete-article` in a way that also works on XEmacs.

8 years ago; ChangeLog.2 fixes
Juanma Barranquero [Sun, 8 Nov 2015 22:15:07 +0000 (23:15 +0100)]
; ChangeLog.2 fixes

8 years agoAdd support for retrieving paths to JSON elements
Simen Heggestøyl [Sun, 8 Nov 2015 20:44:21 +0000 (21:44 +0100)]
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'.

8 years ago* etc/NEWS: Mention new `bookmark-set-no-overwrite'.
Karl Fogel [Sun, 8 Nov 2015 19:40:35 +0000 (14:40 -0500)]
* 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).

8 years agoOffer non-overwrite bookmark setter (Bug#15746)
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.

8 years ago* src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614).
Paul Eggert [Sun, 8 Nov 2015 17:36:14 +0000 (09:36 -0800)]
* src/unexelf.c (NEW_PROGRAM_H): Remove unused macro (Bug#20614).

8 years agoELF unexec: Don't insert a new section
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.

8 years agoELF unexec: Drive from PT_LOAD header rather than 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)

8 years agoELF unexec: R_*_NONE relocs
Alan Modra [Sun, 8 Nov 2015 17:29:00 +0000 (09:29 -0800)]
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.

8 years agoELF unexec: _OBJC_ symbols in bss sections
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.

8 years agoELF unexec: Symbol table patching
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.

8 years agoELF unexec: Merge Alpha and MIPS COFF debug handling
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.

8 years agoELF unexec: Tidy code
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.

8 years agoELF unexec: Correct section header index
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.

8 years agoFix Bug#21841
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)

8 years agoRemove dirs in vc project roots from the the vc project library roots
Dmitry Gutov [Sun, 8 Nov 2015 12:46:22 +0000 (14:46 +0200)]
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)

8 years ago; project-library-roots: Update docstring
Dmitry Gutov [Sun, 8 Nov 2015 12:20:26 +0000 (14:20 +0200)]
; project-library-roots: Update docstring

8 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 8 Nov 2015 11:23:33 +0000 (06:23 -0500)]
; Auto-commit of ChangeLog files.

8 years agoPrefer xpalloc to doubling buffers by hand
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.

8 years agoMerge from gnulib
Paul Eggert [Sun, 8 Nov 2015 07:36:45 +0000 (23:36 -0800)]
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.

8 years ago;* test/automated/abbrev-tests.el: Fix a typo in a comment
Eli Zaretskii [Sun, 8 Nov 2015 03:43:00 +0000 (05:43 +0200)]
;* test/automated/abbrev-tests.el: Fix a typo in a comment

8 years agoProvide NS notification objects where required to eliminate warnings
David Reitter [Sun, 8 Nov 2015 01:43:29 +0000 (20:43 -0500)]
Provide NS notification objects where required to eliminate warnings

* nsterm.m (windowDidResize:, toggleFullScreen:):
Call notification functions with notification objects
as per delegate APIs.

8 years agoMove and rename xref-find-regexp to the project package
Dmitry Gutov [Fri, 6 Nov 2015 03:08:51 +0000 (05:08 +0200)]
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.

8 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 7 Nov 2015 18:05:43 +0000 (20:05 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

8 years agoAdd test for bug #21824
Noam Postavsky [Sat, 7 Nov 2015 18:04:00 +0000 (20:04 +0200)]
Add test for bug #21824

* test/automated/buffer-tests.el: New file.
(overlay-modification-hooks-message-other-buf): New test.

8 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Kelvin White [Sat, 7 Nov 2015 18:03:03 +0000 (13:03 -0500)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

8 years agoerc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771
Kelvin White [Sat, 7 Nov 2015 17:54:58 +0000 (12:54 -0500)]
erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771

8 years agoerc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771
l3thal [Sat, 7 Nov 2015 17:54:58 +0000 (12:54 -0500)]
erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771

8 years ago; ChangeLog.2: Fix formatting of ntlm.el 2.0.0 entry
Thomas Fitzsimmons [Sat, 7 Nov 2015 14:08:19 +0000 (09:08 -0500)]
; ChangeLog.2: Fix formatting of ntlm.el 2.0.0 entry

8 years ago; ChangeLog.2: Fix entry for soap-client 3.0.0 sync
Thomas Fitzsimmons [Sat, 7 Nov 2015 13:53:49 +0000 (08:53 -0500)]
; ChangeLog.2: Fix entry for soap-client 3.0.0 sync

8 years ago; * lisp/abbrev.el (copy-abbrev-table): Remove forgotten debug code.
Eli Zaretskii [Sat, 7 Nov 2015 13:50:40 +0000 (15:50 +0200)]
; * lisp/abbrev.el (copy-abbrev-table): Remove forgotten debug code.

8 years agoIgnore fullscreen exit notifications on NS when frame is dead
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.

May address Bug#21428.

8 years agoSpeed up lookup in redisplay--variables
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.

8 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug
Artur Malabarba [Sat, 7 Nov 2015 11:25:31 +0000 (11:25 +0000)]
* 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

8 years agoUpdate doc string of hexl-mode
Mihai Olteanu [Sat, 7 Nov 2015 12:35:10 +0000 (14:35 +0200)]
Update doc string of hexl-mode

* lisp/hexl.el (hexl-mode): Doc fix.  (Bug#21800)

Copyright-paperwork-exempt: yes

8 years agoFix error in copy-abbrev-table
Eli Zaretskii [Sat, 7 Nov 2015 11:32:33 +0000 (13:32 +0200)]
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.

8 years agoAdd test to auto-revert-tests.el for Bug#21841
Michael Albinus [Sat, 7 Nov 2015 10:05:03 +0000 (11:05 +0100)]
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.

8 years ago* doc/lispref/windows.texi (Coordinates and Windows): Fix typo.
Martin Rudalics [Sat, 7 Nov 2015 08:19:03 +0000 (09:19 +0100)]
* doc/lispref/windows.texi (Coordinates and Windows): Fix typo.

8 years agoIn x_consider_frame_title don't set title of tooltip frames
Martin Rudalics [Sat, 7 Nov 2015 07:51:28 +0000 (08:51 +0100)]
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.

8 years agoFixed NextStep fullscreen problem (bug#21770).
Anders Lindgren [Fri, 6 Nov 2015 21:39:02 +0000 (22:39 +0100)]
Fixed NextStep fullscreen problem (bug#21770).

* nsterm.m (ns_constrain_all_frames): Don't constrain fullscreen
frames.

8 years agoEnsure redisplay after evaluation
Eli Zaretskii [Fri, 6 Nov 2015 19:21:52 +0000 (21:21 +0200)]
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)

8 years ago* test/automated/subr-tests.el (subr-test-when): Fix again
Artur Malabarba [Fri, 6 Nov 2015 15:53:23 +0000 (15:53 +0000)]
* test/automated/subr-tests.el (subr-test-when): Fix again

8 years agoDon't invoke overlay modification hooks in wrong buffer
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)

8 years agoAbolish temporary buffer management for xref
Dmitry Gutov [Tue, 3 Nov 2015 00:36:50 +0000 (02:36 +0200)]
Abolish temporary buffer management for xref

* lisp/progmodes/xref.el (xref--temporary-buffers)
(xref--current)
(xref--inhibit-mark-current)
(xref--mark-selected): Remove.  Remove all references.
(xref--show-xrefs): Do not construct the
list of the temporary buffers, nor pass it along.

8 years agoRename "search path" to "library roots"
Dmitry Gutov [Tue, 3 Nov 2015 00:11:45 +0000 (02:11 +0200)]
Rename "search path" to "library roots"

* lisp/emacs-lisp/cl-seq.el (cl-set-difference): Retain the order
of the elements from CL-LIST1.

* test/automated/cl-lib-tests.el (cl-lib-test-set-functions):
Update WRT to the above change.

* lisp/progmodes/project.el (project-search-path-function): Rename
to project-library-roots-function, update the documentation and
references.
(project-search-path): Likewise, to project-library-roots.
(project-roots): Clarify documentation.
(project-vc-search-path): Likewise, to project-vc-library-roots.
(project-library-roots): In addition to the renames, thread the
results through file-name-as-directory.
(project-prune-directories): Accept a variable number of
arguments.  Rename to project-combine-directories.
(project-subtract-directories): New function.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-references):
Append project-roots and project-library-roots together.

* lisp/progmodes/etags.el (etags--xref-find-references): Ditto.

8 years ago* admin/notes/repo: Fix a few obsolete references to Bazaar
Juanma Barranquero [Fri, 6 Nov 2015 13:06:29 +0000 (14:06 +0100)]
* admin/notes/repo: Fix a few obsolete references to Bazaar

8 years ago* test/automated/subr-tests.el (subr-test-when): Fix test
Artur Malabarba [Fri, 6 Nov 2015 11:18:23 +0000 (11:18 +0000)]
* test/automated/subr-tests.el (subr-test-when): Fix test

8 years agoAvoid division by zero crash observed by Yuan MEI.
Martin Rudalics [Fri, 6 Nov 2015 11:15:18 +0000 (12:15 +0100)]
Avoid division by zero crash observed by Yuan MEI.

See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html.

* src/dispnew.c (required_matrix_height, required_matrix_width):
Avoid division by zero.
* src/xterm.c (x_term_init): Init dpyinfo->smallest_font_height and
dpyinfo->smallest_char_width to 1.

8 years agoEnsure redisplay after "C-x C-e"
Eli Zaretskii [Fri, 6 Nov 2015 09:28:46 +0000 (11:28 +0200)]
Ensure redisplay after "C-x C-e"

* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure
redisplay happens to account for any side effects of the evaluated
sexp.  (Bug#21835)

8 years ago; * CONTRIBUTE: Add section about the bug tracker
Eli Zaretskii [Fri, 6 Nov 2015 08:56:59 +0000 (10:56 +0200)]
; * CONTRIBUTE: Add section about the bug tracker

* CONTRIBUTE: Move less important sections after the more
important ones.  Add section about the bug tracker.

8 years agoSkip some file notification tests for cygwin
Michael Albinus [Fri, 6 Nov 2015 06:33:50 +0000 (07:33 +0100)]
Skip some file notification tests for cygwin

* test/automated/file-notify-tests.el (file-notify--test-with-events):
Remove argument TIMEOUT.  Adapt all callees.
(file-notify-test02-events, file-notify-test04-file-validity):
Skip for cygwin.  (Bug#21804)

8 years ago* lisp/progmodes/xref.el: require semantic/symref during compilation.
Stephen Leake [Fri, 6 Nov 2015 03:14:45 +0000 (05:14 +0200)]
* lisp/progmodes/xref.el: require semantic/symref during compilation.

8 years agoSuppress redundant Pinentry startup messages
Daiki Ueno [Fri, 6 Nov 2015 01:28:36 +0000 (10:28 +0900)]
Suppress redundant Pinentry startup messages

* lisp/net/pinentry.el (pinentry-start): Add optional QUIET
argument.
* lisp/epg.el: Declare `pinentry-start'.
(epg--start): Call `pinentry-start' with QUIET argument set.

8 years ago* doc/emacs/ack.texi (Acknowledgments): Updates.
Xue Fuqiao [Thu, 5 Nov 2015 23:30:32 +0000 (07:30 +0800)]
* doc/emacs/ack.texi (Acknowledgments): Updates.

8 years ago* test/automated/elisp-mode-test.el: Silence some run-time warnings
Juanma Barranquero [Thu, 5 Nov 2015 21:47:52 +0000 (22:47 +0100)]
* test/automated/elisp-mode-test.el: Silence some run-time warnings

(xref-elisp-deftest): Bind `find-file-suppress-same-file-warnings' to t.

8 years agoAdd prettify symbol for \times
Tassilo Horn [Thu, 5 Nov 2015 20:12:37 +0000 (21:12 +0100)]
Add prettify symbol for \times

* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
prettification support for \times.

8 years ago* test/automated/process-tests.el: Skip tests when bash is not available
Juanma Barranquero [Thu, 5 Nov 2015 18:40:42 +0000 (19:40 +0100)]
* test/automated/process-tests.el: Skip tests when bash is not available

(process-test-sentinel-accept-process-output)
(process-test-sentinel-sit-for): skip-unless bash executable found.

8 years agoAdd test for bug #21831
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>

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 5 Nov 2015 11:17:56 +0000 (06:17 -0500)]
; Auto-commit of loaddefs files.

8 years ago; * test/automated/elisp-mode-tests.el: Fix typo.
Juanma Barranquero [Thu, 5 Nov 2015 11:01:25 +0000 (12:01 +0100)]
; * test/automated/elisp-mode-tests.el: Fix typo.

8 years ago* lisp/emacs-lisp/eieio-compat.el: Typo caught by tests
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.

8 years agoRevert "* lisp/subr.el (when): Use `macroexp-progn'"
Artur Malabarba [Wed, 4 Nov 2015 14:22:27 +0000 (14:22 +0000)]
Revert "* lisp/subr.el (when): Use `macroexp-progn'"

This reverts commit 8e843831eaf271801836b7a3e4dd3b4fb0bb72b8.
It breaks bootstrapping (duh).

8 years ago* lisp/files.el (report-errors): Obsolete
Artur Malabarba [Wed, 4 Nov 2015 13:00:04 +0000 (13:00 +0000)]
* lisp/files.el (report-errors): Obsolete

(normal-mode, hack-local-variables, dir-locals-find-file): Use
`with-demoted-errors' instead.

8 years ago* lisp/subr.el (when): Use `macroexp-progn'
Artur Malabarba [Wed, 4 Nov 2015 12:54:53 +0000 (12:54 +0000)]
* lisp/subr.el (when): Use `macroexp-progn'

* test/automated/subr-tests.el (subr-test-when): New test

8 years ago* lisp/progmodes/xref.el: Doc fixes
Juanma Barranquero [Wed, 4 Nov 2015 09:07:25 +0000 (10:07 +0100)]
* lisp/progmodes/xref.el: Doc fixes

(xref-make-file-location, xref-make-buffer-location, xref-make)
(xref-make-bogus-location, xref-make-match): Add cross-references.
(xref--insert-xrefs): Fix typo in docstring.

8 years agoRender fringe bitmaps correctly on NextStep (bug#21301).
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).

8 years ago* lisp/emacs-lisp/pcase.el (pcase): Tweak docstring.
Michael Heerdegen [Tue, 3 Nov 2015 22:42:24 +0000 (23:42 +0100)]
* lisp/emacs-lisp/pcase.el (pcase): Tweak docstring.

8 years ago* admin/MAINTAINERS: Add seq-tests.el, map-tests.el, and thunk-tests.el.
Nicolas Petton [Tue, 3 Nov 2015 22:22:39 +0000 (23:22 +0100)]
* admin/MAINTAINERS: Add seq-tests.el, map-tests.el, and thunk-tests.el.

8 years ago* admin/MAINTAINERS: Add thunk.el.
Nicolas Petton [Tue, 3 Nov 2015 22:20:56 +0000 (23:20 +0100)]
* admin/MAINTAINERS: Add thunk.el.

8 years agoChange maintainer address.
Jay Belanger [Tue, 3 Nov 2015 22:16:54 +0000 (16:16 -0600)]
Change maintainer address.

* lisp/calc/calc (calc-bug-address): Change address.

8 years ago; Shorten TODO list in file-notify-tests.el
Michael Albinus [Tue, 3 Nov 2015 17:33:25 +0000 (18:33 +0100)]
; Shorten TODO list in file-notify-tests.el

8 years agoFix a stupid error in gfilenotify.c.
Michael Albinus [Tue, 3 Nov 2015 17:17:53 +0000 (18:17 +0100)]
Fix a stupid error in gfilenotify.c.

* src/gfilenotify.c (dir_monitor_callback): Cancel monitor only,
if we've got a `deleted' signal AND the file name is the watched one.

8 years agoFix Bug#21816; case insensitive file system in elisp-mode-tests.el
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).

8 years agoFix ChangeLog.2 entry for js-jsx-mode
Jackson Ray Hamilton [Tue, 3 Nov 2015 05:14:05 +0000 (21:14 -0800)]
Fix ChangeLog.2 entry for js-jsx-mode

8 years agoflymake-tests.el (warning-predicate-rx-gcc): Fix check.
Juanma Barranquero [Mon, 2 Nov 2015 17:08:52 +0000 (18:08 +0100)]
flymake-tests.el (warning-predicate-rx-gcc): Fix check.

* test/automated/flymake-tests.el (warning-predicate-rx-gcc):
Also check that "make" is available, not just "gcc".