]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 5 Aug 2016 21:07:00 +0000 (14:07 -0700)]
Merge from origin/emacs-25

d4c6774 Fix missing point information in undo
3a9d629 Avoid crashes when buffer modification hooks clobber match data
178b2f5 Note combine-and-quote-strings doesn't shell quote
dec7567 Explain when package-initialize isn't called
113d1e2 Fix escaping in sh-indent-after-continuation docstr
80e2044 ; * etc/NEWS: Improve previous change.
5bb9e6c ; * etc/NEWS: Document how to avoid horizontal scroll bars.
38f4b8e Clarify the documentation of back-references in replacements

8 years ago; Merge from origin/emacs-25
Paul Eggert [Fri, 5 Aug 2016 21:07:00 +0000 (14:07 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

d039fc4 ; Auto-commit of loaddefs files.

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 5 Aug 2016 21:06:59 +0000 (14:06 -0700)]
Merge from origin/emacs-25

850ba44 Clarify lexical binding with symbol args behavior
f981b31 * lisp/net/tramp-sh.el (tramp-remote-path): Doc fix.
68fc964 * lisp/net/tramp-sh.el (tramp-remote-path): Doc fix.  (Bug#23...
21110af Avoid assertion violations when rendering some fonts
6192b6c Document more details of package activation
272ddc6 Fixup warning message regarding HOME a bit more
43206d6 * lisp/leim/quail/indian.el ("bengali-probhat"): Change indic...
d41f7ff Fix input method "probhat" for Bengali
c150a64 ; Fix typo in commit before last
ebf0472 Add to elisp-completion-at-point's docstring
fd9fad0 Give more helpful warning about setting HOME
ea6b01d ; * lisp/term.el (term-mode): FIXME comment about bidi reorde...

# Conflicts:
# lisp/term.el

8 years ago; Merge from origin/emacs-25
Paul Eggert [Fri, 5 Aug 2016 21:05:10 +0000 (14:05 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

7f83e7e Fix slow redisplay in term-mode

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 5 Aug 2016 21:05:09 +0000 (14:05 -0700)]
Merge from origin/emacs-25

26d4da0 New input method "probhat" for Bengali
4f445bf ; Spelling fix
f403f03 ; Fix typo

8 years agoSpelling and minor grammar fixes
Paul Eggert [Fri, 5 Aug 2016 20:31:10 +0000 (13:31 -0700)]
Spelling and minor grammar fixes

* test/file-organization.org: Rename from test/file-organisation.org.

8 years agoWiden in certain low level CC Mode functions. This fixes bug #24148.
Alan Mackenzie [Thu, 4 Aug 2016 21:07:52 +0000 (21:07 +0000)]
Widen in certain low level CC Mode functions.  This fixes bug #24148.

* lisp/progmodes/cc-engine (c-state-semi-pp-to-literal)
(c-state-full-pp-to-literal): Widen around the functionality.
(c-parse-ps-state-below): Correct the order of save-excursion and
save-restriction.

8 years agoFix Bug#24149
Stefan Monnier [Thu, 4 Aug 2016 15:39:28 +0000 (23:39 +0800)]
Fix Bug#24149

* lisp/subr.el (set-transient-map): Don't wait if MAP not present in
overriding-terminal-local-map.  (Bug#24149)

8 years agoUpdate from gnulib
Paul Eggert [Wed, 3 Aug 2016 22:10:58 +0000 (15:10 -0700)]
Update from gnulib

This incorporates:
2016-07-03 mktime: call tzset as per POSIX
* doc/misc/texinfo.tex, lib/mktime.c, m4/mktime.m4:
Copy from gnulib.

8 years agoFix GnuTLS includes
Paul Eggert [Wed, 3 Aug 2016 21:20:38 +0000 (14:20 -0700)]
Fix GnuTLS includes

* src/gnutls.c [HAVE_GNUTLS]: Don’t include gnutls/gnutls.h
a second time; although it doesn’t hurt, it’s not needed.
* src/sysdep.c [!HAVE_GNUTLS]: Don’t include gnutls/crypto.h,
as it may not be available.  Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00100.html

8 years agoFix accessing regex-resources in out-of-tree test runs in regex-tests
Michal Nazarewicz [Wed, 3 Aug 2016 02:37:29 +0000 (04:37 +0200)]
Fix accessing regex-resources in out-of-tree test runs in regex-tests

[82a487d: Fix reading of regex-resources in regex-tests] attempted to
fix regex-tests failing when run from the source tree (i.e. via make)
by hard-coding path to regex-resources directory relative to the test
directory.

This fixed runs from the tree but broke the test when run using other
methods.

Fix by trying ‘load-file-name’ or ‘buffer-file-name’, whichever is set.

* test/src/regex-tests.el (regex-tests--resources-dir): New variable
storing path to the regex-resources directory.
(regex-tests-generic-line): Use aforementioned variable.

8 years agoSimplify by assuming GnuTLS 2.12.2 or later
Paul Eggert [Wed, 3 Aug 2016 12:02:03 +0000 (08:02 -0400)]
Simplify by assuming GnuTLS 2.12.2 or later

* src/gnutls.c (gnutls_certificate_details):
* src/sysdep.c: Assume GnuTLS 2.12.2 or later.

8 years agoPort to systems lacking GNUTLS_NONBLOCK
Paul Eggert [Wed, 3 Aug 2016 11:45:47 +0000 (07:45 -0400)]
Port to systems lacking GNUTLS_NONBLOCK

Problem reported by Colin Baxter in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00096.html
* src/gnutls.c (Fgnutls_boot): Don’t assume GNUTLS_NONBLOCK is defined.

8 years agoFix non-blocking GnuTLS with slow connection
Paul Eggert [Wed, 3 Aug 2016 08:54:20 +0000 (01:54 -0700)]
Fix non-blocking GnuTLS with slow connection

Although the problem is reported for OS X (Bug#23982), it seems to
be possible on other POSIXish platforms.
* src/gnutls.c (emacs_gnutls_nonblock_errno) [!WINDOWSNT]:
New function.
(emacs_gnutls_handshake) [!WINDOWSNT]:
Use it as the errno function, if non-blocking.
(Fgnutls_boot): Use GNUTLS_NONBLOCK if non-blocking.

8 years agoRequire GnuTLS 2.12.2 or later
Paul Eggert [Wed, 3 Aug 2016 08:33:21 +0000 (04:33 -0400)]
Require GnuTLS 2.12.2 or later

* configure.ac, etc/NEWS: Require GnuTLS 2.12.2 or later,
instead of merely 2.6.6 or later (Bug#23982#20).
* src/gnutls.c (init_gnutls_functions, emacs_gnutls_handshake)
[WINDOWSNT]: Don’t bother with gnutls_check_version or
gnutls_transport_set_lowat, as they are no longer needed now that
we require gnutls 2.12.2 or later.

8 years ago* src/window.c (sanitize_window_sizes): Remove unused arg `frame'
Stefan Monnier [Wed, 3 Aug 2016 02:43:11 +0000 (22:43 -0400)]
* src/window.c (sanitize_window_sizes): Remove unused arg `frame'

* src/window.h (sanitize_window_sizes): Adjust prototype.
* src/frame.c (adjust_frame_size): Adjust calls.

8 years agoFix (mapcar F S) crash when F alters S’s length
Paul Eggert [Wed, 3 Aug 2016 01:04:28 +0000 (21:04 -0400)]
Fix (mapcar F S) crash when F alters S’s length

* src/fns.c (mapcar1): Return number of elements computed,
which can be less than LENI if the function alters the list.
All callers changed.  (Bug#24118)

8 years agoPort window changes to --enable-gcc-warnings
Paul Eggert [Wed, 3 Aug 2016 00:46:30 +0000 (20:46 -0400)]
Port window changes to --enable-gcc-warnings

* src/window.c (sanitize_window_sizes): Return void.
This pacifies GCC, and no caller uses the return value anyway.

8 years ago* src/window.c: Fix bootstrap failure due to window.el changes
Stefan Monnier [Tue, 2 Aug 2016 23:45:30 +0000 (19:45 -0400)]
* src/window.c: Fix bootstrap failure due to window.el changes

(sanitize_window_sizes): Adjust to new calling convention of
window--sanitize-window-sizes and only call it if defined.
(Fwindow__sanitize_window_sizes): Remove.
(syms_of_window): Don't defsubr it.

8 years agoFix Bug#23883
Michael Albinus [Tue, 2 Aug 2016 20:38:03 +0000 (22:38 +0200)]
Fix Bug#23883

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Call `process-actions' with adapted position.  The connection
buffer might have been cleaned up already.  (Bug#23883)

8 years agoPort regex changes to strict ISO C
Paul Eggert [Tue, 2 Aug 2016 20:16:23 +0000 (16:16 -0400)]
Port regex changes to strict ISO C

* src/regex.c (regex_compile): Redo casts.

8 years ago* lisp/window.el: Use lexical-binding
Stefan Monnier [Tue, 2 Aug 2016 19:17:01 +0000 (15:17 -0400)]
* lisp/window.el: Use lexical-binding

(window--min-size-ignore-p): Remove unused arg `horizontal'.
(window--sanitize-window-sizes): Remove unused arg `frame'.
(window-edges): Remove unused vars left-off and right-off.
(display-buffer-reuse-mode-window): Remove unused var `frame?'.
Avoid extraneous setq and do a bit of CSE.
(fit-frame-to-buffer): Remove unused vars `window', `fit-width',
and `toolbar-extra-height'.
(window-adjust-process-window-size): Remove unused arg `process'.

8 years agoFix unused lexical variable
Michal Nazarewicz [Tue, 2 Aug 2016 17:44:51 +0000 (19:44 +0200)]
Fix unused lexical variable

This fixes the following warning:

    In toplevel form:
    src/regex-tests.el:416:1:Warning: Unused lexical variable ‘newline’

* test/src/regex-tests.el (regex-tests-BOOST): Remove unused lexical
variable.

8 years agoRemove unused STREQ macro
Michal Nazarewicz [Tue, 2 Aug 2016 17:41:00 +0000 (19:41 +0200)]
Remove unused STREQ macro

This fixes the following compilation warning:

    regex.c:516:0: warning: macro "STREQ" is not used [-Wunused-macros]
     #define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
     ^

* src/regex.c (STREQ): Remove unused macro.  It should have been removed
in a [4538a5e: Refactor regex character class parsing in [:name:]]
commit but was mistakenly left out.

8 years ago* cl-generic.el: Fix problems introduced by new load-history format
Stefan Monnier [Tue, 2 Aug 2016 17:01:26 +0000 (13:01 -0400)]
* cl-generic.el: Fix problems introduced by new load-history format

* lisp/emacs-lisp/cl-generic.el (cl--generic-load-hist-format): New function.
(cl-generic-define-method, cl--generic-describe): Use it.
(cl--generic-search-method): Adjust for new format.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
* test/lisp/progmodes/elisp-mode-tests.el:
Use cl--generic-load-hist-format rather than hard-coding cl-generic's
internal format.

8 years agoHardcode regex syntax to remove dead code handling different syntax
Michal Nazarewicz [Wed, 27 Jul 2016 21:13:11 +0000 (23:13 +0200)]
Hardcode regex syntax to remove dead code handling different syntax

Emacs only ever uses its own regex syntax so support for other syntaxes
is never used.  Hardcode the syntax so that the compilar can detect such
dead code and remove it from compiled code.

The only exception is RE_NO_POSIX_BACKTRACKING which can be separatelly
specified.  Handle this separatelly with a function argument (replacing
now unnecessary syntax argument).

With this patchset, size of Emacs binary on x86_64 machine is reduced by
around 60 kB:

new-sizes:-rwx------ 3 mpn eng 30254720 Jul 27 23:31 src/emacs
old-sizes:-rwx------ 3 mpn eng 30314828 Jul 27 23:29 src/emacs

* src/regex.h (re_pattern_buffer): Don’t define syntax field #ifdef emacs.
(re_compile_pattern): Replace syntax with posix_backtracking argument.

* src/regex.c (print_compiled_pattern): Don’t print syntax #ifdef emacs.
(regex_compile): #ifdef emacs, replace syntax argument with
posix_backtracking which is now used instead of testing for
RE_NO_POSIX_BACKTRACKING syntax.
(re_match_2_internal): Don’t access bufp->syntax #ifndef emacs.
(re_compile_pattern): Replace syntax with posix_backtracking argument.

* src/search.c (compile_pattern_1): Pass boolean posix_backtracking
instead of syntax to re_compile_pattern.

8 years agoGet rid of re_set_whitespace_regexp
Michal Nazarewicz [Wed, 27 Jul 2016 20:53:57 +0000 (22:53 +0200)]
Get rid of re_set_whitespace_regexp

* src/regex.h (re_set_whitespace_regexp): Delete.
(re_compile_pattern): Add whitespace_regexp argument #ifdef emacs.

* src/regex.c (re_set_whitespace_regexp, whitespace_regexp): Delete.
(regex_compile): Add whitespace_regexp argument #ifdef emacs and wrap
whitespace_regexp-related code in an #ifdef emacs so it’s compiled out
unless building Emacs.
(re_compile_pattern): Pass whitespace_regexp argument to regex_compile

* src/search.c (compile_pattern_1): Don’t use re_set_whitespace_regexp,
pass the regex as argument to re_compile_pattern instead.

8 years agoGet rid of re_set_syntax
Michal Nazarewicz [Wed, 27 Jul 2016 20:39:04 +0000 (22:39 +0200)]
Get rid of re_set_syntax

Instead of using a global variable for storing regex syntax, pass it
to re_compile_pattern.  This is only enabled when compiling Emacs (i.e.
‘#ifdef emacs’).

* src/regex.h (re_set_syntax): Declare only #ifndef emacs.
(re_compile_pattern): Now takes syntax argument #ifdef emacs.

* src/regex.c (re_syntax_options): Define only #ifndef emacs.
(re_compile_pattern): Use the new syntax argument #ifdef emacs.

* src/search.c (compile_pattern_1): Don’t use re_set_syntax and
instead pass syntax to re_compile_pattern directly.

8 years agoRemove dead opcodes in regex bytecode
Michal Nazarewicz [Sat, 23 Jul 2016 14:05:12 +0000 (16:05 +0200)]
Remove dead opcodes in regex bytecode

There is no way to specify before_dot and after_dot opcodes in a regex
so code handling those ends up being dead.  Remove it.

* src/regex.c (print_partial_compiled_pattern, regex_compile,
analyze_first, re_match_2_internal): Remove handling and references to
before_dot and after_dot opcodes.

8 years agoRefactor regex character class parsing in [:name:]
Michal Nazarewicz [Sun, 17 Jul 2016 01:09:38 +0000 (03:09 +0200)]
Refactor regex character class parsing in [:name:]

re_wctype function is used in three separate places and in all of
those places almost exact code extracting the name from [:name:]
surrounds it.  Furthermore, re_wctype requires a NUL-terminated
string, so the name of the character class is copied to a temporary
buffer.

The code duplication and unnecessary memory copying can be avoided by
pushing the responsibility of parsing the whole [:name:] sequence to
the function.

Furthermore, since now the function has access to the length of the
character class name (since it’s doing the parsing), it can take
advantage of that information in skipping some string comparisons and
using a constant-length memcmp instead of strcmp which needs to take
care of NUL bytes.

* src/regex.c (re_wctype): Delete function.  Replace it with:
(re_wctype_parse): New function which parses a whole [:name:] string
and returns a RECC_* constant or -1 if the string is not of [:name:]
format.
(regex_compile): Use re_wctype_parse.
* src/syntax.c (skip_chars): Use re_wctype_parse.

8 years agoSplit regex glibc test cases into separet tests
Michal Nazarewicz [Wed, 27 Jul 2016 13:49:20 +0000 (15:49 +0200)]
Split regex glibc test cases into separet tests

* test/src/regex-tests.el (regex-tests): Remove and split into multiple
tests cases.
(regex-tests-glbic-BOOST, regex-tests-glibc-PCRE,
regex-tests-glibc-PTESTS, regex-tests-glibc-TESTS): New test cases split
from ‘regex-tests’.

8 years agoDon’t (require 'cl)
Michal Nazarewicz [Wed, 27 Jul 2016 16:38:41 +0000 (18:38 +0200)]
Don’t (require 'cl)

* test/src/regex-test.el: Don’t (require 'cl).
(regex-tests-PCRE): s/loop/cl-loop/

8 years agoFix reading of regex-resources in regex-tests
Michal Nazarewicz [Wed, 27 Jul 2016 15:25:34 +0000 (17:25 +0200)]
Fix reading of regex-resources in regex-tests

* test/src/regex-tests.el (regex-tests-generic-line): Referring to
‘buffer-file-name’ does not work when running the test from command
line, i.e. via make, which results in (wrong-type-argument stringp nil)
failures.  Replace it with hard-coded path.
(regex-tests-BOOST, regex-tests-PCRE, regex-tests-PTESTS-whitelist,
regex-tests-TESTS-whitelist): ‘regex-tests-generic-line’ now  includes
the ‘regex-resources’ path component so the tests don’t need to specify
it explicitly.

8 years agoAdded driver for the regex tests
Dima Kogan [Sun, 28 Feb 2016 02:06:35 +0000 (18:06 -0800)]
Added driver for the regex tests

* test/src/regex-tests.el (regex-tests): Test executing glibc tests
cases.

[mina86@mina86.com: merged test with existing file]

8 years agoNew regex tests imported from glibc 2.21
Dima Kogan [Sat, 12 Mar 2016 02:18:14 +0000 (18:18 -0800)]
New regex tests imported from glibc 2.21

* test/src/regex-resources/BOOST.tests:
* test/src/regex-resources/PCRE.tests:
* test/src/regex-resources/PTESTS:
* test/src/regex-resources/TESTS:
New test data files

[mina86@mina86.com: Moved files from test/src/regex/* to test/src/*.]

8 years agoFix use-after-close in connect_network_socket
Paul Eggert [Tue, 2 Aug 2016 07:31:04 +0000 (03:31 -0400)]
Fix use-after-close in connect_network_socket

* src/process.c (connect_network_socket):
Reverse sense of previous fix.  Problem reported by Ken Brown in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00004.html

8 years ago* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Glenn Morris [Mon, 1 Aug 2016 20:31:57 +0000 (16:31 -0400)]
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Respect autoload-timestamps for "actual autoloads are elsewhere" case.

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Aug 2016 10:24:24 +0000 (06:24 -0400)]
; Auto-commit of loaddefs files.

8 years ago* lisp/textmodes/rst.el: Major refactoring, minor changes, minor fixes
Stefan Merten [Sun, 31 Jul 2016 14:40:46 +0000 (16:40 +0200)]
* lisp/textmodes/rst.el: Major refactoring, minor changes, minor fixes

(rst-Ado, rst-Hdr, rst-Ttl, rst-Stn): Introduce classes
representing reStructuredText section header concepts.
(rst-mode-map, rst-new-preferred-hdr)
(rst-update-section, rst-classify-adornment)
(rst-ttl-at-point, rst-all-ttls-cache)
(rst-hdr-hierarchy-cache, rst-reset-section-caches)
(rst-all-ttls, rst-infer-hdr-hierarchy, rst-hdr-hierarchy)
(rst-all-ttls-with-level, rst-get-previous-hdr)
(rst-adornment-complete-p, rst-next-hdr, rst-adjust)
(rst-adjust-section, rst-promote-region)
(rst-display-hdr-hierarchy, rst-straighten-sections)
(rst-all-stn, rst-remaining-stn, rst-toc-insert)
(rst-toc-insert-node, rst-toc-node, rst-toc)
(rst-forward-section, rst-adornment-level)
(rst-font-lock-handle-adornment-pre-match-form)
(rst-imenu-convert-cell, rst-imenu-create-index): Refactor
using classes.
(rst-compare-adornments, rst-get-adornment-match): Remove
functions now in classes.
(rst-re-alist-def, rst-toc-mode)
(rst-font-lock-extend-region-extend): Minor improvements.
(rst-mode, rst-compile): Use `setq-local'.
(rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
(rst-official-version, rst-official-cvs-rev)
(rst-package-emacs-version-alist): Maintain version tags.

8 years agoFix calculation of tool bar width reported by `frame-geometry' (Bug#24107)
Martin Rudalics [Sat, 30 Jul 2016 12:11:12 +0000 (14:11 +0200)]
Fix calculation of tool bar width reported by `frame-geometry' (Bug#24107)

* src/w32fns.c (Fw32_frame_geometry): Fix calculation of tool
bar width (Bug#24107).  Reindent.
* src/xfns.c (frame_geometry): Fix calculation of tool bar
width on non-GTK builds.

8 years agoFix region display while dragging mouse
Eli Zaretskii [Sat, 30 Jul 2016 08:32:02 +0000 (11:32 +0300)]
Fix region display while dragging mouse

* lisp/mouse.el (mouse-drag-track): Reset deactivate-mark in the
buffer of the drag event, to allow mark to be set and the region
be shown as we drag the mouse.  (Bug#24030)

8 years agoCopy just non-empty strings to kill-ring
Tino Calancha [Sat, 30 Jul 2016 08:26:19 +0000 (17:26 +0900)]
Copy just non-empty strings to kill-ring

* lisp/dired.el (dired-copy-filename-as-kill):
Do not change the kill ring when the string is empty (Bug#24103).

8 years agoAvoid warnings about undo list while decoding
Eli Zaretskii [Sat, 30 Jul 2016 08:23:10 +0000 (11:23 +0300)]
Avoid warnings about undo list while decoding

* src/coding.c (coding_restore_undo_list): New function.
(decode_coding_gap, decode_coding_object): Temporarily set the
buffer's undo list to t, to avoid warnings when decoding changes
the buffer many times, e.g. due to post-read-conversion.  Use
coding_restore_undo_list to make sure the undo list is restored.
(Bug#23813)

8 years agoprofiler: Add mouse-1 binding for tree expansion
Noam Postavsky [Fri, 29 Jul 2016 00:06:09 +0000 (20:06 -0400)]
profiler: Add mouse-1 binding for tree expansion

(profiler-report-mode-map): Add mouse-1 binding for
profiler-report-toggle-entry (Bug #13455).

8 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche [Thu, 28 Jul 2016 16:12:50 +0000 (18:12 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

8 years agoEnable addition of local printers from a mode hook.
Vincent Belaïche [Thu, 28 Jul 2016 15:41:21 +0000 (17:41 +0200)]
Enable addition of local printers from a mode hook.

* doc/misc/ses.texi (Printer functions): Split the node into 5
sub-nodes + add some extra documentation.
(Various kinds of printer functions): Make an itemisation to
disintguish better the 3 types of printers, give an example of
lambda printer definition.
(Standard printer functions): Add documentation for ses-prin1
printer function.
(Local printer functions): Add documentation for creating
local printers programmatically from a hook.
(Writing a lambda printer function): Add documentation about
anti-stackoverflow precautions to take when you call the
standard printer functions from inside a local printer.

* lisp/ses.el (ses-standard-printer-functions): Add ses-prin1
among standard printer function, and update docstring
accordingly.
(ses-call-printer, ses-export-tab): Call `ses-prin1' instead
of prin1-to-string.
(ses-define-local-printer): Add definition to arguments so
that a local printer can be defined programmatically from a
mode hook.  Make docstring more substantial.  Use completing
read for local printer name input.  Plus some minor
optimization.
(ses-define-if-new-local-printer): New defsubst.
(ses-center, ses-center-span, ses-dashfill)
(ses-dashfill-span, ses-tildefill-span): Allow to pass printer
as an optional argument to superseed column printer/default
spreadsheet printer.
(ses-prin1): New defun.

8 years agoPrompt to save gnus-cloud-method.
Ted Zlatanov [Wed, 27 Jul 2016 19:22:02 +0000 (15:22 -0400)]
Prompt to save gnus-cloud-method.

Since `gnus-cloud-method' is a defcustom, when it's set, we should
prompt the user to save it, so the customization is not lost on
restart.

* gnus-srvr.el (gnus-server-toggle-cloud-method-server): Prompt to
save the customization of `gnus-cloud-method'.

8 years agoFix dired-test-bug22694
Ken Brown [Wed, 27 Jul 2016 16:28:14 +0000 (12:28 -0400)]
Fix dired-test-bug22694

* test/lisp/dired-tests.el (dired-test-bug22694): Delete the
"bug22694" directory, if it exists, before running the test.  It
might be left over from a previous aborted run of the test.

8 years agoFix ‘is multibyte’ test regex.c’s mutually_exclusive_p (bug#24020)
Michal Nazarewicz [Wed, 27 Jul 2016 16:14:57 +0000 (18:14 +0200)]
Fix ‘is multibyte’ test regex.c’s mutually_exclusive_p (bug#24020)

* src/regex.c (mutually_exclusive_p): Fix how whether character is
unibyte is tested when calling execute_charset function.  This bug has
been introduced by [6dc6b00: Fix ‘[[:cc:]]*literal’ regex failing to
match ‘literal’] which dropped a call to IS_REAL_ASCII (c) macro.
Reinstitute it.

8 years agoRemove hook when disabling ibuffer-auto-mode
Tino Calancha [Wed, 27 Jul 2016 10:44:06 +0000 (19:44 +0900)]
Remove hook when disabling ibuffer-auto-mode

* lisp/ibuf-ext.el (ibuffer-auto-mode):
Remove 'ibuffer-auto-update-changed' from 'post-command-hook'.

8 years ago; Spelling fixes
Tino Calancha [Wed, 27 Jul 2016 10:14:37 +0000 (19:14 +0900)]
; Spelling fixes

8 years ago* lisp/subr.el (cancel-change-group): Reset cell in case of error
Stefan Monnier [Tue, 26 Jul 2016 17:14:50 +0000 (13:14 -0400)]
* lisp/subr.el (cancel-change-group): Reset cell in case of error

Since the setcdr/setcdr is supposed to be temporary, use unwind-protect
to make sure we properly undo the temporary change even in case of error.

8 years agoAvoid segfaults in compute_motion
Eli Zaretskii [Tue, 26 Jul 2016 15:27:21 +0000 (18:27 +0300)]
Avoid segfaults in compute_motion

* src/indent.c (compute_motion): Don't turn on and don't use the
width cache unless the buffer's width-table is non-nil.  This
avoids segfaults because code that uses the width cache assumes
the width-table exists.  (Bug#24064)

8 years agoDo not sharp-quote lambdas
Nicolas Petton [Tue, 26 Jul 2016 15:08:29 +0000 (17:08 +0200)]
Do not sharp-quote lambdas

* lisp/progmodes/sql.el: Remove sharp-quotes in lambdas.

8 years ago* gnus-cloud.el (gnus-cloud-encode-data): Fix 'base64-gzip encoding.
Ted Zlatanov [Tue, 26 Jul 2016 02:07:35 +0000 (22:07 -0400)]
* gnus-cloud.el (gnus-cloud-encode-data): Fix 'base64-gzip encoding.

8 years agoAdd warning to format-alist docs.
Andrew Hyatt [Mon, 25 Jul 2016 03:58:47 +0000 (23:58 -0400)]
Add warning to format-alist docs.

*/doc/lispref/files.texi (format-alist) Change documentation for
format-alist to warn against file modifications when formatting, which
leads to incorrect results.  (Bug#5440)

Changes suggested by Eli.

8 years ago* lisp/gnus/mm-decode.el (mm-convert-shr-links):
Katsumi Yamaoka [Mon, 25 Jul 2016 23:46:58 +0000 (23:46 +0000)]
* lisp/gnus/mm-decode.el (mm-convert-shr-links):
Preserve key bindings that shr adds (bug#23964).

8 years agoFix ‘[[:cc:]]*literal’ regex failing to match ‘literal’ (bug#24020)
Michal Nazarewicz [Mon, 18 Jul 2016 13:59:26 +0000 (15:59 +0200)]
Fix ‘[[:cc:]]*literal’ regex failing to match ‘literal’ (bug#24020)

The regex engine tries to optimise Kleene star by avoiding backtracking
when it can detect that star’s operand cannot match what follows it in
the pattern.

For example, when ‘[[:alpha:]]*1’ tries to match a ‘foo’, the engine
will test the longest match for ‘[[:alpha:]]*’, namely ’foo’ which is
the entire string.  Literal digit one still present in the pattern will
however not match the remaining empty string.

Normally, backtracking would be performed trying a shorter match for the
character class (namely ‘fo’ leaving ‘o’ in the string), but since the
engine knows whatever would be put back into the string cannot possibly
match literal digit one so no backtracking will be attempted.

In the regexes of the form ‘[[:CC:]]*X’, the optimisation can be applied
if the character class CC does not match character X.  In the above
example, this holds because digit one is not in alpha character class.

This test is performed by mutually_exclusive_p function but it did not
check class bits of a charset opcode.  This resulted in an assumption
that character classes do not match multibyte characters.  For example,
it would incorrectly conclude that [[:alpha:]] doesn’t match ‘ż’.

This, in turn, led to the aforementioned Kleene star optimisation being
incorrectly applied in patterns such as ‘[[:graph:]]*☠’ (which should
match ‘☠’ but doesn’t as can be tested by executing
    (string-match-p "[[:graph:]]*☠" "☠")
which should return 0 but instead yields nil.

This issue affects any class witch matches multibyte characters, i.e.
if ‘[[:cc:]]’ matches a multibyte character X then ‘[[:cc:]]*X’ will
fail to match ‘X’.

* src/regex.c (executing_charset): A new function for executing the
charset and charset_not opcodes.  It performs check on the character
taking into consideration existing bitmap, range table and class bits.
It also advances the pointer in the regex bytecode past the parsed
opcode.
(CHARSET_LOOKUP_RANGE_TABLE_RAW, CHARSET_LOOKUP_RANGE_TABLE): Removed.
Code now included in executing_charset.
(mutually_exclusive_p, re_match_2_internal): Changed to take advantage
of executing_charset function.

* test/src/regex-tests.el: New file with tests for the character class
matching.

8 years agoFix auto-reverting image-mode buffer (bug#21598)
Nicolas Petton [Mon, 25 Jul 2016 21:40:35 +0000 (23:40 +0200)]
Fix auto-reverting image-mode buffer (bug#21598)

When auto-reverting an image buffer, `image-mode' is not called since
`revert-buffer' is called with `preserve-modes' set to non-nil.

* lisp/image-mode.el (image-after-revert-hook): Check if there is an
image display property for the current buffer before updating it.

8 years ago‘signal’ no longer returns
Paul Eggert [Sun, 24 Jul 2016 09:10:09 +0000 (11:10 +0200)]
‘signal’ no longer returns

Although for decades ‘signal’ has been documented to not return,
a corner case in the Lisp debugger causes ‘signal’ to return.
Remove the corner case and adjust Emacs internals accordingly.
An alternative would be to document the corner case, but this
would complicate the Lisp API unnecessarily.  (Bug#24047)
* src/eval.c (signal_or_quit): New function, with most of the
old contents of Fsignal.
(quit): New function, which uses signal_or_quit and which
might return.  All keyboard-based callers of Fsignal (Qquit,
Qnil) changed to use this new function instead.
(Fsignal): Use signal_or_quit.  Now _Noreturn.  All callers
changed.
(xsignal): Move to lisp.h.
* src/lisp.h (xsignal): Now an inline function, as it's now
just an alias for Fsignal.

8 years agoRequire libgnutls unless --with-gnutls=no
Paul Eggert [Sun, 24 Jul 2016 09:00:18 +0000 (11:00 +0200)]
Require libgnutls unless --with-gnutls=no

* configure.ac: Report an error if the gnutls library is missing,
unless --with-gnutls=no is specified.

8 years agoFontify C++ parameter packs.
Alan Mackenzie [Sat, 23 Jul 2016 15:03:07 +0000 (15:03 +0000)]
Fontify C++ parameter packs.

This fixes debbugs #23610.

* lisp/progmodes/cc-langs.el (c-pack-ops, c-pack-key): New
c-lang-defconsts/defvars.
(c-type-decl-prefix-key): Add "..." and "&&" into the C++ version.

* lisp/progmodes/cc-engine.el (c-forward-type): Handle matches of c-pack-key.

8 years agoJava Mode: Handle strings as case labels correctly.
Alan Mackenzie [Sat, 23 Jul 2016 10:43:34 +0000 (10:43 +0000)]
Java Mode: Handle strings as case labels correctly.

This fixes debbugs #23901.

* lisp/progmodes/cc-langs.el (c-nonlabel-token-key): Remove "\"" from the
Java value.

8 years agoAvoid repeated warnings while restoring desktop
Kaushal Modi [Fri, 22 Jul 2016 18:48:12 +0000 (14:48 -0400)]
Avoid repeated warnings while restoring desktop

* lisp/desktop.el (desktop-restore-file-buffer): Do not print warnings
when files are being opened during desktop restore.

8 years agoFix compilation warning in the MinGW build
Eli Zaretskii [Fri, 22 Jul 2016 17:38:22 +0000 (20:38 +0300)]
Fix compilation warning in the MinGW build

* nt/inc/ms-w32.h: Include stdint.h.
(_execvp, execve): Provide prototypes.

* lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
it is now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
mismatch.
(sys_ctime): Remove, not used.

8 years agoMove read-multiple-choice to subr-x.el
Lars Ingebrigtsen [Fri, 22 Jul 2016 09:08:13 +0000 (11:08 +0200)]
Move read-multiple-choice to subr-x.el

* lisp/faces.el (read-multiple-choice-face): Fix doc string.

* lisp/emacs-lisp/subr-x.el (read-multiple-choice): Move here
from subr.el.

* lisp/gnus/message.el (subr-x): Ditto.

* lisp/net/nsm.el: Require subr-x for read-multiple-choice.

read-multiple-choice doesn't need to be in the dumped Emacs, so move
it to a less central file.

8 years agoUpdate define-ibuffer-op doc string
Tino Calancha [Fri, 22 Jul 2016 09:01:43 +0000 (18:01 +0900)]
Update define-ibuffer-op doc string

* lisp/ibuf-macs.el (define-ibuffer-op):
Mention that BODY is evaluated with 'buf' bound to the actual
marked buffer being processed.

8 years agoUpdate define-ibuffer-op doc string
Tino Calancha [Fri, 22 Jul 2016 07:45:51 +0000 (16:45 +0900)]
Update define-ibuffer-op doc string

* lisp/ibuf-macs.el (define-ibuffer-op): Document arg COMPLEX
instead of refer the reader to the source code.
Document arg BODY.

8 years agoFix shell-command[-on-region] doc strings
Tino Calancha [Fri, 22 Jul 2016 05:47:43 +0000 (14:47 +0900)]
Fix shell-command[-on-region] doc strings

* lisp/simple.el (shell-command, shell-command-on-region):
Drop the sentence saying that the command may delete the buffer
'*Shell Command Output*': the command never delete such
buffer (Bug#23936).

8 years ago;Revert ";Partially revert 2649105a"
Mark Oteiza [Thu, 21 Jul 2016 21:15:26 +0000 (17:15 -0400)]
;Revert ";Partially revert 2649105a"

This reverts commit b7651649c2b1321a0c510116c1ac2442599d9a2e.

8 years ago;Partially revert 2649105a
Mark Oteiza [Thu, 21 Jul 2016 20:36:50 +0000 (16:36 -0400)]
;Partially revert 2649105a

* lisp/textmodes/tex-mode.el (tex-common-initialization): Use
setq-local to modify prettify-symbols-compose-predicate.

8 years ago* src/bytecode.c: Fix compilation with BYTE_CODE_SAFE
Stefan Monnier [Thu, 21 Jul 2016 15:12:59 +0000 (11:12 -0400)]
* src/bytecode.c: Fix compilation with BYTE_CODE_SAFE

(struct byte_stack): Re-add `bottom'.
(exec_byte_code): Initialize it.

8 years agoIbuffer: Use default output buffer for shell commands
Tino Calancha [Thu, 21 Jul 2016 13:33:25 +0000 (22:33 +0900)]
Ibuffer: Use default output buffer for shell commands

* lisp/ibuf-ext.el (shell-command-pipe): Insert the output in buffer
'*Shell Command Output*', as command 'shell-command-file'.

8 years agoFix failing test
Tino Calancha [Thu, 21 Jul 2016 12:51:24 +0000 (21:51 +0900)]
Fix failing test

* test/lisp/erc/erc-track-tests.el (erc-track--erc-faces-in):
Enable Font Lock mode in order to initialize
'char-property-alias-alist' (Bug#23954).

8 years agoFix use-after-close in connect_network_socket
Paul Eggert [Thu, 21 Jul 2016 09:27:55 +0000 (11:27 +0200)]
Fix use-after-close in connect_network_socket

* src/process.c (connect_network_socket): Don’t use
external_sock_fd after closing it.  Problem found by Coverity Scan.

8 years ago* lisp/net/shr.el (shr-fill-line):
Katsumi Yamaoka [Thu, 21 Jul 2016 08:36:17 +0000 (08:36 +0000)]
* lisp/net/shr.el (shr-fill-line):
Preserve text properties in folded lines (bug#24034).

8 years agoFix lifetime bug in tzlookup
Paul Eggert [Wed, 20 Jul 2016 21:38:12 +0000 (23:38 +0200)]
Fix lifetime bug in tzlookup

* src/editfns.c (tzlookup): Fix storage lifetime bug when
INTEGERP (zone) && settz.  Problem found by Coverity Scan.

8 years agoFix shr.el/image build problem
Lars Ingebrigtsen [Wed, 20 Jul 2016 14:47:24 +0000 (16:47 +0200)]
Fix shr.el/image build problem

Fixes: bug#24035
* lisp/net/shr.el: Require image, since some builds seem to
break without it (bug#24035).

8 years agoBring the Gnus Cloud package into working order.
Ted Zlatanov [Mon, 11 Jul 2016 15:01:26 +0000 (11:01 -0400)]
Bring the Gnus Cloud package into working order.

* lisp/gnus/gnus-sync.el: Removed in favor of gnus-cloud.el.

* lisp/gnus/gnus-cloud.el: Autoload EPG functions. Change storage format to
simplify non-file data.
(gnus-cloud-storage-method): New defcustom to support nil, Base64,
Base64+gzip, or EPG encoding on the Gnus Cloud IMAP server. Defaults to
EPG if that's available, Base64+gzip otherwise.
(gnus-cloud-interactive): New defcustom to make Gnus Cloud operations
interactive, defaults to enabled.
(gnus-cloud-group-name): New variable for the Gnus Cloud group name.
(gnus-cloud-make-chunk): Tag with "Gnus-Cloud-Version" instead of just
"Version".
(gnus-cloud-insert-data): Simplify and support :newsrc-data entries.
(gnus-cloud-encode-data, gnus-cloud-decode-data): Support various
storage methods as per gnus-cloud-storage-method.
(gnus-cloud-parse-chunk): Look for "Gnus-Cloud-Version" marker.
(gnus-cloud-parse-version-1): Fix parsing loop bug. Handle :newsrc-data
entries.
(gnus-cloud-update-all): Handle :newsrc-data entries and dispatch to
file and data handlers.
(gnus-cloud-update-newsrc-data): New function to handle :newrsc-data
entries.
(gnus-cloud-update-file): Rework to support gnus-cloud-interactive and
be more careful.
(gnus-cloud-delete-file): Remove; merged into gnus-cloud-update-file.
(gnus-cloud-file-covered-p, gnus-cloud-all-files)
(gnus-cloud-files-to-upload, gnus-cloud-ensure-cloud-group)
(gnus-cloud-add-timestamps, gnus-cloud-available-chunks)
(gnus-cloud-prune-old-chunks): Fix indentation.
(gnus-cloud-timestamp): New function to make a standard Gnus Cloud
timestamp.
(gnus-cloud-file-new-p): Use it.
(gnus-cloud-upload-all-data): Add interactive convenience function to
upload all data.
(gnus-cloud-upload-data): Make interactive; collect files and newsrc
data separately; refresh Gnus Cloud group after insert.
(gnus-cloud-download-all-data): Add interactive convenience function to
download all data.
(gnus-cloud-download-data): Rework to support "Gnus-Cloud-Version"
marker and different storage methods.
(gnus-cloud-host-server-p): New function to check if a server is the
Gnus Cloud host.
(gnus-cloud-collect-full-newsrc): Tag entries with :newsrc-data.
(gnus-cloud-host-acceptable-method-p): New function so
other code can check if a server method can host the Gnus cloud.
(gnus-cloud-storage-method): Use 'radio instead of 'choice for better UI.
(gnus-cloud-method): Make this a defcustom and note how to set it.

* lisp/gnus/gnus-group.el (gnus-group-cloud-map): Add Gnus Cloud autoloaded
keybindings under the `~' prefix.

* lisp/gnus/gnus-srvr.el (gnus-server-mode-map, gnus-server-make-menu-bar)
(gnus-server-cloud, gnus-server-cloud-host)
(gnus-server-font-lock-keywords, gnus-server-insert-server-line)
(gnus-server-toggle-cloud-method-server): Support Gnus Cloud
synchronized servers and synchronization host server toggling (`i' and
`I') and visual display.
(gnus-server-toggle-cloud-method-server): Use
gnus-cloud-host-acceptable-method-p.
(gnus-server-toggle-cloud-method-server): Use custom-set-variables to
set the gnus-cloud-method. Ask the user if it's OK to upload the data
right now.

* doc/misc/gnus.texi: Document Gnus Cloud package.

8 years agoRemove CHECK_FRAME_FONT cruft from bytecode.c
Paul Eggert [Tue, 12 Jul 2016 23:16:10 +0000 (01:16 +0200)]
Remove CHECK_FRAME_FONT cruft from bytecode.c

* src/bytecode.c [CHECK_FRAME_FONT]: Do not include frame.h, xterm.h.
Remove some old ‘#if 0’ code.

8 years agoWork around GCC bug 54561 in a better way
Paul Eggert [Wed, 20 Jul 2016 08:31:33 +0000 (10:31 +0200)]
Work around GCC bug 54561 in a better way

The new approach is less selective, but also less intrusive on C code.
* src/bytecode.c, src/image.c, src/keyboard.c: Ignore -Wclobbered.
* src/conf_post.h (NONVOLATILE): Remove.  All uses removed.

8 years agoFix port to glibc 2.24 (pre-release) + ppc64
Paul Eggert [Wed, 20 Jul 2016 07:16:49 +0000 (09:16 +0200)]
Fix port to glibc 2.24 (pre-release) + ppc64

* src/callproc.c (child_setup): Use emacs_exec_file
so that ASLR is enabled in the child process.
* src/emacs.c: Move some personality details into sys/sysdep.c.
Do not include <sys/personality.h>.
(main): Disable ASLR earlier, so that we don’t chdir twice.
* src/lisp.h (disable_address_randomization): New decl.
* src/sysdep.c (disable_address_randomization)
[HAVE_PERSONALITY_ADDR_NO_RANDOMIZE]: Move personality details
here from emacs.c.
(emacs_exec_file): New function.

8 years agoPrevent bar cursor overwriting next glyph (bug#16856)
Alan Third [Sun, 17 Jul 2016 13:44:52 +0000 (14:44 +0100)]
Prevent bar cursor overwriting next glyph (bug#16856)

* src/nsterm.m (ns_draw_window_cursor): Test glyph width vs cursor width
before setting final size.

8 years ago; Spelling fix
Paul Eggert [Tue, 19 Jul 2016 16:51:46 +0000 (18:51 +0200)]
; Spelling fix

8 years agoFix 'transpose-regions' when LEAVE-MARKERS arg is non-nil
Eli Zaretskii [Tue, 19 Jul 2016 15:59:41 +0000 (18:59 +0300)]
Fix 'transpose-regions' when LEAVE-MARKERS arg is non-nil

* src/insdel.c (adjust_markers_bytepos): New function.
* src/lisp.h (adjust_markers_bytepos): Add prototype.
* src/insdel.c (replace_range, replace_range_2):
* src/editfns.c (Ftranspose_regions): Call
adjust_markers_bytepos.  (Bug#5131)

* test/src/editfns-tests.el (transpose-test-reverse-word)
(transpose-test-get-byte-positions): New functions.
(transpose-ascii-regions-test)
(transpose-nonascii-regions-test-1)
(transpose-nonascii-regions-test-2): New tests.

8 years agoMake gif animation work (bug#24004)
Katsumi Yamaoka [Tue, 19 Jul 2016 07:34:54 +0000 (07:34 +0000)]
Make gif animation work (bug#24004)

* lisp/image.el (image-animate-timeout): Fix the logic that tests if
an animation is too big (bug#24004).

8 years ago* lisp/simple.el (undo-amalgamate-change-group): New function
Stefan Monnier [Tue, 19 Jul 2016 01:04:39 +0000 (21:04 -0400)]
* lisp/simple.el (undo-amalgamate-change-group): New function

* lisp/emulation/viper-cmd.el (viper-adjust-undo): Use it.
(viper-set-complex-command-for-undo): Save current state with
prepare-change-group.
* lisp/emulation/viper-init.el (viper-undo-needs-adjustment)
(viper-buffer-undo-list-mark): Remove.

8 years agoKeep w32 environment settings internal only
Noam Postavsky [Wed, 29 Jun 2016 22:52:57 +0000 (18:52 -0400)]
Keep w32 environment settings internal only

* src/emacs.c (main) [WINDOWSNT]: Move init_environment calls after the
set_initial_environment call.  This prevents Emacs' modifications to the
environment from contaminating Vprocess_environment and
Vinitial_environment (Bug #10980).
* src/callproc.c (getenv_internal) [WINDOWSNT]: Consult Emacs' internal
environment in as a fallback to Vprocess_environment.
* test/src/callproc-tests.el (initial-environment-preserved): New Test.

8 years agoBetter documentation for cl-reduce (bug#24014)
Nicolas Petton [Mon, 18 Jul 2016 12:12:50 +0000 (14:12 +0200)]
Better documentation for cl-reduce (bug#24014)

* lisp/emacs-lisp/cl-seq.el (cl-reduce): Explain what reducing means.

8 years ago; Revert "Replace eldoc-documentation-function with a hook"
Dmitry Gutov [Sun, 17 Jul 2016 23:22:24 +0000 (02:22 +0300)]
; Revert "Replace eldoc-documentation-function with a hook"

This reverts commit 5811404f0b86c9fa92c3e0b22505a9bb05f04145.

It doesn't have the consensus, as evidenced by
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00138.html

8 years ago; Revert "Use eldoc-documentation-functions"
Dmitry Gutov [Sun, 17 Jul 2016 23:17:06 +0000 (02:17 +0300)]
; Revert "Use eldoc-documentation-functions"

This reverts commit 001d88b62ecb8163a148656acb103b354ce7613a.

It doesn't have the consensus, as evidenced by
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00138.html

8 years agoRemove separate pool for popup dialogs (bug#23856)
Alan Third [Wed, 29 Jun 2016 19:17:18 +0000 (20:17 +0100)]
Remove separate pool for popup dialogs (bug#23856)

* src/nsmenu.m (pop_down_menu, ns_popup_dialog): Remove references to
autorelease pool and Popdown_data struct.

8 years agoUse eldoc-documentation-functions
Mark Oteiza [Sun, 17 Jul 2016 16:49:57 +0000 (12:49 -0400)]
Use eldoc-documentation-functions

* lisp/hexl.el (hexl-mode):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/progmodes/cfengine.el (cfengine3-mode):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/octave.el (octave-mode, inferior-octave-mode):
* lisp/progmodes/python.el (python-mode):
* lisp/simple.el (read--expression): Add buffer-locally to hook
eldoc-documentation-functions.

8 years agoOptimize ucs-normalize.el compilation
Noam Postavsky [Sat, 16 Jul 2016 02:10:33 +0000 (22:10 -0400)]
Optimize ucs-normalize.el compilation

* lisp/international/ucs-normalize.el (ucs-normalize-combining-chars-regexp):
(quick-check-list-to-regexp): Use regexp-opt-charset instead of
regexp-opt.
* lisp/international/ucs-normalize.el (quick-check-list): Reuse a single
temp buffer for the whole loop.

8 years agoAdd tests for ucs-normalize.el
Noam Postavsky [Sat, 16 Jul 2016 01:18:08 +0000 (21:18 -0400)]
Add tests for ucs-normalize.el

Some tests are marked as expected to fail.

* test/lisp/international/ucs-normalize-tests.el: New tests.
* admin/unidata/NormalizationTest.txt: Add data for tests.
* admin/unidata/README: Add URL for NormalizationTest.txt.
* admin/notes/unicode: Add note about running (and updating the data
for) the new tests.  Remove note about normalization being unsupported.

8 years agoFix cursor display (bug#23993)
Alan Third [Fri, 15 Jul 2016 20:02:47 +0000 (21:02 +0100)]
Fix cursor display (bug#23993)

* src/xdisp.c (get_phys_cursor_geometry): Fix invalid C operator.

8 years agoStop worrying about Alliant in bytecode.c
Paul Eggert [Fri, 15 Jul 2016 20:15:43 +0000 (22:15 +0200)]
Stop worrying about Alliant in bytecode.c

* src/bytecode.c (PUSH): Remove workaround for long-obsolete compiler.

8 years agoRemove BYTE_MAINTAIN_TOP
Paul Eggert [Fri, 15 Jul 2016 20:15:42 +0000 (22:15 +0200)]
Remove BYTE_MAINTAIN_TOP

It is no longer needed now that we assume GC_MARK_STACK ==
GC_MAKE_GCPROS_NOOPS.
* src/bytecode.c (BYTE_MAINTAIN_TOP): Remove.
All uses removed, and code simplified accordingly.
(BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): Remove, since they
are always no-ops now.  All uses removed.
(MAYBE_GC): Remove.  All uses replaced by maybe_gc,
since it is now equivalent.

8 years agoRemove now-inaccurate bytecode comments
Paul Eggert [Fri, 15 Jul 2016 20:15:42 +0000 (22:15 +0200)]
Remove now-inaccurate bytecode comments

* src/bytecode.c: Remove comments that are no longer accurate.
Most of these are actually old ChangeLog entries.

8 years agoPort to glibc 2.24 (pre-release) + ppc64
Paul Eggert [Fri, 15 Jul 2016 11:07:09 +0000 (13:07 +0200)]
Port to glibc 2.24 (pre-release) + ppc64

Inspired by a suggestion by Florian Weimer in:
https://sourceware.org/ml/libc-alpha/2016-07/msg00425.html
* configure.ac (HAVE_PERSONALITY_ADDR_NO_RANDOMIZE):
Rename from HAVE_PERSONALITY_LINUX32, and check for
ADDR_NO_RANDOMIZE (the crucial thing) instead of for LINUX32.
All uses changed.
* src/emacs.c (main) [HAVE_PERSONALITY_ADDR_NO_RANDOMIZE]:
Use ADDR_NO_RANDOMIZE from personality.h rather than inventing the
flag ourselves.  Just set that flag, rather than also setting the
persona.  When doing it, avoid functions like putenv that may
allocate memory.