1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-10 15:56:18 +00:00
Commit Graph

128259 Commits

Author SHA1 Message Date
Noam Postavsky
9a19f26cd7 Fix computation of regex stack limit
The regex stack limit was being computed as the number of stack entries,
whereas it was being compared with the current size as measured in
bytes.  This could cause indefinite looping when nearing the stack limit
if re_max_failures happened not to be a multiple of sizeof
fail_stack_elt_t (Bug #24751).

* src/regex.c (GROW_FAIL_STACK): Compute both current stack size and
limit as numbers of stack entries.
2017-01-08 18:45:52 -05:00
Alan Third
88a501b30d Remove apploopnr
* src/nsterm.m (ns_select, ns_read_socket): Remove apploopnr and only
allow app loop to run in main thread.
2017-01-08 21:29:35 +00:00
Glenn Morris
fc20bd940f Remove unused configure output variable
* configure.ac (GNULIB_MK):
* Makefile.in (gnulib_mk): Remove, no longer used.
2017-01-08 10:19:48 -08:00
Glenn Morris
25d3297bb9 Fix automake dependencies
* Makefile.in (AUTOMAKE_INPUTS): Add nt/gnulib.mk.  (Bug#25372)
All platforms need this file to exist.
2017-01-08 10:16:16 -08:00
Paul Eggert
8d7bdd7540 Remove unnecessary blankp code
* src/character.c (blankp): Remove redundant code that slows Emacs
down a bit.  The caller already does the test.
2017-01-08 10:07:00 -08:00
Stefan Merten
3d418bd46f * lisp/textmodes/rst.el: Fix rst-forward-indented-block.
* rst.el (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
	(rst-official-version, rst-official-cvs-rev)
	(rst-package-emacs-version-alist): Maintain version numbers.
	(rst-forward-indented-block): Fix. Start searching at next
	line again. Fixes fontification of comments continuing on the
	same line they started.
2017-01-08 11:09:10 +01:00
Paul Eggert
952d0f2ce4 Remove @SET_MAKE@ from manually-maintained files
Emacs now assumes GNU Make, so @SET_MAKE@ is no longer needed.
* Makefile.in, lwlib/Makefile.in, nextstep/Makefile.in:
* src/Makefile.in: Remove @SET_MAKE@.
2017-01-07 18:15:37 -08:00
Michael Albinus
77f35363fd Fix a problem with `start-file-process' in Tramp
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`start-file-process' shall work when `non-essential' is
non-nil, but there is already an established connection.
<https://github.com/company-mode/company-mode/issues/462>
2017-01-07 18:51:30 +01:00
Rolf Ade
75cdf42917 Fix selecting SQLite database files with sql-mode (Bug#23566)
* lisp/progmodes/sql.el (sql-sqlite-login-params): Allow any name as
SQLite database file name, by default.
(sql-get-login-ext): Fixed read-file-name arguments to provide
path completion even if a database name pattern is customized and to
allow creation of new SQLite database files.

Copyright-paperwork-exempt: yes
2017-01-07 11:20:17 -05:00
Eli Zaretskii
e272032769 Specify encoding of the bookmark file
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Accept an argument CODING and include a 'coding:' cookie in the
bookmark file preamble.
(bookmark-upgrade-file-format-from-0): Call
'bookmark-insert-file-format-version-stamp' with the file buffer's
encoding, as detected when it was read.
(bookmark-file-coding-system): New variable.
(bookmark-load): Set bookmark-file-coding-system to the encoding
of the loaded file.
(bookmark-write-file): Bind coding-system-for-write to either the
user setting via "C-x RET c" or to the existing file encoding,
defaulting to 'utf-8-emacs'.  Update the value of
bookmark-file-coding-system.  (Bug#25365)
2017-01-07 14:33:41 +02:00
Eli Zaretskii
50fd04cd4b Avoid infloop in 'ispell-region'
* lisp/textmodes/ispell.el (ispell-begin-skip-region-regexp):
Protect against 'ispell-skip-region-alist' being nil.  Reported by
Ernest Adrogué <nfdisco@gmail.com>, see
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-01/msg00007.html.
2017-01-07 13:02:50 +02:00
Philipp Stephani
512e9886be Add support for Unicode whitespace in [:blank:]
See Bug#25366.

* src/character.c (blankp): New function for checking Unicode
horizontal whitespace.
* src/regex.c (ISBLANK): Use 'blankp' for non-ASCII horizontal
whitespace.
(BIT_BLANK): New bit for range table.
(re_wctype_to_bit, execute_charset): Use it.
* test/lisp/subr-tests.el (subr-tests--string-match-p--blank): Add
unit test for [:blank:] character class.
* test/src/regex-tests.el (test): Adapt unit test.
* doc/lispref/searching.texi (Char Classes): Document new Unicode
behavior for [:blank:].
2017-01-06 20:12:48 +01:00
Stefan Monnier
8f0376309e (feedmail-deduce-address-list): Avoid add-to-list on local variables.
Author:

* lisp/mail/feedmail.el (feedmail-deduce-address-list):
Avoid add-to-list on local variables.
2017-01-05 21:02:48 -05:00
Noam Postavsky
69b9224a32 Fix isearch handling of C-u C-u...
* lisp/isearch.el: Add `isearch-scroll' property to
universal-argument-more so that `isearch-allow-scroll' will apply to it
as well.
(isearch-pre-command-hook): Let `isearch-allow-prefix' apply to
`universal-argument-more' as well (Bug#25302).
2017-01-05 20:20:42 -05:00
Paul Eggert
d1d9b37630 Shorten autogen.sh script
* autogen.sh: Use a shorter script, as some 'sed' implementations
mishandle long scripts.
2017-01-05 12:05:27 -08:00
Eli Zaretskii
ade6a024c8 Yet another fix for autogen.sh
* autogen.sh (gnulib.mk): Make the Sed script more portable.

* nt/Makefile.in (${srcdir}/gnulib.mk): Adapt the Sed command to
the changes in autogen.sh.
2017-01-05 21:36:58 +02:00
Eli Zaretskii
99af58d74e * autogen.sh (gnulib.mk): Another attempt to fix macOS build. 2017-01-05 19:48:49 +02:00
Eli Zaretskii
003954e67f Fix dependencies of nt/gnulib.mk
* Makefile.in ($(srcdir)/nt/gnulib.mk): Avoid circular dependency
of nt/gnulib.mk on lib/Makefile.in.
2017-01-05 18:04:54 +02:00
Eli Zaretskii
b5f157e935 Unbreak macOS build
* autogen.sh (gnulib.mk): Don't use non-portable extensions of GNU
Sed.
2017-01-05 17:55:43 +02:00
Johan Claesson
d88cdad284 Fix term.el handling of ^Z-sequences spanning chunks
Bash will after each command send ?\032 and the current directory "/tmp"
to inform term.el.  Bash output is buffered in 4096 bytes chunks.  If a
command outputs roughly 4096 bytes then the end of the first chunk will
be "/tm" (Bug#13350).

* lisp/term.el (term-emulate-terminal): Change the regexp to find the
end of the ?\032 sequence to use \n instead of $, the latter can match
end of string as well.

Copyright-paperwork-exempt: yes
2017-01-04 23:20:47 -05:00
Mark Oteiza
0392f942c7 Turn on lexical-binding in mb-depth.el
* lisp/mb-depth.el: Turn on lexical-binding.
(minibuffer-depth-setup): Bind things used multiple times.
2017-01-04 22:31:26 -05:00
Alan Third
308d596223 Revert "Rework NS event handling (bug#25265)"
This reverts commit e0e5b0f4a4.
2017-01-04 21:00:52 +00:00
Glenn Morris
42614fafa2 Update remaining copyright years with admin.el M-x set-copyright
* etc/refcards/ru-refcard.tex (cyear): Set to 2017.
2017-01-04 14:10:34 -05:00
Glenn Morris
f17a0069f9 * lisp/ffap.el (ffap-lax-url): Bump :version after recent change. 2017-01-04 13:32:18 -05:00
Paul Eggert
44c588a25c Port recent autogen.sh changes to Darwin
Problem reported by Sam Steingold (Bug#25347).
* autogen.sh: Don't assume 'sed -f-' reads a script from stdin, as
POSIX does not require it and it does not work on Darwin.
2017-01-04 00:45:14 -08:00
Stefan Monnier
2ec41c415f Avoid add-to-list on local variables
* lisp/gnus/nnir.el: Use lexical-binding and cl-lib.
(nnir-retrieve-headers): Use pcase.
(nnir-search-thread): Avoid add-to-list on local variables.

* lisp/gnus/smime.el: Use lexical-binding and cl-lib.
(smime-verify-region): Avoid add-to-list on local variables.

* lisp/mail/undigest.el: Use lexical-binding and cl-lib.
(rmail-digest-parse-mime, rmail-digest-rfc1153)
(rmail-digest-parse-rfc934): Avoid add-to-list on local variable.

* lisp/net/ldap.el (ldap-search): Move init into declaration.

* lisp/net/newst-backend.el (newsticker--cache-add):
Avoid add-to-list on local variables; Simplify code with `assq'.

* lisp/net/zeroconf.el: Use lexical-binding and cl-lib.
(dbus-debug): Remove declaration, unused.
(zeroconf-service-add-hook, zeroconf-service-remove-hook)
(zeroconf-service-browser-handler, zeroconf-publish-service):
Avoid add-to-list and *-hook on local variables.

* lisp/org/org-archive.el (org-all-archive-files):
* lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
Avoid add-to-list on local variables.

* lisp/org/ox-publish.el (org-publish--run-functions): New function.
(org-publish-projects): Use it to avoid run-hooks on a local variable.
(org-publish-cache-file-needs-publishing): Avoid add-to-list on
local variables.

* lisp/progmodes/ada-prj.el: Use setq instead of (set '...).
(ada-prj-load-from-file): Avoid add-to-list on local variables.

* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library): Simplify.
(ada-gnat-parse-gpr, ada-parse-prj-file-1)
(ada-xref-find-in-modified-ali): Avoid add-to-list on local variables.

* lisp/progmodes/idlw-shell.el (idlwave-shell-update-bp-overlays):
Avoid add-to-list on local variables.
2017-01-04 00:40:45 -05:00
Mark Oteiza
f49f8c1454 Turn on lexical-binding in md4.el
* lisp/md4.el: Turn on lexical-binding.
* test/lisp/md4-tests.el: New file.
2017-01-03 18:34:13 -05:00
Stefan Merten
9ed3685a77 Lots of refactorings and a few minor improvements.
User visible improvements and changes:
* Improve and debug `rst-forward-section` and `rst-backward-section`.
* Auto-enumeration may be used with all styles for list insertion.
* Improve and debug `rst-toc-insert`.
* Adapt change in Emacs to use customization group `text` instead of `wp`.
* Bind `n` and `p` in `rst-toc-mode`.
* `z` in `toc-mode` returns to the previous window configuration.
* Require Emacs version >= 24.1.

Lots of refactorings including:
* Silence byte compiler.
* Use lexical binding.
* Use `cl-lib`.
* Add tests and raise test coverage.
2017-01-03 23:15:13 +01:00
Stefan Monnier
e28c99082a (cl-defstruct): Improve error message for slots w/o value (bug#25312)
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't signal an error but
emit a warning for those coders who forgot to put a default value in
their slot.
2017-01-03 16:07:44 -05:00
Philipp Stephani
5c6f1198d4
Small patch for ffap.el
* lisp/ffap.el (ffap-alist): Document that ffap sets the match data
while walking 'ffap-alist'.
2017-01-03 08:40:57 -08:00
Philipp Stephani
8dd624c8ac Document that functions in 'ffap-alist' can use the match data
* lisp/ffap.el (ffap-alist): Document that ffap sets the match data
while walking 'ffap-alist'.
2017-01-03 17:19:36 +01:00
Eli Zaretskii
10444dcf77 Generate nt/gnulib.mk from lib/gnulib.mk
This was proposed by Paul Eggert <eggert@cs.ucla.edu>,
with the purpose of avoiding manual maintenance of
nt/gnulib.mk.

* nt/gnulib-modules-to-delete.cfg: New file.
* nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1): New variables.
(${srcdir}/gnulib.mk): Rules to generate gnulib.mk from
lib/gnulib.mk and list of modules in gnulib-modules-to-delete.cfg.

* make-dist (nt): Add gnulib-modules-to-delete.cfg to the list of
files to link.
* configure.ac (GNULIB_MK): Compute the value according to $opsys.
* autogen.sh: Create nt/gnulib.mk if it doesn't exist, before
running autoreconf.
* Makefile.in (gnulib_mk): New variable.
($(srcdir)/nt/gnulib.mk): Rule to produce it.
(AUTOMAKE_INPUTS): Use $(gnulib_mk) instead of a literal file
name.
* .gitignore: Add nt/gnulib.mk.

* src/w32.c (acl_errno_valid): Implement it here, as we no longer
build the acl-permissions module from Gnulib.
2017-01-03 17:46:40 +02:00
Noam Postavsky
134e86b360 Handle multibyte chars spanning chunks in term.el
* lisp/term.el (term-terminal-undecoded-bytes): New variable.
(term-mode): Make it buffer local.  Don't make `term-terminal-parameter'
buffer-local twice.
(term-emulate-terminal): Check for bytes of incompletely decoded
characters, and save them until the next call when they can be fully
decoded (Bug#25288).
2017-01-03 08:58:40 -05:00
Michael Albinus
975b2acfe6 Finish work on filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify--test-monitors):
New variable.
(file-notify--test-cleanup, file-notify--test-monitor): Use it.
(file-notify--test-read-event, file-notify-test02-events)
(file-notify-test04-file-validity): Handle "gvfs-monitor-dir.exe".
(file-notify-test03-autorevert)
(file-notify-test08-watched-file-in-watched-dir):
Set `file-notify--test-desc' for proper work of
`file-notify--test-monitor'.  (Bug#21804)
2017-01-03 09:50:41 +01:00
Michael Albinus
1d714e41ea Check also for "gvfs-monitor-dir.exe" in Tramp
* lisp/net/tramp-sh.el (tramp-get-remote-gvfs-monitor-dir): Check also
for "gvfs-monitor-dir.exe".
2017-01-02 19:30:21 +01:00
Eli Zaretskii
443f171994 Fix compilation --without-x
* src/composite.c (autocmp_chars) [HAVE_WINDOW_SYSTEM]: Call
font_range only if it is compiled in.  (Bug#25334)
2017-01-02 18:55:27 +02:00
Sašo Živanović
1e8bb313ea Fix RefTeX to show table of contents for dtx files (tiny change)
* lisp/textmodes/reftex.el (reftex-compile-variables): Change the
  section regexp so that it accepts lines starting with the comment
  character. (tiny change)
* lisp/textmodes/reftex-parse.el (reftex-parse-from-file): Filter
  gathered toc entries, accepting a commented entry if and only if the
  source file is a ".dtx" file. (tiny change)
2017-01-02 13:11:49 +01:00
Paul Eggert
367dadf554 Remove mistakenly-added files
Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00008.html
* lisp/gnus/gnus-ems.el, lisp/gnus/gnus-sync.el:
* lisp/gnus/messcompat.el, lisp/nxml/nxml-glyph.el:
* lisp/nxml/nxml-uchnm.el, lisp/obsolete/awk-mode.el:
* lisp/obsolete/iso-acc.el, lisp/obsolete/iso-insert.el:
* lisp/obsolete/iso-swed.el, lisp/obsolete/resume.el:
* lisp/obsolete/scribe.el, lisp/obsolete/spell.el:
* lisp/obsolete/swedish.el, lisp/obsolete/sym-comp.el:
Remove files that were added by mistake during a merge.
2017-01-01 20:24:00 -08:00
Noam Postavsky
214a67b00b Warn about incomplete untarring of link files
The current tar-mode doesn't really support unpacking symlinks, it
simply creates an empty file of the same name.

* lisp/tar-mode.el (tar--describe-as-link): New function extracted from
`tar--check-descriptor'.
(tar-untar-buffer): Use it to warn about imperfectly untarred link
files.
2017-01-01 16:36:23 -05:00
Noam Postavsky
5da2a5f449 Remove sh-mode's skeleton-end-hook
* lisp/progmodes/sh-script.el (sh-mode): Remove local setting of
`skeleton-end-hook', `skeleton-insert' already does `newline-and-indent'
and also respects `skeleton-end-newline' (Bug#16634).
2017-01-01 16:36:22 -05:00
Paul Eggert
eb3416016b * nt/gnulib.mk (stdint.h): Update to match lib/gnulib.mk here. 2017-01-01 10:55:10 -08:00
Mark Oteiza
bd34a6c73f Add term/tmux.el
Since tmux version 2.1, new tmux terminfos are shipped due to oddities
with xterm and screen terminfos.  This is simply a duplication of
term/screen.el with screen -> tmux.
* lisp/term/tmux.el: New file.
2017-01-01 11:50:59 -05:00
Philipp Stephani
93be35e038 Fix encoding of JSON surrogate pairs
JSON requires that such pairs be treated as UTF-16 surrogate pairs, not
individual code points; cf. Bug #24784.

* lisp/json.el (json-read-escaped-char): Fix decoding of surrogate
pairs.
(json--decode-utf-16-surrogates): New defun.

* test/lisp/json-tests.el (test-json-read-string): Add test for
surrogate pairs.
2017-01-01 13:24:14 +01:00
Michael Albinus
baa370f255 Remove tramp-gw.el, which was synced from emacs-25 by accident 2017-01-01 13:03:55 +01:00
Michael Albinus
3b878455ac ; Fix typo
* src/gfilenotify.c:
2017-01-01 12:59:58 +01:00
Paul Eggert
65eee8392f Do not use Gnulib’s m4/wint_t.m4.
* admin/merge-gnulib: Remove m4/wint_t.m4 when merging.
Fix typo so that warn-on-use.m4 is removed too.
* configure.ac (gt_TYPE_WINT_T): New macro, replacing Gnulib’s.
* m4/wint_t.m4: Remove.
2017-01-01 02:35:36 -08:00
Paul Eggert
aaf1f4a33c Merge from gnulib, continued
* m4/wint_t.m4: New file, copied from gnulib.
2017-01-01 02:04:55 -08:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Paul Eggert
42479446d3 Remove test/automated detritus from merge 2017-01-01 01:37:51 -08:00
Paul Eggert
5a59e28dec Merge from gnulib
This incorporates:
2016-12-19 stdint: Fix WINT_MAX to match wint_t on mingw
2016-12-18 getopt: Fix link error for users of getopt() in <unistd.h>
2016-12-17 getlogin: Port to newer mingw
2016-12-17 stdint: Fix WINT_MAX to match wint_t on MSVC
2016-12-17 Avoid redefinition errors on MSVC
* lib/getopt.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/unistd.in.h:
* m4/stdint.m4, m4/unistd_h.m4:
Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
Plus, this commit updates the indenting on copyright notices to
match that of gnulib.
2017-01-01 01:32:56 -08:00