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
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
* 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.
* 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
[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.
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.
* 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.
* 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)
(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.
* 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)
(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'.
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.
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.
* 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.
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.
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.
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.
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.
* 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’.
* 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.
* 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/*.]
* 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.
* 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)
* 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)