]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agomessage uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)
Juri Linkov [Tue, 26 Nov 2019 23:43:49 +0000 (01:43 +0200)]
message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)

* doc/lispref/display.texi (Displaying Messages): Explain the
behavior of using minibuffer-message if the minibuffer is active.

* src/editfns.c (Fmessage_in_echo_area): New function with body
copied from Fmessage.
(Fmessage): Call minibuffer-message in the active minibuffer,
otherwise call Fmessage_in_echo_area.
(message-in-echo-area): New variable.

* lisp/isearch.el (isearch--momentary-message, isearch-message):
* lisp/minibuffer.el (minibuffer-message, minibuffer-completion-help):
Use 'message-in-echo-area' instead of 'message' where necessary.

* lisp/autorevert.el (auto-revert-handler):
* lisp/man.el (Man-bgproc-sentinel):
* lisp/subr.el (do-after-load-evaluation):
Revert recent changes that replaced 'message' with 'minibuffer-message'.
This is not needed anymore since 'message' uses 'minibuffer-message'
in the active minibuffer.

4 years agoAllow recursive minibuffers for yes-or-no-p and y-or-n-p (bug#17272 bug#19064)
Juri Linkov [Tue, 26 Nov 2019 23:18:17 +0000 (01:18 +0200)]
Allow recursive minibuffers for yes-or-no-p and y-or-n-p (bug#17272 bug#19064)

* lisp/subr.el (y-or-n-p): Let-bind enable-recursive-minibuffers to t.

* src/fns.c (Fyes_or_no_p): Specbind Qenable_recursive_minibuffers to Qt.

4 years ago* lisp/tab-bar.el (display-buffer-in-tab): New function (bug#38354)
Juri Linkov [Tue, 26 Nov 2019 22:29:31 +0000 (00:29 +0200)]
* lisp/tab-bar.el (display-buffer-in-tab): New function (bug#38354)

4 years agoetags: remove some arbitrary limits
Paul Eggert [Tue, 26 Nov 2019 21:53:41 +0000 (13:53 -0800)]
etags: remove some arbitrary limits

etags had undefined behavior if input files, lines, tags, etc.,
had more than INT_MAX bytes.  Clean up the usage of integer types
to fix the overflow errors I found.
* admin/merge-gnulib (GNULIB_MODULES): Add mempcpy.
* lib-src/etags.c: Include inttypes.h, intprops.h.
(memcpyz): New function.  Use it to simplify several occurrences
of memcpy followed by storing a trailing '\0'.
(xnew): Use xnmalloc, to catch overflow on integer multiplication.
(xrnew): Change last arg to multiplier.  The type is not needed.
All callers changed.
(node, lineno, charno, linecharno, invalidcharno, make_tag):
(pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets)
(readline):
Use intmax_t for line numbers and character positions, instead of
int or long.
(linebuffer, make_tag, pfnote, total_size_of_entries, put_entry)
(in_word_set, C_symtype, token, cstack, pushclass_above):
(popclass_above, write_classname, consider_token, C_entries)
(Ruby_functions, Makefile_targets, Lua_functions, TeX_commands)
(TeX_decode_env, erlang_func, erlang_attribute, erlang_atom)
(substitute, regex_tag_multiline, nocase_tail, readline_interval)
(readline, savenstr, concat, etags_getcwd, relative_filename)
(linebuffer_setlen):
Use ptrdiff_t for object sizes, instead of int or long or unsigned
or size_t.
(write_classname, C_entries):
Avoid sprintf, as the result could exceed INT_MAX bytes
and then behavior goes haywire.
(main): Use int, instead of unsigned, for argv counts.
(get_language_from_filename): Use bool for boolean.
(Ruby_functions): Prefer strcpy to memcpy when copying "=".
(linebuffer_setlen): Use ‘if’ instead of ‘while’.
(memory_full, xnmalloc, xnrealloc): New functions.
(xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t.
(xrealloc): Remove; no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.

4 years agoFix previous change to (next|previous)-buffer
Juanma Barranquero [Tue, 26 Nov 2019 21:35:04 +0000 (22:35 +0100)]
Fix previous change to (next|previous)-buffer

* lisp/window.el (next-buffer, previous-buffer): If no other
buffer is available, signal 'user-error' only when called
interactively.

4 years agoUpdate from Gnulib
Paul Eggert [Tue, 26 Nov 2019 21:14:42 +0000 (13:14 -0800)]
Update from Gnulib

This incorporates:
2019-11-24 Fix errors in C++ mode on mingw
2019-11-24 time_r: Fix for mingw (regression from 2019-11-16)
2019-11-24 sys_time: Fix errors in C++ mode on mingw
2019-11-22 intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
2019-11-21 Disable many _GL_CXXALIASWARN on non-glibc
2019-11-21 Fix various errors in _GL_CXXALIAS_SYS invocations
2019-11-19 intprops: INT_MULTIPLY_WRAPV speedup for GCC 9.3+
2019-11-18 stdint: Define [u]intptr_t correctly on 64-bit native Windows
2019-11-18 stdint: Fix value of WINT_MAX when we override wint_t
2019-11-18 stdint: Avoid "conflicting types" error on mingw 5.22
2019-11-16 time_r: Fix for mingw
2019-11-06 regex: now back in sync with glibc
* lib/intprops.h, lib/regexec.c, lib/signal.in.h:
* lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, lib/sys_select.in.h, lib/sys_time.in.h:
* lib/time.in.h, lib/unistd.in.h, m4/time_r.m4:
Copy from Gnulib.

4 years ago* lisp/subr.el (do-after-load-evaluation): Handle batch mode as well
Stefan Monnier [Tue, 26 Nov 2019 18:58:39 +0000 (13:58 -0500)]
* lisp/subr.el (do-after-load-evaluation): Handle batch mode as well

4 years agoUse 127.0.0.1 in nsm-tests
Robert Pluim [Tue, 26 Nov 2019 18:07:42 +0000 (19:07 +0100)]
Use 127.0.0.1 in nsm-tests

Winsock doesn't like "127.1"

* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv4): Spell
numeric localhost as "127.0.0.1" instead of "127.1".

4 years ago* test/lisp/minibuffer-tests.el (completion-table-test-quoting): New test
Stefan Monnier [Tue, 26 Nov 2019 18:18:18 +0000 (13:18 -0500)]
* test/lisp/minibuffer-tests.el (completion-table-test-quoting): New test

* test/data/minibuffer-test-cttq$tion: New file-name test data.

4 years agoSupport ':extend' in faces defined by list of key/value pairs
Eli Zaretskii [Tue, 26 Nov 2019 17:29:45 +0000 (19:29 +0200)]
Support ':extend' in faces defined by list of key/value pairs

* src/xfaces.c: Update and improve commentary at the beginning
of the file.
(face_attr_sym): New static array.
(init_xfaces): Initialize 'face_attr_sym'.
(merge_face_ref): Handle the :extend attribute in faces
specified as lists of key/value pairs.  (Bug#37774)

4 years agoFix MS-Windows build with mingw.org's MinGW
Eli Zaretskii [Tue, 26 Nov 2019 17:13:12 +0000 (19:13 +0200)]
Fix MS-Windows build with mingw.org's MinGW

mingw.org's MinGW by default targets Windows 9X, so
_WIN32_WINNT is set to a value that bypasses declarations
in system headers we need to compile network_interface_list.
Also, the code needed a workaround for Windows XP, where
some functionality is missing from the GetAdaptersAddresses
API.

* src/w32.c (_WIN32_WINNT): Define to 0x0501, if the value is
lower, temporarily while processing iphlpapi.h.
(address_prefix_match): New helper function.
(network_interface_list): Work around the fact that the
OnLinkPrefixLength member of IP_ADAPTER_UNICAST_ADDRESS is not
available when _WIN32_WINNT < 0x0600.  On Windows XP use
special code that calls address_prefix_match to compute the
network prefix length.

4 years ago* lisp/progmodes/asm-mode.el (asm-mode-map): Obey electric-indent-mode
Stefan Monnier [Tue, 26 Nov 2019 14:04:12 +0000 (09:04 -0500)]
* lisp/progmodes/asm-mode.el (asm-mode-map): Obey electric-indent-mode

4 years ago(next|previous)-buffer no longer fail silently (bug#38384)
Juanma Barranquero [Tue, 26 Nov 2019 14:03:57 +0000 (15:03 +0100)]
(next|previous)-buffer no longer fail silently (bug#38384)

* lisp/window.el (next-buffer, previous-buffer):
Signal 'user-error' if there is no buffer to switch to.

* etc/NEWS: Document it.

4 years agolisp/auth-source.el: Depend on cl-lib unconditionally
Juanma Barranquero [Tue, 26 Nov 2019 13:00:25 +0000 (14:00 +0100)]
lisp/auth-source.el: Depend on cl-lib unconditionally

A change in 2016-04-24 introduced a run-time dependency on cl-subseq.

4 years agolisp/auth-source-pass.el: Require cl-lib unconditionally
Juanma Barranquero [Tue, 26 Nov 2019 11:55:29 +0000 (12:55 +0100)]
lisp/auth-source-pass.el: Require cl-lib unconditionally

Changes in 2019-05-05 and 2019-05-14 introduced run-time dependencies
on cl-maplist and cl-remove-if-not.

4 years ago2019-11-26 Martin Rudalics <rudalics@gmx.at>
Martin Rudalics [Tue, 26 Nov 2019 09:13:12 +0000 (10:13 +0100)]
2019-11-26  Martin Rudalics  <rudalics@gmx.at>

* lisp/window.el (switch-to-visible-buffer): Declare obsolete.
(switch-to-prev-buffer-skip): New option.
(switch-to-prev-buffer, switch-to-next-buffer): Obey
'switch-to-prev-buffer-skip'.
* doc/lispref/windows.texi (Window History): Remove
description of 'switch-to-visible-buffer'.  Describe new
option 'switch-to-prev-buffer-skip'
* etc/NEWS: Mention switch from 'switch-to-visible-buffer' to
'switch-to-prev-buffer-skip'.

4 years agoFix auth-source password lookup
Alex Murray [Mon, 25 Nov 2019 11:48:07 +0000 (22:18 +1030)]
Fix auth-source password lookup

* lisp/net/network-stream.el
(network-stream-certificate): Ensure :port is specified as a string to
'auth-source-search' (Bug#38371).

Copyright-paperwork-exempt: yes

4 years agoExtend network-interface-list to return IPv6 and network info
Robert Pluim [Fri, 15 Nov 2019 10:11:30 +0000 (11:11 +0100)]
Extend network-interface-list to return IPv6 and network info

Bug#38218

* src/process.c (Fnetwork_interface_list): Extend argument list to
allow requesting full network info and/or IPv4/IPv6 info.
(network_interface_list) [HAVE_GETIFADDRS]: Use getifaddrs to retrieve
interface IP addresses.

* src/process.h: Update prototype of network_interface_list.

* src/w32.c (g_b_init_get_adapters_addresses): New init flag.
(globals_of_w32): Initialize it.
(GetAdaptersAddresses_Proc): New function typedef.
(get_adapters_addresses): New wrapper function.
(init_winsock): Load htonl and ntohl.
(sys_htonl, sys_ntohl): New wrapper functions.
(network_interface_list): Implement in terms of
get_adapters_addresses.

* nt/inc/sys/socket.h: Add sys_htonl and sys_ntohl prototypes.

* etc/NEWS: Announce IPv4/IPv6 changes in network-interface-list.

* doc/lispref/processes.texi (Misc Network): Document updated arglist
and return values for network-interface-list.

4 years agoFix previous message.el point-restoring fix
Lars Ingebrigtsen [Tue, 26 Nov 2019 01:40:59 +0000 (02:40 +0100)]
Fix previous message.el point-restoring fix

* lisp/gnus/message.el (message-send-and-exit): Restore window
point before burying buffer so we actually bury the buffer.

4 years agoRemove outdated documentation
Lars Ingebrigtsen [Tue, 26 Nov 2019 01:36:11 +0000 (02:36 +0100)]
Remove outdated documentation

* doc/misc/eieio.texi (Predicates): Remove documentation of
same-class-fast-p, which was removed some years back (bug#38362).

4 years agoFix test failures of test/lisp/auth-source-pass-tests.el
João Távora [Mon, 25 Nov 2019 22:45:24 +0000 (22:45 +0000)]
Fix test failures of test/lisp/auth-source-pass-tests.el

Failures introduced by recent "Make auth-source-pass-search understand
port lists", commit 92fda5a7f92162d610d57df14372bcfcee1f01b6.

* lisp/auth-source-pass.el
(auth-source-pass--generate-entry-suffixes): Fix test failures.

4 years ago; * etc/NEWS: Elaborate the entry about ':extend' face attribute.
Eli Zaretskii [Mon, 25 Nov 2019 18:58:40 +0000 (20:58 +0200)]
; * etc/NEWS: Elaborate the entry about ':extend' face attribute.

4 years agoCorrect small misprint in defcustom's docstring
Filipp Gunbin [Mon, 25 Nov 2019 18:12:46 +0000 (21:12 +0300)]
Correct small misprint in defcustom's docstring

* lisp/custom.el (defcustom): Correct misprint in docstring.

4 years agoFix face merging when some have :extend non-nil and some are inherited
Eli Zaretskii [Mon, 25 Nov 2019 15:52:24 +0000 (17:52 +0200)]
Fix face merging when some have :extend non-nil and some are inherited

* src/xfaces.c (face_inherited_attr): New function.
(merge_named_face): Call 'face_inherited_attr' when testing
whether a face that inherits from another fits the filtering
criteria specified by ATTR_FILTER.
(merge_face_vectors): Revert the changes made in this function
for filtering by ATTR_FILTER, and remove that argument as
well.  These tests are now completely done by the caller, see
'merge_named_face'.  (Bug#37774)

4 years agoHandle auth-source-search failures in open-network-stream
Robert Pluim [Sun, 17 Nov 2019 20:21:48 +0000 (21:21 +0100)]
Handle auth-source-search failures in open-network-stream

If the user cancels the gpg decryption pop-up, auth-source-search
fails *and* epa pops up an error buffer.  Fix epa to allow suppressing
that, and ignore errors returned from auth-source-search.

* lisp/epa.el (epa-suppress-error-buffer): New defvar.  Bind non-nil
to stop epa popping up an error buffer.

* lisp/net/network-stream.el: require epa when byte-compiling.
(network-stream-certificate): ignore errors when calling
auth-source-search, and suppress the epa error buffer.

4 years agoAdd eassert check for bad default face
Paul Eggert [Sat, 23 Nov 2019 23:47:28 +0000 (15:47 -0800)]
Add eassert check for bad default face

* src/xdisp.c (append_space_for_newline): Add an eassert check
that default_face is not null, by calling FACE_FROM_ID instead of
FACE_FROM_ID_OR_NULL.  Initialize a local only if needed.

4 years agoPort gnutls.c to --enable-gcc-warnings --without-gnutls
Paul Eggert [Sat, 23 Nov 2019 23:28:45 +0000 (15:28 -0800)]
Port gnutls.c to --enable-gcc-warnings --without-gnutls

* src/gnutls.c: Move the "#ifdef HAVE_GNUTLS" earlier, so
that "./configure --enable-gcc-warnings --without-gnutls"
does not complain about macros being defined but never used.
Indent "#" directives more consistently.

4 years agoRework previous fix to bug#38222
Juanma Barranquero [Sat, 23 Nov 2019 22:32:33 +0000 (23:32 +0100)]
Rework previous fix to bug#38222

* lisp/help.el (help--doc-without-fn): Remove.
(describe-mode): Use help-split-fundoc instead.

4 years agoMake help-split-fundoc more flexible about what returns
Juanma Barranquero [Sat, 23 Nov 2019 22:29:53 +0000 (23:29 +0100)]
Make help-split-fundoc more flexible about what returns

* lisp/help.el (help-split-fundoc): New arg SECTION to return
only the usage or doc parts of the docstring, or both even if
there is no usage.

* test/lisp/help-tests.el: New file.

4 years agoUse new macro debounce-reduce to make mouse scaling of images more responsive
Juri Linkov [Sat, 23 Nov 2019 22:22:46 +0000 (00:22 +0200)]
Use new macro debounce-reduce to make mouse scaling of images more responsive

* lisp/emacs-lisp/timer.el (debounce, debounce-reduce): New macros.

* lisp/image.el (image-increase-size, image-decrease-size):
Use funcall to call image--change-size-function.
(image--change-size-function): Move code from defun of
image--change-size to defvar that has the value of lambda
returned from debounce-reduce.  (Bug#38187)

4 years agoDefault network-stream-use-client-certificates to nil
Robert Pluim [Mon, 18 Nov 2019 09:48:29 +0000 (10:48 +0100)]
Default network-stream-use-client-certificates to nil

* lisp/net/network-stream.el (network-stream-use-client-certificates):
Default to nil.
(open-network-stream): Adapt description to new default of
network-stream-use-client-certificates.

* etc/NEWS: network-stream-use-client-certificates defaults to nil
now.

* doc/lispref/processes.texi (Network): Flip
network-stream-use-client-certificates description.

* doc/misc/auth.texi (Help for users): Mention
network-stream-use-client-certificates.

4 years agoHave what-cursor-position optionally show character name
Robert Pluim [Tue, 19 Nov 2019 10:33:10 +0000 (11:33 +0100)]
Have what-cursor-position optionally show character name

* lisp/simple.el (what-cursor-show-names): New defcustom, default nil.
(what-cursor-position): Show character names if what-cursor-show-names
is non-nil.

* doc/emacs/basic.texi (Position Info): Add what-cursor-show-names
description.

* etc/NEWS: Announce what-cursor-show-names.

4 years agoAlways expand "total" in dired
Christopher Schmidt [Sat, 23 Nov 2019 14:45:56 +0000 (15:45 +0100)]
Always expand "total" in dired

* lisp/files.el (insert-directory): Always replace "total" with
"total used in directory", even when we don't have free disk space
(bug#13191).  This makes the display more consistent.

4 years agoFix edebug instrumentation removing from advised functions
Michael Heerdegen [Thu, 14 Nov 2019 16:47:51 +0000 (17:47 +0100)]
Fix edebug instrumentation removing from advised functions

* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Handle
advised functions correctly.

4 years agoImprove indexing of modifier keys
Eli Zaretskii [Sat, 23 Nov 2019 11:37:28 +0000 (13:37 +0200)]
Improve indexing of modifier keys

* doc/emacs/commands.texi (User Input): Add index entry for
the Alt key serving as Meta.
* doc/emacs/custom.texi (Modifier Keys): Add index entries for
Alt, Super, and Hyper modifier keys.  (Bug#38315)

4 years agoFix cursor display at EOL before extended face
Eli Zaretskii [Sat, 23 Nov 2019 10:43:49 +0000 (12:43 +0200)]
Fix cursor display at EOL before extended face

* src/xdisp.c (extend_face_to_end_of_line): Make sure the
character position of the stretch glyph inserted to extend the
face is zero, as various other parts of the display code rely
on that.  (Bug#38330)

4 years agoFix and speed up en/decoding of UTF-8 strings
Eli Zaretskii [Sat, 23 Nov 2019 09:27:43 +0000 (11:27 +0200)]
Fix and speed up en/decoding of UTF-8 strings

* src/coding.c (get_char_bytes, encode_string_utf_8)
(decode_string_utf_8): Fix commentary.
(encode_string_utf_8): Return the original ASCII string only
if NOCOPY is non-zero.
(decode_string_utf_8): Accept 2 additional arguments STR and
STR_LEN, which allow to pass the input text as a C string.
(make_string_from_utf8): Delegate the job to decode_string_utf_8.
* src/coding.h: Update the prototype of decode_string_utf_8.
* src/json.c (json_encode): Call encode_string_utf_8.

4 years ago* lisp/minibuffer.el (completion-flex-nospace): Default to t.
João Távora [Sat, 23 Nov 2019 00:30:49 +0000 (00:30 +0000)]
* lisp/minibuffer.el (completion-flex-nospace): Default to t.

4 years agohelp-follow-symbol now complains if no symbol found (bug#38248)
Juanma Barranquero [Fri, 22 Nov 2019 20:10:49 +0000 (21:10 +0100)]
help-follow-symbol now complains if no symbol found (bug#38248)

* lisp/help-mode.el (help-follow-symbol): Signal 'user-error' if
there's no symbol at POS.

* etc/NEWS: Document it.

4 years agoCheck gnus-mailing-list-groups in turn-on-gnus-mailing-list-mode
Filipp Gunbin [Fri, 22 Nov 2019 17:49:02 +0000 (20:49 +0300)]
Check gnus-mailing-list-groups in turn-on-gnus-mailing-list-mode

* lisp/gnus/gnus-ml.el (turn-on-gnus-mailing-list-mode): Check also
gnus-mailing-list-groups variable.

4 years agoMake gnus-mailing-list-archive recognize https
Filipp Gunbin [Fri, 22 Nov 2019 17:37:27 +0000 (20:37 +0300)]
Make gnus-mailing-list-archive recognize https

* /lisp/gnus/gnus-ml.el (gnus-mailing-list-archive): Accept https in
regexp.

4 years agoUnify docstrings of Gnus summary's copy/move/crosspost article functions
Filipp Gunbin [Fri, 22 Nov 2019 16:23:51 +0000 (19:23 +0300)]
Unify docstrings of Gnus summary's copy/move/crosspost article functions

* lisp/gnus/gnus-sum.el (gnus-summary-copy-article)
(gnus-summary-crosspost-article): Make docstrings refer to
gnus-summary-move-article.

4 years agoRefix conditional step clauses in cl-loop
dickmao [Fri, 22 Nov 2019 14:53:58 +0000 (15:53 +0100)]
Refix conditional step clauses in cl-loop

* lisp/emacs-lisp/cl-macs.el
(cl--loop-bindings, cl--loop-symbol-macs, cl-loop):
Add cl--loop-conditions, remove cl--loop-guard-cond.
(cl--push-clause-loop-body): Apply clause to both cl--loop-conditions
and cl--loop-body
(cl--parse-loop-clause): Use cl--push-clause-loop-body.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-and-assignment):
Use docstring.
(cl-macs-loop-for-as-arith): Removed expected failure.
(cl-macs-loop-conditional-step-clauses): Add some tests (bug#29799).

4 years agoFix uses of inhibit-message in package.el
Eli Zaretskii [Fri, 22 Nov 2019 14:36:25 +0000 (16:36 +0200)]
Fix uses of inhibit-message in package.el

* lisp/emacs-lisp/package.el (package-generate-autoloads)
(package--compile, package--save-selected-packages): Don't use
'inhibit-message' to bind 'noninteractive' and 'save-silently',
since 'inhibit-message' already disables all messages.
(Bug#38264)

4 years agofont-lock special attributes in python-mode
Hong Xu [Fri, 22 Nov 2019 13:34:59 +0000 (14:34 +0100)]
font-lock special attributes in python-mode

* lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
special attributes (bug#38318).

4 years agoGive better error messages in image-convert
Lars Ingebrigtsen [Fri, 22 Nov 2019 12:15:41 +0000 (13:15 +0100)]
Give better error messages in image-convert

* lisp/image/image-converter.el (image-convert): Make
image-convert bug out earlier on a wrong IMAGE-FORMAT value
(bug#38310).

4 years agoMake auth-source-pass-search understand port lists
João Távora [Wed, 20 Nov 2019 00:11:00 +0000 (00:11 +0000)]
Make auth-source-pass-search understand port lists

For cases such as a typical IMAP Gnus setup, auto-source-pass-search
is passed a list of "port aliases" like (993 "imaps" "imap" "993"
"143") in hopes of finding a matching ~/.password-store entry.

This modification makes this library understand and unroll the port
list so that, i.e. "domain:993", "domain:imaps"", "domain:imap",
etc. are computed as potential suffixes.  Previously a nonsensical
string "domain:(993 imaps imap ...)" was returned.

* lisp/auth-source-pass.el
(auth-source-pass--generate-entry-suffixes): Allow PORT to be a list
of ports.

4 years ago* lisp/emacs-lisp/smie.el (smie-next-sexp): Fix bug#38255
Stefan Monnier [Thu, 21 Nov 2019 23:24:37 +0000 (18:24 -0500)]
* lisp/emacs-lisp/smie.el (smie-next-sexp): Fix bug#38255

Handle the case where the token is not in `smie-grammar`, either because
the caller is making an error, or because it's a paren-like token that's
not handled in the grammar but directly via the syntax tables.

4 years agoMake `C-c C-w' insert a signature even when overridden
Lars Ingebrigtsen [Thu, 21 Nov 2019 23:19:43 +0000 (00:19 +0100)]
Make `C-c C-w' insert a signature even when overridden

* lisp/gnus/message.el (message-insert-signature): When called
interactively, look harder for a signature to insert (bug#38289).

4 years ago* lisp/minibuffer.el (completions-common-part): Make it blue when possible
Stefan Monnier [Thu, 21 Nov 2019 22:53:02 +0000 (17:53 -0500)]
* lisp/minibuffer.el (completions-common-part): Make it blue when possible

4 years ago* lisp/files.el (locate-file-completion-table): Fix typo
Stefan Monnier [Thu, 21 Nov 2019 22:39:38 +0000 (17:39 -0500)]
* lisp/files.el (locate-file-completion-table): Fix typo

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Thierry Volpiatto [Thu, 21 Nov 2019 20:01:53 +0000 (21:01 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years agoAdd new variable to prevent flex completion style
Thierry Volpiatto [Thu, 21 Nov 2019 19:41:19 +0000 (20:41 +0100)]
Add new variable to prevent flex completion style

matching spaces.  This allows flex style working smoothly with other
styles like helm using spaces.

* lisp/minibuffer.el (completion-flex-nospace): New user var.
(completion-flex-try-completion): Use it.
(completion-flex-all-completions): Same.

4 years agoWhen verilog-auto-ignore-concat is true, also ignore parenthesized signals.
Wilson Snyder [Thu, 21 Nov 2019 19:38:09 +0000 (14:38 -0500)]
When verilog-auto-ignore-concat is true, also ignore parenthesized signals.

* lisp/progmodes/verilog-mode.el (verilog-auto-ignore-concat): When
`verilog-auto-ignore-concat' is true, also ignore parenthesized
signals.

4 years agoFix Gnus summary backtab keybindings to use button-based functions
Eric Abrahamsen [Thu, 21 Nov 2019 18:08:41 +0000 (10:08 -0800)]
Fix Gnus summary backtab keybindings to use button-based functions

* lisp/gnus/gnus-sum.el (gnus-summary-mode-map,
  gnus-summary-article-map): Backtab should call
  gnus-summary-button-backward, not gnus-summary-widget-backward.

4 years agoFix file notifications on macOS
Eli Zaretskii [Thu, 21 Nov 2019 14:39:15 +0000 (16:39 +0200)]
Fix file notifications on macOS

* src/kqueue.c (Fkqueue_add_watch): Don't use encoded file
names in objects and APIs that expect decoded multibyte
strings.  (Bug#38287)

4 years agoFix a recent change in ELisp manual
Eli Zaretskii [Thu, 21 Nov 2019 14:35:58 +0000 (16:35 +0200)]
Fix a recent change in ELisp manual

* doc/lispref/objects.texi (Special Read Syntax): Fix wording
of the last change: don't document #' twice.  (Bug#38278)

4 years agoSupport 'vc-region-history' for Mercurial
Eli Zaretskii [Thu, 21 Nov 2019 14:07:19 +0000 (16:07 +0200)]
Support 'vc-region-history' for Mercurial

* lisp/vc/vc-hg.el (vc-hg-region-history)
(vc-hg-region-history-font-lock, vc-hg-region-history-mode):
New functions.
(vc-hg-region-history-mode-map)
(vc-hg--log-view-long-font-lock-keywords)
(vc-hg-region-history-font-lock-keywords): New variables.
* lisp/vc/vc-git.el (vc-git-region-history): Update commentary.

* doc/emacs/maintaining.texi (VC Change Log): Add
'vc-region-history' to the table at beginning of node.  Update
the VCSes that support 'vc-region-history'.

* etc/NEWS: Mention the new feature of vc-hg.el.

4 years agoFix up previous #' documentation addition
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:58:45 +0000 (14:58 +0100)]
Fix up previous #' documentation addition

* doc/lispref/objects.texi (Special Read Syntax): Add an xref for
the #' (bug#38278).

4 years agoDocument the #' syntax
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:55:34 +0000 (14:55 +0100)]
Document the #' syntax

* doc/lispref/objects.texi (Special Read Syntax): Document the #'
syntax (bug#38278).

4 years agoRestore point after sending a message
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:32:56 +0000 (14:32 +0100)]
Restore point after sending a message

* lisp/gnus/message.el (message-send-and-exit): Restore point
after sending (bug#38303).

4 years agoMake pp-buffer into a command
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:09:32 +0000 (14:09 +0100)]
Make pp-buffer into a command

* lisp/emacs-lisp/pp.el (pp-buffer): Make into a command (bug#38306).

4 years agoFix loading image-converter in the case where the type is passed in
Lars Ingebrigtsen [Thu, 21 Nov 2019 13:02:00 +0000 (14:02 +0100)]
Fix loading image-converter in the case where the type is passed in

* lisp/image.el (create-image): Load image-converter when
converting images (bug#38310).

4 years agoRewrite the image-convert doc string
Lars Ingebrigtsen [Thu, 21 Nov 2019 12:59:37 +0000 (13:59 +0100)]
Rewrite the image-convert doc string

* lisp/image/image-converter.el (image-convert): Clarify the
calling convention (bug#38310).

4 years agoHide quoted passwords with spaces in Authinfo
Dario Gjorgjevski [Thu, 21 Nov 2019 12:51:55 +0000 (13:51 +0100)]
Hide quoted passwords with spaces in Authinfo

* lisp/auth-source.el (auth-source-netrc-looking-at-one): New
function, extracted from auth-source-netrc-parse-one.
(auth-source-netrc-parse-one, authinfo--hide-passwords): Use
auth-source-netrc-looking-at-one (bug#38311).

4 years ago* lisp/net/tramp.el (tramp-unload-tramp): Do not enable ange-ftp. (Bug#38025)
Michael Albinus [Thu, 21 Nov 2019 09:35:14 +0000 (10:35 +0100)]
* lisp/net/tramp.el (tramp-unload-tramp): Do not enable ange-ftp.  (Bug#38025)

4 years ago* lisp/image.el: Mouse-wheel scaling on images (bug#38187)
Juri Linkov [Wed, 20 Nov 2019 22:59:49 +0000 (00:59 +0200)]
* lisp/image.el: Mouse-wheel scaling on images (bug#38187)

* lisp/image.el (image-mouse-increase-size)
(image-mouse-decrease-size): New commands.
(image-map): Bind C-wheel-down and C-mouse-5 to
image-mouse-decrease-size, C-wheel-up and C-mouse-4 to
image-mouse-increase-size.

4 years ago* src/sysdep.c: Improve comment wording.
Paul Eggert [Wed, 20 Nov 2019 19:57:17 +0000 (11:57 -0800)]
* src/sysdep.c: Improve comment wording.

4 years ago* etc/NEWS: Improve XDG_RUNTIME_DIR doc.
Paul Eggert [Wed, 20 Nov 2019 19:28:32 +0000 (11:28 -0800)]
* etc/NEWS: Improve XDG_RUNTIME_DIR doc.

4 years agoAdd renaming of remote buffer file names to Tramp
Michael Albinus [Wed, 20 Nov 2019 12:45:30 +0000 (13:45 +0100)]
Add renaming of remote buffer file names to Tramp

* doc/misc/tramp.texi (Default User): Fix typo.
(Cleanup remote connections): Adapt arguments of
`tramp-cleanup-connection'.
(Renaming remote files): New node.
(Frequently Asked Questions): New item "How to save files when a
remote host isn't reachable anymore?".

* etc/NEWS: Add `tramp-rename-files' and `tramp-rename-these-files'.

* lisp/net/tramp-cmds.el (tramp-default-rename-alist)
(tramp-confirm-rename-file-names): New defcustoms.
(tramp-rename-read-file-name-dir)
(tramp-rename-read-file-name-init): New defsubsts.
(tramp-default-rename-file, tramp-rename-files)
(tramp-rename-these-files): New defuns.

* lisp/net/tramp-integration.el (ido, ivy): Integrate with them.

4 years agoMake with-suppressed-warnings work for macros, too
Lars Ingebrigtsen [Wed, 20 Nov 2019 11:28:37 +0000 (12:28 +0100)]
Make with-suppressed-warnings work for macros, too

* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Pass the
macro/alias symbol on to byte-compile-warning-enabled-p so that
with-suppressed-warnings works for macros, too.

4 years agoRemove info references to gmane web search
Robert Pluim [Wed, 20 Nov 2019 10:55:42 +0000 (11:55 +0100)]
Remove info references to gmane web search

* doc/misc/gnus.texi (Foreign Groups, Web Searches, What is nnir?):
(Setting up nnir, Associating Engines, The imap Engine):
(Customizations): Remove references to gmane web search.

4 years agoExpand coverage of unit tests for time-stamp
Stephen Gildea [Wed, 20 Nov 2019 05:26:09 +0000 (21:26 -0800)]
Expand coverage of unit tests for time-stamp

* test/lisp/time-stamp-tests.el: Remove redundant word "test"
from the names of all the tests.
(time-stamp-custom-time-zone, time-stamp-custom-pattern,
time-stamp-custom-inserts-lines, time-stamp-custom-count,
time-stamp-helper-safe-locals): New tests

4 years agoMake .pdmp file more reproducible
Paul Eggert [Wed, 20 Nov 2019 02:23:01 +0000 (18:23 -0800)]
Make .pdmp file more reproducible

Problem reported by Ulrich Müller
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00757.html>
and diagnosed by Andreas Schwab
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00774.html>.
* src/sysdep.c (maybe_disable_address_randomization):
Disable ASLR if any kind of dumping, instead of merely if
unexec dumping.  Omit first arg for simplicity; all uses changed.

4 years ago* lisp/icomplete.el (icomplete-fido-kill): Unbreak yes-or-no-p usage
João Távora [Tue, 19 Nov 2019 23:53:10 +0000 (23:53 +0000)]
* lisp/icomplete.el (icomplete-fido-kill): Unbreak yes-or-no-p usage

Discussed in the context of bug#19064, bug#17272.

4 years agoEnsure Rmail summary is updated after editing a message
Eli Zaretskii [Tue, 19 Nov 2019 15:59:02 +0000 (17:59 +0200)]
Ensure Rmail summary is updated after editing a message

* lisp/mail/rmailedit.el (rmail-cease-edit): If this mbox file
has a summary, update the summary after editing.  (Bug#38193)

4 years agoFix updating members of zip archives
Eli Zaretskii [Tue, 19 Nov 2019 15:48:55 +0000 (17:48 +0200)]
Fix updating members of zip archives

* lisp/arc-mode.el (archive-zip-case-fiddle): Change the
default to nil except on MS-DOS.  Update the doc string to
make clear that a non-nil value also affects updating the
archive.  (Bug#38260)

4 years ago; Fix NEWS entry for network-lookup-address-info
Robert Pluim [Tue, 19 Nov 2019 14:28:36 +0000 (15:28 +0100)]
; Fix NEWS entry for network-lookup-address-info

4 years agoRemember the full GTK font description
Robert Pluim [Mon, 18 Nov 2019 09:18:25 +0000 (10:18 +0100)]
Remember the full GTK font description

Remember the full font description instead of just the family so that
size/style/weight settings are preserved.

* gtkutil.c (xg_get_font) [HAVE_GTK3]: Use the pango font
description to set/get the current font (Bug#28901).

4 years agoDon't error when comparing IPv4 and IPv6 addresses
Robert Pluim [Mon, 18 Nov 2019 09:57:55 +0000 (10:57 +0100)]
Don't error when comparing IPv4 and IPv6 addresses

* lisp/net/nsm.el (nsm-network-same-subnet): Compare lengths of
local-ip and ip; different lengths can never match.
(nsm-should-check): Chop port off end of address.

4 years agoAllow eww to display exotic images like webp
Lars Ingebrigtsen [Tue, 19 Nov 2019 10:47:19 +0000 (11:47 +0100)]
Allow eww to display exotic images like webp

* lisp/image.el (image-type): Allow passing in the image type.
(create-image): Make conversion work with data in addition to files.

* lisp/image/image-converter.el (image-convert-p): Allow taking
working on data in addition to files (bug#38036).
(image-convert): Ditto.
(image-converter--convert): Extend signature to say whether we're
getting a file or data.
(image-converter--convert-magick): Convert data.
(image-converter--convert): Ditto.

4 years agoStrip "(fn...)" from output of `describe-mode' (bug#38222)
Juanma Barranquero [Tue, 19 Nov 2019 10:18:48 +0000 (11:18 +0100)]
Strip "(fn...)" from output of `describe-mode' (bug#38222)

* lisp/help.el (help--doc-without-fn): New function.
(describe-mode): Use it.

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 19 Nov 2019 07:19:00 +0000 (08:19 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years ago* lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf.
Stefan Monnier [Mon, 18 Nov 2019 22:47:06 +0000 (17:47 -0500)]
* lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf.

This lets the normal `completion-at-point` and `complete-symbol`
use `pcomplete` for completion.

(org-mode-map): Leave M-TAB bound to the global default since
`pcomplete` is now obsolete.

4 years ago* lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667)
Juri Linkov [Mon, 18 Nov 2019 21:57:16 +0000 (23:57 +0200)]
* lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667)

(tab-line-auto-hscroll): Use this option in the function.

4 years ago* lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219)
Juri Linkov [Mon, 18 Nov 2019 21:53:11 +0000 (23:53 +0200)]
* lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219)

* lisp/vc/ediff-util.el (ediff-toggle-read-only, ediff-quit):
Set this-command to the same command after using y-or-n-p
that doesn't guarantee to keep this-command unchanged
to check it later for some contrived logic.

4 years ago; Fix previous commit
Robert Pluim [Mon, 18 Nov 2019 15:35:51 +0000 (16:35 +0100)]
; Fix previous commit

4 years agoCheck for HAVE_GTK3 instead of a specific version
Robert Pluim [Mon, 18 Nov 2019 14:39:54 +0000 (15:39 +0100)]
Check for HAVE_GTK3 instead of a specific version

Our minimum GTK3 version is 3.10, the font filter functions appeared
in 3.2.

* gtkutil.c (xg_font_filter) [HAVE_GTK3]: Just check for HAVE_GTK3.
(xg_get_font) [HAVE_GTK3]: Same here.

4 years ago* lisp/net/tramp.el (tramp-handle-file-regular-p): Improve error handling.
Michael Albinus [Mon, 18 Nov 2019 14:33:21 +0000 (15:33 +0100)]
* lisp/net/tramp.el (tramp-handle-file-regular-p): Improve error handling.

4 years agoFix cl-prettyexpand in the non-FULL case
Lars Ingebrigtsen [Mon, 18 Nov 2019 10:02:27 +0000 (11:02 +0100)]
Fix cl-prettyexpand in the non-FULL case

* lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): This function has
apparently not worked for at least a couple of decades
(bug#38206) unless supplied with a FULL parameter.  Make the FULL
parameter obsolete and make the function always work as it did
with a non-nil FULL.

4 years agoMerge branch 'scratch/so-long-updates'
Phil Sainty [Mon, 18 Nov 2019 08:27:13 +0000 (21:27 +1300)]
Merge branch 'scratch/so-long-updates'

4 years agolisp/so-long.el: Refactor menu action commands
Phil Sainty [Sat, 16 Nov 2019 02:48:44 +0000 (15:48 +1300)]
lisp/so-long.el: Refactor menu action commands

* lisp/so-long.el (so-long-menu): Call `so-long' with an ACTION
argument instead of using `so-long-menu-item-replace-action'.
(so-long-menu-item-replace-action): Remove the deprecated function.

* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.

4 years ago* lisp/so-long.el (so-long): Firstly revert the existing action, if any
Phil Sainty [Sat, 16 Nov 2019 13:11:20 +0000 (02:11 +1300)]
* lisp/so-long.el (so-long): Firstly revert the existing action, if any

This makes `so-long' consistent with the action commands in the menu.

If multiple actions were to be layered on top of one another, we would
lose the ability to revert to the normal state.  Custom actions
combining multiple other actions can be defined if necessary.

4 years agolisp/so-long.el: Use (interactive "@") for menu commands
Stefan Monnier [Sat, 16 Nov 2019 01:39:00 +0000 (14:39 +1300)]
lisp/so-long.el: Use (interactive "@") for menu commands

* lisp/so-long.el (so-long-menu, so-long-menu-item-replace-action)
(so-long-revert): Use interactive code "@", replacing all uses of
`so-long-menu-click-window'.  This approach leaves the window selected
afterwards, whereas the old code did not; but that is not a problem.
(so-long-menu-click-window, so-long-menu-item-revert): Remove the
deprecated functions.

* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.

Co-authored-by: Phil Sainty <psainty@orcon.net.nz>
4 years ago; * lisp/so-long.el: Use declare-function nearer the code that needs it
Stefan Monnier [Sat, 16 Nov 2019 01:35:36 +0000 (14:35 +1300)]
; * lisp/so-long.el: Use declare-function nearer the code that needs it

4 years ago; * lisp/so-long.el: Use function quoting in example configuration
Stefan Monnier [Sat, 16 Nov 2019 01:35:07 +0000 (14:35 +1300)]
; * lisp/so-long.el: Use function quoting in example configuration

4 years ago; * lisp/so-long.el: Delete redundant :group declarations
Stefan Monnier [Sat, 16 Nov 2019 01:32:09 +0000 (14:32 +1300)]
; * lisp/so-long.el: Delete redundant :group declarations

Refer to (elisp) Common Keywords:

> If this keyword is missing from a customization item, it’ll be
> placed in the same group that was last defined (in the current file).

4 years agoRemove the error-out test for with_harfbuzz
Lars Ingebrigtsen [Mon, 18 Nov 2019 07:24:52 +0000 (08:24 +0100)]
Remove the error-out test for with_harfbuzz

* configure.ac (HAVE_HARFBUZZ): Remove the check for explicit
harfbuzz -- have_harfbuzz defaults to "yes", so we have no way of
checking whether the user really asked for it, apparently.

4 years ago* lisp/simple.el (process-file): Clarify doc string.
Paul Eggert [Sun, 17 Nov 2019 23:26:55 +0000 (15:26 -0800)]
* lisp/simple.el (process-file): Clarify doc string.

4 years ago* lisp/tmm.el (tmm-add-one-shortcut): Use dolist
Stefan Monnier [Sun, 17 Nov 2019 22:34:50 +0000 (17:34 -0500)]
* lisp/tmm.el (tmm-add-one-shortcut): Use dolist