Eric Abrahamsen [Sun, 19 Jul 2020 14:15:33 +0000 (16:15 +0200)]
Complete over the MIME types in gnus-summary-save-parts
* lisp/gnus/gnus-sum.el (gnus-summary-save-parts): Allow
completing over the parts in the first article in the list of the
process-marked articles (bug#39543).
gnus-button-alist: Prefer URL links to Elisp library links
* lisp/gnus/gnus-art.el (gnus-button-alist): Move the URL clauses
higher up the list before library link setup to prevent URLs ending in
".el" from failing to be recognized (and invalid library links being
created instead) (bug#39781).
Do window configuration change before killing Gnus buffers on exit
* lisp/gnus/gnus-sum.el (gnus-summary-exit): Do window
configuration changes before killing off the summary buffer, so
that the window conf machinery can return to a group-only
configuration (bug#40069).
Simplify dummy root subject before comparing it to the current article
* lisp/gnus/gnus-sum.el (gnus-summary-prepare-threads): Simplify both
the dummy root and the following article before comparing them,
otherwise both the former and the latter might display the thread's
subject even when gnus-summary-line-format contains "%s" (bug#40520).
Allow open-network-stream to use different TLS capability commands
* doc/lispref/processes.texi (Network): Document non-string
capability command.
* lisp/gnus/nntp.el (nntp-open-connection): Use HELP for Typhoon
and CAPABILITIES for everything else (bug#41960).
* lisp/net/network-stream.el (open-network-stream): Document
function variety of :capability-command.
(network-stream-open-starttls): Use it.
(network-stream-open-tls): Ditto.
(network-stream-open-shell): Ditto.
(network-stream--capability-command): New helper function.
João Távora [Sat, 18 Jul 2020 22:15:28 +0000 (23:15 +0100)]
Fix ElDoc bugs around eldoc-echo-area-use-multiline-p.
If the value is 'truncate-sym-name-if-fit andthe single docstring
doesn't fit in the echo area even when the symbol name is elided, that
step shouldn't be attempted. Also if the value is nil, really ensure
that only the first line is shown.
* lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): Rework
'truncate-sym-name-if-fit case of eldoc-echo-area-use-multiline-p.
* lisp/net/eww.el (eww-open-file): Allow opening non-local Tramp
files (bug#40425).
(eww): Adjust calling convention to allow passing in data directly
via a buffer.
bug-reference auto-setup for IRC, implementation for rcirc
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-irc-alist):
New defvar for configuring bug regexp and URL based on IRC channel and
server names.
(bug-reference--maybe-setup-from-irc): New defun doing the setup given
channel and server.
(bug-reference-try-setup-from-rcirc): New defun calling the above for
rcirc buffers.
(bug-reference--run-auto-setup): Enable the auto-setup for rcirc.
* etc/NEWS: Extend entry describing bug-reference auto-setup.
Fix NOT-CURRENT behaviour in text-property-search-backward
* lisp/emacs-lisp/text-property-search.el
(text-property-search-backward): Fix inconsistent behaviour of
S-TAB in eww (and other callers that use the NOT-CURRENT
behaviour) when there are adjacent elements
(bug#39239).
* src/image.c (gif_load): When unable to parse a GIF specified
via a data attribute, don't message the complete binary, because
that's not useful (bug#40850).
Make old aliases to gnus-child* commands work before Gnus is loaded
* lisp/gnus/gnus.el (gnus-slave-no-server, gnus-slave): Mark as
obsolete in a way that still lets them be used as interactive
commands before Gnus is loaded.
* lisp/gnus/gnus-agent.el (gnus-slave-unplugged): Ditto (bug#42401).
Stefan Kangas [Fri, 17 Jul 2020 01:23:15 +0000 (03:23 +0200)]
Show eww bookmarks buffer only if it's not empty
* lisp/net/eww.el (eww-list-bookmarks): Don't show buffer if there
are no bookmarks. (Bug#41385)
(eww-bookmark-prepare): Move signalling an error if there are no
bookmarks from here...
(eww-read-bookmarks): ...to here. Add new argument `error-out' to
control this.
(eww-next-bookmark, eww-previous-bookmark): Call
`eww-read-bookmarks'.
* lisp/gnus/gnus-agent.el (gnus-child-unplugged): Rename function
from gnus-slave-unplugged (and add the latter as an obsolete alias).
* lisp/gnus/gnus.el (gnus-other-frame-function): Adjust function
names in the defcustom to new naming scheme.
(gnus-other-frame-resume-function): Ditto.
(gnus): Adjust parameter names.
Jonas Bernoulli [Mon, 20 Apr 2020 21:31:16 +0000 (23:31 +0200)]
* lisp/epa.el (epa-show-key): New command.
Users can move in `epa-key-list-mode' buffers using either
`next-line'/`previous-line' or `widget-forward'/`widget-backward'.
When using the first set of commands, then the cursor stays in the
current column and that normally is the first column. The key
widgets do not begin until the third character of their respective
lines.
All `epa' commands work regardless of whether the cursor is on the
widget or before them. The `epa-show-key' command did not exist until
now because the `widget-button-press' already performs its task. But
because the widgets don't span complete lines we actually need this
command too.
Jonas Bernoulli [Mon, 20 Apr 2020 21:33:44 +0000 (23:33 +0200)]
epa-key-list-mode-map: Use widget-keymap as parent keymap
Normally when one keymap is to be treated as the parent of another,
then that relationship is setup once at the time when the child is
being defined, i.e. at birth. For some reason, this was not done
here; instead `widget-keymap' is set as `epa-key-list-mode-map'
parent every time the former is setup to be used as the local map.
This appears to be a mistake. A few other keymaps use `widget-keymap'
as their parent and in those cases the relationship is established
just once. `epa-key-list-mode-map' is the only exception and because
there is absolutely no indication that that is justified, we remove
this inconsistency.
* lisp/epa.el (epa-key-list-mode-map): Set the parent of this keymap
while defining it.
* lisp/epa.el (epa--list-keys): Do not set the parent of the local
keymap here.
Jonas Bernoulli [Tue, 18 Feb 2020 15:56:16 +0000 (16:56 +0100)]
Cosmetic changes to epa libraries
These changes make the code more readable.
* lisp/epa-dired.el (epa-dired-do-decrypt, epa-dired-do-verify)
(epa-dired-do-sign, epa-dired-do-encrypt): Use dolist instead
of while.
* lisp/epa-file.el (epa-file-passphrase-callback-function):
Set just one variable per setq call.
Jonas Bernoulli [Tue, 18 Feb 2020 15:58:31 +0000 (16:58 +0100)]
Drop unnecessary backward compatibility aliases
We can assume that `encode-coding-string' and `decode-coding-string'
are available; they were added in 1997.
* lisp/epa-file.el (epa-file--encode-coding-string)
(epa-file--decode-coding-string): Remove aliases for
encode-coding-string and decode-coding-string.
* lisp/epa-file.el (epa-file-write-region): Use encode-coding-string
instead of removed epa-file--encode-coding-string.
Jonas Bernoulli [Tue, 18 Feb 2020 15:45:34 +0000 (16:45 +0100)]
* lisp/epa.el (epa-faces): Move definition.
Previously option `epa-mail-aliases' was the only option that was
defined right after the group `epa-faces' and right before all the
faces. Now it is defined with all the other options and thus before
the definition of the `epa-faces' group, which it does not belong to.
Juri Linkov [Sun, 12 Jul 2020 23:33:02 +0000 (02:33 +0300)]
Display "C-u C-x =" composed character names on GUI frames as well
* lisp/descr-text.el (describe-char): On GUI frames, display the
Unicode names of the composed characters like they are displayed
on TTY frames. (Bug#42256)
João Távora [Fri, 10 Jul 2020 19:49:54 +0000 (20:49 +0100)]
Sort out ElDoc backward compatibility of eldoc-documentation-function
As explained previously, we can't simply make
eldoc-documentation-function an variable alias for
eldoc-documentation-strategy, because ElDoc is pre-loaded in Emacs <
28, where it holds at least one buffer-local binding. So if eldoc.el
is loaded in those versions, we do the variable alias binding in
reverse. We do this using a macro
eldoc--documentation-strategy-defcustom to at load time in which
direction to make the variable alias.
* lisp/emacs-lisp/eldoc.el
(eldoc--documentation-strategy-defcustom): Helper macro.
(eldoc-documentation-strategy, eldoc-documentation-function): Use it.
(Version): Bump to 1.5.0
* doc/lispref/strings.texi (Creating Strings): 'concat' does not
necessarily return a newly allocated string. This has been the case
at least since 1997 (Emacs 20.3).
* doc/lispref/strings.texi (Creating Strings): 'concat' does not
necessarily return a newly allocated string. This has been the case
at least since 1997 (Emacs 20.3).
Michael Albinus [Sat, 11 Jul 2020 12:46:18 +0000 (14:46 +0200)]
Fix multibyte chars of file names in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-execute-adb-command): Revert return
value meaning. Insert the result into the connection buffer.
(tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region, tramp-adb-handle-copy-file)
(tramp-adb-get-device): Adapt calls.
(tramp-adb-send-command): Use "adb shell ..." in case the command
contains multibyte chars.
Eli Zaretskii [Sat, 11 Jul 2020 12:33:51 +0000 (15:33 +0300)]
Another minor improvement of project.el doc strings
* lisp/progmodes/project.el (project-find-functions)
(project-current, project-switch-to-buffer): Doc fix.
(project-current): Rename the argument DIR to DIRECTORY.
* lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp)
(tramp-adb-ls-date-time-regexp): New defconst.
(tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp)
(tramp-adb-sh-fix-ls-output): Use them.
(tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection):
Apply `eval-when-compile' on constant concat data.
(tramp-do-parse-file-attributes-with-ls):
Suppress `signal-hook-function'.
(tramp-adb--gnu-switches-to-ash): Remove unused function.
(tramp-adb-handle-set-file-modes): Qhote argument.
(tramp-adb-maybe-open-connection): Set file property rather than flush.
* lisp/net/tramp-cmds.el (tramp-rename-these-files):
Apply `eval-when-compile' on constant concat data.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes)
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in
`eval-and-compile'.
(tramp-gvfs-get-directory-attributes): Apply `eval-when-compile'
on constant concat data.
João Távora [Fri, 10 Jul 2020 00:47:10 +0000 (01:47 +0100)]
Fix Eldoc problem when loading on Emacs 26.3
When defining the obsolete variable alias for old
eldoc-documentation-function (which now points to the newer
eldoc-documentation-strategy), one gets the error "don't know how to
make a localized vareiable an alias". I'm not sure, but I suspect
this is because Eldoc is preloaded in Emacs 26.3 and the
eldoc-documentation-function variable is already set locally by some
Elisp buffer.
Uninterning the symbol shortly before defining the alias seems to fix
it.
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function):
Unintern on load.
(Version): Bump to 1.3.0
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Use Gnulib libgmp module
Instead of doing GMP by hand, use the Gnulib libgmp module.
* .gitignore: Add lib/gmp.h.
* admin/merge-gnulib (GNULIB_MODULES): Add libgmp.
* configure.ac (GMP_LIB, GMP_OBJ): Remove. Gnulib uses the name
LIB_GMP, so all uses changed. All uses of GMP_OBJ removed.
(HAVE_GMP): Set this from Gnulib’s variables.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4:
New files, copied from Gnulib.
* src/bignum.h, test/data/emacs-module/mod-test.c:
Include gmp.h unconditionally.
* src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h:
Remove. This moves these files from src to lib, and
updates them to the current GMP version.
* test/Makefile.in (GMP_H): New macro.
($(test_module)): Use it to decide whether to compile
mini-gmp-gnulib.c too.
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Speed up GCC 10.1 compilation in default Git builds
* configure.ac (nw): GCC 10.1 introduced warnings enabled by -fanalyzer
that slow down compilation considerably. Generate these warnings only
if --enable-gcc-warnings is explicitly given. Also, do not bother to
eliminate warnings that Gnulib’s revised manywarnings module no longer
generates.
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Update from Gnulib
This incorporates:
2020-07-07 dup2: remove support for some very old platforms
2020-07-07 memchr: remove support for some very old platforms
2020-07-04 getumask: new module
2020-07-03 getrandom: fix compilation error on native Windows
2020-07-03 lchmod: simplify after 2020-02-22 change
2020-07-01 manywarnings: improve port to GCC 10.1
2020-06-28 getrandom: fix compilation errors on older versions of mingw
2020-06-29 alloca-opt: fix warning on mingw
* lib/alloca.in.h, lib/dup2.c, lib/getrandom.c, lib/string.in.h:
* lib/sys_stat.in.h, lib/unistd.in.h, m4/dup2.m4, m4/getrandom.m4:
* m4/lchmod.m4, m4/manywarnings.m4, m4/string_h.m4, m4/sys_stat_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
João Távora [Thu, 9 Jul 2020 12:12:34 +0000 (13:12 +0100)]
Unbreak M-x eldoc
The command should always invoke Eldoc when called interactively,
instead of going through the usual checks, which are performed to
avoid interference with other commands.
* lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Rework.
(Version): Bump to 1.2.0
João Távora [Thu, 9 Jul 2020 16:51:38 +0000 (17:51 +0100)]
Prevent infloop in Eldoc message truncation algorithm
The truncation algorithm still has a long way to go for very narrow
frame sizes. It should become a generic mechanism that would allows
one to truncate a string so that fits in N possibly truncated screen
lines of a full-width window.
* test/lisp/descr-text-tests.el (descr-text-test-desc):
Update for recent change to describe-char-eldoc.
* test/lisp/progmodes/elisp-mode-tests.el
(elisp--highlight-function-argument-indexed)
(elisp--highlight-function-argument-keyed-1)
(elisp--highlight-function-argument-keyed-2):
Update for recent change to elisp--highlight-function-argument.
Special-case symbol and fixnum keys in member, assoc and rassoc
* src/fns.c (Fmember, Fassoc, Frassoc): Delegate to the cheaper Fmemq,
Fassq and Frassq for arguments of the appropriate types.
(eq_comparable_value): New function.
João Távora [Sat, 6 Jun 2020 13:04:48 +0000 (14:04 +0100)]
Make more parts of Emacs use new Eldoc capabilities
Elisp-mode was doing a lot of work that can now be delegated to Eldoc.
Flymake uses the new Eldoc functionality, too, installing a global
documentation function that may report on diagnostics under point.
CEDET's grammar.el was left as the only user of an Eldoc-internal
function. That function was moved to grammar.el. That file is still,
somewhat reprehensibly, using an internal function of elisp-mode.el,
but this was left unchanged.
In other situations, eldoc-documentation-functions is used or
recommended.
The only other places where the obsolete eldoc-documentation-function
is still used is in libraries which are presumably meant to remain
compatible with previous Emacs versions.
* lisp/progmodes/elisp-mode.el (elisp-eldoc-funcall)
(elisp-eldoc-var-docstring): New functions.
(emacs-lisp-mode): Put two elements in
eldoc-documentation-functions.
* lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Setup
new Elisp eldoc-documentation-functions.
* lisp/progmodes/flymake.el (flymake-mode): Use
flymake-eldoc-function.
(flymake-eldoc-function): New function.
(Package-Requires): Require eldoc 1.1.0