1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00
Commit Graph

126725 Commits

Author SHA1 Message Date
Paul Eggert
8c818d8cb7 ; Merge from origin/emacs-25
The following commit was skipped:

916abe9 Use memmove instead of memcpy on overlapping regions
2016-08-05 14:09:09 -07:00
Paul Eggert
6b780a2e97 Merge from origin/emacs-25
9ba51ed Document buffer-swap-text+save-excursion interaction
452aa94 Fix eieio vs cl-generic incompatibilities found in Rudel (bug...
248d5dd Include cl-generic in package--builtin-versions (bug#22817)
8f5a8b6 Improve timing in `tramp-test29-environment-variables'
05ba7a0 Add test for handling environment variables in Tramp
e393d4f * lisp/emacs-lisp/package.el (describe-package-1) (package-st...
5e38887 ; * lisp/net/tramp.el: Fix 2010-10-04 comment typo.  (Bug#23913)
90f2169 ; Spelling fixes
069fc05 Improve documentation of search functions
0a0144a Delete environment variables in Tramp when needed
f624671 Add "New in Emacs 25" section to the FAQ
658daf9 Fix 'vertical-motion' in non-interactive sessions
686b520 Fix memory leak in imagemagick-types
4069b71 Update ELisp manual to match 'string-collate-equalp' doc string
1b2d6a6 Clarify docstring of find-feature-regexp
aac62a6 Add details to cl-lib defining macros' docstrings
d6aa4da Clarify doc string of 'save-buffer'
03bcf11 Un-confuse doc string of 'string-collate-equalp'
c53135b Clarify documentation of 'mouse-on-link-p'

# Conflicts:
#	lisp/emacs-lisp/eieio-core.el
2016-08-05 14:09:08 -07:00
Paul Eggert
95c6606a47 ; Merge from origin/emacs-25
The following commit was skipped:

8f9c1ed Fix missing undo-boundary on revert-buffer.
2016-08-05 14:07:01 -07:00
Paul Eggert
3498a1a2d5 Merge from origin/emacs-25
6f285d9 Amend last addition to etc/PROBLEMS
7067890 * etc/PROBLEMS: Mention GTK+ problem with unexpected frame wi...
2016-08-05 14:07:01 -07:00
Paul Eggert
20e1d54a3f ; Merge from origin/emacs-25
The following commit was skipped:

a5dcc97 Fix open-network-stream responsiveness
2016-08-05 14:07:01 -07:00
Paul Eggert
1a86b5d607 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
2016-08-05 14:07:00 -07:00
Paul Eggert
c5823cdae3 ; Merge from origin/emacs-25
The following commit was skipped:

d039fc4 ; Auto-commit of loaddefs files.
2016-08-05 14:07:00 -07:00
Paul Eggert
80fcf41d31 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
2016-08-05 14:06:59 -07:00
Paul Eggert
8d9ad899f1 ; Merge from origin/emacs-25
The following commit was skipped:

7f83e7e Fix slow redisplay in term-mode
2016-08-05 14:05:10 -07:00
Paul Eggert
b76885f1da Merge from origin/emacs-25
26d4da0 New input method "probhat" for Bengali
4f445bf ; Spelling fix
f403f03 ; Fix typo
2016-08-05 14:05:09 -07:00
Paul Eggert
92e5b41c7c Spelling and minor grammar fixes
* test/file-organization.org: Rename from test/file-organisation.org.
2016-08-05 13:35:13 -07:00
Alan Mackenzie
6a9d967048 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.
2016-08-04 21:07:52 +00:00
Stefan Monnier
847140163a Fix Bug#24149
* lisp/subr.el (set-transient-map): Don't wait if MAP not present in
overriding-terminal-local-map.  (Bug#24149)
2016-08-04 23:42:07 +08:00
Paul Eggert
7f9721d399 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.
2016-08-03 15:12:06 -07:00
Paul Eggert
967e2ef61d 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
2016-08-03 14:21:21 -07:00
Michal Nazarewicz
9a68740d96 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.
2016-08-03 14:44:29 +02:00
Paul Eggert
f0b5d4bd3e 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.
2016-08-03 08:02:31 -04:00
Paul Eggert
744cc9fa17 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.
2016-08-03 07:46:30 -04:00
Paul Eggert
1a8d311236 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.
2016-08-03 01:55:49 -07:00
Paul Eggert
64edd14ca9 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.
2016-08-03 01:55:49 -07:00
Stefan Monnier
5f0b1c307a * 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.
2016-08-02 22:43:11 -04:00
Paul Eggert
d98f783426 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)
2016-08-02 21:06:02 -04:00
Paul Eggert
07e9281f7a 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.
2016-08-02 20:47:37 -04:00
Stefan Monnier
49e0c276b2 * 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.
2016-08-02 19:45:30 -04:00
Michael Albinus
5083499205 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)
2016-08-02 22:38:03 +02:00
Paul Eggert
0100805af1 Port regex changes to strict ISO C
* src/regex.c (regex_compile): Redo casts.
2016-08-02 16:16:45 -04:00
Stefan Monnier
9d5cd45056 * 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'.
2016-08-02 15:17:01 -04:00
Michal Nazarewicz
c441f56498 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.
2016-08-02 19:53:48 +02:00
Michal Nazarewicz
edd5dd80c8 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.
2016-08-02 19:52:50 +02:00
Stefan Monnier
d0838f201a * 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.
2016-08-02 13:01:26 -04:00
Michal Nazarewicz
54a3c0c98f 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.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
da9c55ddbb 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.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
04d96eca08 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.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
9a418e0f98 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.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
4538a5e37e 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.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
e725706131 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’.
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
7496844e7d Don’t (require 'cl)
* test/src/regex-test.el: Don’t (require 'cl).
(regex-tests-PCRE): s/loop/cl-loop/
2016-08-02 15:39:10 +02:00
Michal Nazarewicz
82a487d522 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.
2016-08-02 15:39:10 +02:00
Dima Kogan
91d5309195 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]
2016-08-02 15:39:10 +02:00
Dima Kogan
6db72771cc 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/*.]
2016-08-02 15:39:10 +02:00
Paul Eggert
53917616b0 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
2016-08-02 03:31:26 -04:00
Glenn Morris
573dde70a4 * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Respect autoload-timestamps for "actual autoloads are elsewhere" case.
2016-08-01 16:31:57 -04:00
Glenn Morris
9eb80d93a7 ; Auto-commit of loaddefs files. 2016-08-01 06:24:24 -04:00
Stefan Merten
cafb4a391b * 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.
2016-07-31 16:40:46 +02:00
Martin Rudalics
8cbaf34253 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.
2016-07-30 14:11:12 +02:00
Eli Zaretskii
7d58b02f36 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)
2016-07-30 11:32:02 +03:00
Tino Calancha
d81dc05258 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).
2016-07-30 17:26:19 +09:00
Eli Zaretskii
9c542a23a8 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)
2016-07-30 11:23:10 +03:00
Noam Postavsky
4a5b6e621c profiler: Add mouse-1 binding for tree expansion
(profiler-report-mode-map): Add mouse-1 binding for
profiler-report-toggle-entry (Bug #13455).
2016-07-28 20:13:51 -04:00
Vincent Belaïche
90ab699c4f Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-07-28 18:12:50 +02:00