]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoSet inhibit-compacting-font-caches to t by default on MS-Windows
Eli Zaretskii [Sat, 7 Sep 2019 09:26:08 +0000 (12:26 +0300)]
Set inhibit-compacting-font-caches to t by default on MS-Windows

* src/font.c (syms_of_font) [WINDOWSNT]: Set
inhibit-compacting-font-caches to t by default.

* etc/NEWS: Mention the change.

5 years agoAllow Zs characters to be composed
Eli Zaretskii [Sat, 7 Sep 2019 09:19:06 +0000 (12:19 +0300)]
Allow Zs characters to be composed

* src/composite.c (char_composable_p): Allow SPC and other Zs
characters to be composed.

* lisp/composite.el (compose-gstring-for-graphic): Don't
reject characters whose general category is Zs.  (Bug#14461)

5 years agoRevert "file-truename now uses realpath for local files"
Eli Zaretskii [Sat, 7 Sep 2019 07:14:31 +0000 (10:14 +0300)]
Revert "file-truename now uses realpath for local files"

This reverts commit a59839d7556ef85058e09b005f0ff32e59b20ec3.
This commit broke the MS-Windows build (because there's no
realpath on MS-Windows).  Even if I change the implementation
to always signal an error on MS-Windows, the build fails.

5 years agofile-truename now uses realpath for local files
Paul Eggert [Fri, 6 Sep 2019 21:30:33 +0000 (14:30 -0700)]
file-truename now uses realpath for local files

This uses fewer syscalls on GNU/Linux and other GNUish platforms.
* lisp/files.el (file-truename): Try fileio--truename
if there are no handlers.
* src/fileio.c: Include stdlib.h, for realpath.
(Ffileio__truename): New function.

5 years agoImprove file name completion in file and directory widgets (Bug#7779)
Mauro Aranda [Wed, 28 Aug 2019 11:29:57 +0000 (08:29 -0300)]
Improve file name completion in file and directory widgets (Bug#7779)

* lisp/wid-edit.el (widget 'file, widget 'directory): Respect the option
read-file-name-completion-ignore-case.
(widget 'directory): Filter the file names, to only perform directory name
completion.

5 years agoFix erc-lurker-update-status (bug#36843)
Amin Bandali [Sat, 17 Aug 2019 18:09:11 +0000 (14:09 -0400)]
Fix erc-lurker-update-status (bug#36843)

Broken since 2013-08-22 "* lisp/erc/erc.el: Use lexical-binding".

* lisp/erc/erc.el (erc-message-parsed): New variable.
(erc-display-message): Dynamically bind it.
(erc-lurker-update-status): Check it instead of using `parsed'
directly.  This results in `erc-lurker-state' being properly updated
to keep track of non-lurkers, and thus `erc-lurker-p' returning
correct results rather than return t for everyone.

5 years agoFix bugs when recalculating consing_until_gc
Paul Eggert [Thu, 5 Sep 2019 20:25:43 +0000 (13:25 -0700)]
Fix bugs when recalculating consing_until_gc

Problem reported by Joseph Mingrone (Bug#37006#72).
* src/alloc.c (watch_gc_cons_threshold)
(watch_gc_cons_percentage):
Don’t try to store an intmax_t into an int.
Redo to make the code clearer.
(watch_gc_cons_percentage):
Use gc_cons_threshold, not consing_until_gc.

5 years agoPort :safe-renegotiation test to GnuTLS < 3.6.3
Paul Eggert [Thu, 5 Sep 2019 18:42:56 +0000 (11:42 -0700)]
Port :safe-renegotiation test to GnuTLS < 3.6.3

Problem reported by Robert Pluim in
https://lists.gnu.org/r/emacs-devel/2019-09/msg00127.html
* src/gnutls.c (Fgnutls_peer_status): Simplify test for
whether the :safe-renegotiation result is needed, so that it
works all the way back to GnuTLS 2.12.2.

5 years agoFurther fix for network-security-protocol-checks
Lars Ingebrigtsen [Thu, 5 Sep 2019 11:26:08 +0000 (13:26 +0200)]
Further fix for network-security-protocol-checks

* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type some more (bug#37306).

5 years agoFix defcustom type of network-security-protocol-checks
Lars Ingebrigtsen [Thu, 5 Sep 2019 11:23:07 +0000 (13:23 +0200)]
Fix defcustom type of network-security-protocol-checks

* lisp/net/nsm.el (network-security-protocol-checks): Fix the
defcustom type (bug#37306).

5 years agoUse plain ‘static’ for Emacs C inline functions
Paul Eggert [Thu, 5 Sep 2019 06:13:54 +0000 (23:13 -0700)]
Use plain ‘static’ for Emacs C inline functions

This improved performance of ‘make compile-always’ by 8.2%
on my platform (AMD Phenom II X4 910e, Fedora 30 x86-64).
* src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
(INLINE_HEADER_END) [!EMACS_EXTERN_INLINE]: Use plain ‘static’.

5 years agoTweak xd_append_arg to pacify -Wnull-dereference
Paul Eggert [Thu, 5 Sep 2019 00:43:16 +0000 (17:43 -0700)]
Tweak xd_append_arg to pacify -Wnull-dereference

* src/dbusbind.c (xd_append_arg): Redo to pacify gcc
-Wnull-dereference.  Also, check that the Lisp string won’t
overrun the C signature buffer.

5 years agoDon't check for :safe-renegotiation with TLS1.3
Robert Pluim [Mon, 2 Sep 2019 12:55:00 +0000 (14:55 +0200)]
Don't check for :safe-renegotiation with TLS1.3

* lisp/net/nsm.el (nsm-protocol-check--renegotiation-info-ext): Don't
check when using TLS1.3, renegotiation has been removed from TLS.
Reported in
<https://lists.gnu.org/archive/html/help-gnu-emacs/2019-09/msg00005.html>

5 years agoDon’t mention :safe-renegotiation in TLS 1.3
Paul Eggert [Tue, 3 Sep 2019 19:16:21 +0000 (12:16 -0700)]
Don’t mention :safe-renegotiation in TLS 1.3

* src/gnutls.c (Fgnutls_peer_status): Don’t put the
safe-renegotiation indication into the status in TLS 1.3, which
removed support for renegotiation.

5 years agoFix nsm for unencrypted connections
Robert Pluim [Wed, 4 Sep 2019 21:43:56 +0000 (23:43 +0200)]
Fix nsm for unencrypted connections

When connecting using a cleartext connection, nsm was erroring out and
tearing down the connection because it was trying to display
nonexistent certificate information.

* lisp/net/nsm.el (nsm-query-user): Only format certificate status
when it is valid.  (Bug#37221)

5 years agoPort pdumper mmap to AIX
Paul Eggert [Wed, 4 Sep 2019 18:08:34 +0000 (11:08 -0700)]
Port pdumper mmap to AIX

* src/pdumper.c (needs_mmap_retry_p) [_AIX]: Return true.
Problem observed on AIX 7.1 and 7.2 in GCC compile farm.

5 years agoPort to platforms with Xrender lib but not header
Paul Eggert [Wed, 4 Sep 2019 18:07:14 +0000 (11:07 -0700)]
Port to platforms with Xrender lib but not header

* configure.ac (HAVE_XRENDER): Also require ‘#include
<X11/extensions/Xrender.h>’ to work.  Problem found
on gcc119 in GCC compile farm.

5 years agoCorrect arguments to `skip-syntax-forward'
Mattias Engdegård [Wed, 4 Sep 2019 14:27:02 +0000 (16:27 +0200)]
Correct arguments to `skip-syntax-forward'

* lisp/wid-edit.el (widget-sexp-validate): Fix bad calls to
`skip-syntax-forward', whose argument is not a regexp.

5 years agoMake the NSM not pop up an X dialogue on non-mouse actions
Lars Ingebrigtsen [Wed, 4 Sep 2019 13:19:40 +0000 (15:19 +0200)]
Make the NSM not pop up an X dialogue on non-mouse actions

* lisp/emacs-lisp/rmc.el (read-multiple-choice): Don't pop up X
dialogues on (url-retrieve "https://expired.badssl.com/" #'ignore)
and the like.

5 years agoPreserve more markers when reverting .gpg files
Lars Ingebrigtsen [Fri, 30 Aug 2019 10:20:30 +0000 (12:20 +0200)]
Preserve more markers when reverting .gpg files

* lisp/epa-file.el (epa-file--replace-text): Gingerly replace the
text in the buffer to preserve as many markers as possible
(bug#34720).  This emulates the behaviour of Finsert_file_contents
more accurately.
(epa-file-decode-and-insert): Remove compat code.
(epa-file-insert-file-contents): Use the new function.

* lisp/emacs-lisp/cl-lib.el (cl-incf): Add autoload cookie.

5 years agoRepair change to compilation-context-lines (bug#36832)
Mattias Engdegård [Wed, 4 Sep 2019 12:35:18 +0000 (14:35 +0200)]
Repair change to compilation-context-lines (bug#36832)

* lisp/progmodes/compile.el (compilation-set-window):
Restore proper behaviour when compilation-context-lines is nil,
which is the default.

5 years agoFurther work on Bug#37202
Michael Albinus [Wed, 4 Sep 2019 12:13:13 +0000 (14:13 +0200)]
Further work on Bug#37202

* test/lisp/shadowfile-tests.el (shadow-debug): Set to t.
(shadow--tests-cleanup): Simplify.
(shadow-test*): Call `shadow-initialize'.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
In cleanup, kill buffers used for test.
(top): Do not initialize.

5 years ago* lisp/net/tramp.el (tramp-process-sentinel): Use `process-buffer'.
Michael Albinus [Wed, 4 Sep 2019 07:37:37 +0000 (09:37 +0200)]
* lisp/net/tramp.el (tramp-process-sentinel): Use `process-buffer'.

5 years ago* src/systime.h (hz): #undef to work around AIX build issue.
Paul Eggert [Wed, 4 Sep 2019 06:40:32 +0000 (23:40 -0700)]
* src/systime.h (hz): #undef to work around AIX build issue.

5 years agoPrefer functions to macros in buffer.h
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
Prefer functions to macros in buffer.h

In buffer.h, prefer inline functions to function-like macros
when either will do.  This helps avoid confusion about how
many times an arg is evaluated.  On my platform, this patch
improves performance of ‘make compile-always’ by 5.7%.
Also, prefer enum constants to object-like macros
when either will do.
* src/buffer.h (BEG, BEG_BYTE, GAP_BYTES_DFL, GAP_BYTES_MIN)
(MAX_PER_BUFFER_VARS, NONEXISTENT_MODTIME_NSECS)
(UNKNOWN_MODTIME_NSECS, BUFFER_LISP_SIZE, BUFFER_REST_SIZE):
Now enum constants, instead of macros.
(BUFFER_CEILING_OF, BUFFER_FLOOR_OF, BUF_BEG, BUF_BEG_BYTE)
(BUF_BEGV, BUF_BEGV_BYTE, BUF_PT, BUF_PT_BYTE, BUF_ZV)
(BUF_ZV_BYTE, BUF_GPT_ADDR, BUF_Z_ADDR, BUF_GAP_END_ADDR)
(BUF_COMPUTE_UNCHANGED, SET_PT, TEMP_SET_PT, SET_PT_BOTH)
(TEMP_SET_PT_BOTH, BUF_TEMP_SET_PT, SET_BUF_BEGV, SET_BUF_ZV)
(SET_BUF_BEGV_BOTH, SET_BUF_ZV_BOTH, SET_BUF_PT_BOTH)
(BYTE_POS_ADDR, CHAR_POS_ADDR, CHAR_TO_BYTE, BYTE_TO_CHAR)
(PTR_BYTE_POS, FETCH_CHAR, FETCH_CHAR_AS_MULTIBYTE)
(BUF_BYTE_ADDRESS, BUF_CHAR_ADDRESS, BUF_PTR_BYTE_POS)
(BUF_FETCH_CHAR, BUF_FETCH_CHAR_AS_MULTIBYTE, BUF_FETCH_BYTE)
(BUFFER_PVEC_INIT, BUFFER_LIVE_P, BUFFER_HIDDEN_P)
(BUFFER_CHECK_INDIRECTION, OVERLAY_POSITION, PER_BUFFER_VALUE_P)
(SET_PER_BUFFER_VALUE_P, PER_BUFFER_IDX):
Now inline functions instead of macros.

5 years ago* src/xdisp.c (hscroll_window_tree): Fix type typo.
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
* src/xdisp.c (hscroll_window_tree): Fix type typo.

5 years agoTake last_per_buffer_idx private
Paul Eggert [Wed, 4 Sep 2019 04:54:58 +0000 (21:54 -0700)]
Take last_per_buffer_idx private

This will simplify future changes.  Turn the runtime check
into an eassert, since it’s not needed in production.
* src/buffer.c (last_per_buffer_idx): Now static.
(valid_per_buffer_idx): New function.
* src/buffer.h (PER_BUFFER_VALUE_P, SET_PER_BUFFER_VALUE_P): Use it.

5 years agoAvoid macros in pdumper.c when it’s easy
Paul Eggert [Wed, 4 Sep 2019 04:53:36 +0000 (21:53 -0700)]
Avoid macros in pdumper.c when it’s easy

Problem with DUMP_SET_REFERRER mentioned by Pip Cet at end of:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00548.html
* src/pdumper.c (DANGEROUS, EMACS_RELOC_TYPE_BITS)
(EMACS_RELOC_LENGTH_BITS, DUMP_RELOC_TYPE_BITS)
(DUMP_RELOC_ALIGNMENT_BITS, DUMP_RELOC_OFFSET_BITS)
(DUMP_RELOCATION_ALIGNMENT, DUMP_ALIGNMENT)
(WEIGHT_NONE, WEIGHT_NORMAL, WEIGHT_STRONG)
(PDUMPER_MAX_OBJECT_SIZE):
Now a constant, not a macro.
(divide_round_up): Now a function, not a macro DIVIDE_ROUND_UP.
All uses changed.
(enum link_weight_enum, WEIGHT_NONE_VALUE)
(WEIGHT_NORMAL_VALUE, WEIGHT_STRONG_VALUE): Remove.
(struct link_weight): Just use an int.
(dump_set_referrer): New function, replacing DUMP_SET_REFERRER
macro with a different API.  All uses changed.
(dump_clear_referrer): Rename from DUMP_CLEAR_REFERRER.
All uses changed.
(DEFINE_FROMLISP_FUNC, DEFINE_TOLISP_FUNC): Remove.
(intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp)
(dump_off_to_lisp): Define without using macros,
(dump_off_from_lisp): Add an eassert range check.
(DUMP_FIELD_COPY): Simplify.

5 years agoAvoid casting -1 to possibly-unsigned enum
Paul Eggert [Wed, 4 Sep 2019 00:34:08 +0000 (17:34 -0700)]
Avoid casting -1 to possibly-unsigned enum

* src/alloc.c (mark_maybe_pointer):
* src/pdumper.h (pdumper_object_p_precise):
Use pdumper_valid_object_type_p.
* src/pdumper.c (pdumper_find_object_type_impl):
* src/pdumper.h (pdumper_find_object_type):
Return int, not enum Lisp_Type.  All callers changed.
* src/pdumper.h (PDUMPER_NO_OBJECT): Do not cast -1 to enum
Lisp_Type; in theory, C18 says this could yield 7, which would
mean PDUMPER_NO_OBJECT == Lisp_Float (!).
(pdumper_valid_object_type_p): New function.

5 years agoRun tramp cleanup in correct buffer
Daniel Colascione [Tue, 3 Sep 2019 20:16:21 +0000 (13:16 -0700)]
Run tramp cleanup in correct buffer

Fixes bug #37297.

* lisp/net/tramp.el (tramp-process-sentinel): Do process-end cleanup
in the tramp buffer, not a random file buffer.

5 years agoSync consing_until_gc with gc-cons-threshold
Paul Eggert [Tue, 3 Sep 2019 20:03:34 +0000 (13:03 -0700)]
Sync consing_until_gc with gc-cons-threshold

Add watchers for gc-cons-threshold and gc-cons-percentage
that update consing_until_gc accordingly.
Suggested by Eli Zaretskii (Bug#37006#52).
* src/alloc.c (consing_threshold, bump_consing_until_gc)
(watch_gc_cons_threshold, watch_gc_cons_percentage):
New functions.
(garbage_collect_1): Use consing_threshold.
(syms_of_alloc): Arrange to watch gc-cons-threshold and
gc-cons-percentage.

5 years agoUse left margin to hold "=>" to indicate current error in fringeless windows
Alan Mackenzie [Tue, 3 Sep 2019 17:33:26 +0000 (17:33 +0000)]
Use left margin to hold "=>" to indicate current error in fringeless windows

This applies to compilation-mode.  It amends the fix for bug #36832.

* lisp/progmodes/compile.el (compilation-arrow-overlay): renamed from
overlay-arrow-overlay.
(compilation-margin-string, compilation--dummy-string): New variables.
(compilation-set-up-arrow-spec-in-margin)
(compilation-tear-down-arrow-spec-in-margin): New functions.
(compilation-set-overlay-arrow): Rewritten to use the new variables/functions.

5 years agoFix Bug#37202
Michael Albinus [Tue, 3 Sep 2019 11:55:42 +0000 (13:55 +0200)]
Fix Bug#37202

* lisp/shadowfile.el (shadow-debug): New defvar.
(shadow-read-files): Suppress error if there's no TODO file.

* test/lisp/shadowfile-tests.el (shadow-debug): Set to nil.
(shadow--tests-cleanup): New defun.  Apply to all tests.  (Bug#37202)
(shadow-test06-literal-groups): Cleanup temp buffer.
(shadow-test08-shadow-todo): Add debug messages.
(top): Cleanup initially.

5 years agoUpdate from Gnulib
Paul Eggert [Mon, 2 Sep 2019 19:37:52 +0000 (12:37 -0700)]
Update from Gnulib

This incorporates:
2019-08-25 intprops.h, verify.h: port better to clang
2019-08-21 New strip-trailing-space option for srclist-update
* .gitattributes: Remove doc/misc/texinfo.tex special case,
which is no longer needed now that Gnulib trims blank-at-eol.
* build-aux/install-sh, doc/misc/texinfo.tex, lib/intprops.h:
* lib/regex_internal.c, lib/verify.h: Copy from Gnulib.

5 years ago* doc/lispref/files.texi (Standard File Names): Mention .emacs.d too.
Paul Eggert [Mon, 2 Sep 2019 18:32:50 +0000 (11:32 -0700)]
* doc/lispref/files.texi (Standard File Names): Mention .emacs.d too.

5 years agoReword documentation markup description
Robert Pluim [Mon, 2 Sep 2019 15:28:59 +0000 (17:28 +0200)]
Reword documentation markup description

* etc/NEWS: Reword temporary note about documentation updates.

5 years agoAdd 'nsm-trust-local-network' to NEWS
Robert Pluim [Mon, 2 Sep 2019 15:26:10 +0000 (17:26 +0200)]
Add 'nsm-trust-local-network' to NEWS

* etc/NEWS: Describe 'nsm-trust-local-network', and warn against its
use.

5 years ago* admin/admin.el (set-version): Check for empty NEWS sections.
Glenn Morris [Sun, 1 Sep 2019 21:35:31 +0000 (14:35 -0700)]
* admin/admin.el (set-version): Check for empty NEWS sections.

5 years agoFix load-theme bug with user-emacs-directory
Paul Eggert [Sun, 1 Sep 2019 16:56:40 +0000 (09:56 -0700)]
Fix load-theme bug with user-emacs-directory

* lisp/custom.el (custom-theme-directory): Delay initialization,
since the value depends on user-emacs-directory (Bug#37256).

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Sep 2019 13:26:47 +0000 (06:26 -0700)]
; Auto-commit of loaddefs files.

5 years agoClarify what counts as whitespace in `string-blank-p'
Mattias Engdegård [Sun, 1 Sep 2019 12:26:18 +0000 (14:26 +0200)]
Clarify what counts as whitespace in `string-blank-p'

* lisp/emacs-lisp/subr-x.el (string-blank-p): Expand doc string.

5 years agopackage.el: Allow Package-Requires to span multiple lines (Bug#36301)
Thomas Fitzsimmons [Sat, 31 Aug 2019 14:48:59 +0000 (10:48 -0400)]
package.el: Allow Package-Requires to span multiple lines (Bug#36301)

* lisp/emacs-lisp/package.el (lm-header-multiline): Declare
function.
(package-buffer-info): Parse Package-Requires with
lm-header-multiline instead of lm-header.
(Bug#36301)

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
5 years agoMake user-emacs-directory a variable
Paul Eggert [Sun, 1 Sep 2019 01:17:20 +0000 (18:17 -0700)]
Make user-emacs-directory a variable

This is in response to Eli’s review here:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html
* lisp/subr.el (user-emacs-directory): defvar, not defconst

5 years agoImprove documentation for recent XDG-related changes
Paul Eggert [Sun, 1 Sep 2019 01:16:17 +0000 (18:16 -0700)]
Improve documentation for recent XDG-related changes

Adjust documentation in the light of Eli’s review here:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00712.html
* doc/emacs/custom.texi (Init File, Find Init):
* doc/lispref/files.texi (Standard File Names):
* doc/lispref/os.texi (Init File):

5 years ago* doc/lispref/customize.texi: Fix typo.
Paul Eggert [Sat, 31 Aug 2019 21:48:26 +0000 (14:48 -0700)]
* doc/lispref/customize.texi: Fix typo.

5 years agoCalculate user-emacs-directory on startup
Paul Eggert [Sat, 31 Aug 2019 21:47:04 +0000 (14:47 -0700)]
Calculate user-emacs-directory on startup

Problem reported by Glenn Morris (Bug#583#56).
* lisp/startup.el (startup--xdg-config-default): New constant.
(startup--xdg-config-home-emacs): New var.
(startup--xdg-or-homedot): New function.
(normal-top-level): Use it to set user-emacs-directory early on.
(command-line): Also use it to determine the startup init directory.
* lisp/subr.el (user-emacs-directory): Just initialize to nil.

5 years agoCheck instead of relying on NOTREACHED
Paul Eggert [Sat, 31 Aug 2019 17:35:08 +0000 (10:35 -0700)]
Check instead of relying on NOTREACHED

NOTREACHED was designed for traditional lint decades ago,
and _Noreturn now normally subsumes its function.
In the one case in Emacs where NORETURN might help and _Noreturn does
not, check for NOTREACHED instead of assuming it.
* lib-src/etags.c (main):
* src/xterm.c (x_connection_closed):
Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
is no longer needed there.  Also, one of the NOTREACHEDs was
misplaced, which defeated traditional lint checking anyway.
* lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
* src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
so that running with ENABLE_CHECKING catches any internal error
causing the toplevel Frecursive_edit to return.

5 years ago* test/lisp/net/tramp-tests.el (tramp-test21-file-links): More cleanup.
Glenn Morris [Sat, 31 Aug 2019 17:30:14 +0000 (10:30 -0700)]
* test/lisp/net/tramp-tests.el (tramp-test21-file-links): More cleanup.

5 years agoFix compilation with CHECK_STRUCTS
Andreas Schwab [Sat, 31 Aug 2019 10:39:16 +0000 (12:39 +0200)]
Fix compilation with CHECK_STRUCTS

* src/pdumper.c (dump_hash_table): Update hash of Lisp_Hash_Table.

5 years ago; * src/floatfns.c: Don't use non-ASCII characters in comments.
Eli Zaretskii [Sat, 31 Aug 2019 06:58:45 +0000 (09:58 +0300)]
; * src/floatfns.c: Don't use non-ASCII characters in comments.

5 years agoAvoid signaling errors from ls-lisp--insert-directory on macOS
Eli Zaretskii [Sat, 31 Aug 2019 06:54:05 +0000 (09:54 +0300)]
Avoid signaling errors from ls-lisp--insert-directory on macOS

* lisp/ls-lisp.el (ls-lisp-sanitize): Don't assume the
directory entries for ".." and "." will either both be present
or both absent.  (Bug#37236)

5 years ago* src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)
Mattias Engdegård [Thu, 29 Aug 2019 10:29:47 +0000 (12:29 +0200)]
* src/floatfns.c: Check against __FINITE_MATH_ONLY__ (bug#37140)

5 years agoExtend tramp--test-check-files (Bug#37228)
Michael Albinus [Fri, 30 Aug 2019 11:54:42 +0000 (13:54 +0200)]
Extend tramp--test-check-files  (Bug#37228)

* test/lisp/net/tramp-tests.el (tramp--test-check-files): Test also
`directory-files-and-attributes'.  (Bug#37228)

5 years agoFix Tramp's directory-files-and-attributes-with-stat (Bug#37228)
Koichi Arakawa [Fri, 30 Aug 2019 11:53:56 +0000 (13:53 +0200)]
Fix Tramp's directory-files-and-attributes-with-stat  (Bug#37228)

* lisp/net/tramp-sh.el
(tramp-do-directory-files-and-attributes-with-stat): Handle file
names with spaces.  (Bug#37228)

Copyright-paperwork-exempt: yes

5 years agoemacsclient: adjust to new config file location
Paul Eggert [Fri, 30 Aug 2019 07:24:07 +0000 (00:24 -0700)]
emacsclient: adjust to new config file location

* lib-src/emacsclient.c (open_config): New arg XDG, to respect
XDG_CONFIG_HOME, consistently with Emacs proper.  Caller changed.
Use XDG convention if available, falling back on the old names
if not.

5 years agoPrefer ~/.config/emacs to ~/.emacs.d if neither exists
Paul Eggert [Fri, 30 Aug 2019 05:29:52 +0000 (22:29 -0700)]
Prefer ~/.config/emacs to ~/.emacs.d if neither exists

That way, when Emacs starts in a fresh home directory,
it prefers the new (XDG) convention rather than the old one.
* lisp/files.el (locate-user-emacs-file): Make the parent
directories of user-emacs-directory if needed.  This is useful
if user-emacs-directory is "~/.config/emacs" and "~/.config"
does not yet exist.
* lisp/startup.el (command-line):
* lisp/subr.el (user-emacs-directory):
Prefer XDG_CONFIG_HOME to ~/.emacs.d if neither exists.

5 years agoMinor copyedits in ido.texi
Nick Drozd [Thu, 29 Aug 2019 23:36:50 +0000 (18:36 -0500)]
Minor copyedits in ido.texi

* doc/misc/ido.texi (Overview)
(Interactive Substring Matching, Prefix Matching)
(Regexp Matching, Hidden Buffers and Files)
(Changing List Order, Find File At Point, Misc)
(All Matching, Replacement): Fix wording, markup and punctuation.
(Bug#37225)

5 years agoMerge from origin/emacs-26
Glenn Morris [Thu, 29 Aug 2019 18:12:12 +0000 (11:12 -0700)]
Merge from origin/emacs-26

1af1240 (origin/emacs-26, emacs-26) ; Remove empty NEWS sections
96dd019 (tag: emacs-26.3-rc1, tag: emacs-26.3) * etc/HISTORY: Add Ema...

# Conflicts:
# etc/NEWS

5 years ago; Merge from origin/emacs-26
Glenn Morris [Thu, 29 Aug 2019 18:11:24 +0000 (11:11 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

4e59ad5 Bump Emacs version to 26.3

5 years agoMerge from origin/emacs-26
Glenn Morris [Thu, 29 Aug 2019 18:11:23 +0000 (11:11 -0700)]
Merge from origin/emacs-26

70829f8 ; ChangeLog.3 update

# Conflicts:
# ChangeLog.3

5 years ago; Merge from origin/emacs-26
Glenn Morris [Thu, 29 Aug 2019 18:11:22 +0000 (11:11 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

a6d0172 * etc/AUTHORS: Update.

5 years agoMerge from origin/emacs-26
Glenn Morris [Thu, 29 Aug 2019 18:11:21 +0000 (11:11 -0700)]
Merge from origin/emacs-26

290fe4d * ; ChangeLog.3 update
e8f176b * etc/NEWS: Delete temporary markup.

# Conflicts:
# ChangeLog.3
# etc/NEWS

5 years ago; Fix earlier NEWS merge
Glenn Morris [Thu, 29 Aug 2019 18:04:18 +0000 (11:04 -0700)]
; Fix earlier NEWS merge

5 years ago; Remove empty NEWS sections
Glenn Morris [Thu, 29 Aug 2019 17:59:53 +0000 (10:59 -0700)]
; Remove empty NEWS sections

5 years agoAdd new "make help" target
Stefan Kangas [Tue, 20 Aug 2019 23:02:43 +0000 (01:02 +0200)]
Add new "make help" target

* GNUmakefile: Add new "help" target that shows a brief summary of
common make targets.  (Bug#12411)
* INSTALL
* etc/NEWS: Announce it.

5 years agoTweak shr background colour handling
Lars Ingebrigtsen [Thu, 29 Aug 2019 07:18:40 +0000 (09:18 +0200)]
Tweak shr background colour handling

* lisp/net/shr.el (shr-fill-line): Extend the background to the
end of the line when folding lines.

5 years agoClarify meaning of <filename> in test/README
Michael Albinus [Wed, 28 Aug 2019 18:39:33 +0000 (20:39 +0200)]
Clarify meaning of <filename> in test/README

5 years agoDon't worry about pre-1.0.0 alsa-lib include
Paul Eggert [Wed, 28 Aug 2019 18:34:48 +0000 (11:34 -0700)]
Don't worry about pre-1.0.0 alsa-lib include

Problem reported by Ergus in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00563.html
* configure.ac (ALSA_SUBDIR_INCLUDE): Do not define.
* src/sound.c: Assume ALSA_SUBDIR_INCLUDE.

5 years ago; Improve and clarify wording of recent commit in NEWS.
Eli Zaretskii [Wed, 28 Aug 2019 11:00:01 +0000 (14:00 +0300)]
; Improve and clarify wording of recent commit in NEWS.

5 years agoUse XDG conventions more consistently
Paul Eggert [Tue, 27 Aug 2019 21:21:45 +0000 (14:21 -0700)]
Use XDG conventions more consistently

Fit in better with the XDG conventions.
Something like this was suggested in 2008 (Bug#583)
and the XDG conventions seem to have settled down by now.
* doc/emacs/custom.texi (Init File, Init Syntax, Find Init):
* doc/lispref/files.texi (Standard File Names):
* doc/lispref/os.texi (Init File):
* doc/misc/url.texi (Customization):
* etc/NEWS:
Adjust accordingly.
* lisp/startup.el (startup--load-user-init-file):
If init-file-name is nil, do not load from it; instead
just use the alt-file.
(find-init-path): Remove; no longer used.
(command-line): Don't check twice for XDG.
Look at XDG_CONFIG_HOME instead of assuming it's ~/.config.
Prefer XDG configuration if it exists; the user can disable
this by setting XDG_CONFIG_HOME to some other place.
* lisp/subr.el (user-emacs-directory):
Prefer XDG configuration if it exists.

5 years agoPort recent gnutls fixes to gcc -Wpointer-sign
Paul Eggert [Tue, 27 Aug 2019 21:19:38 +0000 (14:19 -0700)]
Port recent gnutls fixes to gcc -Wpointer-sign

* src/gnutls.c (Fgnutls_format_certificate):
Fix pointer signedness problem.

5 years agoBrowser-like Info-history button menu (bug#37184)
Juri Linkov [Tue, 27 Aug 2019 20:48:57 +0000 (23:48 +0300)]
Browser-like Info-history button menu (bug#37184)

* doc/misc/info.texi (Help-Int): Using tool-bar to navigate history.

* lisp/info.el (Info-history-menu): New function.
(Info-history-back-menu, Info-history-forward-menu): New commands.
(Info-mode-map): Bind Info-history-back-menu and
Info-history-forward-menu to tool-bar on C-key.

5 years agoDeactivate part of tramp--test-check-files on macOS (Bug#36940)
Michael Albinus [Tue, 27 Aug 2019 16:53:26 +0000 (18:53 +0200)]
Deactivate part of tramp--test-check-files on macOS (Bug#36940)

* test/lisp/net/tramp-tests.el (tramp--test-check-files): Do not
search for environment variables on macOS.  (Bug#36940)

5 years ago; Fix commentary of last change.
Eli Zaretskii [Tue, 27 Aug 2019 16:13:39 +0000 (19:13 +0300)]
; Fix commentary of last change.

5 years agoFix crashes on MS-Windows when using GnuTLS connections
Eli Zaretskii [Tue, 27 Aug 2019 15:47:24 +0000 (18:47 +0300)]
Fix crashes on MS-Windows when using GnuTLS connections

* src/gnutls.c (init_gnutls_functions) [WINDOWSNT]: Define and
load gnutls_free by an explicit call to GetProcAddress.
(gnutls_free) [WINDOWSNT]: Define as a macro that dereferences
a function pointer.  (Bug#31946)
(Fgnutls_format_certificate): Use make_string_from_bytes
instead of going through an intermediate malloc'ed buffer.

5 years agoFix filename completion in shell mode buffers
Alex Branham [Thu, 15 Aug 2019 16:02:38 +0000 (11:02 -0500)]
Fix filename completion in shell mode buffers

* lisp/shell.el (shell-dynamic-complete-functions): Move
pcomplete-completions-at-point down the list so that filename
completion has a chance to complete before pcompletion.

Fixes bug#34330

5 years ago* test/Makefile.in (test_template): Declare target FOO.log.
Michael Albinus [Tue, 27 Aug 2019 10:58:38 +0000 (12:58 +0200)]
* test/Makefile.in (test_template): Declare target FOO.log.

5 years agoFix completion in `read-library-name'
Lars Ingebrigtsen [Tue, 27 Aug 2019 07:46:28 +0000 (09:46 +0200)]
Fix completion in `read-library-name'

* lisp/emacs-lisp/find-func.el (read-library-name): Only list
.el/.el.gz files when completing (bug#36945).

5 years agoMake link widgets obey mouse-1-click-follows-link
Mauro Aranda [Tue, 27 Aug 2019 06:41:44 +0000 (08:41 +0200)]
Make link widgets obey mouse-1-click-follows-link

* lisp/wid-edit.el (widget-link-keymap): New variable, a keymap to use
inside a link widget.
('link widget): Restore the :follow-link property and add
widget-link-keymap as the :keymap property (bug#15682).

5 years agoAdapt recentf.el to the change in the Widget Library
Mauro Aranda [Tue, 27 Aug 2019 06:40:32 +0000 (08:40 +0200)]
Adapt recentf.el to the change in the Widget Library

* lisp/recentf.el (recentf-open-files-item): Stop overriding
:follow-link property of the link widgets, since now it should
work as expected (bug#15682).

5 years agoCreate push-button widgets instead of links in epa *Keys* buffer
Mauro Aranda [Tue, 27 Aug 2019 06:39:04 +0000 (08:39 +0200)]
Create push-button widgets instead of links in epa *Keys* buffer

* lisp/epa.el (epa--select-keys): Make OK and Cancel into buttons
(bug#15682).

5 years agoFix Tramp rounding of file sizes and inode numbers
Paul Eggert [Tue, 27 Aug 2019 01:57:56 +0000 (18:57 -0700)]
Fix Tramp rounding of file sizes and inode numbers

* lisp/net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-do-file-attributes-with-stat)
(tramp-do-directory-files-and-attributes-with-stat):
Format file sizes and inode numbers without trailing ".0",
to avoid rounding errors when absolute values exceed 2**53
(Bug#36940#94).  This fixes the problem for Emacs 27 and later,
and doesn't hurt in earlier Emacs.

5 years agoPrefer display-line-numbers over linum in docs and one defcustom
Stefan Kangas [Fri, 31 May 2019 23:40:11 +0000 (01:40 +0200)]
Prefer display-line-numbers over linum in docs and one defcustom

* doc/misc/efaq.texi: Replace linum with display-line-numbers.
* lisp/progmodes/prog-mode.el (prog-mode-hook): Replace linum-mode
with display-line-numbers-mode in :options.  (Bug#37120)

5 years ago* src/keyboard.c (parse_tool_bar_item): Use CAPTION when HELP is unavailable
Juri Linkov [Mon, 26 Aug 2019 22:38:19 +0000 (01:38 +0300)]
* src/keyboard.c (parse_tool_bar_item): Use CAPTION when HELP is unavailable

while adding equivalent key binding to the tooltip. (Bug#36156)

5 years agoFix crashes in networking with GnuTLS on MS-Windows
Eli Zaretskii [Mon, 26 Aug 2019 16:06:13 +0000 (19:06 +0300)]
Fix crashes in networking with GnuTLS on MS-Windows

* src/gnutls.c (init_gnutls_functions) [WINDOWSNT]: Define and
load gnutls_free.
(Fgnutls_format_certificate): Use gnutls_free instead of
xfree.  This prevents crashes on MS-Windows, since the memory
being released was allocated inside GnuTLS.  (Bug#31946)

5 years ago; Continued attempt to fix Bug#36940
Michael Albinus [Mon, 26 Aug 2019 14:14:16 +0000 (16:14 +0200)]
; Continued attempt to fix Bug#36940

* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Handle link number.
(tramp--test-check-files): Encode search string on macOS.  (Bug#36940)

5 years agoAllow finding gpg2 binaries when gpg2 has an "unknown" version string
Lars Ingebrigtsen [Mon, 26 Aug 2019 06:02:31 +0000 (08:02 +0200)]
Allow finding gpg2 binaries when gpg2 has an "unknown" version string

* lisp/epg-config.el (epg-find-configuration): Allow finding a
usable configuration even if the version string looks like "gpg
(GnuPG) 2.2.15-unknown" (bug#35629).

5 years agoOnly use --sender for gpg when gpg supports it
Teemu Likonen [Mon, 26 Aug 2019 05:52:54 +0000 (07:52 +0200)]
Only use --sender for gpg when gpg supports it

* lisp/epg-config.el (epg-required-version-p): New function (bug#37025).

* lisp/gnus/mml-sec.el (mml-secure-epg-sign):
* lisp/epg.el (epg-start-sign):
(epg-start-encrypt): Use it to only use --sender when the gpg
binary supports it.

5 years agoFix ede-proj-project class
Lars Ingebrigtsen [Mon, 26 Aug 2019 04:13:20 +0000 (06:13 +0200)]
Fix ede-proj-project class

* lisp/cedet/ede/proj.el (ede-proj-project): Make class inherit
from eieio-named to get object-name slot (bug#37181).

5 years agoFix bug with non-paletted transparent PNGs
Paul Eggert [Sun, 25 Aug 2019 23:35:43 +0000 (16:35 -0700)]
Fix bug with non-paletted transparent PNGs

Adapted from a fix by YAMAMOTO Mitsuharu (Bug#37153#77).
* src/image.c (png_load_body): Fix bug with non-paletted
transparent images.

5 years agoFix misdisplay of PNG paletted images
Paul Eggert [Sun, 25 Aug 2019 17:01:46 +0000 (10:01 -0700)]
Fix misdisplay of PNG paletted images

Problem reported by Roland Winkler (Bug#37153).
Derived from a patch suggested by YAMAMOTO Mitsuharu (Bug#37153#62).
* src/image.c (png_get_valid) [WINDOWSNT]:
Do not dynamically link this function.
(png_get_tRNS) [WINDOWSNT && PNG_tRNS_SUPPORTED]:
Dynamically link this function instead.
(png_load_body): Do not assume that every paletted image supplies
only transparency data.  Fix typo in use of transparent_p.

5 years agoFix a further part of Bug#36940
Michael Albinus [Sun, 25 Aug 2019 11:44:11 +0000 (13:44 +0200)]
Fix a further part of Bug#36940

* lisp/net/tramp-sh.el (tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-do-file-attributes-with-stat)
(tramp-do-directory-files-and-attributes-with-stat): Return size
and inode as floating number.  (Bug#36940).

5 years agoIntroduce new value t for compilation-context-lines to eliminate scrolling
Alan Mackenzie [Sun, 25 Aug 2019 10:21:37 +0000 (10:21 +0000)]
Introduce new value t for compilation-context-lines to eliminate scrolling

In particular, to prevent scrolling in a window lacking a left fringe.
Instead, a visible arrow "=>" is inserted before column zero.  This fixes
bug #36832.

* lisp/progmodes/compile.el (compilation-context-lines): Add the new value t.
(compilation-set-window): Amend to handle compilation-context-lines being t.
(overlay-arrow-overlay): New variable holding an overlay with before-string
property "=>".
(compilation-set-overlay-arrow): New function which manipulates
overlay-arrow-overlay.
(compilation-goto-locus, compilation-find-file): In addition to calling
compilation-set-window, also call compilation-set-overlay-arrow.

* doc/emacs/building.texi (Compilation Mode): Document the new value t which
compilation-context-lines can take.

* etc/NEWS: Add an entry for this change.

5 years agoFix minor problems in TUTORIAL.ru
Alex Ott [Sun, 25 Aug 2019 09:33:48 +0000 (11:33 +0200)]
Fix minor problems in TUTORIAL.ru

This fixes wording and avoids visiting the tutorial in
Ruby mode.

5 years agoFix a recent change in coding.c
Eli Zaretskii [Sun, 25 Aug 2019 08:08:11 +0000 (11:08 +0300)]
Fix a recent change in coding.c

This partially reverts the changes in "extern function cleanup".
* src/coding.c (encode_string_utf_8, decode_string_utf_8): Now
extern again.  They should NOT be static, as they are intended
to be used by the likes of json.c, where we need
highly-optimized code for processing UTF-8 strings.  E.g.,
decode_string_utf_8 beats make_string_from_utf8 by a factor of
2 to 5 in a large number of scenarios.

5 years ago; Improve a recent change.
Eli Zaretskii [Sun, 25 Aug 2019 07:10:01 +0000 (10:10 +0300)]
; Improve a recent change.

* src/frame.c (Fx_parse_geometry): Improve the comment about
non-initialization of some locals.

5 years agoUse ' instead of ` in NEWS
Lars Ingebrigtsen [Sun, 25 Aug 2019 06:12:17 +0000 (08:12 +0200)]
Use ' instead of ` in NEWS

5 years agoUse `autoconf-mode' for Autoconf .m4 files
Lars Ingebrigtsen [Sun, 25 Aug 2019 06:11:58 +0000 (08:11 +0200)]
Use `autoconf-mode' for Autoconf .m4 files

* lisp/files.el (auto-mode-alist): Use `autoconf-mode' (instead of
`m4-mode') for acinclude.m4/aclocal.m4/acsite.m4 files (bug#37133).

5 years agoThe `gnus*-1' functions shouldn't be interactive
Alex Branham [Sun, 25 Aug 2019 06:05:48 +0000 (08:05 +0200)]
The `gnus*-1' functions shouldn't be interactive

* lisp/gnus/gnus-start.el (gnus-no-server-1): This function
shouldn't be interactive (bug#37022).
(gnus-1): Ditto.

5 years agoDisallow just hitting RET in gnus-mime-replace-part
Lars Ingebrigtsen [Sun, 25 Aug 2019 05:57:30 +0000 (07:57 +0200)]
Disallow just hitting RET in gnus-mime-replace-part

* lisp/gnus/gnus-art.el (gnus-mime-replace-part): Don't replace
the part if the file to replace it with doesn't exist (bug#36864).