]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoMerge from origin/emacs-25
Paul Eggert [Mon, 26 Sep 2016 20:32:28 +0000 (13:32 -0700)]
Merge from origin/emacs-25

0ffc9ce Update admin/authors.el
0ad7410 Update Antinews in ELisp manual
ea0f750 Fix comments on window height macros
0bbdeed Fix 'url-http-create-request' when cookies are used
0045998 Fix cross reference in frames.texi
1392894 ; * etc/DEBUG: Minor copyedits.
304a5c8 ; * etc/DEBUG: Improve documentation of getting control to GDB.
56bf7d7 Fix regexp-opt documentation (bug #17862)
803ad6f ; Fix documentation of seq-subseq
ed4530d * lisp/emacs-lisp/gv.el (gv-ref): Fix example of PLACE in doc...
88ea396 ; Spelling fixes
17197d0 Fix tags-query-replace docstring
80a7f8b Clarify documentation of precision in format specs
88a5052 Improve and clarify documentation of subprocesses
89eb09f * etc/PROBLEMS: Mention gnutls-cli 3.5.3 (Bug#24247).

# Conflicts:
# etc/PROBLEMS
# src/process.c

8 years ago* lisp/net/tramp-compat.el (tramp-compat-funcall): Don't use `subrp'.
Michael Albinus [Mon, 26 Sep 2016 07:50:39 +0000 (09:50 +0200)]
* lisp/net/tramp-compat.el (tramp-compat-funcall): Don't use `subrp'.

8 years agoFix 'dired-mark-extension' with prefix argument
Eli Zaretskii [Sat, 24 Sep 2016 15:10:42 +0000 (18:10 +0300)]
Fix 'dired-mark-extension' with prefix argument

* lisp/dired-x.el (dired-mark-extension): Allow to specify
MARKER-CHAR interactively as a string, not as a character's
codepoint.  (Bug#24518)

* doc/misc/dired-x.texi (Advanced Mark Commands): Document the
behavior when invoked with a prefix arg.

8 years agoSupport completion of classes and IDs in CSS mode
Simen Heggestøyl [Sat, 24 Sep 2016 11:55:36 +0000 (13:55 +0200)]
Support completion of classes and IDs in CSS mode

* lisp/textmodes/css-mode.el (css-class-list-function): New variable
holding the function to call for retrieving completions of class
names.
(css-id-list-function): New variable holding the function to call for
retrieving completions of IDs.
(css--foreign-completions): New function for retrieving completions
from other buffers.
(css--complete-selector): Support completing HTML class names and IDs
from other buffers in addition to completing HTML tags.

* lisp/textmodes/sgml-mode.el (html--buffer-classes-cache): New
variable holding a cache for `html-current-buffer-classes'.
(html--buffer-ids-cache): New variable holding a cache for
`html-current-buffer-ids'.
(html-current-buffer-classes): New function returning a list of class
names used in the current buffer.
(html-current-buffer-ids): New function returning a list of IDs used
in the current buffer.
(html-mode): Set `css-class-list-function' and `css-id-list-function'
to `html-current-buffer-classes' and `html-current-buffer-ids'
respectively.

8 years agoUpdate test suite files due to removal of test/lisp/legacy
Eli Zaretskii [Sat, 24 Sep 2016 10:32:44 +0000 (13:32 +0300)]
Update test suite files due to removal of test/lisp/legacy

* test/README: Reference file-organization.org.
* test/file-organization.org: Remove the description of files in
the lisp/legacy/ directory.

8 years ago; * test/src/undo-tests.el: Moved from test/lisp/legacy/.
Eli Zaretskii [Sat, 24 Sep 2016 10:27:57 +0000 (13:27 +0300)]
; * test/src/undo-tests.el: Moved from test/lisp/legacy/.

8 years ago; * test/src/textprop-tests.el: Minor copyedits.
Eli Zaretskii [Sat, 24 Sep 2016 10:25:04 +0000 (13:25 +0300)]
; * test/src/textprop-tests.el: Minor copyedits.

8 years ago; * Move test/lisp/legacy/textprop-tests.el to test/src/.
Eli Zaretskii [Sat, 24 Sep 2016 10:23:20 +0000 (13:23 +0300)]
; * Move test/lisp/legacy/textprop-tests.el to test/src/.

8 years agoIncorporate syntax-tests in lisp-tests.
Eli Zaretskii [Sat, 24 Sep 2016 10:20:19 +0000 (13:20 +0300)]
Incorporate syntax-tests in lisp-tests.

* test/lisp/emacs-lisp/lisp-tests.el: Add tests from
test/lisp/legacy/syntax-tests.el.
* test/lisp/legacy/syntax-tests.el: File deleted.

8 years ago; * test/src/process-tests.el: Renamed from test/lisp/legacy/process-tests.el.
Eli Zaretskii [Sat, 24 Sep 2016 10:12:43 +0000 (13:12 +0300)]
; * test/src/process-tests.el: Renamed from test/lisp/legacy/process-tests.el.

8 years agoIncorporate occur-tests in replace-tests
Eli Zaretskii [Sat, 24 Sep 2016 10:00:40 +0000 (13:00 +0300)]
Incorporate occur-tests in replace-tests

* test/lisp/replace-tests.el: Add tests from
test/lisp/legacy/occur-tests.el.
* test/lisp/legacy/occur-tests.el: File deleted.

8 years agoIncorporate lexbind-tests.el in bytecomp-test.el
Eli Zaretskii [Sat, 24 Sep 2016 09:53:46 +0000 (12:53 +0300)]
Incorporate lexbind-tests.el in bytecomp-test.el

* test/lisp/emacs-lisp/bytecomp-tests.el: Added tests from
test/lisp/legacy/lexbind-tests.el.
* test/lisp/legacy/lexbind-tests.el: File deleted.

8 years ago; * test/src/font-tests.el: Minor copyedits.
Eli Zaretskii [Sat, 24 Sep 2016 09:43:40 +0000 (12:43 +0300)]
; * test/src/font-tests.el: Minor copyedits.

8 years ago; * test/src/font-tests.el: Moved from test/lisp/legacy/font-parse-tests.el.
Eli Zaretskii [Sat, 24 Sep 2016 09:40:10 +0000 (12:40 +0300)]
; * test/src/font-tests.el: Moved from test/lisp/legacy/font-parse-tests.el.

8 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 24 Sep 2016 09:36:43 +0000 (12:36 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

8 years ago; * test/lisp/files-tests.el: Minor copyedits.
Eli Zaretskii [Sat, 24 Sep 2016 09:35:54 +0000 (12:35 +0300)]
; * test/lisp/files-tests.el: Minor copyedits.

8 years agoImprove integer overflow handling a bit
Paul Eggert [Sat, 24 Sep 2016 09:35:13 +0000 (02:35 -0700)]
Improve integer overflow handling a bit

* src/charset.c (read_hex): Use INT_LEFT_SHIFT_OVERFLOW for clarity.
The machine code is the same on my platform.
* src/doprnt.c (doprnt):
* src/emacs-module.c (module_funcall):
* src/font.c (font_intern_prop):
* src/keyboard.c (Frecursion_depth):
* src/lread.c (read1):
Use WRAPV macros instead of checking overflow by hand.
* src/editfns.c (hi_time, time_arith, decode_time_components):
* src/emacs-module.c (Fmodule_load):
Simplify by using FIXNUM_OVERFLOW_P.
* src/emacs-module.c: Include intprops.h.
* src/xdisp.c (percent99): New function.
(decode_mode_spec): Use it to simplify overflow avoidance and
formatting of %p and %P.

8 years ago; * test/lisp/files-tests.el: Moved from test/lisp/legacy/.
Eli Zaretskii [Sat, 24 Sep 2016 09:34:15 +0000 (12:34 +0300)]
; * test/lisp/files-tests.el: Moved from test/lisp/legacy/.

8 years agoIncorporate core-elisp-tests in lisp-tests
Eli Zaretskii [Sat, 24 Sep 2016 09:30:22 +0000 (12:30 +0300)]
Incorporate core-elisp-tests in lisp-tests

* test/lisp/emacs-lisp/lisp-tests.el: Added tests from
test/lisp/legacy/core-elisp-tests.el.
* test/lisp/legacy/core-elisp-tests.el: File removed.

8 years agoMove coding-tests.el and decoder-test.el to their places
Eli Zaretskii [Sat, 24 Sep 2016 09:18:54 +0000 (12:18 +0300)]
Move coding-tests.el and decoder-test.el to their places

* test/src/coding-tests.el: Added all the tests from
test/lisp/legacy/decoder-tests.el.
* test/lisp/legacy/decoder-tests.el: File deleted.

8 years ago; * test/src/coding-tests.el: Moved from test/lisp/legacy/.
Eli Zaretskii [Sat, 24 Sep 2016 09:04:55 +0000 (12:04 +0300)]
; * test/src/coding-tests.el: Moved from test/lisp/legacy/.

8 years ago; * test/lisp/emacs-lisp/bytecomp-tests.el: Fix header and 'provide'.
Eli Zaretskii [Sat, 24 Sep 2016 09:01:44 +0000 (12:01 +0300)]
; * test/lisp/emacs-lisp/bytecomp-tests.el: Fix header and 'provide'.

8 years ago; * test/lisp/emacs-lisp/bytecomp-tests.el: Moved from test/lisp/.
Eli Zaretskii [Sat, 24 Sep 2016 08:59:42 +0000 (11:59 +0300)]
; * test/lisp/emacs-lisp/bytecomp-tests.el: Moved from test/lisp/.

8 years ago; * test/lisp/bytecomp-tests.el: Moved from test/lisp/legacy/.
Eli Zaretskii [Sat, 24 Sep 2016 08:55:03 +0000 (11:55 +0300)]
; * test/lisp/bytecomp-tests.el: Moved from test/lisp/legacy/.

8 years agoUse correct TYPE value for displaying error messages in (erc-display-message)
Vibhav Pant [Sat, 24 Sep 2016 06:11:44 +0000 (11:41 +0530)]
Use correct TYPE value for displaying error messages in (erc-display-message)

8 years agoBump the version to 25.2.50
Eli Zaretskii [Fri, 23 Sep 2016 07:40:47 +0000 (10:40 +0300)]
Bump the version to 25.2.50

* README:
* configure.ac:
* etc/NEWS:
* msdos/sed2v2.inp: Increment the Emacs version to 25.2.50.

8 years agoibuffer-do-view-other-frame: Display each buffer in a new frame
Tino Calancha [Fri, 23 Sep 2016 06:16:15 +0000 (15:16 +0900)]
ibuffer-do-view-other-frame: Display each buffer in a new frame

* lisp/ibuffer.el (ibuffer-do-view-1):
When TYPE equals 'other-frame, then display each buffer
in a new frame (Bug#24086).

8 years agoUpdate from gnulib
Paul Eggert [Thu, 22 Sep 2016 21:52:59 +0000 (14:52 -0700)]
Update from gnulib

This incorporates:
2016-09-22 stdint: port to GCC 7
2016-09-22 limits-h, stdint: don't assume extensions
* doc/misc/texinfo.tex, m4/limits-h.m4, m4/stdint.m4: Copy from gnulib.

8 years ago* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix coding error
Alan Mackenzie [Thu, 22 Sep 2016 09:56:55 +0000 (09:56 +0000)]
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix coding error

8 years agoPort recent flexmember changes to NetBSD
Paul Eggert [Wed, 21 Sep 2016 22:17:20 +0000 (15:17 -0700)]
Port recent flexmember changes to NetBSD

The NetBSD library supports localtime_rz directly, and without
this change 'configure' omitted the flexmember test that is marked
as conditional on localtime_rz.  Emacs now needs to use
flexmember.m4 even when localtime_rz works.
Problem reported by Thomas Klausner.
* admin/merge-gnulib (GNULIB_MODULES): Add flexmember.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.

8 years ago* doc/misc/texinfo.tex: Copy from gnulib.
Paul Eggert [Wed, 21 Sep 2016 20:50:24 +0000 (13:50 -0700)]
* doc/misc/texinfo.tex: Copy from gnulib.

8 years ago; * lisp/net/tramp.el (tramp-clear-passwd): Make it compatible to Emacs 23
Michael Albinus [Wed, 21 Sep 2016 18:02:54 +0000 (20:02 +0200)]
; * lisp/net/tramp.el (tramp-clear-passwd): Make it compatible to Emacs 23

8 years ago* lisp/net/tramp.el (tramp-clear-passwd): Call also `auth-source-forget'.
Michael Albinus [Wed, 21 Sep 2016 10:00:11 +0000 (12:00 +0200)]
* lisp/net/tramp.el (tramp-clear-passwd): Call also `auth-source-forget'.

8 years agoUse flexmembers on IBM XL C for AIX
Paul Eggert [Tue, 20 Sep 2016 15:30:17 +0000 (08:30 -0700)]
Use flexmembers on IBM XL C for AIX

This removes a workaround where Emacs did not use flexible
array members when compiled with IBM XL C.  Instead, avoid
the problem by making the aliasing issues more obvious to
this compiler.
* admin/merge-gnulib: Don’t remove m4/flexmember.m4.
* m4/flexmember.m4: Copy from gnulib.
* configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Remove workaround.
* src/alloc.c (allocate_string_data): Rephrase to avoid aliasing
problem that would otherwise mess up code generated for flexible
array members by IBM XL C for AIX, V12.1.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER): Remove; now done
by gnulib code.

8 years agoFix a problem with Tramp when the temporary dir isn't C:/Temp on w32
Michael Albinus [Mon, 19 Sep 2016 12:21:35 +0000 (14:21 +0200)]
Fix a problem with Tramp when the temporary dir isn't C:/Temp on w32

* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): Don't use
`tramp-drop-volume-letter' any longer, it causes collateral
damages.  Reported by Chris Zheng <chriszheng99@gmail.com>.

8 years agoPort January __morecore changes to AIX 7.1
Paul Eggert [Sat, 17 Sep 2016 22:06:24 +0000 (15:06 -0700)]
Port January __morecore changes to AIX 7.1

* src/vm-limit.c (__MALLOC_HOOK_VOLATILE, __morecore)
(__after_morecore_hook):
* src/ralloc.c (__morecore):
Declare if DOUG_LEA_MALLOC is not defined, not if HAVE_MALLOC_H is
not defined.  <malloc.h> does not declare these in AIX 7.1.

8 years agoDefine _GNU_SOURCE in files delaying config.h
Paul Eggert [Sat, 17 Sep 2016 18:05:07 +0000 (11:05 -0700)]
Define _GNU_SOURCE in files delaying config.h

Problem reported by Richard Copley in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00440.html
* src/w32.c, src/w32notify.c, src/w32proc.c (_GNU_SOURCE):
Define early.

8 years agoUpdate the bidi test code and data
Eli Zaretskii [Sat, 17 Sep 2016 16:12:46 +0000 (19:12 +0300)]
Update the bidi test code and data

* test/manual/BidiCharacterTest.txt: Import the version from
Unicode Standard 9.0.0.
* test/manual/biditest.el (biditest-generate-testfile): Allow 'x'
in the 4th field of the test data.

8 years agoibuffer-do-toggle-read-only: Fix unused argument
Tino Calancha [Sat, 17 Sep 2016 13:38:19 +0000 (22:38 +0900)]
ibuffer-do-toggle-read-only: Fix unused argument

* lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call
'read-only-mode' with ARG when its an integer.
Clarify the meaning of ARG in doc string.

8 years agoImprove accuracy of line/column numbers in byte compiler's warning messages.
Alan Mackenzie [Sat, 17 Sep 2016 12:43:54 +0000 (12:43 +0000)]
Improve accuracy of line/column numbers in byte compiler's warning messages.

* lisp/emacs-lisp/bytecomp.el (byte-compile-set-symbol-position): ensure new
value of byte-compile-last-position is not lower than old value.
(byte-compile-function-warn): call byte-compile-set-symbol-position.

8 years agoMinor Tramp tweaks
Michael Albinus [Sat, 17 Sep 2016 08:01:31 +0000 (10:01 +0200)]
Minor Tramp tweaks

* lisp/net/tramp.el (tramp-get-buffer): Reuse connection
property "process-buffer" if already existing.
(tramp-connectable-p): Suppress debug messages.

8 years agoDefine _GNU_SOURCE in unexmacosx.c
Paul Eggert [Sat, 17 Sep 2016 01:01:39 +0000 (18:01 -0700)]
Define _GNU_SOURCE in unexmacosx.c

Problem reported by Bob Halley in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00427.html
* src/unexmacosx.c (_GNU_SOURCE): Define if not already defined.

8 years agoC Mode: Fix mis-fontification of macro invocation as function declaration
Alan Mackenzie [Fri, 16 Sep 2016 10:47:55 +0000 (10:47 +0000)]
C Mode: Fix mis-fontification of macro invocation as function declaration

This happened with a macro invocation which was followed by a statement block
in braces.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 11: distinguish
between contexts nil and top, being less permissive in the former case.
(c-just-after-func-arglist-p): call c-forward-decl-or-cast-1 with context top.

8 years agoImprove the doc string of 'format'
Eli Zaretskii [Fri, 16 Sep 2016 09:55:15 +0000 (12:55 +0300)]
Improve the doc string of 'format'

* src/editfns.c (Fformat): Fix ambiguity in the doc string's usage
of a literal period.  (Bug#24407)

8 years agoImprove doc strings in whitespace.el
Eli Zaretskii [Fri, 16 Sep 2016 09:46:15 +0000 (12:46 +0300)]
Improve doc strings in whitespace.el

* lisp/whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode): Improve
the doc strings.  (Bug#24413)

8 years agoImprove detectability of 'next-logical-line' and 'previous-logical-line'
Eli Zaretskii [Fri, 16 Sep 2016 09:31:41 +0000 (12:31 +0300)]
Improve detectability of 'next-logical-line' and 'previous-logical-line'

* lisp/simple.el (next-line, previous-line): Mention
'next-logical-line' and 'previous-logical-line' in the doc
strings.  (Bug#24443)

8 years agoUpdate from gnulib
Paul Eggert [Fri, 16 Sep 2016 07:55:40 +0000 (00:55 -0700)]
Update from gnulib

This incorporates:
2016-09-16 extensions: fix typo in comment
2016-09-16 stdio: don't redefine __USE_MINGW_ANSI_STDIO
* m4/extensions.m4, m4/stdio_h.m4: Copy from gnulib.

8 years agoPrefer now-standard int width macros
Paul Eggert [Thu, 15 Sep 2016 22:25:33 +0000 (15:25 -0700)]
Prefer now-standard int width macros

* src/data.c (ULL_WIDTH):
* src/lisp.h (EMACS_INT_WIDTH, BITS_PER_BITS_WORD):
* src/lread.c (read_integer):
* src/term.c (produce_glyphless_glyph):
* src/xterm.c (x_send_scroll_bar_event):
Use *_WIDTH macros instead of CHAR_BIT * sizeof.
* src/data.c (ULL_WIDTH): Rename from BITS_PER_ULL for consistency
with the *_WIDTH standard macros.  All uses changed.
* src/gmalloc.c (INT_BIT): Remove.  All uses replaced with INT_WIDTH.
* src/lisp.h (EMACS_INT_WIDTH): Rename from BITS_PER_EMACS_INT
for consistency with the *_WIDTH standard macros.  All uses changed.
(BITS_PER_CHAR): Remove; all uses replaced by CHAR_BIT.  This must
be the same as CHAR_WIDTH and avoids confusion with Elisp
char-width, which counts columns not bits.
(BITS_PER_SHORT): Remove; all uses replaced by SHRT_WIDTH.
(BITS_PER_LONG): Remove; all uses replaced by LONG_WIDTH.
* src/lread.c: Do not include limits.h since CHAR_BIT is no longer
used directly.

8 years agoUpdate from gnulib
Paul Eggert [Thu, 15 Sep 2016 18:50:23 +0000 (11:50 -0700)]
Update from gnulib

This incorporates:
2016-09-15 stdint: support new _WIDTH macros
2016-09-15 limits-h: new module
2016-09-15 sys_types: avoid glibc 2.25 warnings about major()
2016-09-15 extensions: port to more ISO C TSes
2016-09-13 intprops: new macro TYPE_WIDTH
2016-09-13 extensions: port to recent ISO C TRs
* .gitignore: Add lib/limits.h.
* doc/misc/texinfo.tex, lib/ftoastr.h, lib/intprops.h:
* lib/stdint.in.h, m4/extensions.m4, m4/stdint.m4, m4/stdio_h.m4:
* m4/sys_types_h.m4: Copy from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/limits.in.h, m4/limits-h.m4: New files, copie from gnulib.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.

8 years agoUpdate admin/authors.el
Eli Zaretskii [Thu, 15 Sep 2016 19:21:19 +0000 (22:21 +0300)]
Update admin/authors.el

* admin/authors.el (authors-fixed-entries): Add an entry for Bob
Weiner.

8 years agoRework fixing Bug#24432
Michael Albinus [Thu, 15 Sep 2016 07:24:07 +0000 (09:24 +0200)]
Rework fixing Bug#24432

* lisp/net/tramp.el (tramp-get-buffer): Set connection property
"process-buffer" in order to mark connection as active.

* lisp/net/tramp-cache.el (tramp-get-hash-table)
(tramp-set-connection-property)
(tramp-dump-connection-properties): Do not use "active" property.
(tramp-list-connections): Use "process-buffer" property.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Flush process
properties prior deletion of process.

8 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix debug spec (Bug#24430).
Johan Bockgård [Wed, 14 Sep 2016 19:50:31 +0000 (21:50 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix debug spec (Bug#24430).

8 years ago* lisp/emacs-lisp/edebug.el (defun): Fix debug spec.
Johan Bockgård [Wed, 14 Sep 2016 19:01:08 +0000 (21:01 +0200)]
* lisp/emacs-lisp/edebug.el (defun): Fix debug spec.

8 years agoAvoid compiler warning on MS-Windows due to clone_file
Eli Zaretskii [Wed, 14 Sep 2016 17:46:59 +0000 (20:46 +0300)]
Avoid compiler warning on MS-Windows due to clone_file

* src/fileio.c (clone_file): Condition on !WINDOWSNT, since the
call to it is not compiled in that build, and having it defined
causes compiler warnings.

8 years agoAvoid aborts in GC due to abort_on_gc
Eli Zaretskii [Wed, 14 Sep 2016 17:41:04 +0000 (20:41 +0300)]
Avoid aborts in GC due to abort_on_gc

* src/lisp.h:
* src/print.c (Fprin1_to_string):
* src/eval.c (signal_or_quit):
* src/alloc.c (garbage_collect_1): Remove declarations, setting,
and testing the value of abort_on_gc.  It is no longer needed, and
using it causes rare aborts in GC for no good reason.  (Bug#23912)

8 years agoUpdate Antinews in ELisp manual
Eli Zaretskii [Wed, 14 Sep 2016 14:20:24 +0000 (17:20 +0300)]
Update Antinews in ELisp manual

* doc/lispref/anti.texi (Antinews): Update for Emacs 25.1.
* doc/lispref/elisp.texi (Top): Update the main menu entry for
Antinews.

8 years ago; Complete fixing Bug#24432
Michael Albinus [Wed, 14 Sep 2016 12:52:54 +0000 (14:52 +0200)]
; Complete fixing Bug#24432

8 years agoFix Bug#24432
Michael Albinus [Wed, 14 Sep 2016 09:49:56 +0000 (11:49 +0200)]
Fix Bug#24432

* lisp/net/tramp-cache.el (tramp-get-hash-table): Initialize a
connection as inactive.
(tramp-set-connection-property): Make the connection active.
(tramp-dump-connection-properties): Don't save "active" property.
(tramp-list-connections): List only active connections.  (Bug#24432)

8 years agoDon't bug out on all-whitespace URLs
Lars Ingebrigtsen [Wed, 14 Sep 2016 09:11:17 +0000 (11:11 +0200)]
Don't bug out on all-whitespace URLs

* lisp/net/shr.el (shr-expand-url): Don't bug out on
degenerate all-whitespace URLs.

8 years agosieve-manage.el: Rename sieve-manage-ignore-broken-tls
Katsumi Yamaoka [Wed, 14 Sep 2016 00:07:21 +0000 (00:07 +0000)]
sieve-manage.el: Rename sieve-manage-ignore-broken-tls

* lisp/net/sieve-manage.el (sieve-manage-ignore-starttls):
Rename from sieve-manage-ignore-broken-tls.  If it is set,
sieve-manage will never use STARTTLS even if the server says
it is capable (but may be broken).

8 years agoPort to ISO/IEC TS 18661-1:2014
Paul Eggert [Tue, 13 Sep 2016 22:29:26 +0000 (15:29 -0700)]
Port to ISO/IEC TS 18661-1:2014

* src/character.h (CHARACTER_WIDTH): Rename from CHAR_WIDTH.
All uses changed.

8 years agodired-jump: Expand file-name before dired-goto-file call
Tino Calancha [Tue, 13 Sep 2016 15:04:32 +0000 (00:04 +0900)]
dired-jump: Expand file-name before dired-goto-file call

Command dired-goto-file requires its argument to be an absolute
file name.  Interactively FILE-NAME is read with read-file-name,
which could return an abbreviated file name (Bug#24409).
* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME.
Clarify in doc string the meaning of arg FILE-NAME.

8 years agoAdd test for Bug#21454
Tino Calancha [Tue, 13 Sep 2016 09:01:38 +0000 (18:01 +0900)]
Add test for Bug#21454

* test/lisp/legacy/files-tests.el (files-test-bug-21454): New test.

8 years ago* lisp/net/sieve-manage.el (sieve-manage-ignore-broken-tls): Add :version.
Katsumi Yamaoka [Mon, 12 Sep 2016 23:41:25 +0000 (23:41 +0000)]
* lisp/net/sieve-manage.el (sieve-manage-ignore-broken-tls): Add :version.

8 years agosieve.el: Make the buffer to edit unmodified initially (bug#24423)
TSUCHIYA Masatoshi [Mon, 12 Sep 2016 23:08:02 +0000 (23:08 +0000)]
sieve.el: Make the buffer to edit unmodified initially (bug#24423)

* lisp/net/sieve.el (sieve-edit-script):
Make the buffer to edit be not modified-p initially (bug#24423).

8 years agosieve-manage.el: Allow user to avoid STARTTLS capability test (bug#24422)
TSUCHIYA Masatoshi [Mon, 12 Sep 2016 23:06:43 +0000 (23:06 +0000)]
sieve-manage.el: Allow user to avoid STARTTLS capability test (bug#24422)

* lisp/net/sieve-manage.el
(sieve-manage-ignore-broken-tls): New user option.
(sieve-manage-open-server):
Don't test STARTTLS capability if the option is set (bug#24422).

8 years agoFix compiler thinking width and height may be unitialised in frame.c
Michal Nazarewicz [Mon, 12 Sep 2016 19:36:28 +0000 (21:36 +0200)]
Fix compiler thinking width and height may be unitialised in frame.c

This fixes the following warning:

frame.c: In function ‘x_set_frame_parameters’:
frame.c:3329:25: error: ‘width’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
       adjust_frame_size (f, width_change ? width : -1,
                         ^

* src/frame.c (x_set_frame_parameters): Drop width_changed and
height_changed variables in favour of storing that information in
width and height variables.

8 years agoFix compiler thinking tmpdir may be unitialised in emacsclient
Michal Nazarewicz [Mon, 12 Sep 2016 19:31:15 +0000 (21:31 +0200)]
Fix compiler thinking tmpdir may be unitialised in emacsclient

This fixes the following warning:

emacsclient.c: In function ‘set_local_socket’:
/usr/include/x86_64-linux-gnu/bits/string3.h:111:3: error:
‘tmpdir’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   return __builtin___stpcpy_chk (__dest, __src, __bos (__dest));
   ^
emacsclient.c:1197:17: note: ‘tmpdir’ was declared here
     const char *tmpdir;

* lib-src/emacsclient.c (set_local_socket): Get rid of use_tmpdir
variable and instead use tmpdir being non-NULL as sign that it should
be used.

8 years agoimage-dired: Signal an error before calling a missing executable
Tino Calancha [Mon, 12 Sep 2016 19:28:42 +0000 (04:28 +0900)]
image-dired: Signal an error before calling a missing executable

Reverts commit ca473907
Add a defun to check if an executable exists, and call it
on each function using an external program: when the executable
is not available signal an error.
See discussion on:
https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00135.html
* lisp/image-dired.el (image-dired--check-executable-exists): New defun.
Throw and error when the executable arg is missing.
(image-dired-display-image, image-dired-rotate-thumbnail)
(image-dired-rotate-original, image-dired-set-exif-data)
(image-dired-get-exif-data):
Use it.

8 years agoFix daemon shutdown when emacs-kill-hooks ask questions
Eli Zaretskii [Mon, 12 Sep 2016 18:25:09 +0000 (21:25 +0300)]
Fix daemon shutdown when emacs-kill-hooks ask questions

* lisp/server.el (server-start): Put the server's kill-emacs-hook
last, to allow other hooks to have a frame to interact with the
user.  (Bug#24326)

8 years ago* src/casefiddle.c (casify_word): Simplify.
Paul Eggert [Mon, 12 Sep 2016 15:18:15 +0000 (08:18 -0700)]
* src/casefiddle.c (casify_word): Simplify.

8 years ago* src/casefiddle.c (casify_word): Return Qnil.
Paul Eggert [Mon, 12 Sep 2016 15:06:52 +0000 (08:06 -0700)]
* src/casefiddle.c (casify_word): Return Qnil.

8 years agoRefactor common code in {upcase,downcase,capitalize}-word functions
Michal Nazarewicz [Wed, 7 Sep 2016 13:21:26 +0000 (15:21 +0200)]
Refactor common code in {upcase,downcase,capitalize}-word functions

* src/casefiddle.c (operate_on_word): Removed in favour of…
(casify_word) …new function which does what operate_on_word did plus
what all of the common code from *-word functions.
(upcase-word, downcase-word, capitalize-word): Move code common between
those functions (pretty much the whole body of those functions) into
casify_word and use that instead of now deleted operate_on_word.

8 years ago* doc/lispref/files.texi: Remove @vindex.
Paul Eggert [Mon, 12 Sep 2016 02:55:41 +0000 (19:55 -0700)]
* doc/lispref/files.texi: Remove @vindex.

8 years agoRemove unnecessary ref to coreutils manual
Paul Eggert [Sun, 11 Sep 2016 22:09:04 +0000 (15:09 -0700)]
Remove unnecessary ref to coreutils manual

* doc/lispref/files.texi: Document write-region-inhibit-fsync.

8 years agoCorrectly fontify C++ direct initializations with parens inside functions
Alan Mackenzie [Sun, 11 Sep 2016 21:09:08 +0000 (21:09 +0000)]
Correctly fontify C++ direct initializations with parens inside functions

Or, more clearly, when something looks like a function declaration and it's
inside a function, fontify it as a direct initialization.

For this purpose, introduce a "brace stack" for each buffer, where an entry on
the brace stack states how deeply nested a particular position is inside
braces inside a "top level", which includes classes and namespaces.

Also introduce a new "context", "top", with which c-font-lock-declarations
signals to c-forward-decl-or-cast-1 that point is at the top level.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): add
c-truncate-bs-cache.
(c-flat-decl-block-kwds, c-brace-stack-thing-key, c-brace-stack-no-semi-key)
(c-type-decl-operator-prefix-key): new language constants/variables.

* lisp/progmodes/cc-engine.el (c-bs-interval, c-bs-cache, c-bs-cache-limit)
(c-bs-prev-pos, c-bs-prev-stack): New mostly local variables for the brace
stack cache.
(c-init-bs-cache, c-truncate-bs-cache, c-truncate-bs-cache, c-brace-stack-at)
(c-bs-at-toplevel-p): New functions which manipulate the brace stack (cache).
(c-find-decl-prefix-search): Keep track of whether we're at top level.
(c-find-decl-spots): New local variable cfd-top-level which records what it
says.  On calling cfd-fun, pass cfd-top-level as an additional argument.
(c-forward-declarator): Add new element DECORATED to the result list.  Set it
to non-nil when a match for c-type-decl-operator-prefix-key is found.
(c-forward-decl-or-cast-1): Handle the newly introduced context "top".
Introduce "CASE 9.5", which recognizes direct initializations.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
(c-font-lock-enum-tail, c-font-lock-cut-off-declarators)
(c-font-lock-enclosing-decls, c-simple-decl-matchers, c-basic-matchers-after):
Add appropriate `not-top' argument to calls to c-font-lock-declarators.
(c-font-lock-declarators): Additional parameter `not-top'.  Use not-top to
participate in the decision whether to fontify an identifier as a function or
a variable.
(c-font-lock-declarations): The internal lambda function takes an additional
argument `toplev' from c-find-decl-spots, which it uses in determining the
"context" of a declaration.  Add appropriate `not-top' argument to calls to
c-font-lock-declarators.
(c-font-lock-objc-methods): Add extra parameter to internal lambda function,
like for c-font-lock-declarators.

* lisp/progmodes/cc-mode.el (c-basic-common-init): Initialize the brace stack
cache.

8 years agoFix comments on window height macros
Noam Postavsky [Sun, 11 Sep 2016 20:25:13 +0000 (16:25 -0400)]
Fix comments on window height macros

* src/window.h (WINDOW_MODE_LINE_HEIGHT, WINDOW_HEADER_LINE_HEIGHT): Fix
confusing claim that "height is in pixels and in lines"; in fact it's in
pixels.

8 years agoAvoid signaling errors when computing "Stop" in GDB menu
Eli Zaretskii [Sun, 11 Sep 2016 19:07:47 +0000 (22:07 +0300)]
Avoid signaling errors when computing "Stop" in GDB menu

* lisp/progmodes/gdb-mi.el (gdb-show-stop-p): Don't assume
'gdb-running-threads-count' must have a numeric value.
(Bug#24414)

8 years agoStop calling ‘byte-compile-log-warning’
Philipp Stephani [Sat, 3 Sep 2016 18:37:47 +0000 (20:37 +0200)]
Stop calling ‘byte-compile-log-warning’

For errors, use ‘byte-compile-report-error’ instead so that the error
is registered and causes compilation to fail (Bug#24359).

For warnings, use ‘byte-compile-warn’ instead so that
‘byte-compile-error-on-warn’ is honored (Bug#24360).

* lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
(macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of
‘byte-compile-log-warning’.

* lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf)
(byte-compile-setq, byte-compile-funcall): Use
‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’.
(byte-compile-log-warning): Convert comment to documentation
string.  Explain that the function shouldn’t be called directly.
(byte-compile-report-error): Add optional FILL argument.

* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
(cconv--analyze-function, cconv-analyze-form): Use
‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use
‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.

* lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead
of ‘byte-compile-log-warning’.
(do-after-load-evaluation): Use ‘byte-compile-warn’ instead of
‘byte-compile-log-warning’.

8 years ago* etc/NEWS: Remove comment lost in emacs-25 merge.
Paul Eggert [Sun, 11 Sep 2016 02:13:36 +0000 (19:13 -0700)]
* etc/NEWS: Remove comment lost in emacs-25 merge.

8 years agoDocument file synchronization issues
Paul Eggert [Sun, 11 Sep 2016 02:12:21 +0000 (19:12 -0700)]
Document file synchronization issues

* doc/lispref/files.texi (Files and Storage): New section.

8 years agocopy-file now uses GNU/Linux file cloning
Paul Eggert [Sat, 10 Sep 2016 19:51:27 +0000 (12:51 -0700)]
copy-file now uses GNU/Linux file cloning

From a suggestion by Kieran Colford (see Bug#23904).
* configure.ac: Check for linux/fs.h.
* src/fileio.c [HAVE_LINUX_FS_H]: Include sys/ioctl.h and linux/fs.h.
(clone_file): New function.
(Fcopy_file): Use it.

8 years agoInvert y coord of NS image files (bug#7847)
Alan Third [Sat, 10 Sep 2016 22:46:09 +0000 (23:46 +0100)]
Invert y coord of NS image files (bug#7847)

* src/nsterm.m (ns_dumpglyphs_image): Invert y co-ordinate of the image
when compositing.

8 years agoFix 'url-http-create-request' when cookies are used
Toke Høiland-Jørgensen [Sat, 10 Sep 2016 19:09:33 +0000 (22:09 +0300)]
Fix 'url-http-create-request' when cookies are used

* lisp/url/url-http.el (url-http-create-request): Make sure the
cookie headers are a unibyte string.  For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00202.html.

Copyright-paperwork-exempt: yes

8 years agoDon't require isearch-update before isearch-done
Noam Postavsky [Sun, 4 Sep 2016 03:38:35 +0000 (23:38 -0400)]
Don't require isearch-update before isearch-done

It is useful to be able to call `isearch-done' unconditionally to
ensure a non-isearching state.

* lisp/isearch.el (isearch-done): Check that `isearch--current-buffer'
is a live buffer before using it (Bug #21091).
* test/lisp/isearch-tests.el (isearch--test-done): Test it.

8 years ago* lisp/emacs-lisp/ring.el: Use lexical-binding
Simen Heggestøyl [Fri, 9 Sep 2016 16:46:55 +0000 (18:46 +0200)]
* lisp/emacs-lisp/ring.el: Use lexical-binding

* lisp/emacs-lisp/ring.el (ring-elements): Don't use the RESULT
argument of `dotimes' when the iteration variable isn't referred by
it.
(ring-member): Don't pass nil as the RESULT argument of `dotimes'
since it's the default.

8 years agoSplit regex character class test into smaller chunks
Michal Nazarewicz [Wed, 17 Aug 2016 17:53:01 +0000 (19:53 +0200)]
Split regex character class test into smaller chunks

Having one test for all character classes it is not always trivial to
determine which class is failing.  This happens when failure is caused
by ‘(should (equal (point) (point-max)))’ not being met.

With per-character class tests, it is immidiatelly obvious which test
causes issues plus tests for all classes are run even if some of them
fail.

* test/src/regex-tests.el (regex-character-classes): Delete and split
into…
(regex-tests-alnum-character-class, regex-tests-alpha-character-class,
regex-tests-ascii-character-class, regex-tests-blank-character-class,
regex-tests-cntrl-character-class, regex-tests-digit-character-class,
regex-tests-graph-character-class, regex-tests-lower-character-class,
regex-tests-multibyte-character-class,
regex-tests-nonascii-character-class,
regex-tests-print-character-class, regex-tests-punct-character-class,
regex-tests-space-character-class,
regex-tests-unibyte-character-class,
regex-tests-upper-character-class, regex-tests-word-character-class,
regex-tests-xdigit-character-class): …new tests.

8 years agoDon’t allocate char-table’s extra slots in regexp-out-charset
Michal Nazarewicz [Mon, 5 Sep 2016 18:01:23 +0000 (20:01 +0200)]
Don’t allocate char-table’s extra slots in regexp-out-charset

* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Do not use
'case-table as charmap char-table’s property.  The function has nothing
to do with casing and in addition using 'case-table causes unnecessary
extra slots to be allocated which ‘regexp-opt-charset’ does not use.

8 years agoRemove dead loop iterations in regex.c
Michal Nazarewicz [Wed, 3 Aug 2016 01:52:49 +0000 (03:52 +0200)]
Remove dead loop iterations in regex.c

RE_CHAR_TO_MULTIBYTE(c) yields c for ASCII characters and a byte8
character for c ≥ 0x80.  Furthermore, CHAR_BYTE8_P(c) is true only
for byte8 characters.  This means that

c = RE_CHAR_TO_MULTIBYTE (ch);
if (! CHAR_BYTE8_P (c) && re_iswctype (c, cc))

is equivalent to:

c = c;
if (! false && re_iswctype (c, cc))

for 0 ⪬ c < 0x80, and

c = BYTE8_TO_CHAR (c);
if (! true && re_iswctype (c, cc))

for 0x80 ⪬ c < 0x100.  In other words, the loop never executes for
c ≥ 0x80 and RE_CHAR_TO_MULTIBYTE call is unnecessary for c < 0x80.

* src/regex.c (regex_compile): Simplyfy a for loop by eliminating
dead iterations and unnecessary macro calls.

8 years agoReplace decimalnump with alphanumericp
Michal Nazarewicz [Wed, 3 Aug 2016 01:08:48 +0000 (03:08 +0200)]
Replace decimalnump with alphanumericp

decimalnump was used in regex.c only in ISALNUM macro which ored it with
alphabeticp.  Because both of those functions require Unicode general
category lookup, this resulted in unnecessary lookups (if alphabeticp
return false decimalp had to perform another lookup).  Drop decimalnump
in favour of alphanumericp which combines decimelnump with alphabeticp.

* src/character.c (decimalnump): Remove in favour of…
(alphanumericp): …new function.

* src/regex.c (ISALNUM): Use alphanumericp.

8 years agoRemove inaccurate comment in regex.c
Michal Nazarewicz [Wed, 3 Aug 2016 01:48:22 +0000 (03:48 +0200)]
Remove inaccurate comment in regex.c

* src/regex.c (regex_compile): Remove comment indicating that wctype of
some character classes may be negative.  All wctypes are in fact
non-negative.

8 years agoSTRING_CHAR does not unify characters; update documentation
Michal Nazarewicz [Tue, 6 Sep 2016 15:20:23 +0000 (17:20 +0200)]
STRING_CHAR does not unify characters; update documentation

* src/character.h (STRING_CHAR): Update doc.
* src/buffer.h (FETCH_MULTIBYTE_CHAR): Update doc.  While at it, change
the function to use BYTE_POS_ADDR instead of open-coding it.

8 years agoAdd tests for ring.el
Simen Heggestøyl [Thu, 8 Sep 2016 17:18:40 +0000 (19:18 +0200)]
Add tests for ring.el

* test/lisp/emacs-lisp/ring-tests.el: New file with tests for ring.el.

8 years agoFix cross reference in frames.texi
Martin Rudalics [Thu, 8 Sep 2016 08:56:17 +0000 (10:56 +0200)]
Fix cross reference in frames.texi

* doc/lispref/frames.texi (Minibuffers and Frames): Fix cross
reference.

8 years agoNew file test/src/marker-tests.el
Martin Rudalics [Thu, 8 Sep 2016 06:28:59 +0000 (08:28 +0200)]
New file test/src/marker-tests.el

8 years agoPort flexible array members to GCC + valgrind
Paul Eggert [Thu, 8 Sep 2016 01:08:45 +0000 (18:08 -0700)]
Port flexible array members to GCC + valgrind

These changes are needed to conform to the C standard's rule for
allocating structs containing flexible array members.  C11 says
that malloc (offsetof (struct s, m) + n) does not suffice to
allocate a struct with an n-byte tail; instead, malloc’s arg
should be rounded up to the nearest multiple of alignof (struct s).
Although this is arguably a defect in C11, gcc -O2 + valgrind
sometimes complains when this rule is violated, and when debugging
it’s better to keep valgrind happy.
For details please see the thread containing the message at:
https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html
* lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c:
Include flexmember.h.
* lib-src/ebrowse.c (add_sym, add_member, make_namespace)
(register_namespace_alias):
* src/alloc.c (SDATA_SIZE, allocate_string_data):
* src/image.c (xpm_cache_color, imagemagick_create_cache):
* src/process.c (Fmake_network_process):
Use FLEXSIZEOF instead of offsetof and addition.
* src/alloc.c (SDATA_SIZE, vector_alignment):
Use FLEXALIGNOF instead of sizeof (ptrdiff_t).
* src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR):
Remove, as alloc.c can now calculate this on its own.

8 years agoUpdate from gnulib
Paul Eggert [Thu, 8 Sep 2016 00:04:49 +0000 (17:04 -0700)]
Update from gnulib

This incorporates:
2016-09-07 flexmember: new macro FLEXALIGNOF
2016-09-07 flexmember: port better to GCC + valgrind
2016-08-18 Port modules to use getprogname explicitly
2016-09-02 manywarnings: add -fno-common
* admin/merge-gnulib (GNULIB_TOOL_FLAGS): Don’t avoid flexmember,
since time_rz now uses part of it.  Instead, remove m4/flexmember.m4.
* configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Define away,
since Emacs assumes C99 and therefore removes m4/flexmember.m4.
* lib/euidaccess.c, lib/group-member.c, lib/time_rz.c:
* m4/manywarnings.m4: Copy from gnulib.
* lib/flexmember.h: New file, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.

8 years agoDon't --load directories
Noam Postavsky [Sun, 21 Aug 2016 14:51:38 +0000 (10:51 -0400)]
Don't --load directories

* lisp/startup.el (command-line-1): Only pass expanded FILENAME argument
of --load when it refers to a normal file, since `load' doesn't handle
directories (Bug #16406).

8 years agoAvoid error in icalendar--read-element
Peder O. Klingenberg [Tue, 30 Aug 2016 12:44:16 +0000 (14:44 +0200)]
Avoid error in icalendar--read-element

* lisp/calendar/icalendar.el (icalendar--read-element): Avoid a regex
stack overflow by not using regex to extract values from calendar
events. (Bug#24315)

8 years agoFix back-white <-> black-white typo
Kaushal Modi [Thu, 25 Aug 2016 15:06:45 +0000 (11:06 -0400)]
Fix back-white <-> black-white typo

* lisp/ps-print.el (ps-begin-job): back-white -> black-white (Bug#24308)