]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years ago; Fix version in orgcard.tex
Rasmus [Fri, 23 Jun 2017 08:59:16 +0000 (10:59 +0200)]
; Fix version in orgcard.tex

7 years agoSynchronize with the "emacs-sync" branch from Org
Rasmus [Fri, 23 Jun 2017 08:58:09 +0000 (10:58 +0200)]
Synchronize with the "emacs-sync" branch from Org

7 years ago; Fix ORG-NEWS formatting in previous commit
Rasmus [Thu, 22 Jun 2017 10:26:08 +0000 (12:26 +0200)]
; Fix ORG-NEWS formatting in previous commit

7 years agoAdd Org schemas.xml contents to Emacs schemas.xml
Rasmus [Thu, 22 Jun 2017 09:16:38 +0000 (11:16 +0200)]
Add Org schemas.xml contents to Emacs schemas.xml

Entries from the Org version of schemas.xml have been added to
the Emacs version of schemas.xml.

7 years agoUpdate Org to v9.0.9
Rasmus [Wed, 21 Jun 2017 11:20:20 +0000 (13:20 +0200)]
Update Org to v9.0.9

Please see etc/ORG-NEWS for details.

7 years agoFix make_hash_table calls in lread.c
Martin Rudalics [Thu, 22 Jun 2017 07:24:06 +0000 (09:24 +0200)]
Fix make_hash_table calls in lread.c

* src/lread.c (readevalloop, read_internal_start): Fix
make_hash_table calls to make build succeed.

7 years agoMerge several Lisp reader speedups.
Ken Raeburn [Thu, 22 Jun 2017 02:45:14 +0000 (22:45 -0400)]
Merge several Lisp reader speedups.

7 years agoCreate less garbage to collect while reading symbols.
Ken Raeburn [Mon, 19 Dec 2016 21:01:09 +0000 (16:01 -0500)]
Create less garbage to collect while reading symbols.

* src/lread.c (read1): When interning a symbol, only create a new
string object for the name if we're going to use it for a new symbol
object.

7 years agoReplace read_objects assoc list with two hash tables.
Ken Raeburn [Sun, 30 Oct 2016 13:05:46 +0000 (09:05 -0400)]
Replace read_objects assoc list with two hash tables.

For larger input files with lots of shared data structures, an
association list is too slow.

* src/lread.c (read_objects_map, read_objects_completed): New
variables, replacing read_objects.
(readevalloop): Initialize them with hash tables before starting a
top-level read, if they're not already empty hash tables, and reset
them to Qnil afterwards if something was added to the hash tables.
(read_internal_start): Likewise.
(read1): Store first the placeholder and later the newly read object
into read_objects_map under the specified object number.  If the new
object can contain a reference to itself, store it in
read_objects_completed.
(substitute_objects_recurse): Check read_objects_completed instead of
read_objects for the known possibly-recursive objects.
(syms_of_lread): Update initializations.

7 years agoUse getc_unlocked.
Ken Raeburn [Thu, 27 Oct 2016 04:50:07 +0000 (00:50 -0400)]
Use getc_unlocked.

* configure.ac: Check for getc_unlocked.
* src/charset.c (read_hex, load_charset_map_from_file): Use
getc_unlocked instead of getc.
(getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
* src/lread.c (readbyte_from_file, Fget_file_char, read1,
getc_unlocked): Likewise.

7 years agoReduce lread substitutions.
Stefan Monnier [Thu, 27 Oct 2016 05:18:16 +0000 (01:18 -0400)]
Reduce lread substitutions.

* src/lread.c (read1): After reading an object using the "#n=" syntax,
if the read object is a cons cell, instead of recursively substituting
the placeholder with the new object, mutate the placeholder cons cell
itself to have the correct car and cdr values.

7 years agoShort-circuit substitutions for some simple types.
Ken Raeburn [Thu, 27 Oct 2016 06:53:07 +0000 (02:53 -0400)]
Short-circuit substitutions for some simple types.

Values that don't contain other values cannot be circular, so checking
for circular objects is a waste of cycles.

* src/lread.c (substitute_object_recurse): If the subtree being
examined is a symbol, number, or property-less string, just return
it.

7 years agoLimit style_format to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:26:46 +0000 (17:26 -0700)]
Limit style_format to MAX_ALLOCA

* src/editfns.c (styled_format): Subtract initial buffer size
from sa_avail, since it is nontrivial.

7 years agoLimit bidi_find_bracket_pairs to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:18:30 +0000 (17:18 -0700)]
Limit bidi_find_bracket_pairs to MAX_ALLOCA

* src/bidi.c (MAX_BPA_STACK): Now a constant, not a macro.
Shrink it to allow for the two struct bidi_it objects in
the same frame.
(PUSH_BPA_STACK): Avoid integer overflow with enormous bidi cache.
(bidi_find_bracket_pairs): Use compile-time check instead of runtime.

7 years agoLimit insert-file-contents to MAX_ALLOCA
Paul Eggert [Thu, 22 Jun 2017 00:15:49 +0000 (17:15 -0700)]
Limit insert-file-contents to MAX_ALLOCA

* src/fileio.c (READ_BUF_SIZE): Don’t allocate more than
MAX_ALLOCA bytes in a single stack array.

7 years agoRemove malloc_find_address relic
Paul Eggert [Wed, 21 Jun 2017 18:49:48 +0000 (11:49 -0700)]
Remove malloc_find_address relic

* src/gmalloc.c (register_heapinfo, _malloc_internal_nolock):
Omit unnecessary initialization.

7 years agoFix temacs hybrid_malloc core dump
Paul Eggert [Wed, 21 Jun 2017 18:45:05 +0000 (11:45 -0700)]
Fix temacs hybrid_malloc core dump

Without this patch, ./temacs would dump core sometimes on Fedora
25 x86-64.  The problem was that the hybrid allocator assumed that
all pointers into bss_sbrk_buffer are allocated via gmalloc.  This
assumption is not true on Fedora, because the standard memory
allocator calls gdefault_morecore, which means its blocks are
interleaved with our blocks.  Usually the code happened to work,
because our data structures agreed with the glibc data structures,
but this was merely luck due to a shared pedigree, and as glibc
mutates our luck has run out.
* src/gmalloc.c (ALLOCATED_BEFORE_DUMPING) [HYBRID_MALLOC]:
Remove; no longer needed.
(BLOCK): Use unsigned division, as that does the right thing near zero.
(register_heapinfo, __malloc_internal_nolock, __free_internal_nolock)
(_realloc_internal_nolock):
Big blocks now have type -1, not 0, as 0 now means the block is
not ours.
(morecore_nolock): Omit now-unnecessary casts to size_t.
(allocated_via_gmalloc) [HYBRID_MALLOC]: New function.
(hybrid_free, hybrid_realloc) [HYBRID_MALLOC]: Use it, to
avoid calling the wrong free or realloc function in some cases.

7 years agoMake gnus-article-date-user work
Katsumi Yamaoka [Wed, 21 Jun 2017 08:12:10 +0000 (08:12 +0000)]
Make gnus-article-date-user work

* lisp/gnus/gnus-art.el (article-date-ut):
Work for unfolded multi-line Date header.
(article-transform-date):
Refactor; add header name if it is missing in user-defined date line.
(article-date-user): Fix name of date type.

7 years agoKeep order of completion candidates (Bug#25995, Bug#24676)
Noam Postavsky [Wed, 21 Jun 2017 02:19:51 +0000 (22:19 -0400)]
Keep order of completion candidates (Bug#25995, Bug#24676)

* lisp/minibuffer.el (completion-pcm--filename-try-filter)
(completion-pcm--all-completions): Use nreverse to undo the reversing
caused by using push in the loop.

7 years ago* src/lread.c (syms_of_lread) <load-history>: Doc fix.
Glenn Morris [Wed, 21 Jun 2017 01:35:42 +0000 (21:35 -0400)]
* src/lread.c (syms_of_lread) <load-history>: Doc fix.

7 years agoMark prolog indent variables as safe (bug#27369)
Alex Gramiak [Wed, 21 Jun 2017 01:05:38 +0000 (21:05 -0400)]
Mark prolog indent variables as safe (bug#27369)

* lisp/progmodes/prolog.el (prolog-indent-width)
(prolog-left-indent-regexp, prolog-paren-indent-p)
(prolog-paren-indent): Add :safe property.

7 years agoRemove `:options' from `css-electric-keys'
Simen Heggestøyl [Tue, 20 Jun 2017 18:57:48 +0000 (20:57 +0200)]
Remove `:options' from `css-electric-keys'

* lisp/textmodes/css-mode.el (css-electric-keys): Remove `:options`
since it just duplicates the default value.

7 years agoFix crash when built by GNU Gold linker on x86
Paul Eggert [Tue, 20 Jun 2017 15:48:14 +0000 (08:48 -0700)]
Fix crash when built by GNU Gold linker on x86

Problem reported by Andrés Musetti (Bug#27248).
* src/widget.c (emacsFrameClassRec): Do not initialize superclass here.
(emacsFrameClass): Now a function (which initializes the
superclass) instead of a variable.  All uses changed.

7 years agoSimplify autogen.sh version checking
Paul Eggert [Tue, 20 Jun 2017 15:18:08 +0000 (08:18 -0700)]
Simplify autogen.sh version checking

* autogen.sh (get_version): Simplify and make more reliable
by using expr rather than echo | sed.  Check exit status of program.
Run program in subshell in case it cannot be executed.
(check_version): Check exit status of command rather than its output.
Check return status of get_version.

7 years agoDelete old Date header in a simple way
Katsumi Yamaoka [Tue, 20 Jun 2017 09:11:07 +0000 (09:11 +0000)]
Delete old Date header in a simple way

* lisp/gnus/gnus-art.el (article-date-ut): Don't rely on text prop
when searching the old Date header boundary in order to delete it.

7 years agoRevert "Don't bind org-agenda key to an anonymous function"
Bastien [Tue, 20 Jun 2017 05:54:19 +0000 (07:54 +0200)]
Revert "Don't bind org-agenda key to an anonymous function"

This reverts commit 49c0ff29c2e0243ba35ec17e3e3af49369be43db.

7 years agoBind enable-local-variables to nil globally (fix dbe3e41)
Katsumi Yamaoka [Tue, 20 Jun 2017 03:46:21 +0000 (03:46 +0000)]
Bind enable-local-variables to nil globally (fix dbe3e41)

* lisp/gnus/mm-view.el (mm-display-inline-fontify):
Bind enable-local-variables to nil globally instead of making it
buffer-local; remove let-bind of local-enable-local-variables.
cf. <b4mtw3bbfp5.fsf@jpl.org> in the emacs-devel list.

7 years ago; * lisp/eshell/em-basic.el: Fix commentary.
Glenn Morris [Tue, 20 Jun 2017 02:24:29 +0000 (22:24 -0400)]
; * lisp/eshell/em-basic.el: Fix commentary.
This file has never provided any such "version" command.

7 years agokill-matching-buffers to optionally not confirm
Glenn Morris [Tue, 20 Jun 2017 01:31:50 +0000 (21:31 -0400)]
kill-matching-buffers to optionally not confirm

* lisp/files.el (kill-matching-buffers):
Add option to not confirm killing.  (Bug#27286)

7 years ago* lisp/files.el (local-enable-local-variables): Doc fix.
Glenn Morris [Tue, 20 Jun 2017 01:28:18 +0000 (21:28 -0400)]
* lisp/files.el (local-enable-local-variables): Doc fix.

7 years agoautogen.sh: try to check for tool being present but broken
Glenn Morris [Tue, 20 Jun 2017 01:13:08 +0000 (21:13 -0400)]
autogen.sh: try to check for tool being present but broken

* autogen.sh (get_version): Check return status of "--version".
(check_version): Try to distinguish between a missing tool
and a broken one.  (Bug#27288)

7 years agoAvoid a custom-variable-type error (bug#27363)
Glenn Morris [Mon, 19 Jun 2017 18:53:47 +0000 (14:53 -0400)]
Avoid a custom-variable-type error (bug#27363)

* lisp/cus-edit.el (custom-variable-type):
Avoid an error due to plist-put becoming stricter of late.

7 years agoDon't put deleted packages in the trash (bug#14967)
Glenn Morris [Mon, 19 Jun 2017 18:39:25 +0000 (14:39 -0400)]
Don't put deleted packages in the trash (bug#14967)

* lisp/emacs-lisp/package.el (package-delete):
Don't pay attention to delete-by-moving-to-trash.

; * etc/NEWS: Mention this.

7 years agoRevert "Add current-line in simple.el"
Nicolas Petton [Mon, 19 Jun 2017 12:43:39 +0000 (14:43 +0200)]
Revert "Add current-line in simple.el"

This reverts commit ae98cdf9431604d0f722f1db217ca06debfbb7b6.

7 years agoAdd current-line in simple.el
Damien Cassou [Sun, 9 Apr 2017 10:46:57 +0000 (12:46 +0200)]
Add current-line in simple.el

* lisp/simple.el (current-line): New function.
* test/list/simple-tests.el: Add tests for current-line.

7 years agoDon't try to eval local variables in Gnus article
Katsumi Yamaoka [Mon, 19 Jun 2017 02:10:22 +0000 (02:10 +0000)]
Don't try to eval local variables in Gnus article

* lisp/gnus/mm-view.el (mm-display-inline-fontify): Disable local vars.

7 years agoFix emacs-module.h cleaning
Paul Eggert [Sun, 18 Jun 2017 18:51:55 +0000 (11:51 -0700)]
Fix emacs-module.h cleaning

* src/Makefile.in (clean): Do not remove emacs-module.h.in.
(bootstrap-clean): Remove emacs-module.h.

7 years ago* url/url-util.el (url-get-url-at-point): Add missing group in
Andreas Schwab [Sun, 18 Jun 2017 07:09:34 +0000 (09:09 +0200)]
* url/url-util.el (url-get-url-at-point): Add missing group in
regex.

7 years ago* lib/gettext.h: Merge from gnulib.
Paul Eggert [Sat, 17 Jun 2017 22:21:53 +0000 (15:21 -0700)]
* lib/gettext.h: Merge from gnulib.

7 years agoMerge from gnulib
Paul Eggert [Sat, 17 Jun 2017 22:12:50 +0000 (15:12 -0700)]
Merge from gnulib

This (and my previous patch) incorporate:
2017-06-17 diffseq: port to GCC 7 with --enable-gcc-warnings
2017-06-15 gettext-h: Update comment
* lib/diffseq.h: Copy from gnulib.

7 years ago* test/Makefile.in: Don't suppress test failure for single tests.
Noam Postavsky [Sat, 17 Jun 2017 19:48:32 +0000 (15:48 -0400)]
* test/Makefile.in: Don't suppress test failure for single tests.

7 years agoemacs-module.h: Create emacs_env_26
Philipp Stephani [Sat, 17 Jun 2017 17:12:45 +0000 (19:12 +0200)]
emacs-module.h: Create emacs_env_26

This was part of the original design of the module
API (https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html),
but I didn't take it into account when adding the should_quit
function.

Instead of duplicating the environment fields or using the C
preprocessor, use configure to build emacs-module.h.

* configure.ac: Expand emacs-module.h template.

7 years agoImprove documentation of replace-buffer-contents
Eli Zaretskii [Sat, 17 Jun 2017 16:03:30 +0000 (19:03 +0300)]
Improve documentation of replace-buffer-contents

* etc/NEWS (replace-buffer-contents): Fix formatting.

* src/editfns.c (Freplace_buffer_contents): Doc fix.

7 years ago; * src/emacs-module.c (funcall_module): Add another FIXME
Philipp Stephani [Sat, 17 Jun 2017 15:10:41 +0000 (17:10 +0200)]
; * src/emacs-module.c (funcall_module): Add another FIXME

7 years agoAllow local variables section to begin with a square bracket
Philipp Stephani [Fri, 16 Jun 2017 21:49:09 +0000 (23:49 +0200)]
Allow local variables section to begin with a square bracket

Fixes Bug#27391.

* lisp/international/mule.el (find-auto-coding): Fix regular
expression for "Local Variables" section.

* test/lisp/international/mule-tests.el (find-auto-coding--bug27391):
Add unit test.

7 years agoRemove unnecessary point motion
Philipp Stephani [Sat, 17 Jun 2017 14:08:16 +0000 (16:08 +0200)]
Remove unnecessary point motion

* src/editfns.c (Freplace_buffer_contents): Remove unnecessary point
motion.

7 years ago; * etc/NEWS (Editing Changes in Emacs 26.1): Fix typo in last commit.
Tino Calancha [Sat, 17 Jun 2017 13:58:27 +0000 (22:58 +0900)]
; * etc/NEWS (Editing Changes in Emacs 26.1): Fix typo in last commit.

7 years agoAdd command to replace buffer contents
Philipp Stephani [Sun, 7 May 2017 19:01:53 +0000 (21:01 +0200)]
Add command to replace buffer contents

Add a new command 'replace-buffer-contents' that uses the Myers diff
algorithm to non-destructively replace the accessible portion of the
current buffer.  The Myers algorithm is implemented in Gnulib.

* src/editfns.c (Freplace_buffer_contents): New command.
(set_bit, bit_is_set, buffer_chars_equal): New helper functions.
(syms_of_editfns): Define new command.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2): New unit tests.

* src/buffer.h (BUF_FETCH_CHAR_AS_MULTIBYTE): New helper macro.

* admin/merge-gnulib (GNULIB_MODULES): Add diffseq.h and minmax.h.

7 years ago* international/characters.el: Update list of zero and full width
Andreas Schwab [Sat, 17 Jun 2017 09:44:19 +0000 (11:44 +0200)]
* international/characters.el: Update list of zero and full width
characters according to Unicode 9.0.0.

7 years agoComplete CSS property values less eagerly (Bug#27392)
Simen Heggestøyl [Sat, 17 Jun 2017 07:28:43 +0000 (09:28 +0200)]
Complete CSS property values less eagerly (Bug#27392)

* lisp/textmodes/css-mode.el (css--complete-property-value): Be less
eager by looking for a colon after the property which values are being
completed for.

* test/lisp/textmodes/css-mode-tests.el (css-test-complete-property):
Add a test case ensuring that properties that are prefixes of other
properties don't hinder further completion.

7 years agoHandle integer indices for eshell variables (Bug#26055)
Noam Postavsky [Fri, 9 Jun 2017 23:40:38 +0000 (19:40 -0400)]
Handle integer indices for eshell variables (Bug#26055)

* lisp/eshell/esh-var.el (eshell-index-value): Convert index to number
if it's been marked as one, just like `eshell-lisp-command' does.

7 years agoDon't bind org-agenda key to an anonymous function
Mark Oteiza [Sat, 17 Jun 2017 01:51:05 +0000 (21:51 -0400)]
Don't bind org-agenda key to an anonymous function

* lisp/org/org-agenda.el: Bind "g" to named command.
(org-agenda-redo-all): New command.  Extend the previous functionality
through a prefix argument.

7 years agoAdd test for the fix in the parent commit
Dmitry Gutov [Sat, 17 Jun 2017 00:54:06 +0000 (03:54 +0300)]
Add test for the fix in the parent commit

* test/src/undo-tests.el (undo-test-skip-invalidated-markers):
New test, for the fix in the parent commit.

7 years agoprimitive-undo: Update only the currently valid markers
Nitish Chandra [Sat, 17 Jun 2017 00:46:12 +0000 (03:46 +0300)]
primitive-undo: Update only the currently valid markers

* lisp/simple.el (primitive-undo):
Update only the currently valid markers (bug#25599).

Copyright-paperwork-exempt: yes

7 years agoCorrectly detect URLs surrounded by parentheses in comments
Philipp Stephani [Thu, 15 Jun 2017 09:49:56 +0000 (11:49 +0200)]
Correctly detect URLs surrounded by parentheses in comments

* lisp/thingatpt.el (thing-at-point--bounds-of-well-formed-url):
Make parentheses match work inside comments.

* test/lisp/thingatpt-tests.el (thing-at-point-url-in-comment): Add
unit test.

7 years agoFix load-path issue when it contains remote directories
Michael Albinus [Fri, 16 Jun 2017 12:46:25 +0000 (14:46 +0200)]
Fix load-path issue when it contains remote directories

* lisp/net/tramp.el (tramp-file-name-handler): Use `autoloadp'.
(tramp-use-absolute-autoload-file-names): New defun.  Call it
after loading tramp.el.

* test/lisp/net/tramp-tests.el (tramp-test38-remote-load-path):
New test.
(tramp-test39-unload): Rename.

7 years agoEnsure C++ initializer lists don't get fontified.
Alan Mackenzie [Fri, 16 Jun 2017 11:26:59 +0000 (11:26 +0000)]
Ensure C++ initializer lists don't get fontified.

* lisp/progmodes/cc-cmds.el (c-block-comment-flag): Move declaration to solve
compiler warning.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Add an extra
clause to handle C++ member initialization lists.
(c-font-lock-single-decl): New function, extracted from
c-font-lock-declarations.
(c-font-lock-declarations): Call c-font-lock-single-decl in place of inline
code.
(c-font-lock-cut-off-declarators): Make more rigorous by calling
c-get-fontification-context, c-forward-decl-or-cast-1, and
c-font-lock-single-decl in place of rather approximate code.

7 years agoFix hang in CC Mode when ":" is typed after identifier at EOB.
Alan Mackenzie [Fri, 16 Jun 2017 10:42:20 +0000 (10:42 +0000)]
Fix hang in CC Mode when ":" is typed after identifier at EOB.

* list/progmodes/cc-engine.el (c-forward-declarator): Fix coding error
confusing ":" and EOB.

7 years agoCreate a toggle between block and line comments in CC Mode.
Alan Mackenzie [Thu, 15 Jun 2017 20:47:11 +0000 (20:47 +0000)]
Create a toggle between block and line comments in CC Mode.

Also (unrelated change) initialize the modes' keymaps at each loading.

* lisp/progmodes/cc-cmds.el (c-update-modeline): amend for the new information
on the modeline.
(c-block-comment-flag): New variable.
(c-toggle-comment-style): New function.

* lisp/progmodes/cc-langs.el (c-block-comment-starter)
(c-line-comment-starter): Make them c-lang-defvars.
(c-block-comment-is-default): New c-lang-defvar.
(comment-start, comment-end): Make the default values dependent on
c-block-comment-is-default.

* lisp/progmodes/cc-mode.el (c-mode-base-map): Define C-c C-k in this map.
(c-basic-common-init): Initialize c-block-comment-flag.
(c-mode-map, c++-mode-map, objc-mode-map, java-mode-map, idl-mode-map)
(pike-mode-map, awk-mode-map): Make entries in these key maps each time the
mode is loaded rather than just once per Emacs session.

* doc/misc/cc-mode.texi (Comment Commands): Introduce the notion of comment
style.
(Minor Modes): Define comment style.  Describe how comment style influences
the information displayed on the modeline.  Document c-toggle-comment-style.
(FAQ): Add a question about toggling the comment style.

7 years agoPacify clang without munging C source
Paul Eggert [Thu, 15 Jun 2017 20:29:04 +0000 (13:29 -0700)]
Pacify clang without munging C source

* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.

7 years agoNo need to complicate make-docfile.c for Clang
Paul Eggert [Thu, 15 Jun 2017 19:34:00 +0000 (12:34 -0700)]
No need to complicate make-docfile.c for Clang

* lib-src/make-docfile.c (put_filename): Undo recent change.
The Clang false alarm occurs only with CFLAGS=-save-temps and
we needn’t worry about pacifying unusual compiler configurations.

7 years agoPort './configure CC=clang' to Fedora 25
Paul Eggert [Thu, 15 Jun 2017 18:25:23 +0000 (11:25 -0700)]
Port './configure CC=clang' to Fedora 25

* configure.ac (HAVE_IMAGEMAGICK): Disable if even a
standard function like MagickRelinquishMemory does not link.

7 years agoDon’t worry about __STDC_VERSION__ in emacs-module
Paul Eggert [Thu, 15 Jun 2017 17:33:10 +0000 (10:33 -0700)]
Don’t worry about __STDC_VERSION__ in emacs-module

* src/emacs-module.h: Remove __STDC_VERSION__ check.  In the past
we’ve found that some compilers do not define this symbol even
when they work well enough.  If necessary features like stdbool.h
are missing the compiler will complain eventually anyway.

7 years agoPort cleanup check to Oracle Studio 12.5
Paul Eggert [Wed, 14 Jun 2017 18:01:02 +0000 (11:01 -0700)]
Port cleanup check to Oracle Studio 12.5

* src/conf_post.h (__has_attribute_cleanup): Resurrect.
* src/emacs-module.c: Verify __has_attribute (cleanup), but in an
#if this time.

7 years agoFix misformatted changelog entry
Bastien [Wed, 14 Jun 2017 16:54:38 +0000 (18:54 +0200)]
Fix misformatted changelog entry

7 years agoAvoid compiler warning in image.c on MS-Windows
Eli Zaretskii [Wed, 14 Jun 2017 16:09:21 +0000 (19:09 +0300)]
Avoid compiler warning in image.c on MS-Windows

* src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
compilation warning under -Warray-bounds by temporarily disabling
the -Warray-bounds option.

7 years agoFix Bug#27315
Michael Albinus [Wed, 14 Jun 2017 12:17:22 +0000 (14:17 +0200)]
Fix Bug#27315

* lisp/net/tramp-cache.el (tramp-cache-read-persistent-data):
New defvar.
(top): Use it.

* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Check for connected, not for connectable.  (Bug#27315)
(tramp-process-actions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Use `tramp-cache-read-persistent-data'.

* test/lisp/net/tramp-tests.el (top): Set also
`tramp-cache-read-persistent-data'.

7 years agoGive a fixed default value for icomplete-prospects-height (Bug#26939)
Noam Postavsky [Mon, 5 Jun 2017 23:18:14 +0000 (19:18 -0400)]
Give a fixed default value for icomplete-prospects-height (Bug#26939)

* lisp/icomplete.el (icomplete-prospects-height): Default to 2.
(icomplete-prospects-length): Remove.
* etc/NEWS: Announce removal.

7 years agoRemove some tautological comparisons involving rlim_t
Philipp Stephani [Wed, 14 Jun 2017 10:35:58 +0000 (12:35 +0200)]
Remove some tautological comparisons involving rlim_t

Clang on macOS warns about these with -Wtautological-compare.  POSIX
guarantees that rlim_t is
unsigned (cf.
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html),
so these resource limits can never be negative.

* src/emacs.c (main): Remove tautological comparisons.

7 years agoUse --module-assertions if modules are available
Philipp Stephani [Wed, 14 Jun 2017 10:18:36 +0000 (12:18 +0200)]
Use --module-assertions if modules are available

Using --module-assertions helps us find bugs in the test module.  But
we can use it only if Emacs was compiled with module support.

* test/Makefile.in (MODULES_EMACSOPT): New variable.
(emacs): Use it.

7 years agoDefine --module-assertions only of modules are available
Philipp Stephani [Wed, 14 Jun 2017 08:46:45 +0000 (10:46 +0200)]
Define --module-assertions only of modules are available

Fixes Bug#27352.

* src/emacs.c (usage_message, standard_args): Define
--module-assertions only if Emacs has been compiled with module
support.

7 years ago; Fix typo in INSTALL
Michael Albinus [Wed, 14 Jun 2017 07:08:45 +0000 (09:08 +0200)]
; Fix typo in INSTALL

7 years agognus-article-read-summary-keys: Don't move point for WDD and WDW commands
Katsumi Yamaoka [Wed, 14 Jun 2017 05:35:39 +0000 (05:35 +0000)]
gnus-article-read-summary-keys: Don't move point for WDD and WDW commands

* lisp/gnus/gnus-art.el (gnus-article-read-summary-keys):
No need to restore window config for WDD and WDW commands.

7 years agolisp/net/soap-client.el: Bump version to 3.1.3
Thomas Fitzsimmons [Wed, 14 Jun 2017 00:56:25 +0000 (20:56 -0400)]
lisp/net/soap-client.el: Bump version to 3.1.3

* lisp/net/soap-client.el: Bump version to 3.1.3.
(soap-name-p): Fix checkdoc issue.

7 years agoFix an HTTP encoding error in soap-client.el
Alex Harsanyi [Wed, 14 Jun 2017 00:49:59 +0000 (20:49 -0400)]
Fix an HTTP encoding error in soap-client.el

* lisp/net/soap-client.el (soap-invoke-internal): Make
SOAPAction header a UTF-8 encoded string.

7 years agoPort cleanup attribute to Oracle Studio 12.5
Paul Eggert [Wed, 14 Jun 2017 01:19:30 +0000 (18:19 -0700)]
Port cleanup attribute to Oracle Studio 12.5

* INSTALL (--with-modules): List cleanup attribute as prereq.
* src/conf_post.h (__has_attribute_cleanup): Remove; no longer needed.
* src/emacs-module.c (MODULE_SETJMP_1): Don’t attempt to verify
(__has_attribute (cleanup)), as Oracle Studio 12.5 supports
__has_attribute only inside preprocessor expressions.  The C
compiler should check the cleanup attribute in the next line anyway.
(module_reset_handlerlist): Remove an unnecessary ‘const’
that causes Oracle Studio 12.5 to refuse to compile.

7 years agoFix running tests in without-modules builds
Glenn Morris [Tue, 13 Jun 2017 22:53:38 +0000 (18:53 -0400)]
Fix running tests in without-modules builds

* test/Makefile.in (EMACSOPT): Remove option that is only defined
with-modules.  emacs-module-tests.el passes it where needed.

7 years ago* test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.
Glenn Morris [Tue, 13 Jun 2017 19:41:56 +0000 (15:41 -0400)]
* test/Makefile.in (src/emacs-module-tests.log): Out-of-tree fix.

7 years agoInline test module Makefile into main test Makefile
Philipp Stephani [Tue, 13 Jun 2017 18:46:03 +0000 (20:46 +0200)]
Inline test module Makefile into main test Makefile

The test/data/emacs-module/Makefile only built a single target, and
inlining it into test/Makefile simplifies dependency tracking and
reduces code duplication.

* configure.ac: Don't build test/data/emacs-module/Makefile.

* Makefile.in ($(test_module)): Inline compilation.
(clean): Also clean test module outputs.

7 years ago* lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not handle locally on w32.
Michael Albinus [Tue, 13 Jun 2017 13:54:09 +0000 (15:54 +0200)]
* lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Do not handle locally on w32.

7 years agoMinor tweaks in Tramp manual
Michael Albinus [Tue, 13 Jun 2017 13:20:43 +0000 (15:20 +0200)]
Minor tweaks in Tramp manual

* doc/misc/trampver.texi: Add prefixwithspace flag.

* doc/misc/tramp.texi (Password handling): Harmonize example.
(File name completion): Use prefixwithspace flag.
(Frequently Asked Questions): Explain `tramp-histfile-override'.

7 years agoSilence two Clang warnings by introducing additional local variables
Philipp Stephani [Tue, 13 Jun 2017 11:55:44 +0000 (13:55 +0200)]
Silence two Clang warnings by introducing additional local variables

* lib/strftime.c (libc_hidden_def):
* lib-src/make-docfile.c (put_filename): Introduce local variables to
silence Clang warnings.

7 years agoFix wrong indentation after string literal (Bug#27306)
Noam Postavsky [Sat, 10 Jun 2017 13:50:48 +0000 (09:50 -0400)]
Fix wrong indentation after string literal (Bug#27306)

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-state)
(lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-region-after-string-literal): New test.

7 years agoFix version checks for emacs-module.h
Philipp Stephani [Tue, 13 Jun 2017 07:53:33 +0000 (09:53 +0200)]
Fix version checks for emacs-module.h

We don't need C11 or C++11 because stdbool.h is in C99, and for C++ we
don't need it at all.

7 years ago; Fix docstring
Lele Gaifax [Tue, 13 Jun 2017 05:31:53 +0000 (14:31 +0900)]
; Fix docstring

* lisp/bindings.el (mode-line-percent-position):
End docstring first sentence with a period (Bug#27339).

Copyright-paperwork-exempt: yes

7 years agoButtonize #<bytecode> part of printed functions (Bug#25226)
Noam Postavsky [Sun, 11 Jun 2017 13:49:44 +0000 (09:49 -0400)]
Buttonize #<bytecode> part of printed functions (Bug#25226)

* lisp/emacs-lisp/cl-print.el: Autoload `disassemble-1'.
(cl-print-compiled-button): New variable.
(help-byte-code): New button type, calls `disassemble' in its action.
(cl-print-object): Use it if `cl-print-compiled-button' is
non-nil.

7 years agoPrint module structure sizes when initializing test module
Philipp Stephani [Mon, 12 Jun 2017 21:45:18 +0000 (23:45 +0200)]
Print module structure sizes when initializing test module

* test/data/emacs-module/mod-test.c (emacs_module_init): Print
compile-time and runtime sizes of module structures to ease debugging

7 years agoSmall portability fix for emacs-module.h (bug#27346)
Glenn Morris [Mon, 12 Jun 2017 21:43:28 +0000 (17:43 -0400)]
Small portability fix for emacs-module.h (bug#27346)

* src/emacs-module.h (EMACS_ATTRIBUTE_NONNULL) [!__has_attribute]:
Avoid 'error: missing binary operator before token "("'.

7 years agoGive a more informative failure in module assertion test
Glenn Morris [Mon, 12 Jun 2017 21:37:30 +0000 (17:37 -0400)]
Give a more informative failure in module assertion test

* test/src/emacs-module-tests.el (module--test-assertions):
Rephrase final check to give a more informative failure.

7 years agoFix off-by-one error
Philipp Stephani [Mon, 12 Jun 2017 21:35:23 +0000 (23:35 +0200)]
Fix off-by-one error

* test/data/emacs-module/mod-test.c (emacs_module_init): Fix
off-by-one error.

7 years agoClean up after module assertion tests
Glenn Morris [Mon, 12 Jun 2017 21:31:25 +0000 (17:31 -0400)]
Clean up after module assertion tests

* test/src/emacs-module-tests.el (module--test-assertions):
Use a temporary directory to contain any core dumps.

7 years agoSmall improvement for module assertion test
Glenn Morris [Mon, 12 Jun 2017 21:17:20 +0000 (17:17 -0400)]
Small improvement for module assertion test

* test/src/emacs-module-tests.el (module--test-assertions):
Don't rely on the precise form of an "Abort" message.

7 years agoImprove previous test/data/emacs-module/Makefile change
Glenn Morris [Mon, 12 Jun 2017 20:52:49 +0000 (16:52 -0400)]
Improve previous test/data/emacs-module/Makefile change

* test/data/emacs-module/Makefile.in (clean):
Avoid doing unpleasant things if run in a build without modules.

7 years agoSmall improvements for test/data/emacs-module/Makefile
Glenn Morris [Mon, 12 Jun 2017 20:35:39 +0000 (16:35 -0400)]
Small improvements for test/data/emacs-module/Makefile

* test/data/emacs-module/Makefile.in (%.o):
Fix emacs-module dependency.
(SECONDARY): Stop make automatically deleting *.o.
(clean): New rule.

7 years ago* make-dist: Skip some more generated files in test/.
Glenn Morris [Mon, 12 Jun 2017 17:53:38 +0000 (13:53 -0400)]
* make-dist: Skip some more generated files in test/.

7 years agoNote how fullscreen differs on the NS port
Alan Third [Mon, 12 Jun 2017 17:26:23 +0000 (18:26 +0100)]
Note how fullscreen differs on the NS port

doc/lispref/frames.texi (Size Parameters):
doc/emacs/frames.texi (Tool Bars): Add a description of how macOS
hides the tool-bar and menu-bar in fullscreen.

7 years agoAdd no-focus-on-map to NS build (bug#25408)
Alan Third [Sun, 11 Jun 2017 16:07:28 +0000 (17:07 +0100)]
Add no-focus-on-map to NS build (bug#25408)

* src/nsfns.m (ns_frame_parm_handlers): Add x_set_no_focus_on_map.
(x-create-frame): Check for no-focus-on-map.
* src/nsterm.h (x_set_no_focus_on_map): New function.
* src/nsterm.m (x_set_no_focus_on_map): New function.
(ns_raise_frame): Add parameter for specifying whether to focus the
frame.
(ns_frame_raise_lower):
(x_make_frame_visible): Handle new parameter for ns_raise_frame.

7 years ago_Noreturn not noreturn
Paul Eggert [Mon, 12 Jun 2017 17:38:27 +0000 (10:38 -0700)]
_Noreturn not noreturn

_Noreturn is more portable to non-C11 platforms.  See:
https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
* src/emacs-module.c: Use _Noreturn, not noreturn.  No need to
include <stdnoreturn.h>.  Reindent to fit in 80 columns.

7 years agoUpdate make-dist for recent test/ changes
Glenn Morris [Mon, 12 Jun 2017 16:33:37 +0000 (12:33 -0400)]
Update make-dist for recent test/ changes

* make-dist: No longer distribute test/data/emacs-module/Makefile.

7 years ago; Instrument `tramp-handle-file-name-case-insensitive-p' for debugging
Michael Albinus [Mon, 12 Jun 2017 15:54:53 +0000 (17:54 +0200)]
; Instrument `tramp-handle-file-name-case-insensitive-p' for debugging