]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago* lisp/textmodes/bibtex.el: Use user-error.
Roland Winkler [Fri, 4 Dec 2020 20:00:49 +0000 (14:00 -0600)]
* lisp/textmodes/bibtex.el: Use user-error.

4 years agoPrefer setq-local in emacs-lisp/*.el
Stefan Kangas [Fri, 4 Dec 2020 18:12:12 +0000 (19:12 +0100)]
Prefer setq-local in emacs-lisp/*.el

* lisp/emacs-lisp/chart.el (chart-mode):
* lisp/emacs-lisp/copyright.el (copyright-update):
* lisp/emacs-lisp/eieio-custom.el (eieio-customize-object):
* lisp/emacs-lisp/elint.el (elint-update-env, elint-init-form):
* lisp/emacs-lisp/ert.el (ert--results-update-ewoc-hf):
(ert--setup-results-buffer):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables):
* lisp/emacs-lisp/pp.el (pp-display-expression):
* lisp/emacs-lisp/re-builder.el (reb-mode, reb-restart-font-lock):
* lisp/emacs-lisp/shadow.el (load-path-shadows-mode):
* lisp/emacs-lisp/smie.el (smie-setup):
* lisp/emacs-lisp/syntax.el (syntax-propertize):
* lisp/emacs-lisp/trace.el (trace-make-advice): Prefer setq-local.

4 years agoPrefer setq-local in net/*.el
Stefan Kangas [Fri, 4 Dec 2020 17:43:06 +0000 (18:43 +0100)]
Prefer setq-local in net/*.el

* lisp/net/ange-ftp.el (ange-ftp-process-handle-line):
(internal-ange-ftp-mode):
* lisp/net/imap.el (imap-fetch-safe):
* lisp/net/net-utils.el (net-utils-mode):
(nslookup-mode, network-connection-mode-setup):
* lisp/net/newst-plainview.el (newsticker-mode):
(newsticker-buffer-update):
* lisp/net/newst-treeview.el (newsticker--treeview-item-show):
(newsticker-treeview-mode):
* lisp/net/rlogin.el (rlogin):
* lisp/net/secrets.el (secrets-mode):
* lisp/net/sieve-mode.el (sieve-mode):
* lisp/net/sieve.el (sieve-setup-buffer, sieve-open-server):
* lisp/net/snmp-mode.el (snmp-common-mode, snmp-mode, snmpv2-mode):
* lisp/net/telnet.el (telnet-mode):
* lisp/net/tramp.el (tramp-get-debug-buffer): Prefer setq-local.

4 years agoSpeed up match-substitute-replacement
Mattias Engdegård [Fri, 4 Dec 2020 17:37:21 +0000 (18:37 +0100)]
Speed up match-substitute-replacement

* lisp/subr.el (match-substitute-replacement): Use match-data--translate.
* src/search.c (Fmatch_data__translate): Remove string restriction.
* test/lisp/subr-tests.el (subr-match-substitute-replacement): New test.

4 years agoPrefer setq-local in cedet
Stefan Kangas [Fri, 4 Dec 2020 16:55:46 +0000 (17:55 +0100)]
Prefer setq-local in cedet

* lisp/cedet/data-debug.el (data-debug-mode):
* lisp/cedet/ede/custom.el (ede-customize-project):
* lisp/cedet/ede/project-am.el (project-am-load-makefile):
* lisp/cedet/mode-local.el (mode-local--activate-bindings):
* lisp/cedet/semantic.el (semantic--set-buffer-cache):
* lisp/cedet/semantic/analyze/debug.el
(semantic-analyzer-debug-add-buttons):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/semantic/senator.el (senator-search-set-tag-class-filter):
(senator-isearch-mode-hook):
* lisp/cedet/semantic/symref/list.el
(semantic-symref-produce-list-on-results)
(semantic-symref-results-mode):
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/cedet/semantic/wisent/python.el (wisent-python-default-setup):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
Prefer setq-local.

4 years agoPrefer setq-local in most of textmodes/*.el
Stefan Kangas [Fri, 4 Dec 2020 15:00:12 +0000 (16:00 +0100)]
Prefer setq-local in most of textmodes/*.el

* lisp/textmodes/artist.el (artist-mode-init):
* lisp/textmodes/bibtex.el (bibtex-mode):
* lisp/textmodes/dns-mode.el (dns-mode):
* lisp/textmodes/enriched.el (enriched-mode):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing):
* lisp/textmodes/nroff-mode.el (nroff-mode):
* lisp/textmodes/picture.el (picture-mode):
* lisp/textmodes/refill.el (refill-mode):
* lisp/textmodes/two-column.el (2C-split): Prefer setq-local.

4 years agoDon't abort when terminated by SIGINT in -batch
Eli Zaretskii [Fri, 4 Dec 2020 14:47:49 +0000 (16:47 +0200)]
Don't abort when terminated by SIGINT in -batch

* src/xdisp.c (clear_message_stack): New function.
* src/emacs.c (terminate_due_to_signal): Call clear_message_stack
when we are being shut down by SIGINT under -batch.
* src/lisp.h (clear_message_stack): Add prototype.

4 years agoMake custom-data saving atomic
Lars Ingebrigtsen [Fri, 4 Dec 2020 11:15:26 +0000 (12:15 +0100)]
Make custom-data saving atomic

* lisp/cus-edit.el (custom-save-all): Do the custom saves as an
atomic change group, to avoid writing invalid data if something
goes wrong (or the user hits `C-g') in the middle (bug#18633).

4 years agoAllow viper-save-setting to save numerical settings
Lars Ingebrigtsen [Fri, 4 Dec 2020 10:46:47 +0000 (11:46 +0100)]
Allow viper-save-setting to save numerical settings

* lisp/emulation/viper-util.el (viper-save-setting): Allow saving
numerical settings (bug#18928).

4 years agoClarify icomplete-show-matches-on-no-input doc string
Lars Ingebrigtsen [Fri, 4 Dec 2020 10:33:56 +0000 (11:33 +0100)]
Clarify icomplete-show-matches-on-no-input doc string

* lisp/icomplete.el (icomplete-show-matches-on-no-input): Clarify
the meaning of the variable (bug#19031).

4 years agoPrefer setq-local in erc
Stefan Kangas [Fri, 4 Dec 2020 10:14:26 +0000 (11:14 +0100)]
Prefer setq-local in erc

* lisp/erc/erc-goodies.el (erc-imenu-setup):
* lisp/erc/erc-list.el (erc-list-install-322-handler, erc-cmd-LIST):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-setup):
* lisp/erc/erc.el (erc-mode, erc-update-mode-line-buffer):
Prefer setq-local.

4 years agoMake shell-command use comint settings
Alyssa Ross [Fri, 4 Dec 2020 10:06:48 +0000 (11:06 +0100)]
Make shell-command use comint settings

* lisp/simple.el (shell-command): Use the term environment from
comint, so that comint settings are used for commands like
`async-shell-command', too (bug#45034).

Copyright-paperwork-exempt: yes

4 years ago* lisp/eshell/esh-mode.el (eshell-mode): Remove XEmacs compat code.
Stefan Kangas [Fri, 4 Dec 2020 09:57:04 +0000 (10:57 +0100)]
* lisp/eshell/esh-mode.el (eshell-mode): Remove XEmacs compat code.

4 years agoPrefer setq-local in eshell
Stefan Kangas [Fri, 4 Dec 2020 09:55:50 +0000 (10:55 +0100)]
Prefer setq-local in eshell

* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/eshell/em-dirs.el (eshell-dirs-initialize):
* lisp/eshell/em-glob.el (eshell-glob-initialize, eshell-glob-regexp):
* lisp/eshell/em-hist.el (eshell-hist-initialize):
* lisp/eshell/em-prompt.el (eshell-prompt-initialize):
* lisp/eshell/em-rebind.el (eshell-rebind-initialize)
(eshell-setup-input-keymap):
* lisp/eshell/em-script.el (eshell-script-initialize):
* lisp/eshell/em-smart.el (eshell-smart-initialize):
* lisp/eshell/em-term.el (eshell-term-initialize, eshell-exec-visual):
* lisp/eshell/em-tramp.el (eshell-tramp-initialize):
* lisp/eshell/em-unix.el (eshell-unix-initialize, eshell/diff):
* lisp/eshell/esh-arg.el (eshell-arg-initialize):
* lisp/eshell/esh-cmd.el (eshell-cmd-initialize):
* lisp/eshell/esh-io.el (eshell-get-target):
* lisp/eshell/esh-mode.el (eshell-mode):
* lisp/eshell/esh-var.el (eshell-var-initialize): Prefer setq-local.

4 years agoPreload iso-trans.el
Lars Ingebrigtsen [Fri, 4 Dec 2020 09:46:34 +0000 (10:46 +0100)]
Preload iso-trans.el

* lisp/loadup.el ("international/iso-transl"): Load by default so
that we get `Alt-' bindings (bug#21310).

* lisp/international/iso-transl.el: Remove autoloads and some
comments.

4 years ago; Fix line number sorting
Dmitry Gutov [Fri, 4 Dec 2020 02:46:52 +0000 (04:46 +0200)]
; Fix line number sorting

4 years ago; Expand on the NEWS entry
Dmitry Gutov [Fri, 4 Dec 2020 01:54:14 +0000 (03:54 +0200)]
; Expand on the NEWS entry

4 years agoSupport using ripgrep in project-find-regexp and friends
Dmitry Gutov [Fri, 4 Dec 2020 01:37:10 +0000 (03:37 +0200)]
Support using ripgrep in project-find-regexp and friends

Performance results vary here.  Some projects and search terms
don't see much of a change, but for some (including Emacs sources
checkout and case-insensitive search) the switch to ripgrep shows
~2-3x speed improvement.  Another piece of anecdata here:
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00802.html

* lisp/progmodes/xref.el (xref-search-program-alist)
(xref-search-program): New user options.
(xref-matches-in-files): Use them.

4 years ago; Fix last change
Basil L. Contovounesios [Thu, 3 Dec 2020 18:36:42 +0000 (18:36 +0000)]
; Fix last change

* lisp/gnus/nnimap.el (nnimap-split-download-body-default): Declare
obsolete varalias before its referent.
(nnimap-split-download-body): Add :version tag.  (Bug#44981)

4 years agoRestore nnimap-split-download-body as a customization option
Eric Abrahamsen [Wed, 2 Dec 2020 23:52:25 +0000 (15:52 -0800)]
Restore nnimap-split-download-body as a customization option

* lisp/gnus/nnimap.el (nnimap-split-download-body): And add an
obsolete alias for `nnimap-split-download-body-default'.
(nnimap-fetch-inbox): Check the value of the option, not the variable.
* doc/misc/gnus.texi (Client-Side IMAP Splitting): Move the primary
documentation of this option to this section.

4 years agoDefine explicit-shell-file-name only in shell.el
Basil L. Contovounesios [Fri, 17 Apr 2020 09:27:36 +0000 (10:27 +0100)]
Define explicit-shell-file-name only in shell.el

For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2020-04/msg00880.html

* doc/emacs/cmdargs.texi (General Variables): Mention
shell-file-name in relation to SHELL.
* doc/emacs/misc.texi (Interactive Shell): Move index entry for
SHELL environment variable from here, where it is not mentioned...
(Single Shell): ...to here, where it is discussed along with
shell-file-name.
* lisp/dired.el (dired-insert-directory): Use shell-file-name
instead of explicit-shell-file-name when a shell is implicitly
requested.
* lisp/obsolete/terminal.el (explicit-shell-file-name):
* lisp/term.el (explicit-shell-file-name): Remove duplicate
defcustoms and load lisp/shell.el instead.  (Bug#40679)
* lisp/shell.el (explicit-shell-file-name): Clarify docstring.
(shell): Simplify.

4 years agoAdd tests for several byte-compiler warnings
Stefan Kangas [Thu, 3 Dec 2020 16:08:28 +0000 (17:08 +0100)]
Add tests for several byte-compiler warnings

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp/warn-autoload-not-on-top-level\.el)
(bytecomp/warn-callargs\.el)
(bytecomp/warn-defcustom-nogroup\.el)
(bytecomp/warn-defcustom-notype\.el)
(bytecomp/warn-defvar-lacks-prefix\.el)
(bytecomp/warn-format\.el)
(bytecomp/warn-lambda-malformed-interactive-spec\.el)
(bytecomp/warn-make-variable-buffer-local\.el)
(bytecomp/warn-redefine-defun-as-macro\.el)
(bytecomp/warn-redefine-defun\.el)
(bytecomp/warn-redefine-macro-as-defun\.el)
(bytecomp/warn-save-excursion\.el)
(bytecomp/warn-variable-let-bind-constant\.el)
(bytecomp/warn-variable-let-bind-nonvariable\.el)
(bytecomp/warn-variable-set-constant\.el)
(bytecomp/warn-variable-set-nonvariable\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-autoload-not-on-top-level.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-callargs.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defcustom-nogroup.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defcustom-notype.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-defvar-lacks-prefix.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-format.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-lambda-malformed-interactive-spec.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-make-variable-buffer-local.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-defun-as-macro.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-redefine-macro-as-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-save-excursion.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-constant.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-let-bind-nonvariable.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-constant.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el:
* test/lisp/emacs-lisp/bytecomp-tests.el: New files.

4 years agoAvoid spamming view-mode-enter help message
Basil L. Contovounesios [Mon, 16 Nov 2020 14:40:57 +0000 (14:40 +0000)]
Avoid spamming view-mode-enter help message

By default, entering view-mode echoes a usage message.  This is
particularly helpful with non-nil view-read-only, to notify the user
that view-mode has been enabled.  It is less useful and more spammy,
however, if view-mode is (possibly inadvertently) entered from some
non-interactive code running in the background, such as when a major
mode is enabled in a temporary buffer for text formatting
purposes (bug#44629).

* lisp/jsonrpc.el (jsonrpc-events-buffer, initialize-instance): Use
buffer-read-only in place of read-only-mode for non-interactive use.
* lisp/view.el (view-mode-enter): Inhibit help message if either
view-inhibit-help-message is non-nil, or view-mode-enter was called
from an interactive command.  Suggested by João Távora
<joaotavora@gmail.com>.

4 years agoFix auto-revert-test07-auto-revert-several-buffers
Michael Albinus [Thu, 3 Dec 2020 14:58:40 +0000 (15:58 +0100)]
Fix auto-revert-test07-auto-revert-several-buffers

* test/lisp/autorevert-tests.el
(auto-revert-test07-auto-revert-several-buffers): Adapt times values.

4 years agoImprove performance of auto-revert-notify-add-watch
Spencer Baugh [Thu, 3 Dec 2020 14:57:20 +0000 (15:57 +0100)]
Improve performance of auto-revert-notify-add-watch

* lisp/autorevert.el (auto-revert-notify-add-watch):
Do not search for buffers registered with the same file name, this
is not necessary.  (Bug#44638)

4 years agoRemove redundant requires of 'help'
Stefan Kangas [Wed, 2 Dec 2020 14:56:54 +0000 (15:56 +0100)]
Remove redundant requires of 'help'

* lisp/emacs-lisp/advice.el (ad-read-advised-function):
* lisp/emacs-lisp/ert.el:
* lisp/facemenu.el: Don't require 'help'; it is preloaded since
version 18.59.

4 years agoRemove redundant requires of 'button'
Stefan Kangas [Wed, 2 Dec 2020 14:49:56 +0000 (15:49 +0100)]
Remove redundant requires of 'button'

* lisp/apropos.el:
* lisp/emacs-lisp/cl-print.el:
* lisp/emacs-lisp/debug.el:
* lisp/emacs-lisp/ert.el:
* lisp/emacs-lisp/shadow.el:
* lisp/facemenu.el:
* lisp/help-mode.el:
* lisp/man.el:
* lisp/progmodes/etags.el:
* lisp/textmodes/bibtex.el:
* lisp/woman.el: Don't require 'button'; it is preloaded since version
23.1.

4 years agoFix "grep foo bar" in eshell
Lars Ingebrigtsen [Thu, 3 Dec 2020 10:18:45 +0000 (11:18 +0100)]
Fix "grep foo bar" in eshell

* lisp/eshell/em-unix.el (eshell-grep): Use the -H switch so that
we always get the file name, so that `M-x next-error' and friends
work (bug#22330).

4 years agoDon't make grep arguments invisible in eshell
Lars Ingebrigtsen [Thu, 3 Dec 2020 10:11:46 +0000 (11:11 +0100)]
Don't make grep arguments invisible in eshell

* lisp/eshell/em-unix.el (eshell-grep): There doesn't seem to be
any reason why parts of the command should be invisible, so don't
do that.

4 years agoRecompute error positions in python-shell-send-region
Lars Ingebrigtsen [Thu, 3 Dec 2020 09:21:15 +0000 (10:21 +0100)]
Recompute error positions in python-shell-send-region

* lisp/progmodes/python.el (python-shell-send-region): Recompute
line positions when evaluating (bug#22934).

4 years agoRemove redundant requires of 'custom'
Stefan Kangas [Thu, 3 Dec 2020 08:50:58 +0000 (09:50 +0100)]
Remove redundant requires of 'custom'

* lisp/emacs-lisp/eieio-custom.el:
* lisp/htmlfontify.el:
* lisp/mwheel.el:
* lisp/net/eudc-vars.el:
* lisp/net/ldap.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-gvfs.el:
* lisp/progmodes/cwarn.el:
* lisp/progmodes/sql.el:
* lisp/savehist.el:
* lisp/textmodes/reftex.el:
* lisp/wid-browse.el: Don't require 'custom'; it is preloaded since
version 20.1.

4 years agoRemove redundant requires of 'font-core'
Stefan Kangas [Thu, 3 Dec 2020 07:51:15 +0000 (08:51 +0100)]
Remove redundant requires of 'font-core'

* lisp/ibuffer.el:
* test/lisp/erc/erc-track-tests.el: Don't require 'font-core'; it is
preloaded since version 22.1.

4 years agoRemove redundant requires of 'font-lock'
Stefan Kangas [Thu, 3 Dec 2020 07:50:14 +0000 (08:50 +0100)]
Remove redundant requires of 'font-lock'

* lisp/cedet/data-debug.el:
* lisp/hi-lock.el:
* lisp/htmlfontify.el:
* lisp/org/org.el:
* lisp/progmodes/cperl-mode.el:
* lisp/progmodes/cwarn.el: Don't require 'font-lock'; it is preloaded
since version 22.1.

4 years agobibtex-autokey-get-year: Allow both a year or date field.
Roland Winkler [Wed, 2 Dec 2020 21:08:25 +0000 (15:08 -0600)]
bibtex-autokey-get-year: Allow both a year or date field.

* lisp/textmodes/bibtex.el (bibtex-text-in-field): Allow arg field
to be a list of fields.
(bibtex-autokey-get-year): Look for year and date field.  Allow
the extended date format used by biblatex.

4 years agobibtex-mode: do not fail when local variables are disabled
Roland Winkler [Wed, 2 Dec 2020 19:51:35 +0000 (13:51 -0600)]
bibtex-mode: do not fail when local variables are disabled

* lisp/textmodes/bibtex.el (bibtex-mode): Check if
enable-local-variables is non-nil (bug#37957).

4 years agoAllow bibtex-contline-indentation as file-local variable.
Roland Winkler [Wed, 2 Dec 2020 18:33:08 +0000 (12:33 -0600)]
Allow bibtex-contline-indentation as file-local variable.

* lisp/textmodes/bibtex.el (bibtex-contline-indentation)
(bibtex-comment-start, bibtex-entry-offset, bibtex-text-indentation):
Add :safe attribute.
(bibtex-mode): Allow these variables as file-local variables
(bug#44618 and bug#44647).

4 years agoRemove redundant requires of faces
Stefan Kangas [Wed, 2 Dec 2020 14:43:26 +0000 (15:43 +0100)]
Remove redundant requires of faces

* lisp/htmlfontify.el:
* lisp/term/ns-win.el:
* lisp/term/w32-win.el:
* lisp/term/x-win.el:
* test/lisp/faces-tests.el: Don't require 'faces'; it is preloaded
since version 19.34.

4 years agoRemove redundant requires of env
Stefan Kangas [Wed, 2 Dec 2020 17:20:46 +0000 (18:20 +0100)]
Remove redundant requires of env

* lisp/eshell/esh-var.el:
* lisp/man.el: Don't require 'env'; it is preloaded since version
20.1.

4 years agoAllow bibtex-unify-case-function as file-local variable
Roland Winkler [Wed, 2 Dec 2020 15:47:14 +0000 (09:47 -0600)]
Allow bibtex-unify-case-function as file-local variable

* lisp/textmodes/bibtex.el (bibtex-unify-case-function):
Renamed from bibtex-unify-case-convert.  Add :safe attribute.
* etc/NEWS: Update accordingly.

4 years agoAdd test to autorevert-tests.el
Michael Albinus [Wed, 2 Dec 2020 15:09:20 +0000 (16:09 +0100)]
Add test to autorevert-tests.el

* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert):
Handle `auto-revert--messages' being nil.
(auto-revert-test07-auto-revert-several-buffers): New test.

4 years agoImprove sectioning in bytecomp-tests.el
Stefan Kangas [Wed, 2 Dec 2020 10:29:26 +0000 (11:29 +0100)]
Improve sectioning in bytecomp-tests.el

* test/lisp/emacs-lisp/bytecomp-tests.el: Add section comments.
(test-eager-load-macro-expansion)
(test-eager-load-macro-expansion-eval-and-compile): Move definitions.

4 years ago* lisp/play/dunnet.el: Remove Emacs 18 compat code.
Stefan Kangas [Wed, 2 Dec 2020 12:03:49 +0000 (13:03 +0100)]
* lisp/play/dunnet.el: Remove Emacs 18 compat code.

4 years agoMake variable cperl-version obsolete
Stefan Kangas [Wed, 2 Dec 2020 11:58:42 +0000 (12:58 +0100)]
Make variable cperl-version obsolete

* lisp/progmodes/cperl-mode.el (cperl-menu): Remove CPerl version
menu entry.
(cperl-version): Make obsolete.

4 years agoRemove some Emacs 19 compat code from cperl-mode
Stefan Kangas [Wed, 2 Dec 2020 11:55:22 +0000 (12:55 +0100)]
Remove some Emacs 19 compat code from cperl-mode

* lisp/progmodes/cperl-mode.el
(cperl-put-do-not-fontify): Remove Emacs 19 compat code.
(cperl-do-not-fontify): Make obsolete.

4 years agoRemove some references to fast-lock and lazy-lock
Stefan Kangas [Wed, 2 Dec 2020 11:50:05 +0000 (12:50 +0100)]
Remove some references to fast-lock and lazy-lock

* lisp/htmlfontify.el (hfy-copy-and-fontify-file):
* lisp/progmodes/antlr-mode.el: Remove some references to obsolete
libraries fast-lock and lazy-lock.

4 years agoFix alignment of declaractions of arrays
Lars Ingebrigtsen [Wed, 2 Dec 2020 12:07:40 +0000 (13:07 +0100)]
Fix alignment of declaractions of arrays

* lisp/align.el (align-rules-list): Align variable declarations
like char *foo[], too (bug#23370).

4 years ago* INSTALL: Add the installation command of development packages for FreeBSD.
Michael Albinus [Wed, 2 Dec 2020 11:50:20 +0000 (12:50 +0100)]
* INSTALL: Add the installation command of development packages for FreeBSD.

Recipe contributed by Joseph Mingrone <jrm@ftfl.ca>.

4 years agoAdd tests for xsd-regexp
Lars Ingebrigtsen [Wed, 2 Dec 2020 11:26:04 +0000 (12:26 +0100)]
Add tests for xsd-regexp

4 years agoFix xsdre-range-list-to-char-alternative problem with {P}
Lars Ingebrigtsen [Wed, 2 Dec 2020 11:23:13 +0000 (12:23 +0100)]
Fix xsdre-range-list-to-char-alternative problem with {P}

* lisp/nxml/xsd-regexp.el (xsdre-range-list-to-char-alternative):
Make (string-match (xsdre-translate "\\p{P}") "a-b") work
(bug#24093) -- the "forbidden" characters don't have to be the
first elements in a range.

4 years agoFix the message-fetch-field doc string
Lars Ingebrigtsen [Wed, 2 Dec 2020 10:16:30 +0000 (11:16 +0100)]
Fix the message-fetch-field doc string

* lisp/gnus/message.el (message-fetch-field): Improve the doc
string (bug#44991).

4 years agoRemove specific byte-compiler warnings for cl.el
Stefan Kangas [Wed, 2 Dec 2020 09:19:16 +0000 (10:19 +0100)]
Remove specific byte-compiler warnings for cl.el

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile-cl-file-p)
(byte-compile-eval, byte-compile-eval-before-compile)
(byte-compile-arglist-warn, byte-compile-find-cl-functions)
(byte-compile-cl-warn, displaying-byte-compile-warnings)
(byte-compile-file-form-require, byte-compile-form): Remove all
specific cl.el warnings, as that library is now obsolete.  The
regular obsoletion warnings are sufficiently discouraging.
* lisp/emacs-lisp/advice.el (ad-compile-function): Don't try to
silence the now removed warning.
* doc/lispref/tips.texi (Coding Conventions):
* doc/misc/cl.texi (Organization): Make recommendation to not use
cl.el and cl-compat.el stronger.
* lisp/obsolete/cl.el: Make alias help say that they are obsolete.
* lisp/obsolete/cl-compat.el (build-klist, safe-idiv)
(pair-with-newsyms): Silence byte-compiler.

4 years agoImprove .gitignore and project-vc-ignores handling
Dmitry Gutov [Wed, 2 Dec 2020 02:28:35 +0000 (04:28 +0200)]
Improve .gitignore and project-vc-ignores handling

* lisp/progmodes/project.el (project-ignores):
Convert .gitignore entries more faithfully.
(project--vc-list-files): Convert "our" ignore entries to
"proper" globs, which is what Git pathspec requires.

4 years agoUse project--value-in-dir
Dmitry Gutov [Tue, 1 Dec 2020 23:41:40 +0000 (01:41 +0200)]
Use project--value-in-dir

* lisp/progmodes/project.el (project-files):
Use 'project--value-in-dir'.  To have any changes in
'project-vc-ignores' take effect immediately.

4 years agoFix documentation of window-in-direction arg MINIBUF (bug#44932)
Juri Linkov [Tue, 1 Dec 2020 20:33:43 +0000 (22:33 +0200)]
Fix documentation of window-in-direction arg MINIBUF (bug#44932)

* doc/lispref/windows.texi (Windows and Frames): Rename MINI arg
of window-in-direction to MINIBUF.  Explain the non-nil non-t value.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 1 Dec 2020 15:50:12 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

8e73259093 (origin/emacs-27, emacs-27) ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 1 Dec 2020 15:50:12 +0000 (07:50 -0800)]
Merge from origin/emacs-27

749e4b7e0b Reset xref-show-xrefs-function temporarily
3e6525d69f Don't show in 'view-lossage' responses to xterm feature qu...
9fbff9c35c ; * src/buffer.c: Fix comment describing 'buffer_defaults'.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 1 Dec 2020 15:50:12 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

9e0085064b Adapt Tramp versions.  Do not merge

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 1 Dec 2020 15:50:09 +0000 (07:50 -0800)]
Merge from origin/emacs-27

9939c435c1 Return the correct suffix in eww-make-unique-file-name
17fa17be3d Save bookmarks by using `write-file' (bug#12507)
2cdf1fd261 Fix filing messages when 'rmail-output-reset-deleted-flag'...
a72db8ab8b Make file copying in tramp-gvfs more robust
f31cacd1ff Revert "Fix incorrect handling of module runtime and envir...
cdc632fbe6 Fix incorrect handling of module runtime and environment p...
c9160bda78 CC Mode: Fix error in cache handling.  This fixes bug #43481

4 years ago* lisp/arc-mode.el (archive-get-descr): Use default mode if needed.
Michael Albinus [Tue, 1 Dec 2020 14:39:38 +0000 (15:39 +0100)]
* lisp/arc-mode.el (archive-get-descr): Use default mode if needed.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Dec 2020 14:27:56 +0000 (06:27 -0800)]
; Auto-commit of loaddefs files.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Dec 2020 14:12:37 +0000 (06:12 -0800)]
; Auto-commit of loaddefs files.

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs into master
Michael Albinus [Tue, 1 Dec 2020 12:37:27 +0000 (13:37 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into master

4 years agoAllow Tramp to mirror traces to a file
Michael Albinus [Tue, 1 Dec 2020 12:37:03 +0000 (13:37 +0100)]
Allow Tramp to mirror traces to a file

* doc/misc/tramp.texi (Traces and Profiles): Add `tramp-debug-to-file'.

* lisp/net/tramp-adb.el (tramp-adb-parse-device-names)
(tramp-adb-get-device):
* lisp/net/tramp-cmds.el (tramp-rename-files):
* lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-volumeadded-volumeremoved)
(tramp-get-media-devices):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-maybe-send-script)
(tramp-find-inline-encoding):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl):
Use `tramp-compat-string-replace'.

* lisp/net/tramp-compat.el (tramp-compat-string-replace): New defalias.

* lisp/net/tramp.el (tramp-debug-to-file): New defcustom.
(tramp-get-debug-buffer): Simplify.
(tramp-get-debug-file-name): New defun.
(tramp-debug-message): Write debug file if indicated.

4 years ago* etc/NEWS: Add user option 'tramp-debug-to-file'.
Michael Albinus [Tue, 1 Dec 2020 12:36:07 +0000 (13:36 +0100)]
* etc/NEWS: Add user option 'tramp-debug-to-file'.

4 years agoFix byte-compiler warning for failed uses of lexical vars
Stefan Kangas [Tue, 1 Dec 2020 12:34:17 +0000 (13:34 +0100)]
Fix byte-compiler warning for failed uses of lexical vars

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Fix byte-compiler
warning for failed uses of lexical vars.  (Bug#44980)
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--define-warning-file-test): Don't prefix tests with
'warn'.
(bytecomp/error-lexical-var-with-add-hook\.el)
(bytecomp/error-lexical-var-with-remove-hook\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args-until-failure\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args-until-success\.el)
(bytecomp/error-lexical-var-with-run-hook-with-args\.el)
(bytecomp/error-lexical-var-with-symbol-value\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-symbol-value.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-failure.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-remove-hook.el:
* test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-add-hook.el:
New files.

4 years agoFix use of 'switch-to-buffer-preserve-window-point'
Zajcev Evgeny [Tue, 1 Dec 2020 08:33:05 +0000 (09:33 +0100)]
Fix use of 'switch-to-buffer-preserve-window-point'

* lisp/window.el (switch-to-buffer): Respect buffer local value
of 'switch-to-buffer-preserve-window-point' variable.

4 years agoAdd tests for some byte-compiler warnings
Stefan Kangas [Tue, 1 Dec 2020 03:46:33 +0000 (04:46 +0100)]
Add tests for some byte-compiler warnings

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-warn/warn-interactive-only\.el)
(bytecomp-warn/warn-obsolete-defun\.el)
(bytecomp-warn/warn-obsolete-hook\.el)
(bytecomp-warn/warn-obsolete-variable-same-file\.el)
(bytecomp-warn/warn-obsolete-variable\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-interactive-only.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-hook.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-same-file.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable.el:
New files.

4 years agoReset xref-show-xrefs-function temporarily
Dmitry Gutov [Tue, 1 Dec 2020 01:46:27 +0000 (03:46 +0200)]
Reset xref-show-xrefs-function temporarily

* lisp/dired-aux.el (dired-do-find-regexp-and-replace):
Make sure xref-show-xrefs-function has the necessary value (bug#44905).

4 years agoDecrease code duplication in byte-compiler free-vars warning
Stefan Kangas [Mon, 30 Nov 2020 21:44:09 +0000 (22:44 +0100)]
Decrease code duplication in byte-compiler free-vars warning

* lisp/emacs-lisp/bytecomp.el
(byte-compile-free-vars-warn): New defun extracted from...
(byte-compile-variable-ref, byte-compile-variable-set): ...here.

4 years agoTest byte-compiler free variable warning
Stefan Kangas [Mon, 30 Nov 2020 21:42:08 +0000 (22:42 +0100)]
Test byte-compiler free variable warning

* test/lisp/emacs-lisp/bytecomp-tests.el (ert-x): Require.
(bytecomp--define-warning-file-test): New macro.
(bytecomp-warn/warn-free-setq\.el)
(bytecomp-warn/warn-free-variable-reference\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-setq.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-free-variable-reference.el:
New files.

4 years ago* lisp/so-long.el: Doc fix to reduce use of passive voice.
Stefan Kangas [Mon, 30 Nov 2020 18:56:59 +0000 (19:56 +0100)]
* lisp/so-long.el: Doc fix to reduce use of passive voice.

4 years agoDon't show in 'view-lossage' responses to xterm feature queries
Eli Zaretskii [Mon, 30 Nov 2020 18:44:11 +0000 (20:44 +0200)]
Don't show in 'view-lossage' responses to xterm feature queries

* lisp/term/xterm.el (xterm--read-event-for-query): Prevent
recording the characters read as the xterm response to a query,
so as not to show them in 'view-lossage'.  (Bug#44908)

4 years ago; * src/buffer.c: Fix comment describing 'buffer_defaults'.
Eli Zaretskii [Mon, 30 Nov 2020 18:42:06 +0000 (20:42 +0200)]
; * src/buffer.c: Fix comment describing 'buffer_defaults'.

4 years agoSome adaptions to tramp-tests.el
Michael Albinus [Mon, 30 Nov 2020 12:54:29 +0000 (13:54 +0100)]
Some adaptions to tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test-vec): Check for remote
`tramp-test-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file):
Do not skip for tramp-gvfs.el.
(tramp--test-sh-p): Use `tramp-test-vec'.

4 years agoAdapt Tramp versions
Michael Albinus [Mon, 30 Nov 2020 12:44:44 +0000 (13:44 +0100)]
Adapt Tramp versions

* doc/misc/tramp.texi (Obtaining @value{tramp}):
(Remote shell setup, Remote processes, Archive file names):
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Adapt Tramp versions.

4 years agoAdapt Tramp versions. Do not merge
Michael Albinus [Mon, 30 Nov 2020 12:19:19 +0000 (13:19 +0100)]
Adapt Tramp versions.  Do not merge

* doc/misc/tramp.texi (Obtaining @value{tramp})
(Remote shell setup, Remote processes, Archive file names):
* doc/misc/trampver.texi:
* lisp/net/tramp.el:
* lisp/net/trampver.el (tramp-version)
(customize-package-emacs-version-alist): Adapt Tramp versions.

4 years agoImprove docstrings
Dmitry Gutov [Mon, 30 Nov 2020 01:33:14 +0000 (03:33 +0200)]
Improve docstrings

* lisp/progmodes/project.el (project-find-file)
(project-or-external-find-file): More accurate docstrings (bug#44588).

4 years agoFix double-free bug when finalizing module runtimes.
Philipp Stephani [Sun, 29 Nov 2020 20:13:02 +0000 (21:13 +0100)]
Fix double-free bug when finalizing module runtimes.

* src/emacs-module.c (finalize_runtime_unwind): Don't finalize initial
environment twice.

* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Allocate lots of values during module initialization to trigger the
bug.

4 years ago* lisp/simple.el (read-from-kill-ring): Call current-kill to prefill kill-ring
Juri Linkov [Sun, 29 Nov 2020 19:54:53 +0000 (21:54 +0200)]
* lisp/simple.el (read-from-kill-ring): Call current-kill to prefill kill-ring

4 years agoFix MINIBUF 'nomini' arg for windmove/window-in-direction (bug#44932)
Juri Linkov [Sun, 29 Nov 2020 19:48:01 +0000 (21:48 +0200)]
Fix MINIBUF 'nomini' arg for windmove/window-in-direction (bug#44932)

* lisp/windmove.el (windmove-display-in-direction)
(windmove-delete-in-direction, windmove-swap-states-in-direction):
Add 'nomini' as MINIBUF arg of window-in-direction.

* lisp/window.el (window-in-direction): Rename arg MINI to MINIBUF.
Update docstring from walk-window-tree.
Send MINIBUF arg to walk-window-tree unchanged.

4 years agoAllow doprint to handle multibyte chars in format (bug#44349)
Alan Third [Fri, 27 Nov 2020 22:11:47 +0000 (22:11 +0000)]
Allow doprint to handle multibyte chars in format (bug#44349)

* src/doprnt.c (doprnt): Handle the case where fmtchar is the start of
a multibyte character.

4 years agoMake log-view-commit-body less intrusive
Protesilaos Stavrou [Sun, 29 Nov 2020 10:43:38 +0000 (11:43 +0100)]
Make log-view-commit-body less intrusive

* lisp/vc/log-view.el (log-view-commit-body): Inherit from
font-lock-comment-face.  This makes expanded commit messages in
log-view look the same as they did prior to commit 1f0b929430 (consult
bug#44424) (bug#44937).

4 years agoReturn the correct suffix in eww-make-unique-file-name
Akira Kyle [Sun, 29 Nov 2020 10:40:47 +0000 (11:40 +0100)]
Return the correct suffix in eww-make-unique-file-name

* lisp/net/eww.el (eww-make-unique-file-name): Return the correct
suffix (bug#44936).

4 years agoframe-position doc string clarificaton
Lars Ingebrigtsen [Sun, 29 Nov 2020 10:10:42 +0000 (11:10 +0100)]
frame-position doc string clarificaton

* src/frame.c (Fframe_position): Mention that the values are
system-dependent (bug#32977).

4 years agogarbage-collect doc string clarification
Lars Ingebrigtsen [Sun, 29 Nov 2020 10:05:10 +0000 (11:05 +0100)]
garbage-collect doc string clarification

* src/alloc.c (Fgarbage_collect): Mention that calling this
function is not guaranteed to collect all the garbage (bug#34404).

4 years agoTweak eww-use-browse-url doc string
Lars Ingebrigtsen [Sun, 29 Nov 2020 09:54:58 +0000 (10:54 +0100)]
Tweak eww-use-browse-url doc string

* lisp/net/eww.el (eww-use-browse-url): Tweak doc string wording.

4 years agoSave bookmarks by using `write-file' (bug#12507)
Karl Fogel [Sun, 29 Nov 2020 00:17:46 +0000 (18:17 -0600)]
Save bookmarks by using `write-file' (bug#12507)

Go back to using `write-file' to save bookmarks, instead of using
`write-region'.  This means numbered backups of the bookmark file may
get made again, depending on the value of `bookmark-version-control'.

Thanks especially to Drew Adams and Eli Zaretskii for their
persistence in tracking down information relevant to this change.

4 years agoFix filing messages when 'rmail-output-reset-deleted-flag' is non-nil
Eli Zaretskii [Sat, 28 Nov 2020 17:05:18 +0000 (19:05 +0200)]
Fix filing messages when 'rmail-output-reset-deleted-flag' is non-nil

* lisp/mail/rmailout.el (rmail-output): Fix off-by-one error in
deciding when to advance to the next message under non-nil
'rmail-output-reset-deleted-flag'.  (Bug#44839)

4 years agoUpdate TUTORIAL.it
Lele Gaifax [Sat, 28 Nov 2020 08:48:09 +0000 (09:48 +0100)]
Update TUTORIAL.it

* etc/tutorials/TUTORIAL.it: Follow changes made to TUTORIAL in the
last year

4 years agoMake file copying in tramp-gvfs more robust
Michael Albinus [Sat, 28 Nov 2020 11:31:43 +0000 (12:31 +0100)]
Make file copying in tramp-gvfs more robust

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Do not skip for tramp-gvfs.el.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Add sanity checks.

4 years ago* etc/tutorials/TUTORIAL.sv: General copy-editing.
Mattias Engdegård [Sat, 28 Nov 2020 11:28:45 +0000 (12:28 +0100)]
* etc/tutorials/TUTORIAL.sv: General copy-editing.

4 years agoRevert "Fix incorrect handling of module runtime and environment pointers."
Eli Zaretskii [Sat, 28 Nov 2020 07:21:33 +0000 (09:21 +0200)]
Revert "Fix incorrect handling of module runtime and environment pointers."

This reverts commit cdc632fbe6e149318147a98cccf1b7af191f2ce8.
Those changes are too significant and non-trivial to be
suitable for a release branch at this time.

4 years agoFix incorrect handling of module runtime and environment pointers.
Philipp Stephani [Fri, 27 Nov 2020 18:08:55 +0000 (19:08 +0100)]
Fix incorrect handling of module runtime and environment pointers.

We used to store module runtime and environment pointers in the static
lists Vmodule_runtimes and Vmodule_environments.  However, this is
incorrect because these objects have to be kept per-thread.  With this
naive approach, interleaving module function calls in separate threads
leads to environments being removed in the wrong order, which in turn
can cause local module values to be incorrectly garbage-collected.

Instead, turn Vmodule_runtimes and Vmodule_environments into
hashtables keyed by the thread objects.  The fix is relatively
localized and should therefore be safe enough for the release branch.

Module assertions now have to walk the pointer list for the current
thread, which is more correct since they now only find environments
for the current thread.

Also add a unit test that exemplifies the problem.  It interleaves two
module calls in two threads so that the first call ends while the
second one is still active.  Without this change, this test triggers
an assertion failure.

* src/emacs-module.c (Fmodule_load, initialize_environment)
(finalize_environment, finalize_runtime_unwind): Store runtime and
environment pointers in per-thread lists.
(syms_of_module): Initialize runtimes and environments hashtables.
(module_assert_runtime, module_assert_env, value_to_lisp): Consider
only objects for the current thread.
(module_gc_hash_table_size, module_hash_push, module_hash_pop): New
generic hashtable helper functions.
(module_objects, module_push_pointer, module_pop_pointer): New helper
functions to main thread-specific lists of runtime and environment
pointers.
(mark_modules): Mark all environments in all threads.

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

* test/src/emacs-module-tests.el (emacs-module-tests--variable): New
helper type to guard access to state in a thread-safe way.
(emacs-module-tests--wait-for-variable)
(emacs-module-tests--change-variable): New helper functions.
(emacs-module-tests/interleaved-threads): New unit test.

4 years agoUse correct glyph in title when resizing NS frames
Mattias Engdegård [Fri, 27 Nov 2020 20:16:15 +0000 (21:16 +0100)]
Use correct glyph in title when resizing NS frames

* src/nsterm.m ([EmacsView windowWillResize:toSize:]): Use ×, not x.

4 years agoFix incorrect handling of module runtime and environment pointers.
Philipp Stephani [Fri, 27 Nov 2020 18:08:55 +0000 (19:08 +0100)]
Fix incorrect handling of module runtime and environment pointers.

We used to store module runtime and environment pointers in the static
lists Vmodule_runtimes and Vmodule_environments.  However, this is
incorrect because these objects have to be kept per-thread.  With this
naive approach, interleaving module function calls in separate threads
leads to environments being removed in the wrong order, which in turn
can cause local module values to be incorrectly garbage-collected.
The fix isn't completely trivial: specbinding the lists wouldn't work
either, because then the garbage collector wouldn't find the
environments in other threads than the current ones, again leading to
objects being garbage-collected incorrectly.  While introducing custom
pseudovector types would fix this, it's simpler to put the runtime and
environment pointers into the specbinding list as new specbinding
kinds.  This works since we need to unwind them anyway, and we only
ever treat the lists as a stack.  The thread switching machinery
ensures that the specbinding lists are thread-local, and that all
elements of the specbinding lists in all threads are marked during
garbage collection.

Module assertions now have to walk the specbinding list for the
current thread, which is more correct since they now only find
environments for the current thread.  As a result, we can now remove
the faulty Vmodule_runtimes and Vmodule_environments variables
entirely.

Also add a unit test that exemplifies the problem.  It interleaves two
module calls in two threads so that the first call ends while the
second one is still active.  Without this change, this test triggers
an assertion failure.

* src/lisp.h (enum specbind_tag): Add new tags for module runtimes and
environments.

* src/eval.c (record_unwind_protect_module): New function to record a
module object in the specpdl list.
(do_one_unbind): Unwind module objects.
(backtrace_eval_unrewind, default_toplevel_binding, lexbound_p)
(Fbacktrace__locals): Deal with new specbinding types.
(mark_specpdl): Mark module environments as needed.

* src/alloc.c (garbage_collect): Remove call to 'mark-modules'.
Garbage collection of module values is now handled as part of marking
the specpdl of each thread.

* src/emacs-module.c (Fmodule_load, funcall_module): Use specpdl to
record module runtimes and environments.
(module_assert_runtime, module_assert_env, value_to_lisp): Walk
through specpdl list instead of list variables.
(mark_module_environment): Rename from 'mark_modules'.  Don't attempt
to walk though current thread's environments only, since that would
miss other threads.
(initialize_environment, finalize_environment): Don't change
Vmodule_environments variable; environments are now in the specpdl
list.
(finalize_environment_unwind, finalize_runtime_unwind): Make 'extern'
since do_one_unbind now calls them.
(finalize_runtime_unwind): Don't change Vmodule_runtimes variable;
runtimes are now in the specpdl list.
(syms_of_module): Remove Vmodule_runtimes and Vmodule_environments.

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

* test/src/emacs-module-tests.el (emacs-module-tests--variable): New
helper type to guard access to state in a thread-safe way.
(emacs-module-tests--wait-for-variable)
(emacs-module-tests--change-variable): New helper functions.
(emacs-module-tests/interleaved-threads): New unit test.

4 years ago; * src/lisp.h (enum specbind_tag): Fix typo.
Philipp Stephani [Fri, 27 Nov 2020 19:04:20 +0000 (20:04 +0100)]
; * src/lisp.h (enum specbind_tag): Fix typo.

4 years ago* lisp/subr.el (activate-change-group): Refine fix for bug#33341
Stefan Monnier [Fri, 27 Nov 2020 15:19:21 +0000 (10:19 -0500)]
* lisp/subr.el (activate-change-group): Refine fix for bug#33341

4 years agoMake the 'cucumber' compilation pattern work without 'omake'
Mattias Engdegård [Tue, 24 Nov 2020 11:05:47 +0000 (12:05 +0100)]
Make the 'cucumber' compilation pattern work without 'omake'

When 'omake' is included in compilation-error-regexp-alist, which it
still is by default, then all other rules are modified to match with
an extra leading 6 spaces as well. The 'cucumber' pattern relied on
this in order to work as intended.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Extend the 'cucumber' pattern so that it works even when 'omake'
is not included.  Move it below the 'gnu' rule so that it doesn't
match anything else.

4 years agoUpdate TUTORIAL.de and TUTORIAL.fr
Mattias Engdegård [Fri, 27 Nov 2020 14:29:22 +0000 (15:29 +0100)]
Update TUTORIAL.de and TUTORIAL.fr

* etc/tutorials/TUTORIAL.de:
* etc/tutorials/TUTORIAL.fr: Follow recent changes in TUTORIAL.

4 years ago* lisp/subr.el (activate-change-group): Fix bug#33341
Stefan Monnier [Fri, 27 Nov 2020 14:43:56 +0000 (09:43 -0500)]
* lisp/subr.el (activate-change-group): Fix bug#33341