]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoAdd two autoloads to manual fix/bootstrap-build-minimize
Phillip Lord [Mon, 23 Jan 2017 10:07:39 +0000 (10:07 +0000)]
Add two autoloads to manual

7 years agoAdd error handling to magic-mode-alist
Phillip Lord [Sat, 21 Jan 2017 16:43:38 +0000 (16:43 +0000)]
Add error handling to magic-mode-alist

* lisp/files.el (set-auto-mode): Add explicit error handling in two
  places.

7 years agoRemove conditional includes from bootstrap
Phillip Lord [Fri, 20 Jan 2017 15:13:27 +0000 (15:13 +0000)]
Remove conditional includes from bootstrap

 * lisp/loadup.el: No longer load optional includes during bootstrap
   dumping.
 * lisp/ldefs-boot-auto.el: Regenerated.

Previously, bootstrap-emacs includes optional functionality, depending
on the platform which is not needed for bootstrap function. As a result,
bootstrap-emacs contains different functions in different
circumstances. If ldefs-boot-auto.el is generated, then loaded functions
will not be added to ldefs-boot-auto.el, although they may be required
during some builds. With this change, bootstrap-emacs should always
behave the same way and, therefore, require the same autoloads.

7 years agoDo not use find-file non-interactively
Phillip Lord [Fri, 20 Jan 2017 15:11:50 +0000 (15:11 +0000)]
Do not use find-file non-interactively

 * lisp/international/titdic-cnv (miscdic-convert): Use
   insert-file-contents in place of find-file.

7 years agoImprove ffap-gopher-at-point handling of long lines
Noam Postavsky [Sun, 8 Jan 2017 23:19:32 +0000 (18:19 -0500)]
Improve ffap-gopher-at-point handling of long lines

* lisp/ffap.el (ffap-gopher-regexp): Only match the KEY part.  Note
setting to nil is now supported.
(ffap--gopher-var-on-line): New function.
(ffap-gopher-at-point): Use it instead of the old ffap-gopher-regexp
which could overflow the regexp stack on long lines (Bug#25391).  Use
`let-alist' instead of calling `set' on local variables.
* test/lisp/ffap-tests.el (ffap-gopher-at-point): New test.

7 years agoFix NS main thread check (bug#25265)
Alan Third [Sat, 14 Jan 2017 16:57:46 +0000 (16:57 +0000)]
Fix NS main thread check (bug#25265)

* src/nsterm.m (ns_read_socket, ns_select): Replace mainThread with
isMainThread.

7 years agoCorrect c-parse-state-get-strategy for moving HERE backward into a macro.
Alan Mackenzie [Sat, 14 Jan 2017 12:38:43 +0000 (12:38 +0000)]
Correct c-parse-state-get-strategy for moving HERE backward into a macro.

* list/progmodes/c-engine.el (c-parse-state-get-strategy): When HERE is below
its previous value, we chose strategy 'forward, and the new HERE is in a
(different) macro, ensure the returned START-POINT is not above the start of
the macro.

7 years agoInclude "Date:" in mail messages filed by 'sendmail-send-it'
Eli Zaretskii [Sat, 14 Jan 2017 08:55:16 +0000 (10:55 +0200)]
Include "Date:" in mail messages filed by 'sendmail-send-it'

* lisp/mail/sendmail.el (mail-do-fcc): Insert a 'Date:' header
into the filed message.  In the outgoing message, sendmail will
add the date, but the composed message body doesn't have it.
(Bug#25436)

7 years agoRemove leftover references to log-view-message-face
Dmitry Gutov [Sat, 14 Jan 2017 03:56:37 +0000 (06:56 +0300)]
Remove leftover references to log-view-message-face

* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode): Use log-view-message.

* lisp/vc/vc-git.el (vc-git-root-log-format): Same.

* lisp/vc/vc-hg.el (vc-hg-root-log-format): Same.

7 years agoRecord autoloads till emacs dump
Phillip Lord [Fri, 13 Jan 2017 13:57:51 +0000 (13:57 +0000)]
Record autoloads till emacs dump

* admin/ldefs-clean.el (ldefs-clean-up): Record autoloads till emacs dump
* lisp/ldefs-boot-auto.el (batch-byte-compile): Update

Previously, autoloads were collected till loaddefs.el was generated as
part of the build. However, bootstrap-emacs does not load
loaddefs (rather it is dumped), hence we must record autoloads until the
full emacs binary is dumped.

7 years agoAdd chained indentation to js-mode
Tom Tromey [Fri, 13 Jan 2017 06:15:00 +0000 (23:15 -0700)]
Add chained indentation to js-mode

Bug#20896
* lisp/progmodes/js.el (js-chain-indent): New variable.
(js--skip-term-backward, js--skip-terms-backward)
(js--chained-expression-p): New functions.
(js--proper-indentation): Call js--chained-expression-p.
* test/manual/indent/js-chain.js: New file.
* test/manual/indent/js.js: Add (non-)chained indentation test.

7 years agoFix js-mode indentation bug
Tom Tromey [Tue, 10 Jan 2017 05:15:57 +0000 (22:15 -0700)]
Fix js-mode indentation bug

Bug#15582:
* lisp/progmodes/js.el (js--find-newline-backward): New function.
(js--continued-expression-p): Use it.
* test/manual/indent/js.js: Add new test.

7 years agoFix definition of EMACS in test/manual/indent/Makefile
Tom Tromey [Fri, 13 Jan 2017 06:20:02 +0000 (23:20 -0700)]
Fix definition of EMACS in test/manual/indent/Makefile

* test/manual/indent/Makefile (EMACS): Add one more "..".

7 years agoAdd .jsx to auto-mode-alist
Tom Tromey [Tue, 10 Jan 2017 03:44:19 +0000 (20:44 -0700)]
Add .jsx to auto-mode-alist

Bug#25389:
* lisp/files.el (auto-mode-alist): Add entry for .jsx.

7 years agoFix two js-mode filling bugs
Tom Tromey [Tue, 10 Jan 2017 03:42:43 +0000 (20:42 -0700)]
Fix two js-mode filling bugs

Bug#19399 and Bug#22431:
* lisp/progmodes/js.el (js-mode): Set comment-line-break-function and
c-block-comment-start-regexp.
* test/lisp/progmodes/js-tests.el: New file.

7 years agoFix last change
Eli Zaretskii [Fri, 13 Jan 2017 16:17:12 +0000 (18:17 +0200)]
Fix last change

* test/src/thread-tests.el (threads-condvar-wait): Revert
previous change.  Make sure no other threads from previous
tests are running, to avoid interfering with our thread counts.

7 years agoFix the new condvar test
Eli Zaretskii [Fri, 13 Jan 2017 16:05:38 +0000 (18:05 +0200)]
Fix the new condvar test

* test/src/thread-tests.el (threads-condvar-wait): Enlarge the
time we sleep in the main thread to let the other thread
process notifications.

7 years agoMinor improvements in the new condvar test
Eli Zaretskii [Fri, 13 Jan 2017 14:13:30 +0000 (16:13 +0200)]
Minor improvements in the new condvar test

* test/src/thread-tests.el (threads-test-condvar-wait): Use
with-mutex instead of emulating it inline.
(threads-condvar-wait): Improve comments.  Check that the new
thread is alive before waiting for it to become blocked on the
conditional variable.

7 years agoFix a bug in waiting for condition variable
Eli Zaretskii [Fri, 13 Jan 2017 09:48:51 +0000 (11:48 +0200)]
Fix a bug in waiting for condition variable

* src/thread.c (lisp_mutex_lock, lisp_mutex_unlock)
(lisp_mutex_unlock_for_wait, condition_wait_callback)
(condition_notify_callback): Improve commentary.
(condition_wait_callback): Call post_acquire_global_lock before
attempting to lock the mutex, to make sure the lock's owner is
recorded correctly.

* test/src/thread-tests.el (threads-condvar-wait): New test.

7 years agoFix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part)
Katsumi Yamaoka [Fri, 13 Jan 2017 07:42:35 +0000 (07:42 +0000)]
Fix last change of dd80ee6 (was: mm-uu.el: Don't dissect patch part)

7 years agomm-uu.el: Don't dissect patch part
Katsumi Yamaoka [Fri, 13 Jan 2017 07:22:30 +0000 (07:22 +0000)]
mm-uu.el: Don't dissect patch part

This fixes a bug that the patch part is broken in the article
<87inpjzhpb.fsf@users.sourceforge.net> in the bug-gnu-emacs list.

* lisp/gnus/mm-uu.el (mm-uu-dissect-text-parts):
Don't dissect patch part.

7 years agoFix extracting async def type and name in python mode imenu
Dmitry Lazurkin [Wed, 4 Jan 2017 18:46:21 +0000 (21:46 +0300)]
Fix extracting async def type and name in python mode imenu

* lisp/progmodes/python.el (python-imenu--get-defun-type-name):
New function.
(python-imenu--build-tree): Use python-imenu--get-defun-type-name for
extract async or simple def type and name at current
position (Bug#24820).
* test/lisp/progmodes/python-tests.el (python-imenu-create-index-1):
(python-imenu-create-flat-index-1): Add async def's.

7 years agoRemove garbage from Content-Transfer-Encoding value (bug#25420)
Katsumi Yamaoka [Thu, 12 Jan 2017 23:32:41 +0000 (23:32 +0000)]
Remove garbage from Content-Transfer-Encoding value (bug#25420)

* lisp/mail/ietf-drums.el (ietf-drums-strip-cte): New function.
(ietf-drums-remove-garbage): New function.
(ietf-drums-remove-whitespace): Remove CR as well.

* lisp/mail/mail-parse.el (mail-header-strip-cte):
Alias to ietf-drums-strip-cte.

* lisp/gnus/gnus-art.el (article-decode-charset):
* lisp/gnus/gnus-sum.el (gnus-summary-enter-digest-group):
* lisp/gnus/mm-decode.el (mm-dissect-buffer):
* lisp/gnus/nndoc.el (nndoc-decode-content-transfer-encoding)
(nndoc-rfc822-forward-generate-article):
* lisp/mh-e/mh-mime.el (mh-decode-message-body):
Replace mail-header-strip with mail-header-strip-cte.

7 years agoRestore behavior of ‘./autogen.sh autoconf git’
Paul Eggert [Thu, 12 Jan 2017 23:04:38 +0000 (15:04 -0800)]
Restore behavior of ‘./autogen.sh autoconf git’

* autogen.sh: Do both autoconf and git setup when invoked
as ‘./autogen.sh autoconf git’.  Avoid unnecessary newline in chatter.
Mention new --no-check option in usage message.  (Bug#25359)

7 years ago* autogen.sh: Simplify argument parsing.
Glenn Morris [Thu, 12 Jan 2017 19:06:03 +0000 (14:06 -0500)]
* autogen.sh: Simplify argument parsing.

7 years ago* autogen.sh: Add --no-check option. (Bug#25359)
Glenn Morris [Wed, 11 Jan 2017 20:01:28 +0000 (15:01 -0500)]
* autogen.sh: Add --no-check option.  (Bug#25359)

7 years agoConvert some network test failures to skipping
Glenn Morris [Wed, 11 Jan 2017 19:35:51 +0000 (14:35 -0500)]
Convert some network test failures to skipping

These tests intermittently fail on hydra.nixos.org for unclear
reasons related to starting the external process.
This isn't an Emacs issue, and the failures cause noise on
the emacs-buildstatus list.  (Bug#24503)
* test/lisp/net/network-stream-tests.el (echo-server-nowait)
(connect-to-tls-ipv4-nowait): Skip rather than fail if the
external process fails to start properly.

7 years agoAdd DNS keywords and remove duplications
Alexander Kuleshov [Fri, 23 Dec 2016 10:53:41 +0000 (16:53 +0600)]
Add DNS keywords and remove duplications

* lisp/textmodes/dns-mode.el (dns-mode-types): Add two TLSA and
NSEC" DNS related keywords and remove duplication of "NSAP".

7 years agoHandle syntactic WS cache properties more accurately at buffer changes.
Alan Mackenzie [Wed, 11 Jan 2017 18:25:39 +0000 (18:25 +0000)]
Handle syntactic WS cache properties more accurately at buffer changes.

This fixes bug #25362.

* lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits)
(c-invalidate-sws-region-before, c-invalidate-sws-region-after-del)
(c-invalidate-sws-region-after-ins): New variables and functions.
(c-invalidate-sws-region-after): Change from a defsubst to a defun.
Also pass
it the standard OLD-LEN argument.  Call both
c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS
cache
properties.

* lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language
variable.

* lisp/progmodes/cc-mode.el (c-before-change): Call
c-invalidate-sws-region-before.
(c-after-change): Pass old-len to c-invalidate-sws-region-after.

7 years agoSupport stat 8.26 in Tramp
Michael Albinus [Wed, 11 Jan 2017 16:13:41 +0000 (17:13 +0100)]
Support stat 8.26 in Tramp

* lisp/net/tramp-sh.el (tramp-get-remote-stat): Use QUOTING_STYLE
environment variable of newer coreutils.  (Bug#23422)

7 years agoMerge from gnulib
Paul Eggert [Tue, 10 Jan 2017 15:48:37 +0000 (07:48 -0800)]
Merge from gnulib

This incorporates:
2017-01-09 maint: time stamp -> timestamp
2017-01-07 stdioext: Port to Minix 3.2 and newer
2017-01-06 glob, intprops, xalloc: work around Clang bug
2017-01-02 revert copyright-year change to synced files
* doc/misc/texinfo.tex, lib/fpending.c, lib/intprops.h, lib/mktime.c:
* lib/stat-time.h, lib/stdio-impl.h, lib/time.in.h, lib/timespec.h:
* lib/utimens.c, lib/xalloc-oversized.h:
Copy from gnulib.

7 years agoDon't use unsafe encoding for the bookmark file
Eli Zaretskii [Tue, 10 Jan 2017 15:47:10 +0000 (17:47 +0200)]
Don't use unsafe encoding for the bookmark file

* lisp/bookmark.el (bookmark-write-file): Handle the case when the
explicitly specified encoding of the bookmark file cannot encode the
additional bookmarks just added.  (Bug#25365)

7 years agoRemove unused ldefs-boot.el
Phillip Lord [Mon, 9 Jan 2017 08:56:03 +0000 (08:56 +0000)]
Remove unused ldefs-boot.el

 * lisp/ldefs-boot.el: Remove

This file was not removed as reported in c27b645956a11, but accidentally
left.

7 years agoUse expanded stack during regex matches
Noam Postavsky [Sun, 1 Jan 2017 19:09:13 +0000 (14:09 -0500)]
Use expanded stack during regex matches

While the stack is increased in main(), to allow the regex stack
allocation to use alloca we also need to modify regex.c to actually take
advantage of the increased stack, and not limit stack allocations to
SAFE_ALLOCA bytes.

* src/regex.c (MATCH_MAY_ALLOCATE): Remove obsolete comment about
allocations in signal handlers which no longer happens and correct
description about when and why MATCH_MAY_ALLOCATE should be defined.
(emacs_re_safe_alloca): New variable.
(REGEX_USE_SAFE_ALLOCA): Use it as the limit of stack allocation instead
of MAX_ALLOCA.
(emacs_re_max_failures): Rename from `re_max_failures' to avoid
confusion with glibc's `re_max_failures'.
* src/emacs.c (main): Increase the amount of fixed 'extra' bytes we add
to the stack.  Instead of changing emacs_re_max_failures based on the
new stack size, just change emacs_re_safe_alloca; emacs_re_max_failures
remains constant regardless, since if we run out stack space SAFE_ALLOCA
will fall back to heap allocation.

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
7 years agoFix computation of regex stack limit
Noam Postavsky [Sat, 5 Nov 2016 20:51:53 +0000 (16:51 -0400)]
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.

7 years agoRemove apploopnr
Alan Third [Sun, 8 Jan 2017 09:47:51 +0000 (09:47 +0000)]
Remove apploopnr

* src/nsterm.m (ns_select, ns_read_socket): Remove apploopnr and only
allow app loop to run in main thread.

7 years agoRemove unused configure output variable
Glenn Morris [Sun, 8 Jan 2017 18:19:48 +0000 (10:19 -0800)]
Remove unused configure output variable

* configure.ac (GNULIB_MK):
* Makefile.in (gnulib_mk): Remove, no longer used.

7 years agoFix automake dependencies
Glenn Morris [Sun, 8 Jan 2017 18:16:16 +0000 (10:16 -0800)]
Fix automake dependencies

* Makefile.in (AUTOMAKE_INPUTS): Add nt/gnulib.mk.  (Bug#25372)
All platforms need this file to exist.

7 years agoRemove unnecessary blankp code
Paul Eggert [Sun, 8 Jan 2017 18:06:41 +0000 (10:06 -0800)]
Remove unnecessary blankp code

* src/character.c (blankp): Remove redundant code that slows Emacs
down a bit.  The caller already does the test.

7 years ago* lisp/textmodes/rst.el: Fix rst-forward-indented-block.
Stefan Merten [Sun, 8 Jan 2017 10:09:10 +0000 (11:09 +0100)]
* 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.

7 years agoRemove @SET_MAKE@ from manually-maintained files
Paul Eggert [Sun, 8 Jan 2017 02:15:17 +0000 (18:15 -0800)]
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@.

7 years agoFix a problem with `start-file-process' in Tramp
Michael Albinus [Sat, 7 Jan 2017 17:51:30 +0000 (18:51 +0100)]
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>

7 years agoFix selecting SQLite database files with sql-mode (Bug#23566)
Rolf Ade [Tue, 3 Jan 2017 01:05:37 +0000 (20:05 -0500)]
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

7 years agoSpecify encoding of the bookmark file
Eli Zaretskii [Sat, 7 Jan 2017 12:33:41 +0000 (14:33 +0200)]
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)

7 years agoAvoid infloop in 'ispell-region'
Eli Zaretskii [Sat, 7 Jan 2017 11:02:50 +0000 (13:02 +0200)]
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.

7 years agoAdd support for Unicode whitespace in [:blank:]
Philipp Stephani [Fri, 6 Jan 2017 14:56:51 +0000 (15:56 +0100)]
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:].

7 years ago(feedmail-deduce-address-list): Avoid add-to-list on local variables.
Stefan Monnier [Fri, 6 Jan 2017 02:02:48 +0000 (21:02 -0500)]
(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.

7 years agoFix isearch handling of C-u C-u...
Noam Postavsky [Sat, 31 Dec 2016 05:31:49 +0000 (00:31 -0500)]
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).

7 years agoShorten autogen.sh script
Paul Eggert [Thu, 5 Jan 2017 20:04:00 +0000 (12:04 -0800)]
Shorten autogen.sh script

* autogen.sh: Use a shorter script, as some 'sed' implementations
mishandle long scripts.

7 years agoYet another fix for autogen.sh
Eli Zaretskii [Thu, 5 Jan 2017 19:36:58 +0000 (21:36 +0200)]
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.

7 years ago* autogen.sh (gnulib.mk): Another attempt to fix macOS build.
Eli Zaretskii [Thu, 5 Jan 2017 17:48:49 +0000 (19:48 +0200)]
* autogen.sh (gnulib.mk): Another attempt to fix macOS build.

7 years agoFix dependencies of nt/gnulib.mk
Eli Zaretskii [Thu, 5 Jan 2017 16:04:54 +0000 (18:04 +0200)]
Fix dependencies of nt/gnulib.mk

* Makefile.in ($(srcdir)/nt/gnulib.mk): Avoid circular dependency
of nt/gnulib.mk on lib/Makefile.in.

7 years agoUnbreak macOS build
Eli Zaretskii [Thu, 5 Jan 2017 15:55:43 +0000 (17:55 +0200)]
Unbreak macOS build

* autogen.sh (gnulib.mk): Don't use non-portable extensions of GNU
Sed.

7 years agoFix term.el handling of ^Z-sequences spanning chunks
Johan Claesson [Wed, 28 Dec 2016 17:56:11 +0000 (12:56 -0500)]
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

7 years agoTurn on lexical-binding in mb-depth.el
Mark Oteiza [Thu, 5 Jan 2017 03:31:26 +0000 (22:31 -0500)]
Turn on lexical-binding in mb-depth.el

* lisp/mb-depth.el: Turn on lexical-binding.
(minibuffer-depth-setup): Bind things used multiple times.

7 years agoRevert "Rework NS event handling (bug#25265)"
Alan Third [Wed, 4 Jan 2017 12:41:29 +0000 (12:41 +0000)]
Revert "Rework NS event handling (bug#25265)"

This reverts commit e0e5b0f4a4ce1d19ee0240c514dedd873d4165dc.

7 years agoPort recent autogen.sh changes to Darwin
Paul Eggert [Wed, 4 Jan 2017 08:44:45 +0000 (00:44 -0800)]
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.

7 years agoAvoid add-to-list on local variables
Stefan Monnier [Wed, 4 Jan 2017 05:40:45 +0000 (00:40 -0500)]
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.

7 years agoTurn on lexical-binding in md4.el
Mark Oteiza [Tue, 3 Jan 2017 23:34:13 +0000 (18:34 -0500)]
Turn on lexical-binding in md4.el

* lisp/md4.el: Turn on lexical-binding.
* test/lisp/md4-tests.el: New file.

7 years agoLots of refactorings and a few minor improvements.
Stefan Merten [Tue, 3 Jan 2017 22:15:13 +0000 (23:15 +0100)]
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.

7 years ago(cl-defstruct): Improve error message for slots w/o value (bug#25312)
Stefan Monnier [Tue, 3 Jan 2017 21:07:44 +0000 (16:07 -0500)]
(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.

7 years agoSmall patch for ffap.el
Philipp Stephani [Tue, 3 Jan 2017 16:24:23 +0000 (16:24 +0000)]
Small patch for ffap.el

* lisp/ffap.el (ffap-alist): Document that ffap sets the match data
while walking 'ffap-alist'.

7 years agoGenerate nt/gnulib.mk from lib/gnulib.mk
Eli Zaretskii [Tue, 3 Jan 2017 15:46:40 +0000 (17:46 +0200)]
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.

7 years agoHandle multibyte chars spanning chunks in term.el
Noam Postavsky [Thu, 29 Dec 2016 01:13:20 +0000 (20:13 -0500)]
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).

7 years agoFinish work on filenotify-tests.el
Michael Albinus [Tue, 3 Jan 2017 08:50:41 +0000 (09:50 +0100)]
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)

7 years agoCheck also for "gvfs-monitor-dir.exe" in Tramp
Michael Albinus [Mon, 2 Jan 2017 18:30:21 +0000 (19:30 +0100)]
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".

7 years agoFix compilation --without-x
Eli Zaretskii [Mon, 2 Jan 2017 16:55:27 +0000 (18:55 +0200)]
Fix compilation --without-x

* src/composite.c (autocmp_chars) [HAVE_WINDOW_SYSTEM]: Call
font_range only if it is compiled in.  (Bug#25334)

7 years agoFix RefTeX to show table of contents for dtx files (tiny change)
Sašo Živanović [Fri, 30 Dec 2016 10:12:42 +0000 (11:12 +0100)]
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)

7 years agoRemove mistakenly-added files
Paul Eggert [Mon, 2 Jan 2017 04:23:38 +0000 (20:23 -0800)]
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.

7 years agoWarn about incomplete untarring of link files
Noam Postavsky [Sat, 17 Dec 2016 23:01:52 +0000 (18:01 -0500)]
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.

7 years agoRemove sh-mode's skeleton-end-hook
Noam Postavsky [Tue, 20 Dec 2016 01:16:50 +0000 (20:16 -0500)]
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).

7 years ago* nt/gnulib.mk (stdint.h): Update to match lib/gnulib.mk here.
Paul Eggert [Sun, 1 Jan 2017 18:54:28 +0000 (10:54 -0800)]
* nt/gnulib.mk (stdint.h): Update to match lib/gnulib.mk here.

7 years agoAdd term/tmux.el
Mark Oteiza [Sun, 1 Jan 2017 16:50:59 +0000 (11:50 -0500)]
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.

7 years agoFix encoding of JSON surrogate pairs
Philipp Stephani [Mon, 24 Oct 2016 19:54:51 +0000 (21:54 +0200)]
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.

7 years agoRemove tramp-gw.el, which was synced from emacs-25 by accident
Michael Albinus [Sun, 1 Jan 2017 12:03:55 +0000 (13:03 +0100)]
Remove tramp-gw.el, which was synced from emacs-25 by accident

7 years ago; Fix typo
Michael Albinus [Sun, 1 Jan 2017 11:59:58 +0000 (12:59 +0100)]
; Fix typo

* src/gfilenotify.c:

7 years agoDo not use Gnulib’s m4/wint_t.m4.
Paul Eggert [Sun, 1 Jan 2017 10:33:29 +0000 (02:33 -0800)]
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.

7 years agoMerge from gnulib, continued
Paul Eggert [Sun, 1 Jan 2017 10:04:35 +0000 (02:04 -0800)]
Merge from gnulib, continued

* m4/wint_t.m4: New file, copied from gnulib.

7 years agoUpdate copyright year to 2017 in master
Paul Eggert [Sun, 1 Jan 2017 09:48:38 +0000 (01:48 -0800)]
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.

7 years agoRemove test/automated detritus from merge
Paul Eggert [Sun, 1 Jan 2017 09:37:30 +0000 (01:37 -0800)]
Remove test/automated detritus from merge

7 years agoMerge from gnulib
Paul Eggert [Sun, 1 Jan 2017 09:32:27 +0000 (01:32 -0800)]
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.

7 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:10:47 +0000 (01:10 -0800)]
Merge from origin/emacs-25

2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017

7 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:05:03 +0000 (01:05 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

e092f08 Bump Emacs version to 25.1.91

7 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:05:02 +0000 (01:05 -0800)]
Merge from origin/emacs-25

665be69 ; Update ChangeLog.2 and AUTHORS files

# Conflicts:
# etc/AUTHORS

7 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:48 +0000 (01:02 -0800)]
; Merge from origin/emacs-25

The following commits were skipped:

e8f0d7d Backport: Remove an ambiguity from defvar's doc string.  Fixe...
af1b102 * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)

7 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:47 +0000 (01:02 -0800)]
Merge from origin/emacs-25

697167b ; Improve wording of previous change in variables.texi
d7973e8 Document 'default-toplevel-value' and 'set-default-toplevel-v...
8b71826 Don't modify minibuffer variables globally
5b5e036 Revert to pre-25.1 behavior in ffap
19994a1 * lisp/ffap.el: Fix obsolete comment referencing ffap-bug.
3ace730 Attempt to fix 64-bit AIX build
f69bd79 Clarify usage of 'ediff-cleanup-hook' (Bug#24675)
c04ac8a Document that variable binding order is unspecified
272554a * lisp/desktop.el (desktop-buffers-not-to-save): Doc fix.
08de101 Fix M-x hints on Mac port
86a297a Work around reporting a dpi change in apply_xft_settings
cf1f985 ; lisp/skeleton.el (skeleton-insert): Fix typo in last change
9e1209d Amend the version number of CC Mode 5.33 -> 5.32.99.  Don't m...
88cdf14 Improve skeleton docstrings

7 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:47 +0000 (01:02 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

ce55382 ; Auto-commit of loaddefs file.

7 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:46 +0000 (01:02 -0800)]
Merge from origin/emacs-25

4179238 Improve documentation of 'w32-scroll-lock-modifier'

7 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:46 +0000 (01:02 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

dfc9f11 Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac...

7 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 1 Jan 2017 09:02:45 +0000 (01:02 -0800)]
Merge from origin/emacs-25

9adb101 Document 'describe-fontset'
229315c ; Add missing symbol quoting.
3d94931 Repair desktop restoration on text terminals
43022f9 Ignore forward-sexp-function in js-mode indentation code
b19fb49 Improve documentation of 'define-coding-system'
467768f Fix Bug#25162
6db78ae Fix a typo in define-abbrev-table
5f7d906 Bump makeinfo requirement from 4.7 to 4.13
442e2f6 Fixes related to select-enable-clipboard
e4ac450 Define struct predicate before acccesors
08decbd Doc fix for vc-git
5531e75 Further improve make-dist checking
953bf67 Improve previous make-dist change
129645a Make make-dist --snapshot do some sanity checks

# Conflicts:
# lisp/menu-bar.el

7 years agoGive eval-and-compile a correct edebug spec. Fixes bug #16184 properly.
Alan Mackenzie [Sun, 1 Jan 2017 08:28:04 +0000 (08:28 +0000)]
Give eval-and-compile a correct edebug spec.  Fixes bug #16184 properly.

* lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit
from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug.

* lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from
t to (&rest def-form).

7 years agoFix copyright years by hand
Paul Eggert [Sun, 1 Jan 2017 04:01:41 +0000 (04:01 +0000)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update, or
updated incorrectly.

7 years agoUpdate copyright year to 2017
Paul Eggert [Sun, 1 Jan 2017 03:14:01 +0000 (03:14 +0000)]
Update copyright year to 2017

Run admin/update-copyright.

7 years agoClarify internal_catch etc.
Paul Eggert [Sat, 31 Dec 2016 21:10:38 +0000 (13:10 -0800)]
Clarify internal_catch etc.

The recent change to internal_catch and friends relied on some
confusion I introduced to the code in 2013.  Attempt to fix
the confusion by clarifying the code instead.  This saves an
instruction and a load dependency in the typical case.
* src/eval.c (internal_catch, internal_condition_case)
(internal_condition_case_1, internal_condition_case_2)
(internal_condition_case_n): Undo the previous change.  Instead,
use use ‘c’ rather than ‘handlerlist’ in the typical case.
Also, use ‘eassert’ rather than ‘clobbered_eassert’ when possible.

7 years agoFurther improve filenotify-tests.el
Ken Brown [Sat, 31 Dec 2016 21:16:12 +0000 (16:16 -0500)]
Further improve filenotify-tests.el

* test/lisp/filenotify-tests.el
(file-notify--test-read-event): Adapt to file monitors of type
GFamFileMonitor, which occur on Cygwin.
(file-notify--test-monitor): Update doc string.

7 years ago* src/xdisp.c (string_from_display_spec): Simplify.
Paul Eggert [Sat, 31 Dec 2016 17:13:38 +0000 (09:13 -0800)]
* src/xdisp.c (string_from_display_spec): Simplify.

7 years agoRework NS event handling (bug#25265)
Alan Third [Sat, 31 Dec 2016 10:31:19 +0000 (10:31 +0000)]
Rework NS event handling (bug#25265)

* src/nsterm.m (unwind_apploopnr): Remove.
(ns_read_socket): Remove references to apploopnr.  Make processing the
NS event loop conditional on being in the main thread.
(ns_select): Remove references to apploopnr.  Remove all fd_handler
related stuff.  Check if there are events waiting on the NS event
queue rather than running the event loop.  Remove unused variables and
code.
(fd_handler): Remove.
(ns_term_init): Remove creation of fd_handler thread.
(hold_event, EmacsApp:sendEvent, EmacsView:mouseMoved,
EmacsView:windowDidExpose): Remove send_appdefined.
(ns_send_appdefined): Always check the event queue for
applicationDefined events rather than relying on send_appdefined var.
* src/nsterm.h: Remove reference to fd_handler method.

7 years agoCheckdoc: use syntax functions instead of regex
Philipp Stephani [Fri, 30 Dec 2016 17:00:54 +0000 (18:00 +0100)]
Checkdoc: use syntax functions instead of regex

In checkdoc.el, get rid of the error-prone regex to find definition
forms, and use existing syntax-based navigation functions instead.
This fixes a corner case with one-argument `defvar' forms.

* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): New function.
(checkdoc-next-docstring, checkdoc-defun): Use it.
* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--next-docstring):
Add unit test.

7 years agoDon't define NOMINMAX on MS-Windows
Eli Zaretskii [Sat, 31 Dec 2016 12:07:39 +0000 (14:07 +0200)]
Don't define NOMINMAX on MS-Windows

* src/callproc.c (NOMINMAX) [WINDOWSNT]: Don't define.  This is no
longer needed with the current sources and MinGW headers, while
defining NOMINMAX causes an annoying compiler warning.

7 years agoSimplify code in eval.c that calls 'setjmp'
Chris Gregory [Sat, 31 Dec 2016 11:36:32 +0000 (13:36 +0200)]
Simplify code in eval.c that calls 'setjmp'

* src/eval.c (internal_catch, internal_condition_case)
(internal_condition_case_1, internal_condition_case_2)
(internal_condition_case_n): Factor out the common tail of the
functions.

Copyright-paperwork-exempt: yes