]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoFactor out project--read-project-buffer from project-switch-buffer
Sean Whitton [Fri, 24 Jul 2020 20:36:39 +0000 (13:36 -0700)]
Factor out project--read-project-buffer from project-switch-buffer

* lisp/progmodes/project.el (project--read-project-buffer): New
function extracted from project-switch-buffer.
* lisp/progmodes/project.el (project-switch-buffer): Instead of
unconditionally reading a project buffer from the user, add
buffer-or-name argument, and populate it using
project--read-project-buffer when called interactively.  Update
docstring.

4 years agoSmall refactoring to simplify the interface of internal function.
Philipp Stephani [Sun, 26 Jul 2020 18:34:30 +0000 (20:34 +0200)]
Small refactoring to simplify the interface of internal function.

* src/emacs-module.c (allocate_emacs_value): Remove STORAGE parameter.
(lisp_to_value): Adapt caller.

4 years agoCorrect order or eldoc-documentation-functions in Elisp mode
João Távora [Sun, 26 Jul 2020 09:54:09 +0000 (10:54 +0100)]
Correct order or eldoc-documentation-functions in Elisp mode

Fixes: bug#42531
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Reverse order of
eldoc-documentation-functions.

4 years agoMake checking for liveness of global values more precise.
Philipp Stephani [Sat, 25 Jul 2020 21:23:19 +0000 (23:23 +0200)]
Make checking for liveness of global values more precise.

We can't just use a hash lookup because a global and a local reference
might refer to the same Lisp object.

* src/emacs-module.c (module_free_global_ref): More precise check for
global liveness.

* test/data/emacs-module/mod-test.c (Fmod_test_globref_invalid_free):
New test module function.
(emacs_module_init): Export it.

* test/src/emacs-module-tests.el
(module--test-assertions--globref-invalid-free): New unit test.

4 years agoFix subtle bug when checking liveness of module values.
Philipp Stephani [Sat, 25 Jul 2020 21:04:05 +0000 (23:04 +0200)]
Fix subtle bug when checking liveness of module values.

We can't simply look up the Lisp object in the global reference table
because an invalid local and a valid global reference might refer to
the same object.  Instead, we have to test the address of the global
reference against the stored references.

* src/emacs-module.c (module_global_reference_p): New helper function.
(value_to_lisp): Use it.

* test/data/emacs-module/mod-test.c
(Fmod_test_invalid_store_copy): New test module function.
(emacs_module_init): Export it.

* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object-with-global-copy):
New unit test.

4 years agoOptimise 3-arg +, - and *
Mattias Engdegård [Sat, 25 Jul 2020 17:12:26 +0000 (19:12 +0200)]
Optimise 3-arg +, - and *

Turn (+ a b c) into (+ (+ a b) c), and do the same for - and *.
The 2-arg operations have their own bytecode which results in a 1.5×
speed-up.  Furthermore, the transform enables other optimisations; for
example, (+ a 1 b) -> (+ (1+ a) b).

* lisp/emacs-lisp/byte-opt.el (byte-optimize-plus, byte-optimize-minus)
(byte-optimize-multiply): Transform (OP a b c) into (OP (OP a b) c).

4 years agoUpdate and improve documentation of project.el commands
Eli Zaretskii [Sat, 25 Jul 2020 09:28:05 +0000 (12:28 +0300)]
Update and improve documentation of project.el commands

* doc/emacs/custom.texi (Prefix Keymaps): Document
'project-prefix-map'.
* doc/emacs/maintaining.texi (Project File Commands)
(Switching Projects): Describe key bindings for the commands
described in the sections.  Document 'project-list-file'.
(Project Buffer Commands): New section.
* doc/emacs/emacs.texi (Top): Add Project sections to the detailed
menu.

* etc/NEWS: Add entries for project.el, and mark documented entries as
appropriate.

4 years agoFix display of man pages after killing the 'man' process
Eli Zaretskii [Sat, 25 Jul 2020 07:15:07 +0000 (10:15 +0300)]
Fix display of man pages after killing the 'man' process

* lisp/man.el (Man-bgproc-filter, Man-bgproc-sentinel): Use
'buffer-live-p' instead of just testing the buffer's name.
(Bug#42160)

4 years agoproject-remember-project: New public function
Dmitry Gutov [Sat, 25 Jul 2020 00:17:47 +0000 (03:17 +0300)]
project-remember-project: New public function

* lisp/progmodes/project.el (project-remember-project):
Rename from project--add-to-project-list-front (bug#42332).
And autoload it.

4 years ago* lisp/vc/vc-git.el (vc-git-log-view-mode): Fix commit regexp (bug#40248)
Juri Linkov [Thu, 23 Jul 2020 23:29:12 +0000 (02:29 +0300)]
* lisp/vc/vc-git.el (vc-git-log-view-mode): Fix commit regexp (bug#40248)

The regexp 'log-view-message-re' should match e.g. "commit 123456789",
not "CommitDate".

4 years agoDon't call undefined function elisp-eldoc-documentation-function (bug#42493)
Tassilo Horn [Thu, 23 Jul 2020 20:05:26 +0000 (22:05 +0200)]
Don't call undefined function elisp-eldoc-documentation-function (bug#42493)

* lisp/ielm.el (inferior-emacs-lisp-mode): Add
`elisp-eldoc-var-docstring' and `elisp-eldoc-funcall' as
`eldoc-documentation-functions' instead of the undefined
elisp-eldoc-documentation-function (bug#42493).

4 years agobug-reference auto-setup for IRC, implementation for ERC
Tassilo Horn [Thu, 23 Jul 2020 17:03:25 +0000 (19:03 +0200)]
bug-reference auto-setup for IRC, implementation for ERC

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-irc-alist):
Change SERVER-REGEXP to NETWORK-REGEXP in docstring.
* lisp/progmodes/bug-reference.el (bug-reference--maybe-setup-from-irc):
Change semantics from requiring a match of channel OR server to
requiring a match of both (if both are configured).
* lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-erc):
New defun doing the auto-setup for ERC.
(bug-reference--run-auto-setup): Run bug-reference-try-setup-from-erc.
* etc/NEWS: Extend entry describing bug-reference auto-setup.

4 years agoFix viewing of encrypted S/MIME messages
Lars Ingebrigtsen [Thu, 23 Jul 2020 15:12:33 +0000 (17:12 +0200)]
Fix viewing of encrypted S/MIME messages

* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Don't
add a content-type header if there already is one (bug#41659).

4 years agoFix memory leak for global module objects (Bug#42482).
Philipp Stephani [Thu, 23 Jul 2020 11:48:43 +0000 (13:48 +0200)]
Fix memory leak for global module objects (Bug#42482).

Instead of storing the global values in a global 'emacs_value_storage'
object, store them as hash values alongside the reference counts.
That way the garbage collector takes care of cleaning them up.

* src/emacs-module.c (global_storage): Remove.
(struct module_global_reference): New pseudovector type.
(XMODULE_GLOBAL_REFERENCE): New helper function.
(module_make_global_ref, module_free_global_ref): Use
'module_global_reference' struct for global reference values.
(value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of
'global_storage'.

4 years agoDon't needlessly request docs from ElDoc functions
João Távora [Sat, 18 Jul 2020 23:48:43 +0000 (00:48 +0100)]
Don't needlessly request docs from ElDoc functions

Fixes: bug#42421
Do this conservatively for now: if the ElDoc helper buffer (as
returned by eldoc--doc-buffer) is visible and showing documentation
for the very same "situation" (as computed by the the new
eldoc--request-state helper), don't request that documentation from
sources again.

Before this change, not only was that request inefficient but if the
user invoked scroll-other-window to see more of the helper buffer,
that would eventually cause it to be reformatted and unexpectedly
recentered.

Later on, when a customizable list of documentation "sinks" is offered
to the user, say, something like eldoc-display-functions, this process
must be consolidated.  In those circumstances, as soon as one of those
sinks signals that it doesn't have up-to-date documentation for the
state computed by eldoc--request-state, documentation will have to be
requested anew from eldoc-documentation-functions via
eldoc--invoke-strategy.

* lisp/emacs-lisp/eldoc.el (eldoc--request-docs-p): Rework from
eglot-display-message-p.
(eldoc--last-request-state): New variable.
(eldoc--request-state): New helper.
(eldoc--handle-docs): Memorize state of request in doc buffer.
(eldoc-print-current-symbol-info): Pass a token to
eldoc--request-docs-p.
(Version): Bump to 1.6.0

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 22 Jul 2020 14:50:47 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

8bc8565721 (origin/emacs-27) Revert "Rectify allout-widgets region un...
db479d6354 Revert "Resolve missing button-region keymap bindings."
259dc75c23 Revert "Provide missing let definition to prevent backgrou...
56422a6366 Revert "Don't let item decoration be disrupted by too-shal...
8e4eae0ce3 Revert "Fix allout-widgets-mode handling of edits to item ...

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 22 Jul 2020 14:50:47 +0000 (07:50 -0700)]
Merge from origin/emacs-27

4db3235fd8 Run custom-magic-reset in the customize buffer
3c9c3f04de ; spelling fix

4 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 22 Jul 2020 14:50:47 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

bc10e467f1 Backport: Rectify allout-widgets region undecoration so it...
82742e295d Backport: Resolve missing button-region keymap bindings.
2035ecca57 Backport: Provide missing let definition to prevent backgr...
3071cecda0 Backport: Don't let item decoration be disrupted by too-sh...
044960ead2 Backport: Fix allout-widgets-mode handling of edits to ite...

4 years agoCalc: fix interval entry snag (bug#42438)
Mattias Engdegård [Wed, 22 Jul 2020 09:27:15 +0000 (11:27 +0200)]
Calc: fix interval entry snag (bug#42438)

* lisp/calc/calc.el (calcDigit-key): Don't signal a 'Bad format' error
when entering '..' after pushing an incomplete interval.

Reported by Allen Li.

4 years agoRevert "Rectify allout-widgets region undecoration so item at start is not missed."
Ken Manheimer [Tue, 21 Jul 2020 14:57:29 +0000 (10:57 -0400)]
Revert "Rectify allout-widgets region undecoration so item at start is not missed."

This reverts commit 33d85cb768b40794bffcd9ab22fbdec1211a74e5.

Backporting it to emacs-27 was not appropriate.

4 years agoRevert "Resolve missing button-region keymap bindings."
Ken Manheimer [Tue, 21 Jul 2020 14:56:55 +0000 (10:56 -0400)]
Revert "Resolve missing button-region keymap bindings."

This reverts commit dd7c191291c8eb1afeac0f1512745491c5c7a317.

Backporting it to emacs-27 was not appropriate.

4 years agoRevert "Provide missing let definition to prevent background void-variable error."
Ken Manheimer [Tue, 21 Jul 2020 14:55:35 +0000 (10:55 -0400)]
Revert "Provide missing let definition to prevent background void-variable error."

This reverts commit 3c410b6b4753e02269bb36914e7534eb124150dd.

Backporting it to emacs-27 was not appropriate.

4 years agoRevert "Don't let item decoration be disrupted by too-shallow items."
Ken Manheimer [Tue, 21 Jul 2020 14:55:08 +0000 (10:55 -0400)]
Revert "Don't let item decoration be disrupted by too-shallow items."

This reverts commit 8684216542889fa57daa32072104afc69785907f.

Backporting it to emacs-27 was not appropriate.

4 years agoRevert "Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)"
Ken Manheimer [Tue, 21 Jul 2020 14:52:50 +0000 (10:52 -0400)]
Revert "Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)"

This reverts commit 8e13d332481551e4c8c1c66dd0c69dd09256dffc.

Backporting it to emacs-27 was not appropriate.

4 years agoRun custom-magic-reset in the customize buffer
Robert Pluim [Tue, 21 Jul 2020 14:37:59 +0000 (16:37 +0200)]
Run custom-magic-reset in the customize buffer

If the user has navigated away from the customize buffer, then
clicking on a widget in the customize buffer applies changes in the
selected buffer rather than in the customize buffer.  Pass the
customize buffer to 'custom-magic-reset' to avoid this.

* lisp/cus-edit.el (custom-magic-reset): Add optional buffer argument,
apply changes in that buffer.
(custom-notify): Pass the buffer containing the widget to
'custom-magic-reset'.  (Bug#40788)

4 years ago; spelling fix
Robert Pluim [Tue, 21 Jul 2020 07:54:58 +0000 (09:54 +0200)]
; spelling fix

4 years agoBackport: Rectify allout-widgets region undecoration so item at start is not missed.
Ken Manheimer [Sun, 5 Jul 2020 20:38:13 +0000 (16:38 -0400)]
Backport: Rectify allout-widgets region undecoration so item at start is not missed.

* lisp/allout-widgets.el (allout-widgets-undecorate-region):
Reorganize the loop so an item at the start is not skipped.

(cherry picked from commit 33d85cb768b40794bffcd9ab22fbdec1211a74e5)

4 years agoBackport: Resolve missing button-region keymap bindings.
Ken Manheimer [Tue, 7 Jul 2020 14:32:03 +0000 (10:32 -0400)]
Backport: Resolve missing button-region keymap bindings.

* lisp/allout-widgets.el (allout-item-icon-keymap,
allout-item-body-keymap, allout-cue-span-keymap, allout-widgets-mode):
Inherit from both (current-local-map) and (current-global-map). This
provides for missing global bindings when inheriting from
just (current-local-map), eg Esc-<.

(cherry picked from commit dd7c191291c8eb1afeac0f1512745491c5c7a317)

4 years agoBackport: Provide missing let definition to prevent background void-variable error.
Ken Manheimer [Mon, 6 Jul 2020 17:19:11 +0000 (13:19 -0400)]
Backport: Provide missing let definition to prevent background void-variable error.

* lisp/allout-widgets.el (allout-widgets-exposure-change-processor)
Let-declare handled-conceal, for reference through `(symbol-value)'
within the let body. (Because the error happens in an
after-change-functions hook, so it is caught and reported as a message
by allout-widgets-hook-error-handler.)

(cherry picked from commit 3c410b6b4753e02269bb36914e7534eb124150dd)

4 years agoBackport: Don't let item decoration be disrupted by too-shallow items.
Ken Manheimer [Mon, 6 Jul 2020 18:18:57 +0000 (14:18 -0400)]
Backport: Don't let item decoration be disrupted by too-shallow items.

* lisp/allout-widgets.el (allout-decorate-item-and-context): Check for
parent-position having value before using it.

Also, shift local emacs vars topic deeper so it doesn't constitute
an instance of that particular aberrant case.

(cherry picked from commit 8684216542889fa57daa32072104afc69785907f)

4 years agoBackport: Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)
Ken Manheimer [Sun, 5 Jul 2020 20:27:52 +0000 (16:27 -0400)]
Backport: Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)

* lisp/allout-widgets.el (allout-decorate-item-cue): Properly decorate
item cue span.
(allout-setup-text-properties): use allout-graphics-modification-handler
as allout-cue-span-category modification hook.

(cherry picked from commit 8e13d332481551e4c8c1c66dd0c69dd09256dffc)

4 years agoRectify allout-widgets region undecoration so item at start is not missed.
Ken Manheimer [Sun, 5 Jul 2020 20:38:13 +0000 (16:38 -0400)]
Rectify allout-widgets region undecoration so item at start is not missed.

* lisp/allout-widgets.el (allout-widgets-undecorate-region):
Reorganize the loop so an item at the start is not skipped.

4 years agoResolve missing button-region keymap bindings.
Ken Manheimer [Tue, 7 Jul 2020 14:32:03 +0000 (10:32 -0400)]
Resolve missing button-region keymap bindings.

* lisp/allout-widgets.el (allout-item-icon-keymap,
allout-item-body-keymap, allout-cue-span-keymap, allout-widgets-mode):
Inherit from both (current-local-map) and (current-global-map). This
provides for missing global bindings when inheriting from
just (current-local-map), eg Esc-<.

4 years agoProvide missing let definition to prevent background void-variable error.
Ken Manheimer [Mon, 6 Jul 2020 17:19:11 +0000 (13:19 -0400)]
Provide missing let definition to prevent background void-variable error.

* lisp/allout-widgets.el (allout-widgets-exposure-change-processor)
Let-declare handled-conceal, for reference through `(symbol-value)'
within the let body. (Because the error happens in an
after-change-functions hook, so it is caught and reported as a message
by allout-widgets-hook-error-handler.)

4 years agoDon't let item decoration be disrupted by too-shallow items.
Ken Manheimer [Mon, 6 Jul 2020 18:18:57 +0000 (14:18 -0400)]
Don't let item decoration be disrupted by too-shallow items.

* lisp/allout-widgets.el (allout-decorate-item-and-context): Check for
parent-position having value before using it.

Also, shift local emacs vars topic deeper so it doesn't constitute
an instance of that particular aberrant case.

4 years agoFix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)
Ken Manheimer [Sun, 5 Jul 2020 20:27:52 +0000 (16:27 -0400)]
Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312)

* lisp/allout-widgets.el (allout-decorate-item-cue): Properly decorate
item cue span.
(allout-setup-text-properties): use allout-graphics-modification-handler
as allout-cue-span-category modification hook.

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 20 Jul 2020 14:50:44 +0000 (07:50 -0700)]
Merge from origin/emacs-27

cd93debc60 (origin/emacs-27) Merge branch 'emacs-27' of git.savannah....
2c0c613ec5 Document prefix arg effects for 'epa-mail-{sign,encrypt}'
551123e0b2 * etc/NEWS: Correct description of :client-certificate change
05c4329cf5 Revert "Fix filename completion in shell mode buffers"
de68572742 Improve documentation of 'bookmark-bmenu-mode'
fd85e70be7 Update systems using GnuTLS certificate files
0d4ba1c2b2 Improve documentation of 'kill-emacs'
b3bbd4fd00 Improve documentation of 'display-raw-bytes-as-hex'
f50d79af6b Correct descriptions of init file
e325d2638c Fix interrupt-process on MS-Windows
d24e56a5e4 Revert "* doc/misc/flymake.texi (An annotated example back...

# Conflicts:
# etc/NEWS

4 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Mon, 20 Jul 2020 14:31:50 +0000 (17:31 +0300)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

4 years agoFix problem with Tramp progress reporter
Michael Albinus [Mon, 20 Jul 2020 14:29:38 +0000 (16:29 +0200)]
Fix problem with Tramp progress reporter

* lisp/net/tramp.el (with-tramp-progress-reporter): Do not span a
new progress reporter if there's already another one.

4 years agoDocument prefix arg effects for 'epa-mail-{sign,encrypt}'
Robert Pluim [Mon, 20 Jul 2020 12:47:43 +0000 (14:47 +0200)]
Document prefix arg effects for 'epa-mail-{sign,encrypt}'

* doc/misc/epa.texi (Mail-mode integration): Describe effect of
prefix arg to 'epa-mail-encrypt' and 'epa-mail-sign'.

* lisp/epa-mail.el (epa-mail-sign): Describe effect of prefix arg.

4 years ago* etc/NEWS: Correct description of :client-certificate change
Robert Pluim [Mon, 20 Jul 2020 12:39:25 +0000 (14:39 +0200)]
* etc/NEWS: Correct description of :client-certificate change

4 years agoMake xwidget-webkit-browse-url slightly more DWIM
Lars Ingebrigtsen [Mon, 20 Jul 2020 10:21:39 +0000 (12:21 +0200)]
Make xwidget-webkit-browse-url slightly more DWIM

* lisp/xwidget.el (xwidget-webkit-browse-url): Prepend "https" to
URLs that don't have a protocol (bug#31369).

4 years agoSuppress relint false positive in gnus-start.el
Mattias Engdegård [Sun, 19 Jul 2020 15:13:35 +0000 (17:13 +0200)]
Suppress relint false positive in gnus-start.el

* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format):
Add suppressive comment.  Prepending "^to\\.\\|" is redundant when
'gnus-ignored-newsgroups' already matches that pattern, but adding
logic here is not worth the trouble.

4 years ago; project.el: Talk about equality
Dmitry Gutov [Mon, 20 Jul 2020 01:07:11 +0000 (04:07 +0300)]
; project.el: Talk about equality

4 years agoproject.el: Add more docs and two new key bindings
Dmitry Gutov [Mon, 20 Jul 2020 00:58:08 +0000 (03:58 +0300)]
project.el: Add more docs and two new key bindings

* lisp/progmodes/project.el:
Add a longer description of the package and how to use it.
(project-prefix-map): Add entries for
'project-or-external-find-file' and
'project-or-external-find-regexp'.

4 years agoOnly kill url-retrieve-synchronously connections when we have a timeout
Lars Ingebrigtsen [Sun, 19 Jul 2020 21:12:54 +0000 (23:12 +0200)]
Only kill url-retrieve-synchronously connections when we have a timeout

* lisp/url/url.el (url-retrieve-synchronously): Only kill the
connections when we have a timeout (bug#34607).

4 years agoMake timeouts work more reliably in url-retrieve-synchronously
Lars Ingebrigtsen [Sun, 19 Jul 2020 20:41:28 +0000 (22:41 +0200)]
Make timeouts work more reliably in url-retrieve-synchronously

* lisp/url/url.el (url-retrieve-synchronously): Ensure that the
processes have been killed on timeouts before returning the buffer
(bug#34607).

4 years agourl-http: Fix handling of redirect locations
Daniele Nicolodi [Sun, 19 Jul 2020 19:16:55 +0000 (21:16 +0200)]
url-http: Fix handling of redirect locations

* lisp/url/url-http.el (url-http-parse-headers): Parse redirect
URIs more like other web browsers (bug#42382).

RFC 7231 the Location header is defined to carry a URI-reference.
According to RFC 3986 it should be percent-encoded and thus should not
contain spaces. However, there are HTTP server implementation (notably
nginx) that do not do that. This makes Emacs url-http.el behave like
most other HTTP client implementatios. Also remove the stripping of
angle bracket quotes as they are not valid according to the RFCs.

Copyright-paperwork-exempt: yes

4 years agoSupport Proxy-Authorization in HTTPS CONNECT proxies
Satoshi Nakagawa [Sun, 19 Jul 2020 19:12:08 +0000 (21:12 +0200)]
Support Proxy-Authorization in HTTPS CONNECT proxies

* lisp/url/url-http.el (url-https-proxy-connect): Support CONNECT
with Proxy-Authorization header (bug#42422).

Copyright-paperwork-exempt: yes

4 years ago* lisp/net/tramp-adb.el (tramp-adb-prompt): Further simplification.
Michael Albinus [Sun, 19 Jul 2020 17:34:16 +0000 (19:34 +0200)]
* lisp/net/tramp-adb.el (tramp-adb-prompt): Further simplification.

Suggested by Mattias Engdegård <mattiase@acm.org>.

4 years agoComplete over the MIME types in gnus-summary-save-parts
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).

4 years agognus-button-alist: Prefer URL links to Elisp library links
Štěpán Němec [Sun, 19 Jul 2020 14:05:11 +0000 (16:05 +0200)]
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).

4 years agoDo window configuration change before killing Gnus buffers on exit
Lars Ingebrigtsen [Sun, 19 Jul 2020 13:46:17 +0000 (15:46 +0200)]
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).

4 years agoAllow adjusting the `W Q' Gnus summary command interactively
Lars Ingebrigtsen [Sun, 19 Jul 2020 13:18:23 +0000 (15:18 +0200)]
Allow adjusting the `W Q' Gnus summary command interactively

* doc/misc/gnus.texi (Article Washing): Document it.

* lisp/gnus/gnus-art.el (article-fill-long-lines): Take a numeric
prefix as the fill width (bug#38698).

4 years agoRemove redundant code from c-font-lock-fontify-region
Alan Mackenzie [Sun, 19 Jul 2020 10:55:48 +0000 (10:55 +0000)]
Remove redundant code from c-font-lock-fontify-region

* lisp/progmodes/cc-mode.el (c-font-lock-fontify-region): Remove variables
string-fence-beg and lim, and the code used to calculate them.

4 years agoAdd missing 'require'.
Philipp Stephani [Sun, 19 Jul 2020 08:32:51 +0000 (10:32 +0200)]
Add missing 'require'.

* lisp/progmodes/project.el: Require seq.el explicitly as
'seq-every-p' isn't autoloaded in Emacs 26.3.

4 years agoSimplify dummy root subject before comparing it to the current article
Kévin Le Gouguec [Sun, 19 Jul 2020 02:34:22 +0000 (04:34 +0200)]
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).

4 years agoFix C-c C-f in the Gnus article buffer
Lars Ingebrigtsen [Sun, 19 Jul 2020 02:28:46 +0000 (04:28 +0200)]
Fix C-c C-f in the Gnus article buffer

* lisp/gnus/gnus-art.el (gnus-article-mode-map): Make the C-c C-f
command work in the article buffer, too (bug#40548).

4 years agoMention the Emacs bug tracker in the bug reporting doc strings
Lars Ingebrigtsen [Sun, 19 Jul 2020 01:49:16 +0000 (03:49 +0200)]
Mention the Emacs bug tracker in the bug reporting doc strings

* lisp/gnus/gnus-msg.el (gnus-bug): Mention the Emacs bug tracker.

* lisp/mail/emacsbug.el (report-emacs-bug): Link directly to the
Emacs portion of the bug reports (bug#41109).

4 years agoDoc fix for article-fill-long-lines
Lars Ingebrigtsen [Sun, 19 Jul 2020 01:20:13 +0000 (03:20 +0200)]
Doc fix for article-fill-long-lines

* lisp/gnus/gnus-art.el (article-fill-long-lines): Mention that it
also respects `fill-column' (bug#41534).

4 years agoAllow open-network-stream to use different TLS capability commands
Lars Ingebrigtsen [Sun, 19 Jul 2020 00:56:40 +0000 (02:56 +0200)]
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.

4 years agoNarrow to headers in gnus-registry before getting data
Eric Abrahamsen [Sun, 19 Jul 2020 00:19:21 +0000 (02:19 +0200)]
Narrow to headers in gnus-registry before getting data

* lisp/gnus/gnus-registry.el (gnus-registry-spool-action): Narrow
to the headers before getting data from them (bug#42029).

4 years agoFix ElDoc bugs around eldoc-echo-area-use-multiline-p.
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.

4 years ago; Reword bits of ElDoc internal documentation
João Távora [Sat, 18 Jul 2020 22:50:00 +0000 (23:50 +0100)]
; Reword bits of ElDoc internal documentation

* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Rewrite docstring.
(eldoc--invoke-strategy): Fix formatting and rewrite comments

4 years ago* lisp/window.el (display-buffer-override-next-command): Add ECHO arg.
Juri Linkov [Sat, 18 Jul 2020 23:43:18 +0000 (02:43 +0300)]
* lisp/window.el (display-buffer-override-next-command): Add ECHO arg.

* lisp/frame.el (other-frame-prefix):
* lisp/tab-bar.el (other-tab-prefix):
* lisp/windmove.el (windmove-display-in-direction):
* lisp/window.el (other-window-prefix, same-window-prefix):
Use new ECHO arg of display-buffer-override-next-command.

https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00819.html

4 years agoDon't have shr kill random buffers on network failures
Lars Ingebrigtsen [Sat, 18 Jul 2020 17:59:19 +0000 (19:59 +0200)]
Don't have shr kill random buffers on network failures

* lisp/url/url-queue.el (url-queue-callback-function): Don't kill
off random buffers on HTTP failures (bug#40976).

4 years agoMake eww-open-file work with Tramp file names
Lars Ingebrigtsen [Sat, 18 Jul 2020 16:02:43 +0000 (18:02 +0200)]
Make eww-open-file work with Tramp file names

* 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.

4 years agoFix documentation of a recent change in shr.el
Eli Zaretskii [Sat, 18 Jul 2020 14:40:44 +0000 (17:40 +0300)]
Fix documentation of a recent change in shr.el

* lisp/net/shr.el (shr-max-width, shr-width): Fix typo and wording
of the doc strings.

* etc/NEWS: Fix the wording of the 'shr-max-width's entry, and
move it to the SHR section.

4 years agoRevert "Fix filename completion in shell mode buffers"
Eli Zaretskii [Sat, 18 Jul 2020 08:17:31 +0000 (11:17 +0300)]
Revert "Fix filename completion in shell mode buffers"

This reverts commit e4d17d8cb479ffeeb7dfb7320a1432722ac8df75.
Per bug#42383 discussions, the fix for bug#34330 probably
just works around the real issue, which is in pcomplete.el.

4 years agoImprove documentation of 'bookmark-bmenu-mode'
Eli Zaretskii [Sat, 18 Jul 2020 07:53:20 +0000 (10:53 +0300)]
Improve documentation of 'bookmark-bmenu-mode'

* lisp/bookmark.el (bookmark-bmenu-mode): Add
`bookmark-bmenu-search' to the doc string.  (Bug#42325)

4 years agoUpdate systems using GnuTLS certificate files
Eli Zaretskii [Sat, 18 Jul 2020 07:02:28 +0000 (10:02 +0300)]
Update systems using GnuTLS certificate files

* lisp/net/gnutls.el (gnutls-trustfiles): Update the names of the
systems in the comments.  Reported by Richard Stallman <rms@gnu.org>
in
https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00455.html.

4 years ago; Add defvars for rcirc vars in order to silence the byte-compiler
Tassilo Horn [Fri, 17 Jul 2020 19:05:32 +0000 (21:05 +0200)]
; Add defvars for rcirc vars in order to silence the byte-compiler

* lisp/progmodes/bug-reference.el: Add rcirc defvars for silencing the
byte-compiler.

4 years agobug-reference auto-setup for IRC, implementation for rcirc
Tassilo Horn [Fri, 17 Jul 2020 18:59:04 +0000 (20:59 +0200)]
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.

4 years agoFix NOT-CURRENT behaviour in text-property-search-backward
Lars Ingebrigtsen [Fri, 17 Jul 2020 16:44:49 +0000 (18:44 +0200)]
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).

4 years agoImprove documentation of 'kill-emacs'
Eli Zaretskii [Fri, 17 Jul 2020 14:54:00 +0000 (17:54 +0300)]
Improve documentation of 'kill-emacs'

* doc/lispref/os.texi (Killing Emacs):
* src/emacs.c (Fkill_emacs): Document what non-integer, non-string
argument to 'kill-emacs' means.  (Bug#42400)

4 years agoFix <textarea> default texts in eww
Xu Chunyang [Fri, 17 Jul 2020 14:43:57 +0000 (16:43 +0200)]
Fix <textarea> default texts in eww

* lisp/net/eww.el (eww-tag-textarea): <textarea> default text
comes from the contents, not a value attribute (bug#39867).

4 years agoImprove documentation of 'display-raw-bytes-as-hex'
Eli Zaretskii [Fri, 17 Jul 2020 14:40:54 +0000 (17:40 +0300)]
Improve documentation of 'display-raw-bytes-as-hex'

* doc/emacs/display.texi (Text Display): Mention
'display-raw-bytes-as-hex'.  (Bug#42384)

4 years agoDon't message complete GIF data upon errors
Lars Ingebrigtsen [Fri, 17 Jul 2020 14:01:55 +0000 (16:01 +0200)]
Don't message complete GIF data upon errors

* 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).

4 years agoAdd support for a shr-max-width variable
Lars Ingebrigtsen [Fri, 17 Jul 2020 13:45:04 +0000 (15:45 +0200)]
Add support for a shr-max-width variable

* doc/misc/eww.texi (Advanced): Document it.

* lisp/net/shr.el (shr-max-width): Add new variable (bug#40909).
(shr-insert-document): Use it.

4 years agoClarify shr width computation
Lars Ingebrigtsen [Fri, 17 Jul 2020 13:30:29 +0000 (15:30 +0200)]
Clarify shr width computation

* lisp/net/shr.el (shr-insert-document): Clarify width
computation: shr-width was checked again in the `else' part where
we already knew it was nil.

4 years agoCorrect descriptions of init file
Robert Pluim [Fri, 17 Jul 2020 13:07:15 +0000 (15:07 +0200)]
Correct descriptions of init file

These still referred to XDG as being preferred.

* doc/emacs/custom.texi (Init File): Correct description of init
file preference order (Bug#42388).

* doc/emacs/custom.texi (Find Init): Correct description of
default init-file.

4 years ago; Simplify last change in shr.el
Basil L. Contovounesios [Fri, 17 Jul 2020 11:04:09 +0000 (12:04 +0100)]
; Simplify last change in shr.el

* lisp/net/shr.el (shr-max-columns): Simplify some function calls.

4 years agoMake old aliases to gnus-child* commands work before Gnus is loaded
Lars Ingebrigtsen [Fri, 17 Jul 2020 01:52:35 +0000 (03:52 +0200)]
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).

4 years agoShow eww bookmarks buffer only if it's not empty
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'.

4 years agoFix problems with not rendering shr tables with rowspan
Lars Ingebrigtsen [Fri, 17 Jul 2020 01:13:05 +0000 (03:13 +0200)]
Fix problems with not rendering shr tables with rowspan

* lisp/net/shr.el (shr-max-columns): When rowspans were in effect,
columns would go missing from subsequent lines (bug#42194).

4 years agoAdjust naming convention for dependent Gnus sessions
Lars Ingebrigtsen [Thu, 16 Jul 2020 23:46:57 +0000 (01:46 +0200)]
Adjust naming convention for dependent Gnus sessions

* doc/misc/gnus.texi (Child Gnusae): Rename node from "Slave
Gnusae" and adjust wording.  Also remove at least one joke.

* lisp/gnus/gnus-start.el (gnus-no-server-1, gnus-1)
(gnus-setup-news, gnus-save-newsrc-file): Adjust parameter names.
(gnus-child-mode): Rename and add alias.
(gnus-child-save-newsrc): Rename.
(gnus-parent-read-child-newsrc): Ditto.

* lisp/gnus/gnus-group.el (gnus-group-mode)
(gnus-group-get-new-news): Ditto.

* 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.

4 years agoFix interrupt-process on MS-Windows
Eli Zaretskii [Thu, 16 Jul 2020 16:51:19 +0000 (19:51 +0300)]
Fix interrupt-process on MS-Windows

* src/w32proc.c (sys_kill): Test the status of the left Ctrl key
for the purpose of restoring it after simulating Ctrl-C.  This
avoids leaving the left Ctrl key status in depressed state when
the user actually pressed the right Ctrl key.  (Bug#42350)

4 years agoAdd tramp and orgmode to bug-reference-setup-from-mail-alist.
Tassilo Horn [Thu, 16 Jul 2020 16:38:59 +0000 (18:38 +0200)]
Add tramp and orgmode to bug-reference-setup-from-mail-alist.

Also add a TODO that I should implement something similar for
IRC (rcirc/ERC).

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-mail-alist):
Auto-setup also with groups matching orgmode and tramp.

4 years agoUse describe-char-padded-string for composed character names in "C-u C-x ="
Juri Linkov [Wed, 15 Jul 2020 23:43:06 +0000 (02:43 +0300)]
Use describe-char-padded-string for composed character names in "C-u C-x ="

* lisp/descr-text.el (describe-char): Use describe-char-padded-string
for displaying Unicode names of composed characters on GUI frames.
(Bug#42256)

4 years ago;Fix eldoc regression bug#42365
Tassilo Horn [Wed, 15 Jul 2020 16:58:57 +0000 (18:58 +0200)]
;Fix eldoc regression bug#42365

4 years ago* lisp/epa.el (epa-show-key): New command.
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.

4 years agoepa-key-list-mode-map: Use widget-keymap as parent keymap
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.

4 years agoCosmetic changes to epa libraries
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.

4 years agoDrop unnecessary backward compatibility aliases
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.

4 years agoImprove and add doc-strings
Jonas Bernoulli [Tue, 18 Feb 2020 15:59:00 +0000 (16:59 +0100)]
Improve and add doc-strings

* lisp/epa-file.el (epa-file-select-keys):
lisp/epa-hook.el (epa-file-name-regexp):
lisp/epa.el (epa-exit-buffer): Improve doc-string.
* lisp/epa-hook.el (epa-file-name-regexp-update): Add doc-string.

4 years ago* lisp/epg-config.el (epg-config--make-gpg-configuration): Fix indentation.
Jonas Bernoulli [Tue, 18 Feb 2020 15:53:34 +0000 (16:53 +0100)]
* lisp/epg-config.el (epg-config--make-gpg-configuration): Fix indentation.

4 years agoAdd all epa faces to epa-faces Custom group
Jonas Bernoulli [Tue, 18 Feb 2020 15:49:19 +0000 (16:49 +0100)]
Add all epa faces to epa-faces Custom group

`epa-validity-face-alist' isn't actually a face but belongs
in that group anyway.

* lisp/epa.el (epa-field-name, epa-field-body)
(epa-validity-face-alist): Add to epa-faces Custom group.

4 years ago* lisp/epa.el (epa-faces): Move definition.
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.

4 years agoImprove display of composed character names in "C-u C-x =" on GUI frames
Juri Linkov [Tue, 14 Jul 2020 23:19:49 +0000 (02:19 +0300)]
Improve display of composed character names in "C-u C-x =" on GUI frames

* lisp/descr-text.el (describe-char): On GUI frames, display the
Unicode names of really composed characters only (Bug#42256)

4 years agoConsistently stylize eldoc as ElDoc in more prose
Basil L. Contovounesios [Tue, 14 Jul 2020 12:49:34 +0000 (13:49 +0100)]
Consistently stylize eldoc as ElDoc in more prose

This fixes new occurrences of "Eldoc" since emacs-27.

* doc/lispref/modes.texi (Major Mode Conventions):
* etc/NEWS:
* lisp/descr-text.el (describe-char-eldoc):
* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p)
(eldoc-prefer-doc-buffer, eldoc--documentation-strategy-defcustom):
Consistently capitalize eldoc as ElDoc rather than Eldoc in
documentation and commentary.