]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoDon't quote lambdas in several places
Stefan Kangas [Wed, 30 Sep 2020 14:18:50 +0000 (16:18 +0200)]
Don't quote lambdas in several places

* admin/find-gc.el (find-gc-unsafe):
* lisp/align.el (align-rules-list):
* lisp/comint.el (comint-arguments):
* lisp/double.el (isearch-mode-map):
* lisp/ehelp.el (electric-help-command-loop):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emulation/cua-rect.el (cua--copy-rectangle-as-kill)
(cua-copy-rectangle-as-text):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/hexl.el (hexl-insert-multibyte-char):
* lisp/international/titdic-cnv.el (tsang-quick-converter)
(ziranma-converter):
* lisp/language/tibet-util.el (tibetan-decompose-precomposition-alist):
* lisp/mail/mailalias.el (mail-get-names):
* lisp/mh-e/mh-e.el (mh-auto-fields-list, mh-identity-default):
* lisp/mouse.el (mouse-buffer-menu-map, mouse-buffer-menu-alist):
* lisp/play/gametree.el (gametree-make-heading-function):
* lisp/shell.el (shell--command-completion-data):
* lisp/talk.el (talk-update-buffers):
* lisp/tempo.el (tempo-insert-template, tempo-is-user-element)
(tempo-build-collection):
* lisp/term.el (term-input-filter, term-pager-help):
* lisp/textmodes/table.el (table-delete-column):
* lisp/url/url-cache.el (url-cache-create-filename-human-readable):
* lisp/textmodes/tex-mode.el (latex-imenu-create-index): Don't quote
lambdas.

3 years agoDon't recommend quoting lambdas
Stefan Kangas [Wed, 30 Sep 2020 14:02:22 +0000 (16:02 +0200)]
Don't recommend quoting lambdas

* doc/misc/calc.texi (Symbolic Lisp Functions):
* doc/misc/cl.texi (Obsolete Lexical Binding):
* lisp/master.el:
* lisp/progmodes/sql.el (sql-interactive-mode):
* lisp/textmodes/flyspell.el (flyspell-mode):
* lisp/textmodes/ispell.el (ispell-message):
* lisp/textmodes/table.el: Doc fixes; don't recommend quoting
lambdas.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Oct 2020 13:27:29 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.

3 years agoUse Fkeywordp in dbusbind.c, again
Michael Albinus [Thu, 1 Oct 2020 09:20:38 +0000 (11:20 +0200)]
Use Fkeywordp in dbusbind.c, again

* src/dbusbind.c (XD_KEYWORDP): New macro.
(XD_DBUS_TYPE_P, Fdbus__init_bus, xd_read_queued_messages): Use it.

3 years agoRevert last change in dbusbind.c
Michael Albinus [Thu, 1 Oct 2020 08:32:50 +0000 (10:32 +0200)]
Revert last change in dbusbind.c

* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Revert last change.  (Bug#43724)

3 years agoRemove mml-sec-test that assumes the first signature
Lars Ingebrigtsen [Thu, 1 Oct 2020 03:19:49 +0000 (05:19 +0200)]
Remove mml-sec-test that assumes the first signature

This is no longer supported; the user is asked for what signature to
use.

3 years agoMake mml-sec-tests not hang waiting for input
Lars Ingebrigtsen [Thu, 1 Oct 2020 03:17:01 +0000 (05:17 +0200)]
Make mml-sec-tests not hang waiting for input

* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Only query if we're
running interactively.  This makes a test not hang.

3 years agoDon't optimize away star patterns in minibuffer file name completion
Pip Cet [Thu, 1 Oct 2020 03:06:41 +0000 (05:06 +0200)]
Don't optimize away star patterns in minibuffer file name completion

* lisp/minibuffer.el (completion-pcm--optimize-pattern): Keep
'star in the pattern (bug#41705).

3 years agoFix the end-of-query prompt in multi-occur and multi-isearch when fido
Lars Ingebrigtsen [Thu, 1 Oct 2020 01:01:33 +0000 (03:01 +0200)]
Fix the end-of-query prompt in multi-occur and multi-isearch when fido

* lisp/misearch.el (multi-isearch-read-buffers): Ditto.

* lisp/replace.el (multi-occur--prompt): New function (bug#41633).
(multi-occur): Use it.

3 years agoMake gnus-base64-repad a bit stricter again
Alex Bochannek [Thu, 1 Oct 2020 00:44:58 +0000 (02:44 +0200)]
Make gnus-base64-repad a bit stricter again

* lisp/gnus/gnus-util.el (gnus-base64-repad): Make the code a bit
stricter again.

3 years agoQuery for the signer when sending signed mail (with unknown signer)
Robert Pluim [Thu, 1 Oct 2020 00:14:17 +0000 (02:14 +0200)]
Query for the signer when sending signed mail (with unknown signer)

* lisp/gnus/mml-sec.el (mml-secure-sender-sign-query): New
function (bug#40118).
(mml-secure-epg-sign): Use it to determine the signer (bug#40118).

* lisp/gnus/mml-sec.el
(mml-secure-allow-signing-with-unknown-recipient): Remove.

3 years agoFix segfault in some cases when restoring a selected window
martin rudalics [Thu, 1 Oct 2020 00:00:06 +0000 (02:00 +0200)]
Fix segfault in some cases when restoring a selected window

* src/xdisp.c (restore_selected_window): Fix the more grave
problems caused by a function deleting the previously selected
frame or window (bug#39977).

3 years agoSplit auto-revert-buffers into several functions
Boruch Baum [Wed, 30 Sep 2020 23:53:30 +0000 (01:53 +0200)]
Split auto-revert-buffers into several functions

* lisp/autorevert.el (auto-revert--buffer-candidates)
(auto-revert-buffer): Refactor out...
(auto-revert-buffers): ... from here.

3 years agoFix up previous window excursion patch in epa--select-keys
Lars Ingebrigtsen [Wed, 30 Sep 2020 23:44:05 +0000 (01:44 +0200)]
Fix up previous window excursion patch in epa--select-keys

* lisp/epa.el (epa--select-keys): Use save-window-excursion
instead of open-coding the macro.

3 years ago* lisp/term.el: Make C-/ undo in a nested Emacs subprocess
Stefan Monnier [Wed, 30 Sep 2020 23:17:26 +0000 (19:17 -0400)]
* lisp/term.el: Make C-/ undo in a nested Emacs subprocess

(term-send-C-_): New function.
(term-raw-map): Use it for `C-/`, as is done in xterm and friends.

3 years ago* doc/emacs/basic.texi (Basic Undo): Explain the C-/ situation in xterm
Stefan Monnier [Wed, 30 Sep 2020 23:08:47 +0000 (19:08 -0400)]
* doc/emacs/basic.texi (Basic Undo): Explain the C-/ situation in xterm

AFAICT, in ttys you can send a `C-_` to Emacs either by pressing
`C-/` (e.g. xterm, uxterm, rxvt, xfce4-terminal, gnome-terminal)
or by pressing `C--` (e.g. rxvt, Linux console).

3 years agoWhen recipient has no public key, make offer to skip it optional.
Richard M Stallman [Wed, 30 Sep 2020 22:44:42 +0000 (18:44 -0400)]
When recipient has no public key, make offer to skip it optional.

* epa-mail.el (epa-mail-offer-skip): New option.
(epa-mail-encrypt): If epa-mail-offer-skip is nil,
don't offer to skip a keyless recipient, just cause error.

3 years agoClarify previous undo keys change
Richard M Stallman [Wed, 30 Sep 2020 22:15:43 +0000 (18:15 -0400)]
Clarify previous undo keys change

Clarify which terminals allow C-/ and which make C-_ easy to type.

3 years agoFurther doc fixes for dotimes about RESULT
Lars Ingebrigtsen [Wed, 30 Sep 2020 18:29:16 +0000 (20:29 +0200)]
Further doc fixes for dotimes about RESULT

* lisp/subr.el (dotimes): Be even more explicit about RESULT
(bug#16206).

3 years agoMinor documentation copyedits
Eli Zaretskii [Wed, 30 Sep 2020 16:38:55 +0000 (19:38 +0300)]
Minor documentation copyedits

* etc/NEWS:
* doc/emacs/dired.texi (Dired Enter): Fix wording, punctuation,
and typos in doc of 'dired-switches-in-mode-line'.

3 years agoFix problem with parsing . as a symbol in bovine
Vladimir Nikishkin [Wed, 30 Sep 2020 16:32:32 +0000 (18:32 +0200)]
Fix problem with parsing . as a symbol in bovine

* lisp/cedet/semantic/bovine/scm.el (semantic-lex-scheme-symbol):
Symbols do not have to start with a word-constituent character
(bug#40034).  In particular, symbols like : and . are valid.

Copyright-paperwork-exempt: yes

3 years agoAllow controlling the Dired switches shown in the mode line
Drew Adams [Wed, 30 Sep 2020 15:59:59 +0000 (17:59 +0200)]
Allow controlling the Dired switches shown in the mode line

* doc/emacs/dired.texi (Dired Enter): Document it (bug#41250).

* lisp/dired.el (dired-switches-in-mode-line): New variable (bug#41250).
(dired-sort-set-mode-line): Use it.

3 years agoFix problem of having the wrong window selected after saving foo.gpg
Lars Ingebrigtsen [Wed, 30 Sep 2020 15:36:39 +0000 (17:36 +0200)]
Fix problem of having the wrong window selected after saving foo.gpg

* lisp/epa.el (epa--select-keys): Restore the window configuration
after selecting the key to use (bug#43703).  This also ensures
that the buffer we were editing ends up as the current buffer
after saving it, instead of selecting a different window.

3 years agoFix 'move-to-column' when invisible text follows a TAB
Eli Zaretskii [Wed, 30 Sep 2020 14:33:58 +0000 (17:33 +0300)]
Fix 'move-to-column' when invisible text follows a TAB

* src/indent.c (scan_for_column): Accept 2 more arguments, and
report through them the position corresponding to PREVCOL.  All
callers changed.
(Fmove_to_column): Use the prev_col's position to test for a TAB
instead of assuming that the TAB is just before point (which is
false when there's invisible text around).  (Bug#43587)

* test/src/indent-tests.el: New file.

3 years agoClarify the "Forgot to expand macro" message
Lars Ingebrigtsen [Wed, 30 Sep 2020 14:12:27 +0000 (16:12 +0200)]
Clarify the "Forgot to expand macro" message

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Make the
define-after-use warning for macros clearer (bug#43678).

3 years agoMinor fixes of recent changes
Eli Zaretskii [Wed, 30 Sep 2020 13:56:08 +0000 (16:56 +0300)]
Minor fixes of recent changes

* lisp/emacs-lisp/generic.el (define-generic-mode): Fix typos.

* etc/NEWS: Adjust an entry due to recent changes.

3 years agoStricter checks for D-Bus compound types.
Michael Albinus [Wed, 30 Sep 2020 13:28:53 +0000 (15:28 +0200)]
Stricter checks for D-Bus compound types.

* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Use Fkeywordp instead of SYMBOLP.
(xd_signature): Stricter checks for compound types.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.

3 years agoMinor code cleanup in dbus-tests.el
Michael Albinus [Wed, 30 Sep 2020 10:40:08 +0000 (12:40 +0200)]
Minor code cleanup in dbus-tests.el

* test/lisp/net/dbus-tests.el (dbus--tests-dir): Make it a defconst.
(dbus--test-method-reentry-handler): Mark args as unused.
(dbus-test04-method-reentry): Tag it :expensive-test.  Fix typo.
(dbus-test06-property-types): Remove duplicate test.
(dbus--test-introspect): Use `insert-file-contents-literally'.
(dbus--test-validate-property): Mark expected-annotations as unused.
(dbus--test-validate-m-or-s): Remove superfluous le-clause.

3 years agoAdd D-Bus method-call reentrant test
Hugh Daschbach [Wed, 30 Sep 2020 09:27:22 +0000 (11:27 +0200)]
Add D-Bus method-call reentrant test

* test/lisp/net/dbus-tests.el (dbus--tests-method-reentry-handler):
New defun.
(dbus-test04-method-reentry): New test.  (Bug#43251)

3 years ago* test/lisp/net/dbus-tests.el: Add timeout tests.
Hugh Daschbach [Wed, 30 Sep 2020 09:23:24 +0000 (11:23 +0200)]
* test/lisp/net/dbus-tests.el: Add timeout tests.

(dbus-test04-call-method-timeout, dbus-test07-introspection-timeout):
New tests.

3 years agoAdd D-Bus introspection tests
Hugh Daschbach [Wed, 30 Sep 2020 09:19:41 +0000 (11:19 +0200)]
Add D-Bus introspection tests

* lisp/net/dbus.el (dbus-annotation-deprecated): New defconst.

* test/lisp/net/dbus-tests.el  (dbus--tests-dir): New defvar.
(dbus--test-introspect, dbus--test-validate-interface)
(dbus--test-validate-annotations, dbus--test-validate-property)
(dbus--test-validate-m-or-s, dbus--test-validate-signal)
(dbus--test-validate-method): New defuns.
(dbus-test07-introspection): New test.

* test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml:
New test data.

3 years ago* test/lisp/net/dbus-tests.el: Add property tests. (Bug#43252)
Hugh Daschbach [Wed, 30 Sep 2020 09:09:17 +0000 (11:09 +0200)]
* test/lisp/net/dbus-tests.el: Add property tests.  (Bug#43252)

(dbus--test-run-property-test, dbus--test-property): New defuns.
(dbus-test06-property-types): New test for property registration,
set, get.

3 years agoDon't have C-x = bug out in a "C" locale with non-ASCII chars
Stefan Monnier [Wed, 30 Sep 2020 03:43:07 +0000 (05:43 +0200)]
Don't have C-x = bug out in a "C" locale with non-ASCII chars

* lisp/simple.el (what-cursor-position): Ensure that we always
have a coding system here, even if the locale is "C" (bug#40702).

3 years agoFix whitespace regexp in gnus-base64-repad
Lars Ingebrigtsen [Wed, 30 Sep 2020 03:05:04 +0000 (05:05 +0200)]
Fix whitespace regexp in gnus-base64-repad

* lisp/gnus/gnus-util.el (gnus-base64-repad): Fix the whitespace
regexp.

3 years agoFix gnus-base64-repad test failures
Lars Ingebrigtsen [Wed, 30 Sep 2020 03:03:35 +0000 (05:03 +0200)]
Fix gnus-base64-repad test failures

3 years ago* lisp/emacs-lisp/cl-macs.el (hash-table): Define the type's typep test
Stefan Monnier [Wed, 30 Sep 2020 02:28:23 +0000 (22:28 -0400)]
* lisp/emacs-lisp/cl-macs.el (hash-table): Define the type's typep test

3 years agoFix isearch-group-* colours on low-colour displays
Lars Ingebrigtsen [Wed, 30 Sep 2020 02:06:28 +0000 (04:06 +0200)]
Fix isearch-group-* colours on low-colour displays

* lisp/isearch.el (isearch-group-1): On low-colour displays, just
use the normal isearch colour (bug#43702).
(isearch-group-2 etc): Ditto.

3 years agodefine-generic-mode doc string fix
Lars Ingebrigtsen [Wed, 30 Sep 2020 01:52:18 +0000 (03:52 +0200)]
define-generic-mode doc string fix

* lisp/emacs-lisp/generic.el (define-generic-mode): Say what a
generic mode is (bug#43713).

3 years agoGive better error feedback on wrong password in .gpg files
Lars Ingebrigtsen [Wed, 30 Sep 2020 01:47:47 +0000 (03:47 +0200)]
Give better error feedback on wrong password in .gpg files

* lisp/epa-file.el (epa-file--find-file-not-found-function): Do a
user-error when there's a wrong password (bug#43704).
(epa--wrong-password-p): New function.
(epa-file-insert-file-contents): Use it, and stash the error away
for later signalling.

* lisp/emacs-lisp/subr-x.el (if-let): Autoload.

3 years agosoap-client: Bump version to 3.2.0
Thomas Fitzsimmons [Tue, 29 Sep 2020 21:33:21 +0000 (17:33 -0400)]
soap-client: Bump version to 3.2.0

* lisp/net/soap-client.el: Bump version to 3.2.0.

3 years agosoap-client: Remove FIXME comment
Thomas Fitzsimmons [Tue, 29 Sep 2020 21:30:04 +0000 (17:30 -0400)]
soap-client: Remove FIXME comment

* lisp/net/soap-client.el (soap-encode-attributes): Remove
cl-defmethod FIXME comment; continue supporting Emacs 24.1.

3 years agosoap-client: Update soap-decode-date-time
Thomas Fitzsimmons [Tue, 29 Sep 2020 21:15:40 +0000 (17:15 -0400)]
soap-client: Update soap-decode-date-time

* lisp/net/soap-client.el (soap-decode-date-time): Add support for
Emacs versions that support fractional seconds.  Make DATATYPE
optional.  Remove FIXME comment.

Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
3 years agoMore strict D-Bus type checking
Michael Albinus [Tue, 29 Sep 2020 17:43:02 +0000 (19:43 +0200)]
More strict D-Bus type checking

* lisp/net/dbus.el (dbus-register-monitor): Register proper key.
(dbus-monitor-handler): Adapt docstring.  Use grave text-quoting-style.

* src/dbusbind.c (xd_signature, xd_append_arg): More strict tests.
(syms_of_dbusbind): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Extend test.

3 years agoFix emacsclient -c foo.txt behaviour with many frames
Lars Ingebrigtsen [Tue, 29 Sep 2020 14:21:17 +0000 (16:21 +0200)]
Fix emacsclient -c foo.txt behaviour with many frames

* lisp/server.el (server-execute): Pass in whether we opened a new
frame or not (bug#43645).
(server-switch-buffer): Use this to switch to the requested buffer
in the new frame if we have "emacsclient -c foo.txt", and retain
the old behaviour if it's "emacsclient foo.txt".

3 years agoMake M-x compile skip the header when looking for errors etc
Lars Ingebrigtsen [Tue, 29 Sep 2020 13:59:50 +0000 (15:59 +0200)]
Make M-x compile skip the header when looking for errors etc

* lisp/progmodes/compile.el (compilation--ensure-parse): Skip the
header when parsing (bug#43651).
(compilation-start): Mark the end.

3 years agoFix space parsing in gnus-base64-repad
Lars Ingebrigtsen [Tue, 29 Sep 2020 13:36:46 +0000 (15:36 +0200)]
Fix space parsing in gnus-base64-repad

* lisp/gnus/gnus-util.el (gnus-base64-repad): Get the separator
regexp right -- there will often be spaces around the newlines.

3 years ago* lisp/gnus/smime.el (smime-openssl-program): Allow nil value.
Mattias Engdegård [Tue, 29 Sep 2020 10:33:50 +0000 (12:33 +0200)]
* lisp/gnus/smime.el (smime-openssl-program): Allow nil value.

3 years agoFix custom-tests with non-GNU grep
Mattias Engdegård [Tue, 29 Sep 2020 09:24:38 +0000 (11:24 +0200)]
Fix custom-tests with non-GNU grep

* admin/cus-test.el (cus-test-get-lisp-files): Add path argument required
by standard grep (BSD, for instance).

3 years ago* src/eval.c (Fapply): Simplify last change
Stefan Monnier [Tue, 29 Sep 2020 03:14:03 +0000 (23:14 -0400)]
* src/eval.c (Fapply): Simplify last change

3 years agoImprove D-Bus monitor
Michael Albinus [Mon, 28 Sep 2020 12:47:46 +0000 (14:47 +0200)]
Improve D-Bus monitor

* lisp/net/dbus.el (dbus-monitor-method-call)
(dbus-monitor-method-return, dbus-monitor-error)
(dbus-monitor-signal): New defconsts.
(dbus-monitor-goto-serial): New defun.
(dbus-monitor-handler): Use them.  Add timestamp.  Make also links
between D-Bus messages with the same serial.

3 years agoSuggest region contents in highlight-regexp when region active
Earl [Mon, 28 Sep 2020 12:16:22 +0000 (14:16 +0200)]
Suggest region contents in highlight-regexp when region active

* lisp/hi-lock.el (hi-lock-face-buffer): Use the region in the
prompt if the region is active in transient-mark-mode (bug#43641).

3 years agocperl-mode: Add compatibility for Emacs 26.1
Harald Jörg [Mon, 28 Sep 2020 12:13:01 +0000 (14:13 +0200)]
cperl-mode: Add compatibility for Emacs 26.1

* lisp/progmodes/cperl-mode.el (cperl--time-convert): New
compatibility helper for time-convert (available in Emacs
27.1)
(cperl--format-prompt): New compatibility helper for
format-prompt (available in Emacs 28)
(cperl-info-on-command): use cperl--format-prompt
(cperl-perldoc): use cperl--format-prompt
(cperl-time-fontification): use cperl--time-convert (bug#43652)

3 years agoRepad the Face header in Gnus
Alex Bochannek [Mon, 28 Sep 2020 12:09:07 +0000 (14:09 +0200)]
Repad the Face header in Gnus

* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Use it.

* lisp/gnus/gnus-util.el (gnus-base64-repad): New function (bug#43441).

3 years agoFix Gnus parsing of weekly recurring icalendar events
Jan Tatarik [Mon, 28 Sep 2020 11:08:32 +0000 (13:08 +0200)]
Fix Gnus parsing of weekly recurring icalendar events

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-interval): Fix parsing of weekly
recurring events (bug#43669).

Example: in the absence of explicit INTERVAL value in the calendar
event, a weekly event with occurrences scheduled for Mondays and
Wednesdays should receive the default recurring interval of "1" and the
org mode timestamp repeater should be "+1w".

Due to a bug in the current code we receive "WEEKLY" and "+WEEKLYw"
instead. The patch fixes the issue.

3 years ago; * etc/NEWS: Put related items together and fix grammar
Mattias Engdegård [Mon, 28 Sep 2020 10:04:49 +0000 (12:04 +0200)]
; * etc/NEWS: Put related items together and fix grammar

3 years ago; * doc/lispref/searching.texi (Search and Replace): Rephrase
Mattias Engdegård [Mon, 28 Sep 2020 10:04:10 +0000 (12:04 +0200)]
; * doc/lispref/searching.texi (Search and Replace): Rephrase

3 years agoFix pcomplete completion of things like `xargs` and `sudo` (bug#16197)
Stefan Monnier [Mon, 28 Sep 2020 02:07:14 +0000 (22:07 -0400)]
Fix pcomplete completion of things like `xargs` and `sudo` (bug#16197)

* lisp/pcmpl-unix.el (pcomplete/xargs): Don't `pcomplete-this` around
`pcomplete-command-completion-function`.
(pcomplete/sudo): Make it an alias for `pcomplete/xargs`.

* lisp/shell.el (shell-command-completion-function): Return the
names from `exec-path` when the command name has no `/`.

3 years agoDocument D-Bus monitoring
Michael Albinus [Sun, 27 Sep 2020 16:59:04 +0000 (18:59 +0200)]
Document D-Bus monitoring

* doc/misc/dbus.texi: Replace "symbol" by "keyword" where appropriate.
(Alternative Buses): Adapt dbus-init-bus description.
(Errors and Events): Adapt dbus-event structure.  New defuns
dbus-event-destination-name, dbus-event-handler and dbus-event-arguments.
(Monitoring Events): New node.

* lisp/net/dbus.el: Replace "symbol" by "keyword" where appropriate.
(cl-lib): Require.
(dbus-register-monitor): Adapt the argument list.
(dbus-monitor-handler): Extend.
(dbus-init-bus): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types):
Skip if needed.  Extend test.

3 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
Merge from origin/emacs-27

0b78785a9b (origin/emacs-27) Minor copyedits in the Emacs user manual
0dfc6fdc1f Followup to a recent change in menu-bar.el
767713682c Enable "Continue Tags Search" menu item only when it can b...
4bb7532163 Fix soap-client URL

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

cc7f971485 Fix out-of-source ‘make check’ emacs-module-tests

3 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
Merge from origin/emacs-27

f31c6792ab Fix support for Zip64 zip files
ba635a19fb * lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix.  (B...
cc8fef2bdd Avoid infinite recursion with 'relative' line numbers display
395f10cb98 ; Fix more trivial typos
bf4accb65e ; Fix some trivial typos

# Conflicts:
# etc/NEWS
# lisp/arc-mode.el

3 years agoFix more single-byte accesses caused by bytepos/charpos confusion
Pip Cet [Sun, 27 Sep 2020 15:40:07 +0000 (17:40 +0200)]
Fix more single-byte accesses caused by bytepos/charpos confusion

* src/cmds.c (internal_self_insert): Use FETCH_BYTE, not
FETCH_CHAR, for a decremented byte position (bug#41520).

* src/xdisp.c (Fwindow_text_pixel_size, trailing_whitespace_p): Ditto.

3 years agoHandle single-argument `apply' consistently (bug#40968)
Pip Cet [Sun, 27 Sep 2020 14:59:00 +0000 (16:59 +0200)]
Handle single-argument `apply' consistently (bug#40968)

* src/eval.c (Fapply): Handle (apply nil) without crashing.
Document single-argument form.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt
to optimize single-argument apply.
* doc/lispref/functions.texi (Calling Functions): Document
single-argument apply.  Provide example (bug#40968).

3 years agoAvoid 1s sleep-for before sending the startfile to a comint process
Pip Cet [Sun, 27 Sep 2020 13:07:34 +0000 (15:07 +0200)]
Avoid 1s sleep-for before sending the startfile to a comint process

* lisp/comint.el (comint-exec): Simplify startup file code.
(Bug#41640).

3 years ago; * doc/emacs/building.texi (Grep Searching): Fix a typo.
Eli Zaretskii [Sun, 27 Sep 2020 13:00:39 +0000 (16:00 +0300)]
; * doc/emacs/building.texi (Grep Searching): Fix a typo.

3 years agoAdd a new grep-match-regexp variable
Simon Lang [Sun, 27 Sep 2020 12:55:22 +0000 (14:55 +0200)]
Add a new grep-match-regexp variable

* doc/emacs/building.texi (Grep Searching): Document it.

* lisp/progmodes/grep.el (grep-match-regexp): New variable (bug#41766).
(grep-filter): Use it.

3 years agoMinor string-search optimisations (bug#43598)
Mattias Engdegård [Sun, 27 Sep 2020 12:28:07 +0000 (14:28 +0200)]
Minor string-search optimisations (bug#43598)

* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones.  Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.

3 years agoImprove accuracy in string-replace description (bug#43598)
Mattias Engdegård [Sun, 27 Sep 2020 12:24:36 +0000 (14:24 +0200)]
Improve accuracy in string-replace description (bug#43598)

* doc/lispref/searching.texi (Search and Replace): More careful
description; string-replace does not necessarily return a copy.

3 years ago; * test/lisp/subr-tests.el (string-replace): Add more test cases
Mattias Engdegård [Sun, 27 Sep 2020 11:32:27 +0000 (13:32 +0200)]
; * test/lisp/subr-tests.el (string-replace): Add more test cases

3 years agoMinor copyedits in the Emacs user manual
Eli Zaretskii [Sun, 27 Sep 2020 06:09:27 +0000 (09:09 +0300)]
Minor copyedits in the Emacs user manual

* doc/emacs/emacs.texi (Top): Remove "real-time" from the Emacs
description; add "advanced", to be consistent with what we say in
the Introduction section.  (Bug#43633)

3 years agoImprove documentation of the 'abbrev-suggest' feature
Eli Zaretskii [Sun, 27 Sep 2020 05:57:17 +0000 (08:57 +0300)]
Improve documentation of the 'abbrev-suggest' feature

* lisp/abbrev.el (abbrev-suggest, abbrev-suggest-hint-threshold)
(abbrev-suggest-show-report): Improve wording of the doc strings.

* doc/emacs/abbrevs.texi (Abbrevs Suggestions): Fix the typo in
the node name.  Improve wording.
* doc/emacs/emacs.texi (Top): Add the new node in the @detailmenu
section.

* etc/NEWS: Improve wording of the NEWS entry for
'abbrev-suggest'.

3 years agoImprove display of raw bytes in the echo-area
Eli Zaretskii [Sun, 27 Sep 2020 05:26:56 +0000 (08:26 +0300)]
Improve display of raw bytes in the echo-area

* src/print.c (print_object): When printing a unibyte string,
convert non-ASCII bytes to their character code, before sending
them to 'printchar'.  (Bug#43632)

3 years agoFix searching for multibyte needles in unibyte haystacks
Lars Ingebrigtsen [Sun, 27 Sep 2020 00:01:03 +0000 (02:01 +0200)]
Fix searching for multibyte needles in unibyte haystacks

* src/fns.c (Fstring_search): Make this work better when searching
unibyte haystacks for multibyte needles (bug#43598).

3 years agoMake dired-replace-in-string obsolete
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:50:39 +0000 (00:50 +0200)]
Make dired-replace-in-string obsolete

* lisp/dired.el (dired-insert-directory):
* lisp/dired-aux.el (dired-rename-subdir, dired-rename-subdir-2)
(dired-insert-subdir): Adjust callers.

* lisp/dired.el (dired-replace-in-string): Make obsolete.

3 years agoAdd tiny optimization for string-search
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:35:11 +0000 (00:35 +0200)]
Add tiny optimization for string-search

* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).

3 years agoRename replace-in-string to string-replace
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:24:50 +0000 (00:24 +0200)]
Rename replace-in-string to string-replace

* doc/lispref/searching.texi (Search and Replace): Update.
* lisp/bindings.el (mode-line-position): Update callers.

* lisp/subr.el (string-replace): Rename from replace-in-string
since that clashes with XEmacs' replace-in-string which is
equivalent to the Emacs replace-regexp-in-string (bug#43598).

3 years agoFix gnus-faq example
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:20:03 +0000 (00:20 +0200)]
Fix gnus-faq example

* doc/misc/gnus-faq.texi (FAQ 6-2): replace-in-string was the XEmacs
name for the function.

3 years agoSlight replace-in-string optimization
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:17:58 +0000 (00:17 +0200)]
Slight replace-in-string optimization

* lisp/subr.el (replace-in-string): Optimize to return the
original string if nothing was replaced (bug#43598).

3 years agoAbbrev suggestions helps users remember to use defined abbrevs
Mathias Dahl [Sat, 26 Sep 2020 19:03:58 +0000 (15:03 -0400)]
Abbrev suggestions helps users remember to use defined abbrevs

    * lisp/abbrev.el (abbrev-suggest): New defcustom.
    (abbrev-suggest-hint-threshold): New defcustom.
    (abbrev--suggest-get-active-tables-including-parents): New defun.
    (abbrev--suggest-get-active-abbrev-expansions): New defun.
    (abbrev--suggest-count-words): New defun.
    (abbrev--suggest-get-previous-words): New defun.
    (abbrev--suggest-above-threshold): New defun.
    (abbrev--suggest-saved-recommendations): New defvar.
    (abbrev--suggest-inform-user): New defun.
    (abbrev--suggest-shortest-abbrev): New defun.
    (abbrev--suggest-maybe-suggest): New defun.
    (abbrev--suggest-get-totals): New defun.
    (abbrev-suggest-show-report): New defun.
    (expand-abbrev): If the previous word was not an abbrev, maybe
    suggest an abbrev to the user.
    * doc/emacs/abbrevs.texi (Abbrev suggestions): New section.
    * etc/NEWS: Announce abbrev suggestions.

3 years agoFix the patch tagging in submit-emacs-patch
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:38:38 +0000 (17:38 +0200)]
Fix the patch tagging in submit-emacs-patch

* lisp/mail/emacsbug.el (submit-emacs-patch): Put the tags in the
debbugs pseudo-headers because X-Debbugs-Tags is not a thing that
exists.

3 years agoFollowup to a recent change in menu-bar.el
Eli Zaretskii [Sat, 26 Sep 2020 15:35:00 +0000 (18:35 +0300)]
Followup to a recent change in menu-bar.el

* lisp/fileloop.el (fileloop--operate-function): Mention in a
comment that menu-bar.el relies on the default value.

3 years agomessage-add-action doc string fix
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:33:08 +0000 (17:33 +0200)]
message-add-action doc string fix

* lisp/gnus/message.el (message-add-action): Document types.

3 years agoDisplay some character widget values in a more user-friendly way
Mauro Aranda [Sat, 26 Sep 2020 15:09:22 +0000 (17:09 +0200)]
Display some character widget values in a more user-friendly way

* lisp/wid-edit.el (widget-character--escape-sequences-alist): New
variable.
(widget-character--change-character-display): New function.  Use the new
variable.
(widget-character-notify): New function, to keep track of the changes
in the character widget, and display characters like tab,
newline and spaces better.
(character widget): Use widget-character-notify as the notify
function.  Use widget-character--change-character-display for the
internal representation of value (bug#15925).

3 years agoMake macroexpand of `push' slightly less confusing
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:05:17 +0000 (17:05 +0200)]
Make macroexpand of `push' slightly less confusing

* lisp/subr.el (push): Use a symbol with a different name to make
macroexpand look slightly less confusing (bug#43601).

3 years agoFix defcustom types of some variables defined in C
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:02:52 +0000 (17:02 +0200)]
Fix defcustom types of some variables defined in C

* lisp/cus-start.el (standard): Fix the defcustom type of a number
of variables defined in C (bug#43611).

3 years agoFix mouse highlighting in Customize buffers
Lars Ingebrigtsen [Sat, 26 Sep 2020 14:36:31 +0000 (16:36 +0200)]
Fix mouse highlighting in Customize buffers

* lisp/wid-edit.el (widget-button-click): Remove a
newly-introduced check that made mouse highlights no longer work
(bug#43612).  It's unclear what the check was trying to fix.

3 years agocperl-mode: Delete conditional code where conditions evaluate to nil
Harald Jörg [Sat, 26 Sep 2020 13:51:15 +0000 (15:51 +0200)]
cperl-mode: Delete conditional code where conditions evaluate to nil

* lisp/progmodes/cperl-mode.el (cperl-force-face): This
macro's single effect is now inlined, and the macro is gone.
(cperl-problems): The reference to choose-color.el, which
is no longer available for download, is deleted.
(no function): A list of unnecessary empty variable
definitions is gone.  They were needed for Emacs v19 and
below.
(cperl-init-faces-weak): This function does no longer do
anything and is therefore deleted.
(cperl-init-faces): Some bodies of conditional code is deleted
because as of today the conditions evaluate to constants.  The
face cperl-nonoverridable-face is no longer available as
variable and needs to be doubly-quoted in one place (bug#43622).

3 years agoSilence some byte-compiler warnings
Stefan Kangas [Sat, 26 Sep 2020 09:34:20 +0000 (11:34 +0200)]
Silence some byte-compiler warnings

* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
* test/lisp/custom-tests.el (cus-test-opts):
* test/lisp/help-fns-tests.el (foo-test-map)
(help-fns-test--describe-keymap-foo):
* test/src/fns-tests.el (w32-collate-ignore-punctuation)
(fns-tests-func-arity): Silence byte-compiler warnings.

3 years agoRepurpose libxml test for obsolete argument
Stefan Kangas [Sat, 26 Sep 2020 09:27:48 +0000 (11:27 +0200)]
Repurpose libxml test for obsolete argument

* test/src/xml-tests.el (libxml-tests): Move half this test for the
recently obsoleted fourth argument to libxml-parse-xml-region...
* test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new
test here for xml-remove-comments.

* test/src/xml-tests.el (libxml-tests--data-comments-discarded):
Move test data from here...
* test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.

3 years ago* etc/NEWS: Add new D-Bus monitor functionality. Fix typos.
Michael Albinus [Sat, 26 Sep 2020 09:38:53 +0000 (11:38 +0200)]
* etc/NEWS: Add new D-Bus monitor functionality.  Fix typos.

3 years agoAdd D-Bus monitor
Michael Albinus [Sat, 26 Sep 2020 09:38:23 +0000 (11:38 +0200)]
Add D-Bus monitor

* lisp/net/dbus.el (dbus-interface-monitoring): New defconst.
(dbus-call-method, dbus-call-method-asynchronously)
(dbus-send-signal, dbus-method-return-internal)
(dbus-method-error-internal, dbus-check-arguments): Accept also
:system-private and :session-private.
(dbus-check-event, dbus-event-path-name)
(dbus-event-interface-name)
(dbus-event-member-name, dbus-property-handler)
(dbus-handle-bus-disconnect): Adapt according to new structure.
(dbus-handle-event): Handle also monitor events.
(dbus-event-destination-name, dbus-event-handler)
(dbus-event-arguments, dbus-register-monitor, dbus-monitor-handler):
New defuns.

* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS, xd_remove_watch)
(Fdbus__init_bus): Accept also :system-private and :session-private.
(xd_read_message_1): Add destination and error_name to
dbus-event.  Handle monitor events.
(syms_of_dbusbind): Declare QCsystem_private, QCsession_private
and QCmonitor.
(dbus-registered-objects-table): Fix docstring.

3 years agoEnable "Continue Tags Search" menu item only when it can be used
Eli Zaretskii [Sat, 26 Sep 2020 08:50:15 +0000 (11:50 +0300)]
Enable "Continue Tags Search" menu item only when it can be used

* lisp/menu-bar.el (menu-bar-search-menu) <tags-continue>: Enable
only when there was a previous tags search.  (Bug#43569)
(menu-bar-replace-menu) <tags-repl-continue>: Enable only when
there was a previous tags-replace.

3 years agoFix byte-compiler warning in CEDET
Stefan Kangas [Sat, 26 Sep 2020 08:50:12 +0000 (10:50 +0200)]
Fix byte-compiler warning in CEDET

* lisp/cedet/semantic/lex.el (semantic-lex-catch-errors): Fix
byte-compiler warning by removing obsolete variable.

3 years agoFix soap-client URL
Paul Eggert [Sat, 26 Sep 2020 07:31:17 +0000 (00:31 -0700)]
Fix soap-client URL

* lisp/net/soap-client.el (soap-create-envelope):
Fix URL that I broke in 2019-09-23T06:53:30Z!eggert@cs.ucla.edu.
Problem reported by Thomas Fitzsimmons.

3 years agosoap-client.el: Prevent some invalid encoding warnings
Thomas Fitzsimmons [Sat, 26 Sep 2020 02:57:25 +0000 (22:57 -0400)]
soap-client.el: Prevent some invalid encoding warnings

* lisp/net/soap-client.el (soap-encode-xs-complex-type): Do not
warn about missing non-nillable slot if type iself is optional.

3 years agoFix out-of-tree make check
Glenn Morris [Fri, 25 Sep 2020 18:01:14 +0000 (11:01 -0700)]
Fix out-of-tree make check

* test/lisp/custom-tests.el (custom-test-admin-cus-test): New const.
(check-for-wrong-custom-types): Use it.

3 years agoFix out-of-source ‘make check’ emacs-module-tests
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.

(cherry picked from commit c86f3fe0d023cdd25edbbce91c5b32654f2b734e)

3 years agoTidy up NS color handling
Alan Third [Fri, 25 Sep 2020 16:12:51 +0000 (17:12 +0100)]
Tidy up NS color handling

* src/nsimage.m (COLORSPACE_NAME): New macro to find the current
colorspace.
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]):
([EmacsImage initForXPMWithDepth:width:height:]): Use the current
colorspace.
* src/nsterm.h (NSAppKitVersionNumber10_7):
(NSAppKitVersionNumber10_10): Define for macOS version checks.
* src/nsterm.m ([NSColor colorForEmacsRed:green:blue:alpha:]): Tidy up
the version checking.
([NSColor colorUsingDefaultColorSpace]): Tidy the version checking and
use [NSColor colorUsingColorSpace:] with GNUstep.

3 years agoRemove obsolete macOS support for NS font backend
Alan Third [Fri, 25 Sep 2020 13:32:56 +0000 (14:32 +0100)]
Remove obsolete macOS support for NS font backend

The ns font backend is has been disabled on macOS for a long time and
doesn't work correctly even if re-enabled.

* src/nsfont.m:
(ns_char_width):
(ns_ascii_average_width):
(ns_get_covering_families):
(nsfont_open):
(nsfont_close):
(nsfont_draw):
(ns_uni_to_glyphs):
(ns_glyph_metrics):
(EmacsGlyphStorage): Remove all Cocoa only code.
* src/nsterm.h (EmacsGlyphStorage): Remove.
(struct nsfont_info): Make GNUstep only.
* src/nsterm.m (ns_compute_glyph_string_overhangs): Remove GNUstep
only code from Cocoa builds.

3 years agoImplement internal border colors on NS (bug#41071)
Alan Third [Wed, 23 Sep 2020 12:57:50 +0000 (13:57 +0100)]
Implement internal border colors on NS (bug#41071)

* src/nsterm.m (ns_clear_under_internal_border): New function.
(ns_after_update_window_line): Use the correct background color.
(ns_redisplay_interface): Add ns_clear_under_internal_border.