]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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 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 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 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 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 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)

8 years agoFix cursor at bottom left of rectangle (bug#24364)
Alan Third [Sun, 4 Sep 2016 21:58:37 +0000 (22:58 +0100)]
Fix cursor at bottom left of rectangle (bug#24364)

* lisp/rect.el (rectangle--col-pos): Don't assume point at EOL doesn't
require rectangle--point-crutches to be set.

8 years agoFix documentation of convert-standard-filename on MS-Windows
Eli Zaretskii [Wed, 7 Sep 2016 16:21:08 +0000 (19:21 +0300)]
Fix documentation of convert-standard-filename on MS-Windows

* lisp/files.el (convert-standard-filename): Doc fix.  (Bug#24387)

* etc/NEWS: Suggest a way for mirroring slashes where previously
'convert-standard-filename' was used.

8 years agoUse DEV_TTY more consistently
Paul Eggert [Wed, 7 Sep 2016 00:27:24 +0000 (17:27 -0700)]
Use DEV_TTY more consistently

* src/conf_post.h (DEV_TTY): Move from here ...
* src/keyboard.c, src/keyboard.h: ... to here, as it doesn’t need
to be visible everywhere.  Make it a constant.
* src/keyboard.c (handle_interrupt, Fset_quit_char):
* src/process.c (create_process): Prefer DEV_TTY to "/dev/tty".

8 years agoAvoid assertion violations when using marker positions
Eli Zaretskii [Tue, 6 Sep 2016 16:46:06 +0000 (19:46 +0300)]
Avoid assertion violations when using marker positions

* src/intervals.c (set_point_from_marker): If MARKER comes from
another buffer, recalculate its byte position before using it to
set point.
* src/marker.c (set_marker_internal): If POSITION is a marker from
another buffer, recalculate its byte position before using it.
(Bug#24368)

8 years ago* lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): Fix coding bug
Alan Mackenzie [Tue, 6 Sep 2016 12:40:41 +0000 (12:40 +0000)]
* lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): Fix coding bug

8 years agoNew options for handling of literals in c-syntactic-re-search-forward
Alan Mackenzie [Tue, 6 Sep 2016 11:47:16 +0000 (11:47 +0000)]
New options for handling of literals in c-syntactic-re-search-forward

* lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): `noerror' can
be given the values `before-literal' and `after-literal', so that when a
search fails, and the `bound' is inside a literal, point is left respectively
before or after that literal.

8 years agoAvoid assertion violations when scrolling narrowed buffer
Eli Zaretskii [Mon, 5 Sep 2016 16:57:22 +0000 (19:57 +0300)]
Avoid assertion violations when scrolling narrowed buffer

* src/window.c (window_scroll_pixel_based):
* src/xdisp.c (pos_visible_p): Don't allow simulated redisplay to
start outside the accessible portion of the buffer.  This avoids
assertion violations when some Lisp narrows the buffer to less
than the current window, and then attempts to scroll the buffer.

8 years agoTreat SIGINT correctly in GUI sessions on MS-Windows
Eli Zaretskii [Mon, 5 Sep 2016 16:50:59 +0000 (19:50 +0300)]
Treat SIGINT correctly in GUI sessions on MS-Windows

* src/w32proc.c (sys_signal): Don't reject SIGINT, as it is
supported by MS runtime.
* src/term.c (DEV_TTY): Move from here ...
* src/conf_post.h (DEV_TTY): ... to here.  Separate definitions
for WINDOWSNT and for the rest.
* src/keyboard.c (handle_interrupt_signal): Use DEV_TTY instead of
a literal "/dev/tty".

* etc/NEWS: Mention the behavior change.

8 years agoFix synthetic bold on macOS retina displays
Alan Third [Mon, 29 Aug 2016 19:48:06 +0000 (20:48 +0100)]
Fix synthetic bold on macOS retina displays

* src/macfont.m (macfont_draw): Multiply the synthetic bold scaling
factor by the OS window backing scale factor.

8 years agoimage-dired: Report when a necessary executable is not found
Tino Calancha [Sun, 4 Sep 2016 13:41:12 +0000 (22:41 +0900)]
image-dired: Report when a necessary executable is not found

See discussion on:
https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00552.html
* lisp/image-dired.el (image-dired-cmd-rotate-original-program)
(image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-temp-image-program)
(image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-write-exif-data-program)
(image-dired-cmd-read-exif-data-program):
Use executable-find to set the defaut value of this option.
(image-dired-cmd-rotate-original-program): Idem.
Search for program 'convert' if 'jpegtran' is not available.
(image-dired-cmd-rotate-original-options):
Set the default value consistent with the executable in
image-dired-cmd-rotate-original-program.
(image-dired-create-thumb, image-dired-display-image)
(image-dired-rotate-thumbnail, image-dired-rotate-original)
(image-dired-set-exif-data, image-dired-get-exif-data):
Throw and error when the executable used in the function is missing.
(image-dired-next-line, image-dired-previous-line):
Use 'forward-line'.

8 years agoimage-type-from-file-name: Perform a case insensitive match
Tino Calancha [Sun, 4 Sep 2016 02:09:31 +0000 (11:09 +0900)]
image-type-from-file-name: Perform a case insensitive match

Fix Bug#24317
* lisp/image.el (image-type-from-file-name): Bind case-fold-search
to a non-nil value to force a case insensitive match.
* lisp/image-dired.el (image-dired-rotate-original):
Use image-type (Bug#24317).
(image-dired-get-exif-file-name): Idem.
Set 'no-exif-data-found' and 'data' in same setq call.
Use file-attribute-modification-time.

8 years agoimage-increase-size: Fix non-interactive calls
Tino Calancha [Sun, 4 Sep 2016 01:59:07 +0000 (10:59 +0900)]
image-increase-size: Fix non-interactive calls

* lisp/image.el (image-increase-size, image-decrease-size):
Compute a floating point division.
Problem reported in:
https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00067.html

8 years agoFix uses of (call-interactively) in lisp/emacs-lisp/checkdoc.el
Robert Cochran [Sat, 20 Aug 2016 01:03:24 +0000 (18:03 -0700)]
Fix uses of (call-interactively) in lisp/emacs-lisp/checkdoc.el

Passing the prefix argument as the 3rd argument to 'call-interactively'
causes the prefix argument to be interpreted as events, which is not
only wrong, but also causes a type error, as 'current-prefix-arg' can
never be a vector as 'call-interactively' expects.  'call-interactively'
automatically passes its prefix argument to the called function, so just
do that, eliminating faulty behavior.

* lisp/emacs-lisp/checkdoc.el (checkdoc-ispell):
(checkdoc-ispell-current-buffer):
(checkdoc-ispell-interactive):
(checkdoc-ispell-message-text):
(checkdoc-ispell-start):
(checkdoc-ispell-continue):
(checkdoc-ispell-comments):
(checkdoc-ispell-defun):
Do not pass 'current-prefix-arg' to 'call-interactively' as an event
vector; merely allow it to propagate forward to the interactive call.

8 years agoFix mail-combine-fields
Richard Stallman [Sat, 3 Sep 2016 01:55:09 +0000 (21:55 -0400)]
Fix mail-combine-fields

* lisp/mail/sendmail.el (mail-combine-fields): Call `save-excursion' to
avoid losing our place in the search loop.

8 years agoCheck actual contents before promting about changed file
Stefan Monnier [Fri, 2 Sep 2016 15:44:13 +0000 (11:44 -0400)]
Check actual contents before promting about changed file

* lisp/userlock.el (userlock--check-content-unchanged)
(userlock--ask-user-about-supersession-threat): New functions.
* src/filelock.c (lock_file): Use them to avoid spurious prompting.
* doc/lispref/buffers.texi (Modification Time): Update doc of
ask-user-about-supersession-threat.

8 years agoMake a reference to fakecygpty in the Tramp manual
Michael Albinus [Fri, 2 Sep 2016 08:07:09 +0000 (10:07 +0200)]
Make a reference to fakecygpty in the Tramp manual

* doc/misc/tramp.texi (Windows setup hints): Make a reference to
fakecygpty on the Emacs Wiki.
(Frequently Asked Questions): Fix url.

8 years agoDon’t create fd >= FD_SETSIZE
Paul Eggert [Fri, 2 Sep 2016 04:15:35 +0000 (21:15 -0700)]
Don’t create fd >= FD_SETSIZE

This avoids a potential crash if too many subprocesses (Bug#24325).
* src/process.c [HAVE_SETRLIMIT]: Include <sys/resource.h>.
(init_process_emacs): If ulimit -n is greater than FD_SETSIZE,
set it to FD_SETSIZE.

8 years agoFix c-declaration-limits to return correct limits in all cases.
Alan Mackenzie [Thu, 1 Sep 2016 18:06:22 +0000 (18:06 +0000)]
Fix c-declaration-limits to return correct limits in all cases.

This function is the guts of c-indent-defun and c-mark-function.

In particular, when c-defun-tactic is nil, return a correct value rather than
always nil, and when it's 'go-outward, go through an intricate algorithm to
determine the requisite narrowing before the "top-level" defuns go to work.

* lisp/progmodes/cc-cmds.el (c-narrow-to-most-enclosing-decl-block): Enhance
to take additional optional parameter LEVEL, saying how many enclosing levels
of decl-block to narrow to.
(c-declaration-limits): Introduce algorithm to determine narrowing.  Use
c-where-wrt-to-brace-block to determine whether to go back to BOD to determine
lower bound.

8 years ago* nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate.
Eli Zaretskii [Thu, 1 Sep 2016 17:15:25 +0000 (20:15 +0300)]
* nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate.

8 years agoAvoid compiler warnings with MinGW64 GCC 6
Eli Zaretskii [Thu, 1 Sep 2016 14:12:12 +0000 (17:12 +0300)]
Avoid compiler warnings with MinGW64 GCC 6

* nt/inc/ms-w32.h (execve) [MINGW_W64]: Make the prototype match
the GCC 6 builtin, to avoid warnings.  For more details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00721.html.

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Sep 2016 10:18:15 +0000 (06:18 -0400)]
; Auto-commit of loaddefs files.

8 years agoFix over-substitution of quotes on error
Paul Eggert [Thu, 1 Sep 2016 06:05:48 +0000 (23:05 -0700)]
Fix over-substitution of quotes on error

Problem reported by Tino Calancha in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00000.html
* src/print.c (print_error_message):
Substitute quotes in errmsg only when gotten from a property.

8 years agoImprove testing of etags
Eli Zaretskii [Wed, 31 Aug 2016 17:22:22 +0000 (20:22 +0300)]
Improve testing of etags

* test/manual/etags/y-src/cccp.c:
* test/manual/etags/y-src/parse.c: Correct #line directives to
allow testing invalidate_nodes in etags.c.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to changes in test files.

8 years ago* lib-src/etags.c (invalidate_nodes): Fix another thinko.
Eli Zaretskii [Wed, 31 Aug 2016 17:19:42 +0000 (20:19 +0300)]
* lib-src/etags.c (invalidate_nodes): Fix another thinko.

8 years agoFix etags problems found by static checking
Paul Eggert [Wed, 31 Aug 2016 17:11:16 +0000 (10:11 -0700)]
Fix etags problems found by static checking

* lib-src/etags.c (invalidate_nodes, put_entry):
Remove now-unnecessary tests for null pointers.  Simplify.
(put_entries): Rewrite to avoid GCC 6.2 warning about
dereferencing null pointer.

8 years agoFix a thinko in etags.c
Eli Zaretskii [Wed, 31 Aug 2016 16:57:59 +0000 (19:57 +0300)]
Fix a thinko in etags.c

* lib-src/etags.c (invalidate_nodes): Don't try to dereference
a null pointer.

8 years agoAvoid recursive calls in etags
Eli Zaretskii [Wed, 31 Aug 2016 15:53:43 +0000 (18:53 +0300)]
Avoid recursive calls in etags

* lib-src/etags.c (stack_entry): New struct.
(push_node, pop_node, put_entry): New functions.
(free_tree, add_node, invalidate_nodes, put_entries): Re-implement
in a non-recursive way, to avoid stack overflow.  (Bug#5847)

8 years agoAdd 451 to url-http-codes
Leo Liu [Wed, 31 Aug 2016 08:39:13 +0000 (16:39 +0800)]
Add 451 to url-http-codes

* lisp/url/url-http.el (url-http-codes): Add 451.

8 years ago; Spelling and quotation fixes
Paul Eggert [Wed, 31 Aug 2016 03:54:05 +0000 (20:54 -0700)]
; Spelling and quotation fixes

8 years ago* src/editfns.c (Fformat_message): Fix doc to match current behavior.
Paul Eggert [Wed, 31 Aug 2016 02:54:35 +0000 (19:54 -0700)]
* src/editfns.c (Fformat_message): Fix doc to match current behavior.

8 years agoMinor doc quoting fixes
Paul Eggert [Wed, 31 Aug 2016 02:44:41 +0000 (19:44 -0700)]
Minor doc quoting fixes

* doc/misc/htmlfontify.texi (Interactive):
* lisp/htmlfontify.el (htmlfontify-buffer):
Spell out character names, for clarity.  The old doc string
generated the *Help* text ‘^L ([FF]) or ¤ (244)’, where ‘[FF]’
stands for a form feed character; this was confusing.
* lisp/electric.el (electric-quote-mode):
* src/doc.c (syms_of_doc):
* src/editfns.c (Fformat_message):
Remove no-longer-necessary ‘\=’s in doc strings.

8 years agoUpdate from gnulib
Paul Eggert [Tue, 30 Aug 2016 20:15:04 +0000 (13:15 -0700)]
Update from gnulib

This incorporates:
2016-08-30 intprops: tune INT_NEGATE_OVERFLOW for GCC 5 and 6
2016-08-29 xalloc-oversized.h: port change to GCC 6.2.0
2016-08-29 intprops.h: port recent changes to GCC 6.2.0
2016-08-29 intprops.h: use __typeof__ with GCC 7
2016-08-29 intprops.h, xalloc-oversized.h: work with gcc 7
2016-08-24 intprops: fix paren typo on old platforms
2016-08-24 intprops: port to OpenVMS
* lib/intprops.h, lib/xalloc-oversized.h: Copy from gnulib.

8 years agoFix rules for \phi and \varphi which were reversed
Tassilo Horn [Tue, 30 Aug 2016 18:30:46 +0000 (20:30 +0200)]
Fix rules for \phi and \varphi which were reversed

* lisp/leim/quail/latin-ltx.el: Special-case phi/varphi because those
  are reversed in ucs-names.  Also remove FIXME stating sigma/varsigma
  were reversed which is not true (anymore?).

8 years agoFix prettification of \phi, \varphi, and \varsigma
Tassilo Horn [Tue, 30 Aug 2016 17:51:33 +0000 (19:51 +0200)]
Fix prettification of \phi, \varphi, and \varsigma

* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Fix
  prettification of \phi, \varphi, and \varsigma.

Concretely, \phi's symbol was actually varphi, \varphi was missing, and
\varsigma was commented out with a FIXME that it was reversed with
\sigma which it was not.

8 years agoUse normal double quotes in TeX / LaTeX comments
Karl Fogel [Tue, 30 Aug 2016 16:14:37 +0000 (11:14 -0500)]
Use normal double quotes in TeX / LaTeX comments

* lisp/textmodes/tex-mode.el (tex-insert-quote): When in a comment,
  default to inserting a normal double quote (") instead of TeX-style
  open (``) or close ('') quote marks.

* etc/NEWS (TeX mode): Note the change.

* test/lisp/electric-tests.el (autowrapping-7): Adjust accordingly.

See this thread for discussion:

  https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00611.html
  From: Karl Fogel <kfogel {_AT_} red-bean.com>
  To: Emacs Development <emacs-devel {_AT_} gnu.org>
  Subject: [PATCH] Have LaTeX mode use normal double quotes in comments.
  Date: Mon, 29 Aug 2016 14:44:12 -0500
  Message-ID: <87twe3icmr.fsf@red-bean.com>

8 years agoCorrectly analyze C++ list initialization in member init areas.
Alan Mackenzie [Tue, 30 Aug 2016 15:36:15 +0000 (15:36 +0000)]
Correctly analyze C++ list initialization in member init areas.

* lisp/progmodes/cc-engine.el (c-back-over-list-of-member-inits): Remove a
superfluous call to c-backward-syntactic-ws.
(c-looking-at-or-maybe-in-bracelist): Change calling convention, so that it
reports encountering the Java "new" keyword.  Add, as an alternative, a check
that we can move back over member initializations, and handle this as finding
a brace block.
(c-looking-at-special-brace-list, c-guess-continued-construct): Adapt to the
new calling convention of c-looking-at-or-maybe-in-bracelist.
(c-guess-basic-syntax, CASE 5A.3): Replace lots of inline ad-hoc code with
calls to c-backward-over-enum-header and c-looking-at-or-maybe-in-bracelist,
using the extra info from the value of that function to generate a
topmost-into-cont element where needed (in Java).

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to the new
calling convention of c-looking-at-or-maybe-in-bracelist.

* lisp/progmodes/cc-mode.el (c-fl-decl-start): Adapt to the new calling
convention of c-looking-at-or-maybe-in-bracelist.

8 years agoUse `file-attribute-*' in Tramp
Michael Albinus [Tue, 30 Aug 2016 13:36:14 +0000 (15:36 +0200)]
Use `file-attribute-*' in Tramp

* lisp/net/tramp-compat.el (tramp-compat-file-attribute-type)
(tramp-compat-file-attribute-link-number)
(tramp-compat-file-attribute-user-id)
(tramp-compat-file-attribute-group-id)
(tramp-compat-file-attribute-modification-time)
(tramp-compat-file-attribute-size)
(tramp-compat-file-attribute-modes): New defaliases.

* lisp/net/tramp.el (tramp-handle-file-modes)
(tramp-handle-file-newer-than-file-p)
(tramp-handle-file-regular-p, tramp-handle-file-symlink-p)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-get-local-gid, tramp-check-cached-permissions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p)
(tramp-adb-handle-file-truename, tramp-adb-handle-copy-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-file-directory-p)
(tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid)
(tramp-gvfs-get-remote-gid):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime)
(tramp-sh-handle-file-newer-than-file-p)
(tramp-sh-handle-file-ownership-preserved-p)
(tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-local-copy)
(tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file)
(tramp-smb-handle-file-directory-p)
(tramp-smb-handle-file-writable-p)
(tramp-smb-handle-insert-directory): Use them.

8 years agoIn `pop-to-buffer' handle case where `display-buffer' fails (Bug#24332)
Martin Rudalics [Tue, 30 Aug 2016 10:30:29 +0000 (12:30 +0200)]
In `pop-to-buffer' handle case where `display-buffer' fails (Bug#24332)

* lisp/window.el (pop-to-buffer): Don't assume that
`display-buffer' has supplied a window (Bug#24332).
Rename BUFFER argument to BUFFER-OR-NAME.
* doc/lispref/windows.texi (Switching Buffers): Fix
`pop-to-buffer' documentation.

8 years agoClarify docstrings
Alan Third [Mon, 29 Aug 2016 18:32:40 +0000 (19:32 +0100)]
Clarify docstrings

* src/nsterm.m: Clarified that ns-x-modifier variables require a symbol.

8 years agoUse `process-live-p' in Tramp
Michael Albinus [Mon, 29 Aug 2016 16:39:07 +0000 (18:39 +0200)]
Use `process-live-p' in Tramp

* lisp/net/tramp-compat.el (tramp-compat-process-live-p): New defun.

* lisp/net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p)
(tramp-handle-file-notify-valid-p)
(tramp-action-process-alive, tramp-action-out-of-band)
(tramp-wait-for-regexp):
* lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-maybe-open-connection):
* lisp/net/tramp-cache.el (tramp-get-connection-property):
* tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
* lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
(tramp-gw-aux-proc-sentinel, tramp-gw-open-connection):
* tramp-sh.el (tramp-process-sentinel)
(tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection):
* lisp/net/lisp/net/lisp/net/tramp-smb.el (tramp-smb-action-with-tar)
(tramp-smb-handle-copy-directory, tramp-smb-action-get-acl)
(tramp-smb-handle-process-file, tramp-smb-action-set-acl)
(tramp-smb-get-cifs-capabilities)
(tramp-smb-get-stat-capability)
(tramp-smb-maybe-open-connection, tramp-smb-wait-for-output)
(tramp-smb-kill-winexe-function): Use it.

8 years agoAvoid crashes for invalid value of key modifiers
Eli Zaretskii [Mon, 29 Aug 2016 14:27:06 +0000 (17:27 +0300)]
Avoid crashes for invalid value of key modifiers

* src/keyboard.c (parse_solitary_modifier): If the argument SYMBOL
is not a symbol, don't try to recognize it.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00502.html
for the details.

* test/src/keymap-tests.el (keymap-where-is-internal-test): New
test, for testing the above fix.

8 years agoMake dired-do-compress understand files with spaces in them
Oleh Krehel [Mon, 29 Aug 2016 08:35:34 +0000 (10:35 +0200)]
Make dired-do-compress understand files with spaces in them

* lisp/dired-aux.el (dired-compress-file): Add `shell-quote-argument'
  and `literal' flag to `replace-regexp-in-string'.

8 years ago* INSTALL.REPO: Suggest Texinfo 4.13 or later.
Paul Eggert [Mon, 29 Aug 2016 01:23:25 +0000 (18:23 -0700)]
* INSTALL.REPO: Suggest Texinfo 4.13 or later.

8 years agoAdd tests for dom.el
Simen Heggestøyl [Sun, 28 Aug 2016 16:36:27 +0000 (18:36 +0200)]
Add tests for dom.el

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

8 years agoMemory allocator alignment fixes
Paul Eggert [Sun, 28 Aug 2016 09:13:18 +0000 (02:13 -0700)]
Memory allocator alignment fixes

These changes remove some assumptions about heap allocator
alignment that may not be true on unusual platforms.
* src/alloc.c (POWER_OF_2): New macro.
(ROUNDUP): Use it.
(BLOCK_ALIGN): Verify that it is a power of 2.
(aligned_alloc): Check that alignment passed to posix_memalign
satisfies POSIX restrictions.
(lisp_align_malloc): Check that size passed to aligned_alloc
satisfies C11 restrictions.
(MALLOC_IS_GC_ALIGNED): Check that GCALIGNMENT is 8, since the
code has not been verified to work with other GCALIGNMENT values
and the ice is thin here.  On GNU/Linux, malloc can return a value
that is a multiple of 8 but not 16, even though __alignof__
(max_align_t) is 16.  See:
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01902.html
(lmalloc) [USE_ALIGNED_ALLOC]: Use aligned_alloc only if size
is a multiple of alignment, since C11 says the behavior is
undefined otherwise.
(lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in
general this macro is restricted to signed types.  Remove
assertion that the result is a multiple of GCALIGNMENT, as that
need not be true.

8 years agoPacify --enable-gcc-warnings for lib-src/pop.c
Paul Eggert [Sun, 28 Aug 2016 08:56:51 +0000 (01:56 -0700)]
Pacify --enable-gcc-warnings for lib-src/pop.c

* lib-src/pop.c: Include c-ctype.h.
(socket_connection): Pacify --enable-gcc-warnings by rewriting to
avoid 'if (v = E) ...'.  Use c_tolower, instead of a combination
of the (undeclared) isupper and tolower.  Fix pointer constness
problem.

8 years agoHandle the C++ "identifiers" "final" and "override" correctly.
Alan Mackenzie [Sat, 27 Aug 2016 19:57:42 +0000 (19:57 +0000)]
Handle the C++ "identifiers" "final" and "override" correctly.

This fixes bug #24319, allowing destructors affixed with these identifiers to
be correctly fontified.

* lisp/progmodes/cc-engine.el (c-forward-type, c-forward-decl-or-cast-1):
After reaching the "end" of a type expression, skip over any occurrences of
c-type-decl-suffix-ws-ids-key.

* lisp/progmodes/cc-langs.el (c-type-modifier-kwds): Remove "override" and
"final" from the C++ value.
(c-type-decl-suffix-ws-ids-kwds, c-type-decl-suffix-ws-ids-key): New lang
constants/variables for "final" and "override".

8 years ago* lisp/textmodes/page-ext.el (pages-directory-mode): Use special-mode.
Stefan Monnier [Sat, 27 Aug 2016 18:17:20 +0000 (14:17 -0400)]
* lisp/textmodes/page-ext.el (pages-directory-mode): Use special-mode.

8 years agoHandle template delimiters in C++ member init constructs.
Alan Mackenzie [Sat, 27 Aug 2016 15:45:17 +0000 (15:45 +0000)]
Handle template delimiters in C++ member init constructs.

* lisp/progmodes/cc-engine.el (c-back-over-list-of-member-inits): Add
handling for "<....>"s.

8 years agoFix etags test suite messed up by merges from emacs-25
Eli Zaretskii [Fri, 26 Aug 2016 19:32:05 +0000 (22:32 +0300)]
Fix etags test suite messed up by merges from emacs-25

* test/manual/etags/go-src/test.go:
* test/manual/etags/go-src/test1.go: Move from test/etags/.
* test/manual/etags/ruby-src/test1.ru: Replace test1.ruby.
* test/etags/: Directory deleted.

8 years agoAdd "supports" to list of CSS at-rules
Simen Heggestøyl [Fri, 26 Aug 2016 17:16:47 +0000 (19:16 +0200)]
Add "supports" to list of CSS at-rules

* lisp/textmodes/css-mode.el (css-at-ids): Add "supports" at-rule.

8 years ago* lisp/net/tramp-sh.el (tramp-get-remote-perl): Perform a basic check.
Michael Albinus [Fri, 26 Aug 2016 13:12:42 +0000 (15:12 +0200)]
* lisp/net/tramp-sh.el (tramp-get-remote-perl): Perform a basic check.

(Bug#22478)