]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* lisp/tab-bar.el: 'C-x t M' bound to tab-move-to supports a negative argument
Juri Linkov [Mon, 22 Feb 2021 17:08:16 +0000 (19:08 +0200)]
* lisp/tab-bar.el: 'C-x t M' bound to tab-move-to supports a negative argument

* lisp/tab-bar.el (tab-bar-move-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-move-tab): Fix docstring to add reference to tab-bar-move-tab-to.
(tab-prefix-map): Bind "M" to tab-move-to.

3 years ago'Mod-9' bound to 'tab-last' now switches to the last tab like in web browsers
Juri Linkov [Mon, 22 Feb 2021 17:03:42 +0000 (19:03 +0200)]
'Mod-9' bound to 'tab-last' now switches to the last tab like in web browsers

* lisp/tab-bar.el (tab-bar--define-keys): Rebind 0 from
tab-bar-switch-to-recent-tab to its alias tab-recent.
Bind 9 to tab-last.
(tab-bar-switch-to-last-tab): New command.
(tab-last): New alias to tab-bar-switch-to-last-tab.
(tab-bar-switch-to-tab, tab-bar-undo-close-tab): Fix docstrings to
avoid mentioning the term "last" for "most recently used" meaning.

3 years ago* lisp/tab-bar.el (tab-bar--undefine-keys): New function from tab-bar-mode.
Juri Linkov [Mon, 22 Feb 2021 16:56:47 +0000 (18:56 +0200)]
* lisp/tab-bar.el (tab-bar--undefine-keys): New function from tab-bar-mode.

3 years agoPrefer `declare` over a `put` of `list-indent-function`.
Stefan Monnier [Mon, 22 Feb 2021 16:54:17 +0000 (11:54 -0500)]
Prefer `declare` over a `put` of `list-indent-function`.

While at it, I enabled lexical-binding in the affected files.

* lisp/cedet/semantic/sb.el: Enable lexical-binding.
(semantic-sb-with-tag-buffer): Use `declare`.

* lisp/cedet/semantic/bovine/el.el: Enable lexical-binding.
(semantic-elisp-setup-form-parser): Use `declare`.

* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/ert-x.el: Remove redundant `put`.

* lisp/emulation/cua-rect.el: Enable lexical-binding.
(cua--rectangle-operation, cua--rectangle-aux-replace): Use `declare`.

* lisp/mh-e/mh-acros.el: Enable lexical-binding.
(mh-do-in-gnu-emacs, mh-do-in-xemacs, mh-funcall-if-exists, defun-mh)
(defmacro-mh, with-mh-folder-updating, mh-in-show-buffer)
(mh-do-at-event-location, mh-iterate-on-messages-in-region)
(mh-iterate-on-range): Use `declare`.

* lisp/mh-e/mh-compat.el: Enable lexical-binding.
(mh-flet): Use `declare`.

* lisp/mh-e/mh-e.el: Enable lexical-binding.
(defgroup-mh, defcustom-mh, defface-mh): Use `declare`.

* lisp/net/sieve.el: Enable lexical-binding.  Remove redundant :group args.
(sieve-activate, sieve-remove, sieve-edit-script): Remove unused arg
from the interactive spec.
(sieve-deactivate-all): Remove unused var `name`.
(sieve-change-region): Use `declare`.

* lisp/obsolete/fast-lock.el: Enable lexical-binding.
Remove redundant :group args.  Remove XEmacs compat code.
(save-buffer-state): Remove macro.
(fast-lock-add-properties): Use `with-silent-modifications` instead.

* lisp/obsolete/lazy-lock.el: Enable lexical-binding.
Remove redundant :group args.
(do-while): Use `declare`.
(save-buffer-state): Remove macro.
(lazy-lock-fontify-rest-after-change, lazy-lock-defer-line-after-change)
(lazy-lock-defer-rest-after-change, lazy-lock-after-fontify-buffer)
(lazy-lock-after-unfontify-buffer, lazy-lock-fontify-region):
Use `with-silent-modifications` instead.

* lisp/obsolete/pgg.el: Enable lexical-binding.  Remove XEmacs compat code.
(pgg-save-coding-system, pgg-as-lbt, pgg-process-when-success):
Use `declare`.
(pgg-add-passphrase-to-cache): Remove unused var `new-timer`.
(pgg-decrypt-region): Remove unused var `buf`.

* lisp/org/org-agenda.el (org-let, org-let2): Move from org-macs and
use `declare`.

* lisp/org/org-macs.el (org-let, org-let2): Move these functions that
are inherently harmful to your karma to the only package that uses them.
(org-scroll): Use `pcase` to avoid `eval` and use more readable syntax
for those integers standing for events.

* lisp/progmodes/antlr-mode.el: Enable lexical-binding.
(save-buffer-state-x): Use `declare` and `with-silent-modifications`.

* lisp/international/mule-util.el (with-coding-priority):
* lisp/cedet/ede/proj-comp.el (proj-comp-insert-variable-once):
* lisp/org/org-element.el (org-element-map):
* test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load):
* test/lisp/emacs-lisp/generator-tests.el (cps-testcase): Use `declare`.

3 years agoFix ANSI coloring problem in large outputs in eshell
Lars Ingebrigtsen [Mon, 22 Feb 2021 15:47:38 +0000 (16:47 +0100)]
Fix ANSI coloring problem in large outputs in eshell

* lisp/ansi-color.el (ansi-color-apply-on-region): Ensure that we
fontize from where we left off, and don't skip to the end of the
region (bug#46332).

3 years agocl-extra: Fix docstring retrieval
Julian Scheid [Mon, 22 Feb 2021 15:06:03 +0000 (16:06 +0100)]
cl-extra: Fix docstring retrieval

* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Fix
docstring retrieval (bug#46662).

3 years agoSkip tests that require Internet when there's no Internet
Robert Pluim [Mon, 22 Feb 2021 14:05:48 +0000 (15:05 +0100)]
Skip tests that require Internet when there's no Internet

Bug#46641

The network-stream-tests actually work fine when the local machine has
no IP at all, but cause a crash in the GnuTLS library when there is an
IP configured but the interface is down.

* test/lisp/net/network-stream-tests.el (internet-is-working): New
defvar, checks if we can resolve "google.com".
(connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait)
(open-network-stream-tls-nowait, open-gnutls-stream-new-api-nowait)
(open-gnutls-stream-old-api-nowait): Use it to check for working
Internet access.

* test/src/process-tests.el (internet-is-working): New defvar, checks
if we can resolve "google.com".
(lookup-family-specification, lookup-unicode-domains)
(unibyte-domain-name, lookup-google, non-existent-lookup-failure): Use
it to check for working Internet access.

3 years agoFix hang when running dns-query with no working internet
Robert Pluim [Mon, 22 Feb 2021 13:47:41 +0000 (14:47 +0100)]
Fix hang when running dns-query with no working internet

* lisp/net/dns.el (dns-set-servers): reduce the timeout and retry
count when using 'nslookup' for "localhost".
(dns-query): Check to see if we actually managed to initiate a dns
request before starting a busy-wait for the result.

3 years agoSimplify comint-watch-for-password-prompt
Lars Ingebrigtsen [Mon, 22 Feb 2021 14:47:30 +0000 (15:47 +0100)]
Simplify comint-watch-for-password-prompt

* lisp/comint.el (comint-watch-for-password-prompt): Simplify by
using `string-trim'.

3 years agoFix prompt for the `M-S-x' command
Lars Ingebrigtsen [Mon, 22 Feb 2021 14:32:34 +0000 (15:32 +0100)]
Fix prompt for the `M-S-x' command

* lisp/simple.el (read-extended-command): Further kludge the
hard-coded "M-x" prompt for the new `M-S-x' command.

3 years agoPrefer mailing lists to newsgroups in FAQ
Stefan Kangas [Mon, 22 Feb 2021 11:17:41 +0000 (12:17 +0100)]
Prefer mailing lists to newsgroups in FAQ

* doc/misc/efaq.texi (Real meaning of copyleft)
(Guidelines for mailing list postings, Mailing list archives)
(Packages that do not come with Emacs): Prefer mailing lists to
newsgroups.  (Bug#46633)

3 years agoImprove wrong number of args error message in propertize
Stefan Kangas [Mon, 22 Feb 2021 10:56:12 +0000 (11:56 +0100)]
Improve wrong number of args error message in propertize

* src/editfns.c (Fpropertize): Improve error message.
(syms_of_editfns) <Qpropertize>: New DEFSYM.
* test/src/editfns-tests.el
(propertize/error-wrong-number-of-args): New test.

3 years agoFix compilation of closures with nontrivial doc strings
Mattias Engdegård [Mon, 22 Feb 2021 10:37:29 +0000 (11:37 +0100)]
Fix compilation of closures with nontrivial doc strings

* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure):
Use the supplied doc string if it's a literal; fall back to the old
slow way of building a closure otherwise.

3 years agoFix up previous conf-mode.el and nroff-mode.el change slightly
Lars Ingebrigtsen [Mon, 22 Feb 2021 04:10:13 +0000 (05:10 +0100)]
Fix up previous conf-mode.el and nroff-mode.el change slightly

* lisp/textmodes/conf-mode.el (conf-mode-map): Remove variable now
unused.

* lisp/textmodes/nroff-mode.el (nroff-mode-map): Remove variable
now unused.

3 years ago* test/misc/test-custom-libs.el (test-custom-libs): Skip on hydra.
Glenn Morris [Mon, 22 Feb 2021 03:11:19 +0000 (19:11 -0800)]
* test/misc/test-custom-libs.el (test-custom-libs): Skip on hydra.

3 years ago* test/misc/test-custom-noloads.el (custom-test-load): Unstable.
Glenn Morris [Mon, 22 Feb 2021 02:58:14 +0000 (18:58 -0800)]
* test/misc/test-custom-noloads.el (custom-test-load): Unstable.

3 years agoConvert some textmodes menus to easy-menu-define
Stefan Kangas [Mon, 22 Feb 2021 01:24:25 +0000 (02:24 +0100)]
Convert some textmodes menus to easy-menu-define

* lisp/textmodes/artist.el (artist-menu-map): Convert menu definition
to easy-menu-define.

* lisp/textmodes/conf-mode.el (conf-mode-map):
* lisp/textmodes/nroff-mode.el (nroff-mode-map): Move menu
definition from here...
* lisp/textmodes/conf-mode.el (conf-mode-menu):
* lisp/textmodes/nroff-mode.el (nroff-mode-menu): ...to here, and
convert to use easy-menu-define.

3 years agoFaster, more compact, and readable closure creation
Mattias Engdegård [Sun, 21 Feb 2021 14:24:41 +0000 (15:24 +0100)]
Faster, more compact, and readable closure creation

Simplify closure creation by calling a single function at run time
instead of putting it together from small pieces.  This is faster
(by about a factor 2), takes less space on disk and in memory, and
makes internal functions somewhat readable in disassembly listings again.

This is done by creating a prototype function at compile-time whose
closure variables are placeholder values V0, V1... which can be seen
in the disassembly.  The prototype is then cloned at run time using
the new make-closure function that replaces the placeholders with
the actual closure variables.

* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure):
Generate call to make-closure from a prototype function.
* src/alloc.c (Fmake_closure): New function.
(syms_of_alloc): Defsubr it.
* src/data.c (syms_of_data): Defsym byte-code-function-p.

3 years agoRun admin/cus-tests.el tests from test suite
Stefan Kangas [Fri, 19 Feb 2021 11:31:56 +0000 (12:31 +0100)]
Run admin/cus-tests.el tests from test suite

* test/Makefile.in (SUBDIRS): Run tests in new directory "misc",
intended for tests not belonging to any one file.
* test/misc/test-custom-deps.el:
* test/misc/test-custom-libs.el:
* test/misc/test-custom-noloads.el:
* test/misc/test-custom-opts.el: New files.
* test/lisp/custom-tests.el (custom--test-local-option): Move test to
above new file test-custom-opts.el.

* admin/cus-test.el: Document running tests from regular test suite.
* test/file-organization.org (Test Files): Document new test directory
"misc" for tests not belonging to any one file.

3 years agoFix interactive mode tagging for man and woman
Stefan Kangas [Sun, 21 Feb 2021 10:19:57 +0000 (11:19 +0100)]
Fix interactive mode tagging for man and woman

* lisp/man.el (man-common): New mode inheriting special-mode.
(Man-mode):
* lisp/woman.el (woman-mode): Inherit from man-common.

* lisp/man.el (man-follow, Man-update-manpage)
(Man-fontify-manpage, Man-cleanup-manpage, Man-next-section)
(Man-previous-section, Man-goto-section)
(Man-goto-see-also-section, Man-follow-manual-reference)
(Man-kill, Man-goto-page, Man-next-manpage)
(Man-previous-manpage): Change interactive mode tag to man-common.

This was discussed in:
https://lists.gnu.org/r/emacs-devel/2021-02/msg01619.html

3 years agoDeclare that `ignore' and `undefined' shouldn't be completed over
Lars Ingebrigtsen [Sun, 21 Feb 2021 18:26:39 +0000 (19:26 +0100)]
Declare that `ignore' and `undefined' shouldn't be completed over

* lisp/subr.el (ignore, undefined): Declare that these shouldn't
be completed over.

3 years agoUse `undefined' instead of `ignore' in wdired
Lars Ingebrigtsen [Sun, 21 Feb 2021 13:03:13 +0000 (14:03 +0100)]
Use `undefined' instead of `ignore' in wdired

* lisp/wdired.el (wdired-mode-map): Use `undefined' here instead
of `ignore' to give the user more feedback.

3 years agoFix json.el encoding of confusable object keys
Basil L. Contovounesios [Thu, 11 Feb 2021 12:00:05 +0000 (12:00 +0000)]
Fix json.el encoding of confusable object keys

* lisp/json.el (json-encode-string): Clarify commentary.
(json--encode-stringlike): New function that covers a subset of
json-encode.
(json-encode-key): Use it for more efficient encoding and
validation, and to avoid mishandling confusable keys like boolean
symbols (bug#42545).
(json-encode-array): Make it clearer that argument can be a list.
(json-encode): Reuse json-encode-keyword and json--encode-stringlike
for a subset of the dispatch logic.
(json-pretty-print): Ensure confusable keys like ":a" survive a
decoding/encoding roundtrip (bug#24252, bug#45032).

* test/lisp/json-tests.el (test-json-encode-string)
(test-json-encode-hash-table, test-json-encode-alist)
(test-json-encode-plist, test-json-pretty-print-object): Test
encoding of confusable keys.

3 years agoMake unused variable menu-bar-handwrite-map obsolete
Stefan Kangas [Sun, 21 Feb 2021 09:23:12 +0000 (10:23 +0100)]
Make unused variable menu-bar-handwrite-map obsolete

* lisp/play/handwrite.el (menu-bar-handwrite-map): Make unused
variable obsolete.

3 years agoConvert bubbles menu to easy-menu-define
Stefan Kangas [Sun, 21 Feb 2021 09:19:23 +0000 (10:19 +0100)]
Convert bubbles menu to easy-menu-define

* lisp/play/bubbles.el (bubbles-game-theme-menu)
(bubbles-graphics-theme-menu, bubbles-menu, bubbles-mode-map):
Move menu definition from here...
(bubbles-menu): ...to here, and convert to easy-menu-define.

3 years ago; Fix previous easy-menu-define conversion
Stefan Kangas [Sun, 21 Feb 2021 09:10:03 +0000 (10:10 +0100)]
; Fix previous easy-menu-define conversion

* lisp/emacs-lisp/re-builder.el (reb-mode-menu):
* lisp/progmodes/make-mode.el (makefile-mode-menu): Replace :button
attribute with :style and :selected.

3 years ago* etc/NEWS.19: Add entry for 'easy-menu-define'.
Stefan Kangas [Sun, 21 Feb 2021 09:02:43 +0000 (10:02 +0100)]
* etc/NEWS.19: Add entry for 'easy-menu-define'.

3 years agoConvert some progmodes menus to easy-menu-define
Stefan Kangas [Sun, 21 Feb 2021 07:24:44 +0000 (08:24 +0100)]
Convert some progmodes menus to easy-menu-define

* lisp/progmodes/asm-mode.el (asm-mode-map):
* lisp/progmodes/grep.el (grep-mode-map):
* lisp/progmodes/m4-mode.el (m4-mode-map):
* lisp/progmodes/sh-script.el (sh-mode-map): Move menu definition from here...
* lisp/progmodes/asm-mode.el (asm-mode-menu):
* lisp/progmodes/grep.el (grep-menu-map):
* lisp/progmodes/m4-mode.el (m4-mode-menu):
* lisp/progmodes/sh-script.el (sh-mode-menu): ...to here, and rewrite
using easy-menu-define.

3 years agoClarification of password handling in Tramp manual
Michael Albinus [Sun, 21 Feb 2021 09:24:56 +0000 (10:24 +0100)]
Clarification of password handling in Tramp manual

* doc/misc/tramp.texi (Password handling): Describe, how to
suppress `auth-sources' for Tramp.
(Remote shell setup, Remote processes)
(Cleanup remote connections, Frequently Asked Questions):
Handle reference to Emacs manual.

3 years agoFix memory leak
Alan Third [Sat, 20 Feb 2021 20:40:56 +0000 (20:40 +0000)]
Fix memory leak

* src/nsterm.m ([EmacsSurface dealloc]): Release will remove all
objects and free the memory.

3 years agoConvert makefile-mode menu to easy-menu-define
Stefan Kangas [Sat, 20 Feb 2021 16:43:03 +0000 (17:43 +0100)]
Convert makefile-mode menu to easy-menu-define

* lisp/progmodes/make-mode.el (makefile-mode-map): Move menu
definition from here...
(makefile-mode-menu): ...to here, and rewrite using easy-menu-define.

3 years agoMute noisy test fixture for socks.el
F. Jason Park [Sat, 20 Feb 2021 14:50:30 +0000 (06:50 -0800)]
Mute noisy test fixture for socks.el

* test/lisp/net/socks-tests.el:
(socks-tests-perform-hello-world-http-request): Bind
'inhibit-message' non-nil when in batch mode.
(Bug#46342)

3 years agoChange command-completion-using-modes-p to defun
Lars Ingebrigtsen [Sat, 20 Feb 2021 14:43:26 +0000 (15:43 +0100)]
Change command-completion-using-modes-p to defun

* lisp/simple.el (command-completion-using-modes-p): Change into a
defun for now because of a build problem.

3 years agoMention `M-S-x' in the Emacs manual.
Lars Ingebrigtsen [Sat, 20 Feb 2021 14:37:24 +0000 (15:37 +0100)]
Mention `M-S-x' in the Emacs manual.

* doc/emacs/m-x.texi (M-x): Mention `M-S-x' in the Emacs manual.

3 years ago; Fix typos in last change
Eli Zaretskii [Sat, 20 Feb 2021 14:24:03 +0000 (16:24 +0200)]
; Fix typos in last change

* etc/NEWS: Improve wording.
* lisp/simple.el (execute-extended-command-for-buffer): Fix typo.

3 years agoAdd a new command for mode-specific commands
Lars Ingebrigtsen [Sat, 20 Feb 2021 14:12:45 +0000 (15:12 +0100)]
Add a new command for mode-specific commands

* doc/lispref/commands.texi (Interactive Call): Document it.
* lisp/simple.el (command-completion-using-modes-p): Refactored
out into its own function for reuse...
(command-completion-default-include-p): ... from here.
(execute-extended-command-for-buffer): New command and keystroke
(`M-S-x').

3 years agoChange how (declare (modes store the data
Lars Ingebrigtsen [Sat, 20 Feb 2021 13:29:41 +0000 (14:29 +0100)]
Change how (declare (modes store the data

* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Change from
being a predicate to storing the modes.  This allows using the
modes for positive command discovery, too.
* src/data.c (Fcommand_modes): Look at the `command-modes' symbol
property, too.

3 years agoAdd the `always' function
Lars Ingebrigtsen [Sat, 20 Feb 2021 12:44:19 +0000 (13:44 +0100)]
Add the `always' function

* doc/lispref/functions.texi (Calling Functions): Document it.
* lisp/subr.el (always): New function.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark it as
side effect free.

3 years agoUse raw bytes for SOCKS 4 IP addresses
F. Jason Park [Sat, 6 Feb 2021 03:41:04 +0000 (19:41 -0800)]
Use raw bytes for SOCKS 4 IP addresses

* lisp/net/socks.el: (socks--open-network-stream, socks-send-command):
* test/lisp/net/socks-tests.el: (socks-tests-v4-basic): (Bug#46342).

3 years agoAdd more auth-related tests for socks.el
F. Jason Park [Fri, 5 Feb 2021 13:24:55 +0000 (05:24 -0800)]
Add more auth-related tests for socks.el

* test/lisp/net/socks-tests.el (auth-registration-and-suite-offer)
(filter-response-parsing-v4, filter-response-parsing-v5): Assert
auth-method selection wrangling and socks-filter parsing.
(v5-auth-user-pass, v5-auth-user-pass-blank, v5-auth-none): Show prep
and execution of the SOCKS connect command and proxying of an HTTP
request; simplify fake server.  (Bug#46342)

3 years agoConvert re-builder menu to easy-menu-define
Stefan Kangas [Sat, 20 Feb 2021 06:34:52 +0000 (07:34 +0100)]
Convert re-builder menu to easy-menu-define

* lisp/emacs-lisp/re-builder.el (reb-mode-map): Move menu
definition from here...
(reb-mode-menu): ...to here, and rewrite using easy-menu-define.

3 years agoConvert finder menu to easy-menu-define
Stefan Kangas [Sat, 20 Feb 2021 05:59:02 +0000 (06:59 +0100)]
Convert finder menu to easy-menu-define

* lisp/finder.el (finder-mode-map): Move menu definition from
here...
(finder-mode-menu): ...to here, and rewrite using
easy-menu-define.

3 years agoAdd toolbar for help-mode
Stefan Kangas [Sat, 20 Feb 2021 04:55:33 +0000 (05:55 +0100)]
Add toolbar for help-mode

* lisp/help-mode.el (help-mode): Add toolbar.
(help-mode-tool-bar-map): New variable.
(help-mode-menu): Disable forward/backward items when stack is empty.

(help-bookmark-make-record, help-bookmark-jump): Minor doc fixes.

3 years ago* lisp/woman.el: Doc fix; remove redundant setup info.
Stefan Kangas [Sat, 20 Feb 2021 03:21:35 +0000 (04:21 +0100)]
* lisp/woman.el: Doc fix; remove redundant setup info.

3 years ago* lisp/url/url-http.el (url-http): Fix docstring typo.
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:32:59 +0000 (17:32 -0500)]
* lisp/url/url-http.el (url-http): Fix docstring typo.

3 years agontlm-tests: Remove missing dependency warnings
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:11:16 +0000 (17:11 -0500)]
ntlm-tests: Remove missing dependency warnings

* test/lisp/net/ntlm-tests.el: Remove warnings about dependencies
not being present.

3 years agontlm-tests: Skip tests if dependencies are too old
Thomas Fitzsimmons [Fri, 19 Feb 2021 22:07:52 +0000 (17:07 -0500)]
ntlm-tests: Skip tests if dependencies are too old

* test/lisp/net/ntlm-tests.el (ntlm-tests--dependencies-present):
Add version and functionality checks.

Co-authored-by: Michael Albinus <michael.albinus@gmx.de>
3 years agoFix frame contents scaling bug on macOS (bug#46155)
Alan Third [Fri, 19 Feb 2021 19:25:39 +0000 (19:25 +0000)]
Fix frame contents scaling bug on macOS (bug#46155)

Discussion in bug#46406.

* src/nsterm.m ([EmacsView focusOnDrawingBuffer:]): Set the scale
factor for the backing layer.

3 years ago* lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args
Stefan Monnier [Fri, 19 Feb 2021 17:51:36 +0000 (12:51 -0500)]
* lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args

(byte-compile-check-lambda-list): Skip warnings of repeated arg for
those that are declared as unused anyway.

3 years ago* test/lisp/emacs-lisp/edebug-tests.el: Adjust to new `edebug-eval-defun`.
Stefan Monnier [Fri, 19 Feb 2021 17:08:00 +0000 (12:08 -0500)]
* test/lisp/emacs-lisp/edebug-tests.el: Adjust to new `edebug-eval-defun`.

(edebug-tests-trivial-backquote): Adjust to the way `eval-defun`
outputs its result.
(edebug-tests-cl-macrolet): Adjust to the fact that now macro expansion
takes place during the `eval-defun` even when Edebugging.

3 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 19 Feb 2021 16:36:56 +0000 (08:36 -0800)]
Merge from origin/emacs-27

8e8b46ef81 (origin/emacs-27) More accurate documentation of the "r" i...
dcb2015a5b Mention the GNU Kind Communications Guidelines in the FAQ
9882e63eea ; * CONTRIBUTE: Another wording change regarding tiny chan...
850f18ef23 Allow newlines in password prompts again in comint
c977370dd7 Avoid point movement when visiting image files
da64a257a4 ; * CONTRIBUTE: Yet another clarification of significant c...
d03f2a6ee9 Avoid assertion violation in callproc.c
dcc00bbb19 ; * CONTRIBUTE: Clarify the "15-lines" rule a bit more.

3 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 19 Feb 2021 16:36:56 +0000 (08:36 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

120149cf6a Clarify "changes" in CONTRIBUTE

3 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 19 Feb 2021 16:36:55 +0000 (08:36 -0800)]
Merge from origin/emacs-27

4712c75ab8 Clarify when activate-mark-hook is run
abedf3a865 Fix language-environment and font selection on MS-Windows
8b8708eadd Fix example in Sequence Functions node in the manual

3 years agoEnable newsticker--group-shift-feed-(up|down) to move groups as well
Ulf Jasper [Fri, 19 Feb 2021 16:07:36 +0000 (17:07 +0100)]
Enable newsticker--group-shift-feed-(up|down) to move groups as well

Fix broken newsticker--group-shift-group-(up-down).

* lisp/net/newst-treeview.el (newsticker-treeview-jump): Change prompt
string.
(newsticker--group-shift): Move the group when a group is currently
selected. Fix error when explicitly shifting a group. (Fixes first
issue in Bug#41376.)

3 years agoMore accurate documentation of the "r" interactive spec
Eli Zaretskii [Fri, 19 Feb 2021 13:16:31 +0000 (15:16 +0200)]
More accurate documentation of the "r" interactive spec

* doc/lispref/commands.texi (Interactive Codes): Describe the
effect of 'mark-even-if-inactive'.

3 years agoFix regexp mistakes
Mattias Engdegård [Fri, 19 Feb 2021 12:44:25 +0000 (13:44 +0100)]
Fix regexp mistakes

* lisp/progmodes/cperl-mode.el (cperl--package-regexp):
Avoid double repetition; cperl--ws-or-comment-regexp is already
repeated with 1+.
* test/lisp/textmodes/dns-mode-tests.el
(dns-mode-tests-dns-mode-soa-increment-serial): Escape literal '$'.
* test/lisp/emacs-lisp/rx-tests.el (rx-regexp): Modify test to not
trigger a linting warning while retaining its testing power.

3 years agoMention the GNU Kind Communications Guidelines in the FAQ
Stefan Kangas [Fri, 19 Feb 2021 09:21:14 +0000 (10:21 +0100)]
Mention the GNU Kind Communications Guidelines in the FAQ

* doc/misc/efaq.texi (Guidelines for newsgroup postings): Mention
the GNU Kind Communications Guidelines.

3 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 19 Feb 2021 09:03:32 +0000 (10:03 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

3 years ago; Fix indentation in test/README
Michael Albinus [Fri, 19 Feb 2021 09:03:20 +0000 (10:03 +0100)]
; Fix indentation in test/README

3 years ago* lisp/calculator.el: Minor doc fix. Remove redundant :group args.
Stefan Kangas [Fri, 19 Feb 2021 07:38:29 +0000 (08:38 +0100)]
* lisp/calculator.el: Minor doc fix.  Remove redundant :group args.

3 years ago; * lisp/plstore.el: Fix formatting.
Stefan Kangas [Fri, 19 Feb 2021 07:30:04 +0000 (08:30 +0100)]
; * lisp/plstore.el: Fix formatting.

3 years agoFix Tramp bug#46625
Michael Albinus [Fri, 19 Feb 2021 08:21:55 +0000 (09:21 +0100)]
Fix Tramp bug#46625

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Adapt test.  (Bug#46625)

3 years agoDo interactive mode tagging for snake.el
Stefan Kangas [Fri, 19 Feb 2021 05:51:49 +0000 (06:51 +0100)]
Do interactive mode tagging for snake.el

3 years agoDo interactive mode tagging for tetris.el
Stefan Kangas [Fri, 19 Feb 2021 05:32:04 +0000 (06:32 +0100)]
Do interactive mode tagging for tetris.el

3 years agoDo interactive mode tagging for man.el
Stefan Kangas [Fri, 19 Feb 2021 05:29:00 +0000 (06:29 +0100)]
Do interactive mode tagging for man.el

3 years agoDo interactive mode tagging for package.el
Stefan Kangas [Fri, 19 Feb 2021 01:27:56 +0000 (02:27 +0100)]
Do interactive mode tagging for package.el

3 years agoImplement NTLM server for ntlm.el testing
Thomas Fitzsimmons [Thu, 18 Feb 2021 23:05:38 +0000 (18:05 -0500)]
Implement NTLM server for ntlm.el testing

* test/Makefile.in
(GNU_ELPA_DIRECTORY, elpa_dependencies, elpa_els, elpa_opts): New
variables.
(EMACSOPT, ert_opts): Add elpa_opts.
* test/README: Document GNU_ELPA_DIRECTORY make variable.
* test/lisp/net/ntlm-tests.el: Fix checkdoc-reported issues.
(ntlm-tests-message, ntlm-server-build-type-2, ntlm-server-hash)
(ntlm-server-check-authorization, ntlm-server-do-token)
(ntlm-server-filter, ntlm-server-handler, ntlm-server-start)
(ntlm-server-stop, ntlm-tests--url-retrieve-internal-around)
(ntlm-tests--authenticate)
(ntlm-tests--start-server-authenticate-stop-server): New
functions.
(ntlm-tests--username-oem, ntlm-tests--username-unicode)
(ntlm-tests--client-supports-unicode, ntlm-tests--challenge)
(ntlm-tests--result-buffer, ntlm-tests--successful-result): New
variables.
(ntlm-authentication)
(ntlm-authentication-old-compatibility-level): New tests.
* test/lisp/net/ntlm-resources/authinfo: New file.  (Bug#43566)

3 years ago* lisp/emacs-lisp/bindat.el: Tweak example in comment
Stefan Monnier [Thu, 18 Feb 2021 16:15:13 +0000 (11:15 -0500)]
* lisp/emacs-lisp/bindat.el: Tweak example in comment

Suggested by Kim Storm <storm@cua.dk>.

3 years agoFix typos
Mattias Engdegård [Thu, 18 Feb 2021 15:41:36 +0000 (16:41 +0100)]
Fix typos

* doc/lispref/display.texi (Size of Displayed Text):
* doc/lispref/windows.texi (Buffer Display Action Functions):
* etc/NEWS:
* etc/ORG-NEWS (Org-Attach has been refactored and extended):
* lisp/battery.el (display-battery-mode, battery--upower-subsribe):
* lisp/calendar/parse-time.el:
* lisp/dired-x.el:
* lisp/emacs-lisp/chart.el (chart-sequece, chart-bar-quickie):
* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p)
(eldoc-documentation-strategy):
* lisp/emacs-lisp/pcase.el (pcase--split-pred, pcase--u1):
* lisp/gnus/gnus-search.el (gnus-search-expandable-keys)
(gnus-search-parse-query, gnus-search-query-return-string)
(gnus-search-imap, gnus-search-imap-search-command)
(gnus-search-transform-expression):
* lisp/gnus/nnselect.el:
* lisp/isearch.el (isearch-lazy-count-format):
* lisp/mh-e/mh-show.el (mh-show-msg):
* lisp/net/dictionary-connection.el (dictionary-connection-open):
* lisp/net/dictionary.el (dictionary-default-popup-strategy)
(dictionary, dictionary-split-string, dictionary-do-select-dictionary)
(dictionary-display-dictionarys, dictionary-search)
(dictionary-tooltip-mode):
* lisp/net/eudcb-macos-contacts.el (eudc-macos-contacts-set-server):
* lisp/net/mailcap.el (mailcap-mime-data):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cperl-mode.el (cperl-mode)
(cperl-fontify-syntaxically):
* lisp/progmodes/flymake.el (flymake-diagnostic-functions):
* lisp/progmodes/verilog-mode.el (verilog--supressed-warnings)
(verilog-preprocess):
* lisp/simple.el (self-insert-uses-region-functions):
* lisp/textmodes/bibtex.el (bibtex-copy-summary-as-kill):
* lisp/textmodes/texnfo-upd.el (texinfo-insert-master-menu-list):
* src/dispnew.c:
* src/font.c (Ffont_get):
* src/indent.c (compute_motion):
* src/process.c (init_process_emacs):
* src/w32fns.c (deliver_wm_chars):
* test/lisp/jsonrpc-tests.el (deferred-action-complex-tests):
Fix typos in documentation, comments, and internal identifiers.

3 years ago* lisp/emacs-lisp/edebug.el (eval-defun): Simplify
Stefan Monnier [Thu, 18 Feb 2021 15:27:36 +0000 (10:27 -0500)]
* lisp/emacs-lisp/edebug.el (eval-defun): Simplify

(edebug-all-defs, edebug-all-forms): Don't autoload since the problem
it was working around has been fixed a while back.
(edebug--eval-defun): Rename from `edebug-eval-defun` and simplify by
making it an `:around` advice.
(edebug-install-read-eval-functions)
(edebug-uninstall-read-eval-functions): Adjust accordingly.
(edebug-eval-defun): Redefine as an obsolete wrapper.

* lisp/progmodes/elisp-mode.el (elisp--eval-defun):
Use `load-read-function` so it obeys `edebug-all-(defs|forms)`.
(elisp--eval-defun): Fix recent regression introduced with
`elisp--eval-defun-result`.

3 years ago; * CONTRIBUTE: Another wording change regarding tiny changes.
Eli Zaretskii [Thu, 18 Feb 2021 14:07:34 +0000 (16:07 +0200)]
; * CONTRIBUTE: Another wording change regarding tiny changes.

3 years agoRevert "Do interactive mode tagging for python.el navigation functions."
Lars Ingebrigtsen [Thu, 18 Feb 2021 11:52:55 +0000 (12:52 +0100)]
Revert "Do interactive mode tagging for python.el navigation functions."

This reverts commit 546f552e7b2439b482c7d28222fb88761a9c876a.

This is a "core package", so can't use the new syntax.

3 years agoAllow newlines in password prompts again in comint
Ryan Prior [Thu, 18 Feb 2021 11:48:28 +0000 (12:48 +0100)]
Allow newlines in password prompts again in comint

* lisp/comint.el (comint-password-prompt-regexp): Match all
whitespace (including newline) at the end of the passphrase, not
just space and \t (bug#46609).
(comint-watch-for-password-prompt): Remove trailing newlines from
the prompt (bug#46609).

Copyright-paperwork-exempt: yes

3 years agoDo interactive mode tagging for python.el navigation functions.
Doug Davis [Thu, 18 Feb 2021 11:39:00 +0000 (12:39 +0100)]
Do interactive mode tagging for python.el navigation functions.

* lisp/progmodes/python.el (navigation functions): Add python-mode to
`interactive' declarations for mode-specific commands (bug#46610).
Copyright-paperwork-exempt: yes

3 years agoFix rx `regexp` form with deprecated syntax
Mattias Engdegård [Thu, 18 Feb 2021 10:11:11 +0000 (11:11 +0100)]
Fix rx `regexp` form with deprecated syntax

The argument of the rx `regexp` form is assumed to evaluate to a valid
regexp, but certain kinds of deprecated but still accepted usage were
not handled correctly, such as unescaped literal (special) characters:
 (rx "a" (regexp "*")) => "a*" which is wrong.
Handle these cases; there is no extra trouble.

* lisp/emacs-lisp/rx.el (rx--translate-regexp): Force bracketing
of single special characters.
* test/lisp/emacs-lisp/rx-tests.el (rx-regexp): Add test case.

3 years agoMove 'project-try-ede' to the back of 'project-find-functions'
Dmitry Gutov [Thu, 18 Feb 2021 03:06:33 +0000 (05:06 +0200)]
Move 'project-try-ede' to the back of 'project-find-functions'

* lisp/cedet/ede.el (project-find-functions):
Move 'project-try-ede' further back, so that 'project-try-vc' has
priority (bug46202).

3 years agoPresent C source files as absolute file names too when possible
Dmitry Gutov [Wed, 17 Feb 2021 23:41:03 +0000 (01:41 +0200)]
Present C source files as absolute file names too when possible

* lisp/progmodes/elisp-mode.el (xref-location-group):
Present C source files as absolute file names too when possible
(bug#46514).

3 years ago; Fix another recent typo in simple.el.
Basil L. Contovounesios [Wed, 17 Feb 2021 23:08:24 +0000 (23:08 +0000)]
; Fix another recent typo in simple.el.

3 years agoFix recent Command Modes changes in Elisp manual
Basil L. Contovounesios [Wed, 17 Feb 2021 22:49:15 +0000 (22:49 +0000)]
Fix recent Command Modes changes in Elisp manual

* doc/lispref/commands.texi (Command Modes): Fix typos and grammar.
Cross-reference the 'declare' form node.

3 years ago; Fix typo in last change to simple.el.
Basil L. Contovounesios [Wed, 17 Feb 2021 22:48:18 +0000 (22:48 +0000)]
; Fix typo in last change to simple.el.

3 years agodoc/lispref/commands.texi (Command Modes): Fix typo.
Matt Armstrong [Wed, 17 Feb 2021 22:33:21 +0000 (23:33 +0100)]
doc/lispref/commands.texi (Command Modes): Fix typo.

* doc/lispref/commands.texi (Command Modes): Fix typo.

3 years agoMake goto-line-history buffer local only when so customized
Alan Mackenzie [Wed, 17 Feb 2021 21:15:51 +0000 (21:15 +0000)]
Make goto-line-history buffer local only when so customized

* lisp/simple.el (goto-line-history-local): New customizable option.
(goto-line-history): Define this simply with defvar, not defvar-local.
(goto-line-read-args): Handle goto-line-history-local, and changes to it.

* doc/emacs/basic.texi (Moving Point): Add a paragraph about
goto-line-history-local.

* etc/NEWS: Add an item under "Editing Changes in Emacs 28.1".

3 years agoAdjust the edebug spec for `interactive'
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:59:44 +0000 (20:59 +0100)]
Adjust the edebug spec for `interactive'

* lisp/emacs-lisp/edebug.el: Adjust the edebug spec for
`interactive' for the new syntax.

3 years agoMake unused `Buffer-menu-sort' alias obsolete
Lars Ingebrigtsen [Wed, 17 Feb 2021 19:14:22 +0000 (20:14 +0100)]
Make unused `Buffer-menu-sort' alias obsolete

* lisp/buff-menu.el (Buffer-menu-sort): Make unused alias obsolete.
* test/lisp/progmodes/elisp-mode-tests.el
(find-defs-defalias-defun-el): Adjust test to use an alias that's
not obsolete.

3 years agoMark up commands in buff-menu.el for modes
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:54:09 +0000 (19:54 +0100)]
Mark up commands in buff-menu.el for modes

3 years ago; * admin/CPP-DEFINES: Remove unused defines.
Glenn Morris [Wed, 17 Feb 2021 19:08:27 +0000 (11:08 -0800)]
; * admin/CPP-DEFINES: Remove unused defines.

3 years agoExplicate on how to tag commands with modes
Lars Ingebrigtsen [Wed, 17 Feb 2021 18:25:08 +0000 (19:25 +0100)]
Explicate on how to tag commands with modes

* doc/lispref/commands.texi (Command Modes): New node.
(Using Interactive): Move the `modes' text to the new node.

3 years agoNew transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
Juri Linkov [Wed, 17 Feb 2021 18:04:42 +0000 (20:04 +0200)]
New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)

* doc/emacs/basic.texi (Repeating): Document repeat-mode.

* lisp/repeat.el (repeat-exit-key): New defcustom.
(repeat-mode): New global minor mode.
(repeat-post-hook): New function.

* lisp/bindings.el (undo-repeat-map): New variable.
(undo): Put 'repeat-map' property with
'undo-repeat-map'.
(next-error-repeat-map): New variable.
(next-error, previous-error): Put 'repeat-map' property with
'next-error-repeat-map'.

* lisp/window.el (other-window-repeat-map): New variable.
(other-window): Put 'repeat-map' property with
'other-window-repeat-map'.
(resize-window-repeat-map): New variable.
(enlarge-window, enlarge-window-horizontally)
(shrink-window-horizontally, shrink-window): Put 'repeat-map'
property with 'resize-window-repeat-map'.

3 years agoNew command 'tab-duplicate' like in web browsers
Juri Linkov [Wed, 17 Feb 2021 17:56:45 +0000 (19:56 +0200)]
New command 'tab-duplicate' like in web browsers

3 years agoFurther Tramp code cleanup
Michael Albinus [Wed, 17 Feb 2021 17:04:35 +0000 (18:04 +0100)]
Further Tramp code cleanup

* doc/misc/tramp.texi (Predefined connection information):
Mention "about-args".

* lisp/net/tramp-cmds.el (tramp-version): Adapt docstring.

* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name)
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Handle local "/..".

* lisp/net/tramp-rclone.el (tramp-methods) <rclone>:
Adapt `tramp-mount-args'.
(tramp-rclone-flush-directory-cache): Remove.
(tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file)
(tramp-rclone-handle-make-directory): Don't use that function.
(tramp-rclone-maybe-open-connection): Fix use of `tramp-mount-args'.

* lisp/net/trampver.el (tramp-inside-emacs): New defun.
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Use it.
(tramp-get-env-with-u-option): Remove.

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-top):
New test.

3 years ago; Fix last m-x.texi change.
Eli Zaretskii [Wed, 17 Feb 2021 16:59:01 +0000 (18:59 +0200)]
; Fix last m-x.texi change.

3 years ago; Fix last change in commands.texi.
Eli Zaretskii [Wed, 17 Feb 2021 16:57:42 +0000 (18:57 +0200)]
; Fix last change in commands.texi.

3 years agoDisable filtering of commands in M-x completion
Eli Zaretskii [Wed, 17 Feb 2021 16:53:54 +0000 (18:53 +0200)]
Disable filtering of commands in M-x completion

This makes the default behavior like it was before:
M-x completion doesn't filter out any commands.  To
have commands filtered based on their relevance to the
current buffer's modes, customize the option
'read-extended-command-predicate' to call
'command-completion-default-include-p'.
* doc/lispref/commands.texi (Interactive Call):
* doc/emacs/m-x.texi (M-x): Update the description of
'read-extended-command-predicate' and improve wording.

* etc/NEWS: Update the entry about
'read-extended-command-predicate'.

* lisp/simple.el (read-extended-command-predicate): Change default
value to nil.  Update doc string.  Add :group.
(read-extended-command): Handle nil as meaning to apply
no-filtering.

3 years agoFix recently introduced bug in `byte-compile-lambda'
Lars Ingebrigtsen [Wed, 17 Feb 2021 16:12:27 +0000 (17:12 +0100)]
Fix recently introduced bug in `byte-compile-lambda'

* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Fix recently
introduced error when compiling non-lexical commands (bug#46589).

3 years ago; Finish recent rename of completion-* predicates.
Basil L. Contovounesios [Wed, 17 Feb 2021 13:27:56 +0000 (13:27 +0000)]
; Finish recent rename of completion-* predicates.

3 years agoClarify 'read-extended-command-predicate' in NEWS
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:15:07 +0000 (12:15 +0100)]
Clarify 'read-extended-command-predicate' in NEWS

3 years agoChange name for the completion-* predicates
Lars Ingebrigtsen [Wed, 17 Feb 2021 11:01:27 +0000 (12:01 +0100)]
Change name for the completion-* predicates

* lisp/simple.el (command-completion-default-include-p)
(command-completion-with-modes-p, command-completion-button-p):
Rename from completion-*.
(read-extended-command-predicate): Adjust default predicate.

* lisp/emacs-lisp/byte-run.el (byte-run--set-modes): Adjust
predicate name.

3 years ago* configure.ac: Replace obsolete AC_CHECK_HEADER usage. (Bug#46578)
Glenn Morris [Wed, 17 Feb 2021 05:25:18 +0000 (21:25 -0800)]
* configure.ac: Replace obsolete AC_CHECK_HEADER usage.  (Bug#46578)

3 years ago* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.
Glenn Morris [Wed, 17 Feb 2021 04:54:46 +0000 (20:54 -0800)]
* configure.ac: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE.

3 years agoRemove TIME_WITH_SYS_TIME, unused for a long time
Glenn Morris [Wed, 17 Feb 2021 04:34:26 +0000 (20:34 -0800)]
Remove TIME_WITH_SYS_TIME, unused for a long time

* configure.ac (AC_HEADER_TIME): Remove.  (Bug#46578)