Kelvin White [Thu, 2 Oct 2014 11:55:22 +0000 (07:55 -0400)]
Use local variable to determine if buffers should be renamed
Fixes: debbugs:18300
Ivan Shmakov [Thu, 2 Oct 2014 11:31:56 +0000 (07:31 -0400)]
Do not reset input ring if one exists
Fixes: debbugs:18599
Glenn Morris [Thu, 2 Oct 2014 04:24:07 +0000 (21:24 -0700)]
Rotate etc/NEWS files for version 25
Stefan Monnier [Thu, 2 Oct 2014 03:19:32 +0000 (23:19 -0400)]
Consolidate management/ownership of selections.
* lisp/select.el (gui-get-selection-alist): New method.
(gui-get-selection): Use it. Rename from x-get-selection.
(x-get-selection): Define as obsolete alias.
(x-get-clipboard): Mark obsolete.
(gui-get-primary-selection): New function.
(x-get-selection-value): Mark obsolete.
(gui-own-selection-alist, gui-disown-selection-alist)
(gui-selection-owner-p-alist): New methods.
(gui-set-selection): Use them. Rename from x-set-selection.
(x-set-selection): Define as obsolete alias.
(gui--valid-simple-selection-p): Rename from
x-valid-simple-selection-p.
* lisp/w32-common-fns.el (gui-own-selection, gui-disown-selection)
(gui-selection-owner-p, gui-get-selection): Define for w32.
(w32-get-selection-value): Rename from x-get-selection-value.
Use the new gui-last-selected-text.
* lisp/term/x-win.el (x-get-selection-value): Remove.
(x-clipboard-yank): Declare obsolete.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for x.
* lisp/term/w32-win.el (w32-win-suspend-error): Rename from
x-win-suspend-error.
* lisp/term/pc-win.el (w16-get-selection-value): Rename from
x-get-selection-value.
(w16-selection-owner-p): Rename from x-selection-owner-p.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for pc.
(w16--select-text): New function.
* lisp/term/ns-win.el (gui-own-selection, gui-disown-selection)
(gui-get-selection, gui-selection-owner-p): Define for ns.
* lisp/term.el (term-mouse-paste):
* lisp/mouse.el (mouse-yank-primary): Use gui-get-primary-selection.
* src/nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
Rename from the "x-" prefix.
Jay Belanger [Thu, 2 Oct 2014 02:09:30 +0000 (21:09 -0500)]
Add missing name to Changelog.
H. Dieter Wilhelm [Thu, 2 Oct 2014 01:41:10 +0000 (20:41 -0500)]
calc/calc-help.el (calc-describe-thing): Quote strings which could
look like regexps.
Stefan Monnier [Wed, 1 Oct 2014 22:14:43 +0000 (18:14 -0400)]
Commit forgotten ChangeLog files
Stefan Monnier [Wed, 1 Oct 2014 22:13:11 +0000 (18:13 -0400)]
Consolidate x-select-text.
* lisp/frame.el (gui-method, gui-method-define, gui-method-declare)
(gui-call): New macros.
(gui-method--name): New function.
(frame-creation-function-alist): Use gui-method-declare.
(make-frame): Use gui-method.
* lisp/select.el (gui-select-enable-clipboard): Rename from
x-select-enable-clipboard and move here.
(x-select-enable-clipboard): Define as obsolete alias.
(gui-last-selected-text): New var, to replace x-last-selected-text.
(gui-select-text): New GUI method.
(gui-select-text): New function.
(x-select-text): Define as obsolete alias.
* lisp/term/common-win.el (x-select-enable-clipboard, x-select-text):
Move to select.el.
* lisp/simple.el (interprogram-cut-function): Change default to
x-select-text.
(interprogram-paste-function): Change default to `ignore'.
* lisp/w32-common-fns.el (interprogram-cut-function): Don't modify.
* lisp/term/x-win.el (interprogram-cut-function): Don't modify.
(gui-select-text): Add method for x.
* lisp/term/w32-win.el (gui-select-text): Add method for w32.
* lisp/term/pc-win.el (x-last-selected-text): Remove, use
gui-last-selected-text instead.
(msdos-initialize-window-system): Don't set interprogram-cut-function.
(gui-select-text): Add method for pc.
* lisp/term/ns-win.el (ns-last-selected-text): Remove, use
gui-last-selected-text instead.
(gui-select-text): Add method for ns.
(x-setup-function-keys): Don't change interprogram-cut-function.
* lisp/loadup.el ("startup"): Load after "frame".
* lisp/subr.el (package--builtin-versions, package--description-file):
Move from startup.el.
* lisp/startup.el (package--builtin-versions, package--description-file):
Move to subr.el.
(handle-args-function-alist, window-system-initialization-alist):
Use gui-method-declare.
(command-line): Use gui-method.
* src/xselect.c (selection-converter-alist): Fix docstring.
Paul Eggert [Wed, 1 Oct 2014 20:34:55 +0000 (13:34 -0700)]
Improve doc for use of 'int', and discuss 'ssize_t'.
* internals.texi (C Integer Types): Mention 'int' for other
randomish values that lie in 'int' range. Mention 'ssize_t'. See:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html
Stefan Monnier [Wed, 1 Oct 2014 17:23:42 +0000 (13:23 -0400)]
* lisp/subr.el (alist-get): New accessor.
* lisp/emacs-lisp/gv.el (alist-get): Provide expander.
* lisp/winner.el (winner-remember):
* lisp/tempo.el (tempo-use-tag-list):
* lisp/progmodes/gud.el (minor-mode-map-alist):
* lisp/international/mule-cmds.el (define-char-code-property):
* lisp/frameset.el (frameset-filter-params):
* lisp/files.el (dir-locals-set-class-variables):
* lisp/register.el (get-register, set-register):
* lisp/calc/calc-yank.el (calc-set-register): Use it.
* lisp/ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete.
* lisp/tooltip.el (tooltip-set-param): Mark as obsolete.
(tooltip-show): Use alist-get instead.
* lisp/ses.el (ses--alist-get): Remove. Use alist-get instead.
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get
and cl-incf.
Ulf Jasper [Wed, 1 Oct 2014 17:20:00 +0000 (19:20 +0200)]
Newsticker: Use libxml instead of `xml-parse-region'. Fix some glitches. Clean up.
* lisp/net/newst-backend.el: Remove Time-stamp. Rename variable
`newsticker--download-logos' to `newsticker-download-logos' and
make it customizable.
(newsticker--sentinel-work): Move xml-workarounds to function
`newsticker--do-xml-workarounds', call unless libxml-parser is
used. Allow single quote in regexp for encoding. Use
libxml-parser if available, else fall back to `xml-parse-region'.
Take care of possibly missing namespace prefixes (like "RDF"
instead of "rdf:RDF") when checking xml nodes and attributes (as
libxml correctly removes the prefixes). Always use Atom 1.0 as
fallback feed type. Rename `newsticker--download-logos' to
`newsticker-download-logos'
(newsticker--unxml, newsticker--unxml-node)
(newsticker--unxml-attribute): New.
(newsticker--parse-atom-1.0): Call `unxml' in case that embedded
HTML code has become part of the xml parse tree.
(newsticker--parse-rss-1.0, newsticker--parse-rss-2.0): Take care
of possibly missing namespace prefixes.
(newsticker--parse-generic-items): Code formatting. Typo.
(newsticker--images-dir): Add trailing slash.
(newsticker--image-get): Fix error message.
* lisp/net/newst-plainview.el: Remove Time-stamp.
* lisp/net/newst-reader.el: Remove Time-stamp.
(newsticker-download-logos): Rename variable
`newsticker--download-logos' to `newsticker-download-logos' and
make it customizable.
(newsticker--print-extra-elements): Add optional parameter
'htmlish for using html markup. Amend list of ignored elements.
(newsticker--do-print-extra-element): Add parameter 'htmlish for
using html markup.
* lisp/net/newst-ticker.el: Remove Time-stamp.
* lisp/net/newst-treeview.el (newsticker--treeview-item-show): Use html
for formatting extra elements.
* lisp/net/newsticker.el: Remove Time-stamp, Version.
(newsticker-version): Make obsolete.
Eli Zaretskii [Wed, 1 Oct 2014 15:18:16 +0000 (18:18 +0300)]
Don't modify the process's command name passed to start-process on MS-Windows.
src/w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
argument passed by the caller, when we mirror all slashes into
backslashes.
Eli Zaretskii [Wed, 1 Oct 2014 14:58:54 +0000 (17:58 +0300)]
Revert the changes in 2014-10-01T02:25:40Z!eggert@cs.ucla.edu.
Dmitry Antipov [Wed, 1 Oct 2014 13:21:08 +0000 (17:21 +0400)]
* gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
Resurrect old code and fix compilation with GTK < 2.13.6.
Glenn Morris [Wed, 1 Oct 2014 10:20:05 +0000 (06:20 -0400)]
Auto-commit of loaddefs files.
Paul Eggert [Wed, 1 Oct 2014 03:28:16 +0000 (20:28 -0700)]
Use AUTO_CONS instead of SCOPED_CONS, etc.
* doc/lispref/internals.texi (Stack-allocated Objects):
Adjust to match the revised, less error-prone macros.
* src/frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
* src/lisp.h (AUTO_CONS): Rename from scoped_cons.
(AUTO_LIST1): Rename from scoped_list1.
(AUTO_LIST2): Rename from scoped_list2.
(AUTO_LIST3): Rename from scoped_list3.
(AUTO_LIST4): Rename from scoped_list4.
(AUTO_STRING): Rename from SCOPED_STRING.
* src/frame.h (AUTO_FRAME_ARG):
* src/lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
(AUTO_LIST4, AUTO_STRING):
Prepend a new argument 'name'.
Declare a variable instead of yielding a value.
All uses changed.
* src/lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
Paul Eggert [Wed, 1 Oct 2014 02:25:40 +0000 (19:25 -0700)]
* dispnew.c (adjust_decode_mode_spec_buffer): Prefer ptrdiff_t
to ssize_t since we're not using ssize_t-related syscalls here.
Stefan Monnier [Tue, 30 Sep 2014 23:19:31 +0000 (19:19 -0400)]
Merge from emacs-24
Leonardo Nobrega [Tue, 30 Sep 2014 23:00:57 +0000 (19:00 -0400)]
* lisp/progmodes/python.el (python-fill-paren): Don't inf-loop at EOB.
Fixes: debbugs:18462
Paul Eggert [Tue, 30 Sep 2014 20:17:36 +0000 (13:17 -0700)]
* alloc.c: Remove now-unnecessary check.
Suggested by Dmitry Antipov in:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
Paul Eggert [Tue, 30 Sep 2014 19:10:37 +0000 (12:10 -0700)]
* internals.texi (Stack-allocated Objects): Further improvements.
Give an example of misuse.
Stefan Monnier [Tue, 30 Sep 2014 17:52:11 +0000 (13:52 -0400)]
* lisp/ses.el (ses--row, ses--col): New dyn-scoped vars, to replace row&col.
(ses-center, ses-center-span): Use them.
(ses-print-cell): Bind them while calling the printer.
(row, col, maxrow, maxcol): Don't declare as dynamically scoped.
(ses-dorange): Revert last change.
(ses-calculate-cell): Don't bind row&col dynamically while evaluating
the formula.
(ses-set-cell): Avoid `eval'.
(ses--time-check): Rename it from ses-time-check and turn it into
a macro.
Fixes: debbugs:18191
Eli Zaretskii [Tue, 30 Sep 2014 16:21:22 +0000 (19:21 +0300)]
Fix last change in lispref.
doc/lispref/internals.texi (Stack-allocated Objects): Minor improvements of
the wording and the indexing.
Dmitry Antipov [Tue, 30 Sep 2014 15:35:16 +0000 (19:35 +0400)]
* internals.texi (Stack-allocated Objects): Describe this feature.
Stefan Monnier [Tue, 30 Sep 2014 15:33:03 +0000 (11:33 -0400)]
* lisp/ses.el (ses-setup): Don't assume modifying the iteration var of
dotimes affects the iteration.
Fixes: debbugs:18191
Paul Eggert [Tue, 30 Sep 2014 15:31:18 +0000 (08:31 -0700)]
* xterm.c (x_term_init): Allocate temps on stack, not on heap.
Paul Eggert [Tue, 30 Sep 2014 15:20:03 +0000 (08:20 -0700)]
* frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
to Ubuntu 14.04.1 x86-64.
Eli Zaretskii [Tue, 30 Sep 2014 13:53:24 +0000 (16:53 +0300)]
Fix creation of frames on MS-Windows: don't cons Lisp objects in input thread.
src/w32fns.c (w32_createwindow): Accept an additional argument, an
array of 2 values specifying the coordinates of the frame's
top-left corner. Use these values instead of calling x_get_arg,
which can cons Lisp objects, and therefore cannot be called except
from the main thread. Remove redundant tests for the default
values.
(my_create_window): Move the calculation of the coordinates of the
frame's top-left edge here. Pass them to the input thread via the
second parameter of the WM_EMACS_CREATEWINDOW message. See
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
for the details.
Glenn Morris [Tue, 30 Sep 2014 10:21:33 +0000 (06:21 -0400)]
Auto-commit of loaddefs files.
Vincent Belaïche [Tue, 30 Sep 2014 08:06:28 +0000 (10:06 +0200)]
* ses.el (ses-calculate-cell): bind row and col dynamically to
their values with 'cl-progv'.
(ses-dorange): bind row, col, maxrow and maxcol dynamically to
their values with 'cl-progv', also use non-interned symbols for
row, minrow, maxrow, mincol and maxcol.
(maxrow maxcol): New defvar, to make the compiler happy.
Paul Eggert [Tue, 30 Sep 2014 05:49:54 +0000 (22:49 -0700)]
* TODO: Remove char/unsigned char, long long, IRIX unexelf.c.
The first two are done, and IRIX support has been dropped.
Bill Wohler [Tue, 30 Sep 2014 05:06:42 +0000 (22:06 -0700)]
Merge from emacs-24; up to 2014-07-12T04:06:32Z!dmantipov@yandex.ru.
Paul Eggert [Tue, 30 Sep 2014 05:02:13 +0000 (22:02 -0700)]
Spelling fix.
Bill Wohler [Tue, 30 Sep 2014 04:58:10 +0000 (21:58 -0700)]
Add TODO to replace cl with cl-lib.
Bill Wohler [Tue, 30 Sep 2014 04:52:10 +0000 (21:52 -0700)]
Release MH-E version 8.6.
* NEWS, MH-E-NEWS: Update for MH-E release 8.6.
* mh-e.el (Version, mh-version): Update for release 8.6.
* mh-comp.el (mh-insert-x-face): Ensure that mh-x-face-file is a
string before trying to use it (closes SF #474).
(mh-bare-components): New function to create a temporary initial
components file; replaces mh-find-components. Improve the temp folder
and file names as per a suggestion from Bill Wohler. Also address
XEmacs compatibility issues: use mm-make-temp-file instead of
make-temp-file, and only pass one argument to delete-directory.
(mh-edit-again, mh-send-sub): Use mh-bare-components instead of
mh-find-components (partially closes SF #468).
Paul Eggert [Tue, 30 Sep 2014 02:43:23 +0000 (19:43 -0700)]
Simplify stack-allocated Lisp objects, and make them more portable.
The build_local_string macro was used in two ways: (1) string
literals for which scoped allocation suffices, and (2) file name
components, where it's not safe in general to assume bounded-size
ASCII data. Simplify by defining a new macro SCOPED_STRING that
allocates a block-scope string, and by using SCOPED_STRING for (1)
and build_string for (2). Furthermore, actually use stack
allocation only for objects known to have sufficient alignment.
This simpler implementation means Emacs can make
USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
GC_MAKE_GCPROS_NOOPS.
* lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
for fewer differences among implementations.
(struct Lisp_String): Now GCALIGNED.
(USE_STACK_LISP_OBJECTS): Default to true, since the
implementation no longer insists on a nonempty GCALIGNED.
But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
(SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
separately. Move definiens to scoped_cons. The old definition
was incorrect when GCALIGNED was defined to be empty.
(union Aligned_String): New type.
(USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
implementation ports to compilers that don't align strictly enough.
Don't worry about the union sizes; it's not worth bothering about.
(scoped_cons, scoped_list1, scoped_list3, scoped_list4):
Rewrite using USE_STACK_CONS.
(scoped_cons): Assume the use of union Aligned_Cons.
(lisp_string_size, make_local_string, build_local_string): Remove.
Unless otherwise specified, all callers of build_local_string
changed to use SCOPED_STRING.
(SCOPED_STRING): New macro.
* data.c (wrong_choice):
* menu.c (single_menu_item):
* process.c (Fformat_network_address):
Hoist use of SCOPED_STRING out of a scope, so that its returned
object lives long enough.
* fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
as the string might be long or might not be ASCII.
Stefan Monnier [Tue, 30 Sep 2014 00:48:31 +0000 (20:48 -0400)]
* lisp/minibuffer.el (completion-at-point): Emit warning for ill-behaved
completion functions.
Stefan Monnier [Mon, 29 Sep 2014 20:25:19 +0000 (16:25 -0400)]
* lisp/ses.el (ses--letref): Quote value before it gets re-evaluated.
Eli Zaretskii [Mon, 29 Sep 2014 19:49:44 +0000 (22:49 +0300)]
Follow-up to renaming v24.5 to 25.1.
README: Bump version to 25.0.50.
configure.ac (AC_INIT): Bump version to 25.0.50.
nt/makefile.w32-in (VERSION): Bump version to 25.0.50.
nt/emacsclient.rc: Bump version to 25.0.50.
nt/emacs.rc: Bump version to 25.0.50.
nt/config.nt (VERSION): Bump version to 25.0.50.
msdos/sed2v2.inp: Bump version to 25.0.50.
etc/refcards/ru-refcard.tex: Bump version to 25.0.50.
etc/refcards/emacsver.tex: Bump version to 25.0.50.
src/msdos.c (internal_terminal_init): Bump version to 25.
doc/man/emacs.1: Bump version to 25.0.50.
doc/emacs/emacsver.texi (EMACSVER): Bump to 20.0.50.
Eli Zaretskii [Mon, 29 Sep 2014 19:10:28 +0000 (22:10 +0300)]
Fix bug #18545 with lack of scrolling a window when point goes out of view.
src/xdisp.c (cursor_row_fully_visible_p): Update commentary.
(redisplay_window): Treat the frame's frozen_window_starts flag
the same way as the optional_new_start flag for the window: only
obey it if the glyph row showing point will be fully visible.
Likewise when the window start is in a continuation line. If,
after trying everything under the 'force_start' label, point is
still not fully visible, give up and scroll the window. Add
debugging traces.
src/window.c (Frecenter): Set the window's redisplay flag.
Stefan Monnier [Mon, 29 Sep 2014 18:14:08 +0000 (14:14 -0400)]
Rename 24.5 to 25.1
Except where we expect to backport the corresponding change.
Fabrice Niessen [Mon, 29 Sep 2014 12:30:16 +0000 (16:30 +0400)]
Check in accumulated leuven-theme updates before it's too late
* themes/leuven-theme.el: Updates.
Daiki Ueno [Mon, 29 Sep 2014 11:05:40 +0000 (20:05 +0900)]
mml: Signal error on invalid <#secure> tag
* mml.el (mml-parse-1): Error out if unknown mode is specified in
<#secure> tag (bug#18513).
Ulf Jasper [Mon, 29 Sep 2014 08:18:32 +0000 (10:18 +0200)]
Do not set `url-gateway-method' in `url-https'. (Bug#16543)
Currently, when `url-retrieve' is called for an https url it modifies
the variable `url-gateway-method'. This has been changed to
explicitly pass the requested gateway method to other functions.
When `url-retrieve' is being processed then (via
`accept-process-output') another `url-retrieve' call from a pending
timer can be started. The second call would always see the modified
`url-gateway-method' of the first one, which in general does not match
the url.
2014-09-28 Ulf Jasper <ulf.jasper@web.de>
* url-gw.el (url-open-stream): New optional parameter
`gateway-method'. If non-nil use it instead of global variable
`url-gateway-method'.
* url/url-http.el (url-http): New optional parameter
`gateway-method', pass it to `url-http-find-free-connection'.
(url-http-find-free-connection): New optional parameter
gateway-method, pass it to `url-open-stream'.
(url-https-create-secure-wrapper): Do not modify
`url-gateway-method' but explicitly provide 'tls as gateway-method
parameter to `url-https'.
Dmitry Antipov [Mon, 29 Sep 2014 06:44:31 +0000 (10:44 +0400)]
Keep stack-allocated Lisp objects fast rather than versatile.
* configure.ac (HAVE_STATEMENT_EXPRESSIONS): Remove.
For USE_STACK_LISP_OBJECTS, we always assume __GNUC__.
* lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
(SCOPED_CONS_INITIALIZER): New macro.
(scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
(USE_LOCAL_ALLOCA): Remove.
(local_cons, local_list1, local_list2, local_list3, local_list4):
Remove. Stack overflow checking makes them too slow.
(make_local_vector): Likewise. Also we just don't have enough
users for it.
(enum LISP_STRING_OVERHEAD): Remove.
(local_string_init, local_vector_init): Remove prototypes.
(make_local_string, build_local_string): Redesign to target short
compile-time string constants, fall back to regular string allocation
where appropriate.
(lisp_string_size): New function.
(verify_ascii) [ENABLE_CHECKING]: Add prototype.
* alloc.c (local_string_init, local_vector_init): Remove.
(verify_ascii) [ENABLE_CHECKING]: New function.
* buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
* fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
* menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
* xselect.c, xterm.c: All related users changed.
Ken Brown [Sun, 28 Sep 2014 22:31:59 +0000 (18:31 -0400)]
* src/sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
* src/gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
Ulf Jasper [Sun, 28 Sep 2014 18:00:54 +0000 (20:00 +0200)]
Do not set `url-gateway-method' in `url-https'. (Bug#16543)
Currently, when `url-retrieve' is called for an https url it modifies
the variable `url-gateway-method'. This has been changed to
explicitly pass the requested gateway method to other functions.
When `url-retrieve' is being processed then (via
`accept-process-output') another `url-retrieve' call from a pending
timer can be started. The second call would always see the modified
`url-gateway-method' of the first one, which in general does not match
the url.
2014-09-28 Ulf Jasper <ulf.jasper@web.de>
* url-gw.el (url-open-stream): New optional parameter
`gateway-method'. If non-nil use it instead of global variable
`url-gateway-method'.
* url/url-http.el (url-http): New optional parameter
`gateway-method', pass it to `url-http-find-free-connection'.
(url-http-find-free-connection): New optional parameter
gateway-method, pass it to `url-open-stream'.
(url-https-create-secure-wrapper): Do not modify
`url-gateway-method' but explicitly provide 'tls as gateway-method
parameter to `url-https'.
Thien-Thi Nguyen [Sun, 28 Sep 2014 08:03:48 +0000 (10:03 +0200)]
Font-lock `cl-flet*', too.
* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2):
Add "flet*" to intermediate var `cl-lib-kw'.
Ken Brown [Sat, 27 Sep 2014 23:35:50 +0000 (19:35 -0400)]
* configure.ac [CYGWIN]: Enable sound support.
Ken Brown [Sat, 27 Sep 2014 20:58:05 +0000 (16:58 -0400)]
Fix implementation of HYBRID_MALLOC on Cygwin.
* src/sheap.c (bss_sbrk_buffer_end): Cast to void *.
(bss_sbrk_buffer_beg): New variable. Use it...
* src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
incorrect definition.
Stefan Monnier [Sat, 27 Sep 2014 16:26:54 +0000 (12:26 -0400)]
* lisp/epg-config.el (epg-gpg-program): Use the plain program names rather
than their absolute file name.
Stefan Monnier [Sat, 27 Sep 2014 16:25:53 +0000 (12:25 -0400)]
* lisp/emacs-lisp/package.el (package-check-signature): Default to nil if
GPG is not available.
(package-refresh-contents): Don't mess with the keyring if we won't
check the signatures anyway.
Stefan Monnier [Sat, 27 Sep 2014 15:52:28 +0000 (11:52 -0400)]
* lisp/subr.el (track-mouse): New macro.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
Remove track-mouse case.
* lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove.
* src/keyboard.c (track-mouse): Rename to internal--track-mouse.
Make it into a function and change arg to be a function.
Leo Liu [Sat, 27 Sep 2014 10:08:59 +0000 (18:08 +0800)]
* lisp/emacs-lisp/eldoc.el (eldoc-mode): Fix thinko.
* lisp/progmodes/elisp-mode.el (elisp--eldoc-last-data): Use defvar.
Eli Zaretskii [Sat, 27 Sep 2014 09:36:08 +0000 (12:36 +0300)]
etc/charsets/README: Delete a stray quote character.
Stefan Monnier [Sat, 27 Sep 2014 04:27:14 +0000 (00:27 -0400)]
* pcase-tests.el: Add #18554 test case.
Stefan Monnier [Sat, 27 Sep 2014 04:24:06 +0000 (00:24 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--split-match, pcase--app-subst-match):
Handle the case where `match' is :pcase--succeed or :pcase--fail.
Fixes: debbugs:18554
Stefan Monnier [Sat, 27 Sep 2014 03:57:41 +0000 (23:57 -0400)]
Introduce global-eldoc-mode. Move Elisp-specific code to elisp-mode.el.
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): New minor mode.
(eldoc-schedule-timer): Obey it.
(eldoc-documentation-function): Default to nil.
(eldoc-mode): Don't enable if eldoc-documentation-function is not set.
(eldoc-documentation-function-default, eldoc-get-fnsym-args-string)
(eldoc-highlight-function-argument, eldoc-get-var-docstring)
(eldoc-last-data-store, eldoc-docstring-first-line)
(eldoc-docstring-format-sym-doc, eldoc-fnsym-in-current-sexp)
(eldoc-beginning-of-sexp, eldoc-current-symbol)
(eldoc-function-argstring): Move to elisp-mode.el.
(eldoc-symbol-function): Remove, unused.
* lisp/progmodes/elisp-mode.el: New file. Rename all "eldoc-*" to "elisp--*".
(elisp-completion-at-point): Rename from lisp-completion-at-point.
(elisp--preceding-sexp): Rename from preceding-sexp.
* lisp/loadup.el: Load new file progmodes/elisp-mode.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set eldoc-documentation-function.
* lisp/emacs-lisp/lisp.el (lisp--local-variables-1, lisp--local-variables)
(lisp--local-variables-completion-table, lisp--expect-function-p)
(lisp--form-quoted-p, lisp--company-doc-buffer)
(lisp--company-doc-string, lisp--company-location)
(lisp-completion-at-point): Move to elisp-mode.el.
* lisp/emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): New syntax-table,
extracted from emacs-lisp-mode-syntax-table.
(emacs-lisp-mode-abbrev-table, emacs-lisp-mode-syntax-table): Move to
elisp-mode.el.
(lisp-imenu-generic-expression): Add comments to document what comes
from which Lisp dialect.
(emacs-lisp-mode-map, emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load, emacs-lisp-mode-hook)
(emacs-lisp-mode, emacs-list-byte-code-comment-re)
(emacs-lisp-byte-code-comment)
(emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode)
(lisp-interaction-mode-map, lisp-interaction-mode)
(eval-print-last-sexp, last-sexp-setup-props)
(last-sexp-toggle-display, prin1-char, preceding-sexp)
(eval-last-sexp-1, eval-last-sexp-print-value)
(eval-last-sexp-fake-value, eval-sexp-add-defvars, eval-last-sexp)
(eval-defun-1, eval-defun-2, eval-defun): Move to elisp-mode.el.
* src/lisp.mk (lisp): Add elisp-mode.elc.
Stefan Monnier [Fri, 26 Sep 2014 22:19:12 +0000 (18:19 -0400)]
* etc/TODO: Add a few entries, remove others, expand some
Paul Eggert [Fri, 26 Sep 2014 18:32:48 +0000 (11:32 -0700)]
* progmodes/grep.el (grep-regexp-alist): Use more-accurate regexp.
Do not match file names that end in '/', as they cannot be 'grep'
hits nowadays. This prevents confusion when 'grep -r' reports a
match in a file whose basename is ':12345:'. Conversely, do not
require exactly the same sequence of spaces and tabs after both
colons, and allow spaces or tabs before the second colon, as per
the POSIX spec for 'grep' output.
Paul Eggert [Fri, 26 Sep 2014 16:49:10 +0000 (09:49 -0700)]
* xfns.c (x_default_scroll_bar_color_parameter):
Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
to pacify --enable-gcc-warnings in non-scrollbar builds.
Kelvin White [Fri, 26 Sep 2014 13:22:47 +0000 (09:22 -0400)]
Regression fix - #bug18551
Kelvin White [Fri, 26 Sep 2014 13:05:28 +0000 (09:05 -0400)]
erc.el: Fix regression - Bug #18551
Ken Brown [Fri, 26 Sep 2014 07:06:35 +0000 (10:06 +0300)]
src/w32term.h (ALIGN_STACK): Fix the cpp condition.
Leo Liu [Fri, 26 Sep 2014 02:01:17 +0000 (10:01 +0800)]
* emacs-lisp/cl-extra.el (cl-parse-integer): Fix last change.
Leo Liu [Fri, 26 Sep 2014 00:15:21 +0000 (08:15 +0800)]
Add cl-parse-integer based on parse-integer
* doc/misc/cl.texi (Predicates on Numbers): Document cl-digit-char-p.
(Numerical Functions): Document cl-parse-integer.
* lisp/calendar/parse-time.el (parse-time-digits): Remove.
(digit-char-p, parse-integer) Moved to cl-lib.el.
(parse-time-tokenize, parse-time-rules, parse-time-string): Use
cl-parse-integer.
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer): New function.
* lisp/emacs-lisp/cl-lib.el (cl-digit-char-table): New var.
(cl-digit-char-p): New function.
* test/automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New
tests.
Fixes: debbugs:18557
Juri Linkov [Thu, 25 Sep 2014 20:55:58 +0000 (23:55 +0300)]
* lisp/vc/add-log.el (change-log-next-buffer): Don't create an empty
buffer "ChangeLog" when the current buffer doesn't match ChangeLog.[0-9].
Return the current buffer if no files match the default pattern
ChangeLog.[0-9]. Signal "end of multi" when file is nil.
Fixes: debbugs:18547
Eli Zaretskii [Thu, 25 Sep 2014 17:49:02 +0000 (20:49 +0300)]
Don't use USE_STACK_LISP_OBJECTS on Windows with GCC older than 4.2.
src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
MinGW builds that use GCC before 4.2.
Fixes: debbugs:18559
Eli Zaretskii [Thu, 25 Sep 2014 17:28:48 +0000 (20:28 +0300)]
src/w32term.h (ALIGN_STACK): Fix a typo in last commit.
Fixes: debbugs:18559
Kelvin White [Thu, 25 Sep 2014 14:07:30 +0000 (10:07 -0400)]
Follow Emacs versioning
Stefan Monnier [Thu, 25 Sep 2014 13:07:28 +0000 (09:07 -0400)]
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify
the global vc-handled-backends.
Fixes: debbugs:18535
Dmitry Antipov [Thu, 25 Sep 2014 11:16:25 +0000 (15:16 +0400)]
* xterm.c (x_new_font): Fix typo introduced by the recent dead code removal.
Dmitry Antipov [Thu, 25 Sep 2014 10:24:57 +0000 (14:24 +0400)]
* lisp.h (toplevel): Adjust comment around USE_STACK_LISP_OBJECTS.
Eli Zaretskii [Thu, 25 Sep 2014 09:34:53 +0000 (12:34 +0300)]
Default to stack objects on DOS_NT platforms as well.
src/w32term.h (ALIGN_STACK) [__GNUC__]: Define to
__attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
src/lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
src/w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
ALIGN_STACK attribute.
src/w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
src/w32uniscribe.c (add_opentype_font_name_to_list): Add the
ALIGN_STACK attribute.
src/w32font.c (add_font_name_to_list, add_font_entity_to_list)
(add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
Martin Rudalics [Thu, 25 Sep 2014 07:01:35 +0000 (09:01 +0200)]
Remove code left dead after 2014-07-27 changes.
* frame.c (frame_inhibit_resize):
* widget.c (EmacsFrameResize):
* window.c (resize_frame_windows, Fset_window_configuration):
* xdisp.c (expose_frame):
* xfns.c (x_change_tool_bar_height):
* xmenu.c (update_frame_menubar):
* xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
Remove code left dead after 2014-07-27 changes.
Paul Eggert [Thu, 25 Sep 2014 02:59:45 +0000 (19:59 -0700)]
* configure.ac (MAKEINFO): Allow 'makeinfo' to be called 'texi2any'.
Paul Eggert [Thu, 25 Sep 2014 02:01:14 +0000 (19:01 -0700)]
Fix local_cons etc. to not exhaust the stack when in a loop.
Problem reported in:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
* buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
* charset.c (load_charset_map_from_file, Ffind_charset_region)
(Ffind_charset_string):
* chartab.c (uniprop_encode_value_numeric, uniprop_table):
* data.c (wrong_range):
* editfns.c (Fpropertize, format2):
* emacs.c (init_cmdargs, decode_env_path):
* fileio.c (auto_save_error):
* fns.c (Fyes_or_no_p):
* font.c (font_style_to_value, font_parse_xlfd)
(font_parse_family_registry, font_delete_unmatched)
(font_add_log):
* fontset.c (Fset_fontset_font):
* frame.c (x_get_arg):
* keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
(read_char_minibuf_menu_prompt):
* keymap.c (silly_event_symbol_error, describe_vector):
* lread.c (load_warn_old_style_backquotes):
* menu.c (single_menu_item):
* minibuf.c (Fread_buffer):
* process.c (status_message, Fformat_network_address)
(server_accept_connection):
* textprop.c (copy_text_properties):
* xdisp.c (Fcurrent_bidi_paragraph_direction):
* xfns.c (x_default_scroll_bar_color_parameter):
* xfont.c (xfont_open):
* xselect.c (x_clipboard_manager_error_1):
* xterm.c (x_term_init):
Put USE_LOCAL_ALLOCA at the start of the function.
* fns.c (maybe_resize_hash_table): Use build_string instead of
build_local_string, since we'd otherwise need a conditional
USE_LOCAL_ALLOCA here, but this is just debugging output and is
not worth the bother of optimization.
* font.c (font_delete_unmatched): Remove by-hand code that
observed MAX_ALLOCA limit, since it's now done automatically.
* keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
since build_local_string needs its sa_alloc.
* lisp.h (lisp_word_count): New function.
(SAFE_ALLOCA_LISP): Use it.
(USE_LOCAL_ALLOCA): New macro.
(local_cons, make_local_vector, make_local_string):
Observe the MAX_ALLOCA limit.
(LISP_STRING_OVERHEAD): New constant.
(make_local_string): Use it.
Paul Eggert [Wed, 24 Sep 2014 20:54:25 +0000 (13:54 -0700)]
Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
* lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
and Solaris and it's likely to work on similar platforms.
Paul Eggert [Wed, 24 Sep 2014 20:30:28 +0000 (13:30 -0700)]
Avoid signed integer overflow when converting Time to ptrdiff_t.
* keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
New macros.
(position_to_Time, Time_to_position): New functions.
(gen_help_event, kbd_buffer_get_event): Use them.
* systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
Go back to plain 'unsigned long', so that 'Time' is the same
for both X and non-X builds; this is less likely to cause surprise.
* termhooks.h: Remove compile-time check that Time and ptrdiff_t
are the same size; this is no longer required.
Stefan Monnier [Wed, 24 Sep 2014 19:23:13 +0000 (15:23 -0400)]
* lisp/find-cmd.el (find-cmd): Use grep's `find-program'.
Suggested by <lompik@voila.fr>.
Fixes: debbugs:18518
Paul Eggert [Wed, 24 Sep 2014 18:25:04 +0000 (11:25 -0700)]
* keyboard.c (make_lispy_event): Avoid unnecessary tests
of bit 28 and of whether an unsigned value is negative.
This simplifies the code a bit, and pacifies clang 3.4.
Ulf Jasper [Wed, 24 Sep 2014 17:33:54 +0000 (19:33 +0200)]
Newsticker: Add commands to rearrange treeview groups and document them. (Bug#12560)
2014-09-24 Ulf Jasper <ulf.jasper@web.de>
* newsticker.texi: Reworked. Document new treeview group
commands. Remove VERSION, UPDATED, use EMACSVER instead. Use
term 'feed reader'.
2014-09-24 Ulf Jasper <ulf.jasper@web.de>
* automated/newsticker-tests.el
(newsticker--group-find-parent-group),
(newsticker--group-do-rename-group): New tests.
2014-09-24 Ulf Jasper <ulf.jasper@web.de>
* net/newst-treeview.el (newsticker--treeview-do-get-node-by-id):
Renamed `newsticker--treeview-do-get-node' to
`newsticker--treeview-do-get-node-by-id'.
(newsticker--treeview-get-node-by-id): Renamed
`newsticker--treeview-get-node' to
`newsticker--treeview-get-node-by-id'.
(newsticker--treeview-get-current-node): Renamed `
`newsticker--treeview-get-node' to
`newsticker--treeview-get-node-by-id'.
(newsticker--treeview-buffer-init)
(newsticker--treeview-buffer-init): Disable buffer undo.
(newsticker--treeview-unfold-node): Adapted to modified
`newsticker--group-find-parent-group'.
(newsticker--group-do-find-group): Renamed
`newsticker--group-do-find-group-for-feed' to
`newsticker--group-do-find-group'. Now works for both, groups and
feeds.
(newsticker--group-find-parent-group): Renamed
`newsticker--group-find-group-for-feed' to
`newsticker--group-find-parent-group'. Now works for both, groups
and feeds.
(newsticker--group-do-get-parent-group)
(newsticker--group-get-parent-group): Removed.
(newsticker-group-add-group): Changed interactive prompts.
(newsticker-group-add-group): Finally jump to added group.
(newsticker-group-delete-group): Finally jump to current feed.
(newsticker--group-do-rename-group, newsticker-group-rename-group)
(newsticker--get-group-names, newsticker--group-names): New.
(newsticker-group-move-feed): Finally jump to moved feed.
(newsticker-group-shift-feed-down, newsticker-group-shift-feed-up)
(newsticker-group-shift-group-down)
(newsticker-group-shift-group-up, newsticker--group-shift): New
(newsticker--group-manage-orphan-feeds): Renamed
`newsticker--group-find-group-for-feed' to
`newsticker--group-find-parent-group'.
(newsticker-treeview-mode-map): New keybindings for new shift commands.
(newsticker-treeview-tree-do-click): Renamed
`newsticker--treeview-get-node' to
`newsticker--treeview-get-node-by-id'.
* net/newst-backend.el (newsticker--item-list)
(newsticker--item-position, newsticker--prev-message)
(newsticker--scrollable-text): Moved to newst-ticker.el.
* net/newst-ticker.el (newsticker--item-list)
(newsticker--item-position, newsticker--prev-message)
(newsticker--scrollable-text): Moved from newst-backend.el.
Stefan Monnier [Wed, 24 Sep 2014 17:31:59 +0000 (13:31 -0400)]
* lisp/erc/erc-track.el (erc-modified-channels-display): Update all mode lines
if needed. Remove call to erc-modified-channels-object
where we ignored the return value.
(erc-modified-channels-update): Don't force-mode-line-update here any more.
Fixes: debbugs:18510
Stefan Monnier [Wed, 24 Sep 2014 14:28:27 +0000 (10:28 -0400)]
* etc/package-keyring.gpg: New file.
Ken Brown [Wed, 24 Sep 2014 13:42:42 +0000 (17:42 +0400)]
* lisp.h (toplevel) [!USE_STACK_LISP_OBJECTS]: Fix poorly nested
conditions (Bug#18544).
Dmitry Antipov [Wed, 24 Sep 2014 11:59:13 +0000 (15:59 +0400)]
* lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
&& __GNUC__ && !__clang__. Mention known problems. Adjust comment.
Dmitry Antipov [Wed, 24 Sep 2014 11:11:14 +0000 (15:11 +0400)]
* chartab.c (uniprop_encode_value_numeric):
* font.c (font_style_to_value): Use make_local_vector.
(font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
* keymap.c (append_key): Use scoped_list1.
Eli Zaretskii [Wed, 24 Sep 2014 10:06:53 +0000 (13:06 +0300)]
Fix fallout on MinGW64 from the previous commit.
src/systime.h (Time): Define as size_t, to be consistent with 64-bit
Windows builds, where 'long' is a 32-bit type.
src/w32inevt.h (w32_console_mouse_position): Update the argument
types to use 'Time'.
src/w32term.c (w32_mouse_position)
(x_horizontal_scroll_bar_report_motion)
(x_scroll_bar_report_motion): Update the argument types to use
'Time'.
Eli Zaretskii [Wed, 24 Sep 2014 07:31:11 +0000 (10:31 +0300)]
Fix bug #18528 with crashes at startup during frameset restoration.
src/w32term.c (w32_read_socket): Don't use frame dimensions for
resizing if GetClientRect returned an empty (0, 0, 0, 0)
rectangle. Check the return value of GetClientRect, and don't use
the results if it didn't succeed.
src/dispnew.c (change_frame_size_1): Recompute the frame dimensions
in columns and lines after correcting the pixel dimensions in
check_frame_size.
(adjust_decode_mode_spec_buffer): Add assertion to avoid passing
negative values to xrealloc.
Dmitry Antipov [Wed, 24 Sep 2014 07:17:51 +0000 (11:17 +0400)]
* termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
(struct input_event): ...unsigned bitfields. Likewise for
`event_kind' member. Prefer unsigned for `code' and 'modifiers'.
Use `timestamp' for HELP_EVENT position. Add compile-time assert.
* keyboard.c (gen_help_event, kbd_buffer_store_help_event)
(kbd_buffer_get_event): Adjust users.
(scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
(make_scroll_bar_position): New function, refactored out of...
(make_lispy_event): ...adjusted user.
* nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
* nsterm.m (ns_mouse_position, mouseUp):
* term.c (term_mouse_position):
* w32inevt.c (w32_console_mouse_position):
* w32term.c (w32_mouse_position):
* xterm.c (XTmouse_position): Use scroll_bar_above_handle.
(x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
Prefer enum and explicit enum members to integers and numeric values.
Paul Eggert [Wed, 24 Sep 2014 04:12:37 +0000 (21:12 -0700)]
Fix some slow uses and misuses of strcat.
* doc.c (get_doc_string):
* gtkutil.c (get_utf8_string):
* xsmfns.c (x_session_initialize):
Avoid recomputation of string length.
* ftfont.c (ftfont_spec_pattern):
* xfns.c (xic_create_fontsetname):
Don't assume output buffer is initially zero.
Paul Eggert [Tue, 23 Sep 2014 19:21:54 +0000 (12:21 -0700)]
movemail: don't dump core if the current time is outlandish
* movemail.c (popmail): Check for mbx_delimit_begin failure.
(mbx_delimit_begin): Fail if the current time is so outlandish
that localtime would fail or asctime would have undefined
behavior. Use strftime to avoid asctime undefined behavior.
Paul Eggert [Tue, 23 Sep 2014 18:20:38 +0000 (11:20 -0700)]
Merge from gnulib.
This incorporates:
2014-09-11 fcntl-h: fix compilation with Intel C++ compiler
2014-09-04 pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
Paul Eggert [Tue, 23 Sep 2014 17:03:48 +0000 (10:03 -0700)]
* lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
All callers changed.
* xterm.c (x_term_init): Use new functionality to avoid two needs
to compute a string length.
Paul Eggert [Tue, 23 Sep 2014 16:07:23 +0000 (09:07 -0700)]
* dispextern.h, xdisp.c (window_box_right_offset): Now static.
Dmitry Antipov [Tue, 23 Sep 2014 15:49:00 +0000 (19:49 +0400)]
Use known length of a Lisp string to copy it faster.
* lisp.h (lispstrcpy): New function. Add comment.
* callproc.c (child_setup):
* dbusbind.c (xd_append_arg):
* doc.c (get_doc_string):
* font.c (Ffont_xlfd_name):
* frame.c (xrdb_get_resource):
* process.c (Fmake_network_process, network_interface_info):
* w32fns.c (Fx_open_connection):
* w32proc.c (sys_spawnve):
* xfns.c (select_visual):
* xfont.c (xfont_list):
* xsmfns.c (x_session_initialize):
* xterm.c (x_term_init): Use it.
Glenn Morris [Tue, 23 Sep 2014 10:21:30 +0000 (06:21 -0400)]
Auto-commit of loaddefs files.
Paul Eggert [Tue, 23 Sep 2014 05:42:47 +0000 (22:42 -0700)]
Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
Problem reported by Dmietry Antipov in thread leading to:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
remain unfixed.
* callproc.c (call_process): Save and restore sa_avail.
* lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
(AVAIL_ALLOCA): New macro.
(SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
Use it, and check against sa_avail rather than MAX_ALLOCA.
Stefan Monnier [Mon, 22 Sep 2014 19:20:45 +0000 (15:20 -0400)]
Merge from emacs-24
Sam Steingold [Mon, 22 Sep 2014 19:19:29 +0000 (15:19 -0400)]
oops