]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agocheckdoc-spellcheck-documentation-flag doc string improvement
Lars Ingebrigtsen [Wed, 20 Jan 2021 21:15:38 +0000 (22:15 +0100)]
checkdoc-spellcheck-documentation-flag doc string improvement

* lisp/emacs-lisp/checkdoc.el
(checkdoc-spellcheck-documentation-flag): Mention
`ispell-kill-ispell' (bug#6221).

3 years agoRevert "Always send Lisp words to checkdoc-ispell-init"
Lars Ingebrigtsen [Wed, 20 Jan 2021 21:11:38 +0000 (22:11 +0100)]
Revert "Always send Lisp words to checkdoc-ispell-init"

This reverts commit 93141d581330d94e7eec9f114def2bec15f87866.

This would make checkdoc words be used in other flyspell
buffers.

3 years agoAlways send Lisp words to checkdoc-ispell-init
Lars Ingebrigtsen [Wed, 20 Jan 2021 20:46:30 +0000 (21:46 +0100)]
Always send Lisp words to checkdoc-ispell-init

* lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-init): Always send
the Lisp words to the process (bug#6221).  This allows an existing
ispell process to be correctly initialised.

3 years agoMove the ‘declare’ form before the interactive spec in 10 functions.
Juri Linkov [Wed, 20 Jan 2021 19:19:23 +0000 (21:19 +0200)]
Move the ‘declare’ form before the interactive spec in 10 functions.

* lisp/emacs-lisp/package.el (package-menu-hide-package):
* lisp/font-lock.el (font-lock-debug-fontify):
* lisp/image.el (image-jpeg-p):
* lisp/mail/flow-fill.el (fill-flowed-test):
* lisp/mh-e/mh-speed.el (mh-speed-toggle, mh-speed-view):
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command, project-compile):
* lisp/progmodes/sh-script.el (sh-assignment):
Fix special forms to follow in this order: docstring, declare, interactive.

3 years ago* lisp/emacs-lisp/subr-x.el (named-let): New macro
Stefan Monnier [Wed, 20 Jan 2021 19:12:50 +0000 (14:12 -0500)]
* lisp/emacs-lisp/subr-x.el (named-let): New macro

3 years ago* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Add 2 new opts
Stefan Monnier [Wed, 20 Jan 2021 19:08:35 +0000 (14:08 -0500)]
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Add 2 new opts

This introduces two new optimizations.  They're designed for code like

    (while
        (let (...)
          (if ... (progn blabla t) (progn blabla nil)))
      ...)

and they allow the elimination of the test internal to `while` since
we can immediately know when we return `t` or `nil` what the result
of the test will be.

`cl-labels` tends to generate this kind of code when it applies the
tail-call optimization.

3 years ago* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Move some opts.
Stefan Monnier [Wed, 20 Jan 2021 18:59:58 +0000 (13:59 -0500)]
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Move some opts.

This moves two optimizations from the final pass to the main loop.
Both may enable further optimizations (and the second can be applied
repeatedly but "from the end", so the loop in the final pass only gets
to apply it once).

3 years ago* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Re-indent
Stefan Monnier [Wed, 20 Jan 2021 18:54:11 +0000 (13:54 -0500)]
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Re-indent

3 years agoFix footnote-mode problem when reopening an old file
Lars Ingebrigtsen [Wed, 20 Jan 2021 18:42:21 +0000 (19:42 +0100)]
Fix footnote-mode problem when reopening an old file

* lisp/mail/footnote.el (footnote--regenerate-alist): New function
(bug#7258).
(footnote-mode): Use it to restore footnotes after opening an old
file with footnotes.

3 years agocua-toggle-global-mark doc string clarification
Lars Ingebrigtsen [Wed, 20 Jan 2021 17:52:17 +0000 (18:52 +0100)]
cua-toggle-global-mark doc string clarification

* lisp/emulation/cua-gmrk.el (cua-toggle-global-mark): Clarify
that also inserted characters are affected (bug#8083).

3 years agoFix environment handling in tramp-handle-make-process
Michael Albinus [Wed, 20 Jan 2021 17:51:52 +0000 (18:51 +0100)]
Fix environment handling in tramp-handle-make-process

* lisp/net/tramp.el (tramp-test-message): Add `tramp-suppress-trace' property.
(tramp-handle-make-process): Handle also 'tramp-remote-process-environment'.

3 years agoRespect remember-save-after-remembering on remember-diary-extract-entries
Gabriel do Nascimento Ribeiro [Wed, 20 Jan 2021 16:54:43 +0000 (17:54 +0100)]
Respect remember-save-after-remembering on remember-diary-extract-entries

* lisp/textmodes/remember.el (remember-diary-extract-entries):
Save automatically if `remember-save-after-remembering' is non-nil
(bug#45811).

3 years agoAdd option remember-text-format-function
Gabriel do Nascimento Ribeiro [Wed, 20 Jan 2021 16:53:04 +0000 (17:53 +0100)]
Add option remember-text-format-function

* lisp/textmodes/remember.el (remember-text-format-function): New
variable (bug#45809).
(remember-append-to-file): Use it.

3 years agoAdd option remember-diary-regexp
Gabriel do Nascimento Ribeiro [Wed, 20 Jan 2021 16:45:08 +0000 (17:45 +0100)]
Add option remember-diary-regexp

* lisp/textmodes/remember.el (remember-diary-extract-entries): Use
it (bug#45808).
(remember-diary-regexp): New variable.

3 years agoTweak tty-find-type to allow TERM=screen.xterm
Lars Ingebrigtsen [Wed, 20 Jan 2021 16:25:40 +0000 (17:25 +0100)]
Tweak tty-find-type to allow TERM=screen.xterm

* lisp/faces.el (tty-find-type): Allow TERM=screen.xterm to find
term/screen.el (bug#45824).

3 years agoMake symbol-at-point return nil if there's no symbols in the buffer
Lars Ingebrigtsen [Wed, 20 Jan 2021 15:58:09 +0000 (16:58 +0100)]
Make symbol-at-point return nil if there's no symbols in the buffer

* lisp/thingatpt.el (thing-at-point--beginning-of-symbol): Special
op that errors out when there's no symbols in the buffer before
point (bug#14234).
(symbol): Use it.

3 years agoAdd tests for symbol-at-point (bug#14234)
Lars Ingebrigtsen [Wed, 20 Jan 2021 15:47:39 +0000 (16:47 +0100)]
Add tests for symbol-at-point (bug#14234)

3 years agoDon't let `maybe_quit` prevent resetting `consing_until_gc` (bug#43389)
Stefan Monnier [Wed, 20 Jan 2021 14:52:07 +0000 (09:52 -0500)]
Don't let `maybe_quit` prevent resetting `consing_until_gc` (bug#43389)

* src/alloc.c (garbage_collect): Postpone `unblock_input` a bit.
* src/window.c (window_parameter): Avoid `maybe_quit`.

3 years agoSort Ibuffer filename/process column as displayed
Fabrice Bauzac [Mon, 18 Jan 2021 22:02:21 +0000 (23:02 +0100)]
Sort Ibuffer filename/process column as displayed

* lisp/ibuf-ext.el (ibuffer-do-sort-by-filename/process): Use the
same function for sorting and for displaying the
filename/process (Bug#45800).

Copyright-paperwork-exempt: yes

3 years agoRevert "Make `symbol-at-point' work in buffers with no symbols"
Lars Ingebrigtsen [Wed, 20 Jan 2021 04:44:16 +0000 (05:44 +0100)]
Revert "Make `symbol-at-point' work in buffers with no symbols"

This reverts commit 40a5df81434ce02fba01779256b50976fb74da4f.

This fails when a point is after a symbol, and there's
nothing else in the buffer.

3 years agoDon't add Content-Type when ceasing an rmail edit
Lars Ingebrigtsen [Wed, 20 Jan 2021 04:08:56 +0000 (05:08 +0100)]
Don't add Content-Type when ceasing an rmail edit

* lisp/mail/rmailedit.el (rmail-cease-edit): Take an optional
parameter to avoid altering the message (bug#13327).
(rmail-abort-edit): Use it.

3 years agoMake `symbol-at-point' work in buffers with no symbols
Lars Ingebrigtsen [Wed, 20 Jan 2021 03:44:18 +0000 (04:44 +0100)]
Make `symbol-at-point' work in buffers with no symbols

* lisp/thingatpt.el (thing-at-point--end-of-symbol): New function
(bug#14234).
(symbol): Use it instead of `forward-symbol', because the latter
will move to the end of the buffer even if there is no symbol
there.  Instead error out like `forward-sexp' and friends.

3 years agoFix up example in the Modifying Menus node in the lispref manual
Lars Ingebrigtsen [Wed, 20 Jan 2021 03:17:41 +0000 (04:17 +0100)]
Fix up example in the Modifying Menus node in the lispref manual

* doc/lispref/keymaps.texi (Modifying Menus): Make the second
example more regular (bug#14257).

3 years agoMention that the mouse will switch on transient-mark-mode in manual
Lars Ingebrigtsen [Wed, 20 Jan 2021 02:54:18 +0000 (03:54 +0100)]
Mention that the mouse will switch on transient-mark-mode in manual

* doc/lispref/markers.texi (The Mark): Mention that the mouse will
enable the `(only)' transient mark mode (bug#14945).

3 years agoMake sh-mode use `auto-mode-interpreter-regexp'
Lars Ingebrigtsen [Wed, 20 Jan 2021 02:25:46 +0000 (03:25 +0100)]
Make sh-mode use `auto-mode-interpreter-regexp'

* lisp/progmodes/sh-script.el (sh-mode): Use
`auto-mode-interpreter-regexp' instead of open-coding the value
(bug#17158).

3 years agotest/lisp/replace-tests.el: Add nested match group test
Nick Drozd [Wed, 20 Jan 2021 01:46:17 +0000 (02:46 +0100)]
test/lisp/replace-tests.el: Add nested match group test

* test/lisp/replace-tests.el (replace-regexp-bug45973): Add test
(bug#45973).

3 years agoMake child signal read pipe non-blocking.
Philipp Stephani [Tue, 19 Jan 2021 20:35:06 +0000 (21:35 +0100)]
Make child signal read pipe non-blocking.

Otherwise Emacs might hang when trying to read the pipe twice in a
row.  This is consistent with the other file descriptors we pass to
'pselect'.

* src/process.c (child_signal_init): Make read end of pipe
non-blocking.

3 years agoDeclare some project commands interactive-only
Dmitry Gutov [Tue, 19 Jan 2021 19:50:11 +0000 (21:50 +0200)]
Declare some project commands interactive-only

* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command, project-compile):
Declare interactive-only (bug#45765).

3 years ago* lisp/help-fns.el: Move defvar keymap-name-history closer to where it's used.
Juri Linkov [Tue, 19 Jan 2021 18:27:29 +0000 (20:27 +0200)]
* lisp/help-fns.el: Move defvar keymap-name-history closer to where it's used.

3 years agoBetter check for nil in search-/query-replace-highlight-submatches (bug#45973)
Juri Linkov [Tue, 19 Jan 2021 18:12:47 +0000 (20:12 +0200)]
Better check for nil in search-/query-replace-highlight-submatches (bug#45973)

* lisp/isearch.el (isearch-highlight):
* lisp/replace.el (replace-highlight):
Use integer-or-marker-p to check matches.

3 years ago* test/infra/gitlab-ci.yml: Bootstrap only from web, schedule, or C-related.
Ted Zlatanov [Tue, 19 Jan 2021 13:35:07 +0000 (13:35 +0000)]
* test/infra/gitlab-ci.yml: Bootstrap only from web, schedule, or C-related.

3 years agoCalc: use Unicode brackets in Big mode when available (bug#45917)
Mattias Engdegård [Sat, 16 Jan 2021 16:30:57 +0000 (17:30 +0100)]
Calc: use Unicode brackets in Big mode when available (bug#45917)

* lisp/calc/calccomp.el (math--big-bracket-alist)
(math--big-bracket, math--comp-bracket, math--comp-round-bracket):
New.
(math-compose-expr, math-compose-log, math-compose-log10)
(math-compose-choose, math-compose-integ, math-compose-sum)
(math-compose-prod): Use big brackets when available.

3 years ago* etc/NEWS.19: Add entry for `indent-line-to`
Stefan Monnier [Tue, 19 Jan 2021 17:53:42 +0000 (12:53 -0500)]
* etc/NEWS.19: Add entry for `indent-line-to`

* lisp/version.el (emacs-major-version, emacs-minor-version):
Remove redundant version info already displayed by `C-h o`.

3 years agoSome Tramp fixes, resulting from test campaign
Michael Albinus [Tue, 19 Jan 2021 17:45:55 +0000 (18:45 +0100)]
Some Tramp fixes, resulting from test campaign

* doc/misc/tramp.texi (Remote shell setup): Clarifications for
`tramp-actions-before-shell' example.

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Do not expand
FILENAME explicitely.
(tramp-open-shell): Add "-i" for interactive shells.

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory)
(tramp-test43-asynchronous-requests): Skip for MS windows.

3 years ago* lisp/startup.el: Fix bug#45857, bug#30994, and bug#45913.
Stefan Monnier [Tue, 19 Jan 2021 17:10:48 +0000 (12:10 -0500)]
* lisp/startup.el: Fix bug#45857, bug#30994, and bug#45913.

(command-line): Don't re-evaluate the `custom-delayed-init-variables`
a second time after reading the `early-init.el` file.
(x-apply-session-resources): Set `blink-cursor-mode` rather than
`no-blinking-cursor`.

* lisp/frame.el (blink-cursor-start): Turn `blink-cursor-mode` off
if `blink-cursor-mode` was set to nil.
(blink-cursor-mode): Default to it being enabled regardless of
`window-system`.

* lisp/custom.el (custom-initialize-delay): Fox docstring now that
autoload.el preserves the `:initialize` info.

3 years agoOnly show "2x entries" i vc log buffers if needed
Lars Ingebrigtsen [Tue, 19 Jan 2021 16:26:01 +0000 (17:26 +0100)]
Only show "2x entries" i vc log buffers if needed

* lisp/vc/vc.el (vc-print-log-setup-buttons): Only show the "more"
buttons if we got more or equal to the number of entries we asked
for (bug#18959).

3 years agoParse square root sign in embedded Calc mode
Mattias Engdegård [Tue, 19 Jan 2021 10:55:13 +0000 (11:55 +0100)]
Parse square root sign in embedded Calc mode

* lisp/calc/calc-lang.el (math-read-big-rec): Recognise √ since it may
be used in Big mode.

3 years agoMissing dynamic variable declarations in Calc
Mattias Engdegård [Tue, 19 Jan 2021 10:43:25 +0000 (11:43 +0100)]
Missing dynamic variable declarations in Calc

* lisp/calc/calc-embed.el (calc-embedded-set-modes): Prevent
the-language and the-display-just from being lexically bound here,
because they may be assigned using 'set'.

3 years agoFix slow abbrev expansion in `message-mode' in some circumstances
Lars Ingebrigtsen [Tue, 19 Jan 2021 15:07:54 +0000 (16:07 +0100)]
Fix slow abbrev expansion in `message-mode' in some circumstances

* lisp/gnus/message.el (message--syntax-propertize): Use the
correct Message mode syntax table to avoid having
`message-cite-prefix-regexp' trigger very heavy backtracing when
called from an abbrev context (which defines "_" as a word
constituent) (bug#45944).

3 years agoDon't stop Gnus startup on password failures
Lars Ingebrigtsen [Tue, 19 Jan 2021 14:54:40 +0000 (15:54 +0100)]
Don't stop Gnus startup on password failures

* lisp/gnus/nntp.el (nntp-send-authinfo): Don't signal an
`nntp-authinfo-rejected' error, because that will stop Gnus
startup (bug#45855).  Instead signal an error that will be caught
higher up.

3 years agoHandle also test/lib-src directory
Michael Albinus [Tue, 19 Jan 2021 13:12:22 +0000 (14:12 +0100)]
Handle also test/lib-src directory

* test/Makefile.in (SUBDIRS): Add lib-src.

* test/README: Add predefined selectors.

* test/file-organization.org: Mention test/lib-src directory.

3 years agoFix list-colors-print handling of callback arg
Mauro Aranda [Tue, 19 Jan 2021 12:25:00 +0000 (09:25 -0300)]
Fix list-colors-print handling of callback arg

* lisp/facemenu.el (list-colors-print): Keeping
backward-compatibility, don't fail when passed a closure object as
CALLBACK.  (Bug#45831)

3 years agoAdd test for the widget-color-match function (Bug#45829)
Mauro Aranda [Tue, 19 Jan 2021 12:11:37 +0000 (09:11 -0300)]
Add test for the widget-color-match function (Bug#45829)

* test/lisp/wid-edit-tests.el (widget-test-color-match): New test.

3 years agoTweaks to the color widget (Bug#45829)
Drew Adams [Tue, 19 Jan 2021 12:11:18 +0000 (09:11 -0300)]
Tweaks to the color widget (Bug#45829)

* lisp/wid-edit.el (widget-color-match, widget-color-validate): New
functions.
(color): Use the new functions.  Base size on longest defined color
name, defaulting to the longest RGB hex string.

3 years agoAdd 'perl-non-scalar-variable' face to perl-mode
Protesilaos Stavrou [Tue, 19 Jan 2021 07:11:39 +0000 (08:11 +0100)]
Add 'perl-non-scalar-variable' face to perl-mode

* etc/NEWS: Document the new face (bug#45840).
* lisp/progmodes/perl-mode.el (perl-non-scalar-variable): Define new
face.
(perl-font-lock-keywords-2): Apply 'perl-non-scalar-variable' face.

3 years agoDefine keymap-name-history
James N. V. Cash [Tue, 19 Jan 2021 06:07:37 +0000 (07:07 +0100)]
Define keymap-name-history

* lisp/help-fns.el (keymap-name-history): Define the history
variable (bug#45879).  This avoids problems in other completing
systems like Helm.

Copyright-paperwork-exempt: yes

3 years agoActually make the calc trail window dedicated
Lars Ingebrigtsen [Tue, 19 Jan 2021 05:05:53 +0000 (06:05 +0100)]
Actually make the calc trail window dedicated

* lisp/calc/calc.el (calc-trail-display): Actually make the trail
window dedicated (bug#45928).

3 years agoDon't infloop in comint-redirect-results-list-from-process
Lars Ingebrigtsen [Tue, 19 Jan 2021 04:13:03 +0000 (05:13 +0100)]
Don't infloop in comint-redirect-results-list-from-process

* lisp/comint.el (comint-redirect-results-list-from-process):
Ensure forward progress (bug#45950).

3 years agoMark the various nxml flags as safa
Lucas Werkmeister [Tue, 19 Jan 2021 03:47:14 +0000 (04:47 +0100)]
Mark the various nxml flags as safa

* lisp/nxml/nxml-mode.el (nxml-char-ref-display-glyph-flag)
(nxml-sexp-element-flag, nxml-slash-auto-complete-flag)
(nxml-child-indent, nxml-attribute-indent)
(nxml-bind-meta-tab-to-complete-flag)
(nxml-prefer-utf-16-to-utf-8-flag)
(nxml-prefer-utf-16-little-to-big-endian-flag)
(nxml-default-buffer-file-coding-system)
(nxml-auto-insert-xml-declaration-flag): Add :safe to allow easier
cusomization (bug#45969).

3 years agoRevert "* .gitignore: add src/fingerprint.c"
Lars Ingebrigtsen [Tue, 19 Jan 2021 03:28:18 +0000 (04:28 +0100)]
Revert "* .gitignore: add src/fingerprint.c"

This reverts commit 2644353cbc65927a6a0a76d68e00d017771cdd03.

The src/fingerprint.c file is no longer generated, and the spelling of the obsolete function was correct.

3 years agoMake sure the new window is not too tall
Dmitry Gutov [Tue, 19 Jan 2021 01:05:44 +0000 (03:05 +0200)]
Make sure the new window is not too tall

* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Make sure the new window is not too tall (bug#45945).

3 years agotime-stamp-tests now pass in more locales
Stephen Gildea [Mon, 18 Jan 2021 21:27:22 +0000 (13:27 -0800)]
time-stamp-tests now pass in more locales

Update time-stamp-tests to use format-time-string to generate the date
words (month, day of week, AM/PM) instead of hard-coding English.  Now
the tests pass in locales other than "C" and US English.

Expand the test coverage of modifier characters.

3 years agoAllow gnus-retrieve-headers to return headers directly
Eric Abrahamsen [Wed, 18 Mar 2020 03:53:05 +0000 (20:53 -0700)]
Allow gnus-retrieve-headers to return headers directly

Previously, all Gnus backends returned header information by writing
nov lines into the nntp-server-buffer, which was later parsed.  This
commit allows the backends to return their header information as a
list of already-parsed headers, though so far none of the backends
actually do that.  The agent, cache, cloud etc. now operate on parsed
headers rather than nov text, ie. they use gnus-fetch-headers instead
of gnus-retrieve-headers.

* lisp/gnus/gnus-sum.el (gnus-fetch-headers): Handle the case in which
gnus-retrieve-headers returns headers directly.
* lisp/gnus/nnvirtual.el (nnvirtual-retrieve-headers): Use
gnus-fetch-headers rather than gnus-retrieve-headers to get headers,
meaning we're operating on already-parsed headers.
(nnvirtual-convert-headers): Remove now-unnecessary function.
(nnvirtual-update-xref-header): Rewrite to operate on parsed header.
* lisp/gnus/gnus-cloud.el (gnus-cloud-available-chunks): Use
gnus-fetch-headers instead of gnus-retrieve-headers.
* lisp/gnus/gnus-cache.el (gnus-cache-retrieve-headers): Use
gnus-fetch-headers.
(gnus-cache-braid-nov, gnus-cache-braid-heads): Delete unnecessary
functions -- we now do this work on a list of parsed headers.
* lisp/gnus/gnus-agent.el (gnus-agent-retrieve-headers): Use
gnus-fetch-headers.
(gnus-agent-braid-nov): Remove unnecessary function.
(gnus-agent-fetch-headers): Use gnus-fetch-headers.

3 years agoFix ibuffer-mark-by-file-name-regexp abbreviations
Basil L. Contovounesios [Sun, 17 Jan 2021 15:53:53 +0000 (15:53 +0000)]
Fix ibuffer-mark-by-file-name-regexp abbreviations

* lisp/ibuffer.el (ibuffer--abbreviate-file-name): New function.
(filename): Use it.
* lisp/ibuf-ext.el (ibuffer-mark-by-file-name-regexp): Prefer
read-regexp over read-string for reading regexps.  Determine file
name using ibuffer-buffer-file-name for consistency.  Abbreviate
file name using ibuffer-directory-abbrev-alist (bug#18859).

3 years agoUse format-prompt in read-regexp.
Basil L. Contovounesios [Sun, 17 Jan 2021 18:56:50 +0000 (18:56 +0000)]
Use format-prompt in read-regexp.

* lisp/replace.el (read-regexp): Use format-prompt (bug#12443).

3 years ago* lisp/cedet/ede/proj.el: Enable Project files to load
Eric Ludlam [Mon, 18 Jan 2021 17:49:11 +0000 (12:49 -0500)]
* lisp/cedet/ede/proj.el: Enable Project files to load

(ede-proj-target-makefile): Give more precise type for its `rules` slot.

* lisp/cedet/ede/base.el (ede-target-list): Don't define.
(ede-project): Use `list-of` instead.

3 years agoFix recent changes for Cham script
Eli Zaretskii [Mon, 18 Jan 2021 17:17:59 +0000 (19:17 +0200)]
Fix recent changes for Cham script

* lisp/language/cham.el ("Cham"): Fix sample-text.
* lisp/leim/quail/cham.el: Really install this new file.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 18 Jan 2021 17:03:46 +0000 (19:03 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago* test/src/xdisp-tests.el: Fix tests to work in batch mode
Aaron Jensen [Sat, 16 Jan 2021 18:28:46 +0000 (12:28 -0600)]
* test/src/xdisp-tests.el: Fix tests to work in batch mode

(xdisp-tests--window-text-pixel-size)
(xdisp-tests--window-text-pixel-size-leading-space)
(xdisp-tests--window-text-pixel-size-trailing-space): Fix tests.
(Bug#45748)

3 years agoDon't double up keys in epa--list-keys
Lars Ingebrigtsen [Mon, 18 Jan 2021 16:35:55 +0000 (17:35 +0100)]
Don't double up keys in epa--list-keys

* lisp/epa.el (epa--list-keys): Delete the list keys before
redisplaying (bug#44134).

3 years agoFix problem with `epa-list-keys' bugging out
Stephen Berman [Mon, 18 Jan 2021 16:29:41 +0000 (17:29 +0100)]
Fix problem with `epa-list-keys' bugging out

* lisp/epa.el (epa--list-keys): Partially revert 517285f7cae which
removed the wrong property (bug#44134).

3 years agoAvoid macOS NSFilenamesPboardType warning (bug#33035)
Mattias Engdegård [Sun, 10 Jan 2021 16:05:18 +0000 (17:05 +0100)]
Avoid macOS NSFilenamesPboardType warning (bug#33035)

* src/nsterm.h (NS_USE_NSPasteboardTypeFileURL): New #define.
* src/nsterm.m (ns_term_init):
([EmacsView performDragOperation:]):
* src/nsselect.m (ns_string_to_symbol):
(nxatoms_of_nsselect):
NSFilenamesPboardType was deprecated in macOS 10.14; use
NSPasteboardTypeFileURL instead when available.

3 years agoReplace Unix commands with Emacs in process tests.
Philipp Stephani [Mon, 18 Jan 2021 10:38:58 +0000 (11:38 +0100)]
Replace Unix commands with Emacs in process tests.

That way, the tests only depend on Emacs, and not on utilities that
might not be available during test time.

* test/src/process-tests.el (process-tests--eval)
(process-tests--emacs-command, process-tests--emacs-binary)
(process-tests--dump-file)
(process-tests--usable-file-for-reinvoke): New helper functions.
(process-tests/sentinel-called)
(process-tests/sentinel-with-multiple-processes): Use them.

3 years agoImprove support for the Cham script and languages
Eli Zaretskii [Sun, 17 Jan 2021 14:53:54 +0000 (16:53 +0200)]
Improve support for the Cham script and languages

* etc/NEWS: Announce the new 'cham' input method.
* etc/HELLO: Fix the order of letters in the Cham greeting.
Remove redundant newlines (reported by Ulrich Mueller
<ulm@gentoo.org>).

* lisp/language/cham.el ("Cham"): Add input-method entry.
* lisp/leim/quail/cham.el: New file.
* lisp/international/fontset.el (setup-default-fontset): Add an
entry for Cham.

3 years ago; * test/infra/gitlab-ci.yml: Merge test-template script into job-template.
Ted Zlatanov [Sun, 17 Jan 2021 13:59:59 +0000 (13:59 +0000)]
; * test/infra/gitlab-ci.yml: Merge test-template script into job-template.

3 years ago* test/infra/gitlab-ci.yml: Merge test-template into job-template.
Ted Zlatanov [Sun, 17 Jan 2021 13:56:27 +0000 (13:56 +0000)]
* test/infra/gitlab-ci.yml: Merge test-template into job-template.

3 years agoEnsure that sentinels are called during 'accept-process-output'.
Philipp Stephani [Sun, 17 Jan 2021 13:00:16 +0000 (14:00 +0100)]
Ensure that sentinels are called during 'accept-process-output'.

When we're trying to notify a process about a status change, we need
to ignore the SIGCHLD pipe temporarily, otherwise the code would
likely not run into the timeout case that's necessary for a status
change to happen.

* src/process.c (wait_reading_process_output): Ignore the SIGCHLD pipe
when notifying a process about a status change.
* test/src/process-tests.el (process-tests/sentinel-called)
(process-tests/sentinel-with-multiple-processes): New unit tests.

3 years agoAdd new targets to test/Makefile
Michael Albinus [Sun, 17 Jan 2021 12:37:58 +0000 (13:37 +0100)]
Add new targets to test/Makefile

* test/Makefile.in (SUBDIRS): New variable.
(subdir_template): New template.
(top) Create new check-<dirname> targets.

* test/README: Document them.

* test/infra/gitlab-ci.yml (test-lisp-net-inotify): Rename.

3 years agoAdd a bit more clarification around standard error processes.
Philipp Stephani [Sun, 17 Jan 2021 10:52:40 +0000 (11:52 +0100)]
Add a bit more clarification around standard error processes.

* doc/lispref/processes.texi (Asynchronous Processes): Document
how to obtain the standard error process that Emacs creates.
(Accepting Output): Add an example how to wait for standard error in
case Emacs has created a standard error process.

3 years ago* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Use pcase
Stefan Monnier [Sat, 16 Jan 2021 15:51:09 +0000 (10:51 -0500)]
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Use pcase

3 years ago* lisp/emacs-lisp/pcase.el: Add support for `not` to `pred`
Stefan Monnier [Sat, 16 Jan 2021 15:15:47 +0000 (10:15 -0500)]
* lisp/emacs-lisp/pcase.el: Add support for `not` to `pred`

(pcase--split-pred, pcase--funcall): Adjust for `not`.
(pcase--get-macroexpander): New function.
(pcase--edebug-match-macro, pcase--make-docstring)
(pcase--macroexpand): Use it.

* lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Use it!

* doc/lispref/control.texi (The @code{pcase} macro): Document it.

* lisp/emacs-lisp/ert.el (ert--explain-equal-rec): Remove redundant test.

3 years agoDon't crash if no asynchronous process has been created yet.
Philipp Stephani [Sun, 10 Jan 2021 16:59:29 +0000 (17:59 +0100)]
Don't crash if no asynchronous process has been created yet.

* src/process.c (wait_reading_process_output): Allow
child_signal_read_fd < 0.

3 years agoFix deadlock when receiving SIGCHLD during 'pselect'.
Philipp Stephani [Sun, 10 Jan 2021 15:31:12 +0000 (16:31 +0100)]
Fix deadlock when receiving SIGCHLD during 'pselect'.

If we receive and handle a SIGCHLD signal for a process while waiting
for that process, 'pselect' might never return.  Instead, we have to
explicitly 'pselect' that the process status has changed.  We do this
by writing to a pipe in the SIGCHLD handler and having
'wait_reading_process_output' select on it.

* src/process.c (child_signal_init): New helper function to create a
pipe for SIGCHLD notifications.
(child_signal_read, child_signal_notify): New helper functions to
read from/write to the child signal pipe.
(create_process): Initialize the child signal pipe on first use.
(handle_child_signal): Notify waiters that a process status has
changed.
(wait_reading_process_output): Make sure that we also catch
SIGCHLD/process status changes.

* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-process): Remove workaround,
which is no longer needed.

3 years agoFix Rmail summary for more than 99,999 messages
Eli Zaretskii [Sat, 16 Jan 2021 18:18:32 +0000 (20:18 +0200)]
Fix Rmail summary for more than 99,999 messages

* lisp/mail/rmailsum.el (rmail-summary-font-lock-keywords): Don't
assume there will be less than 100,000 messages in an mbox file.
(Bug#45912)

3 years agoFix two tests
Eli Zaretskii [Sat, 16 Jan 2021 18:15:17 +0000 (20:15 +0200)]
Fix two tests

* test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run):
Make sure file names can be compared as strings, by running them
through 'file-truename'.  Reported by Vin Shelton
<acs@alumni.princeton.edu>.
* test/lisp/emacs-lisp/bytecomp-tests.el ("warn-obsolete-hook.el")
("warn-obsolete-variable.el"): Use [^z-a] to match a newline as
well.  Reported by Vin Shelton <acs@alumni.princeton.edu>.

3 years agotest/infra/gitlab-ci.yml: run only for tags and some branches
Ted Zlatanov [Sat, 16 Jan 2021 15:45:05 +0000 (15:45 +0000)]
test/infra/gitlab-ci.yml: run only for tags and some branches

3 years agoImprove support for Cham script
Eli Zaretskii [Sat, 16 Jan 2021 14:54:01 +0000 (16:54 +0200)]
Improve support for Cham script

* lisp/language/cham.el ("Cham"): Expand the entry.

* etc/HELLO: Add entry for Cham.

3 years agoEMBA container build improvements for Emacs build testing.
Ted Zlatanov [Sat, 16 Jan 2021 13:03:58 +0000 (13:03 +0000)]
EMBA container build improvements for Emacs build testing.

* test/infra/gitlab-ci.yml: Moved from .gitlab-ci.yml. Use the
EMBA container registry with a different login token storage file
for each commit. Split test stages into prep, build, fast tests,
normal tests, platform tests, and slow (everything) and use
templates where possible.

* .gitlab-ci.yml: Include test/infra/gitlab-ci.yml and move all
content there.

3 years agoFix last change
Eli Zaretskii [Sat, 16 Jan 2021 13:02:48 +0000 (15:02 +0200)]
Fix last change

* src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position):
Don't compile the FRAME_MSDOS_P case on platforms other than
MSDOS, as that will never happen there.

3 years agoMake mouse-related calls be more consistent on all frame types
Jared Finder [Wed, 2 Dec 2020 08:05:59 +0000 (00:05 -0800)]
Make mouse-related calls be more consistent on all frame types

* src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position): Call
Fselect_frame and appropriate mouse_moveto function on all non-GUI
frame types, independent of #ifdef's.
* src/term.c (init_tty): Initialize mouse_face_window for all
non-GUI frame types.
(term_mouse_moveto) [HAVE_GPM]: Make available even if
HAVE_WINDOW_SYSTEM is defined.
* src/xdisp.c (try_window_id): Call gui_clear_window_mouse_face
in all cases.

3 years ago* lisp/frame.el Don't activate `blink-cursor-idle-timer` needlessly.
Stefan Monnier [Sat, 16 Jan 2021 04:18:08 +0000 (23:18 -0500)]
* lisp/frame.el Don't activate `blink-cursor-idle-timer` needlessly.

(blink-cursor-mode): Use `blink-cursor-check` rather than
`blink-cursor--start-idle-timer` so we check for the presence of
a frame where the cursor can be blinked before activating the idle timer.

3 years agoChange default-directory before prompting in project-compile
Kévin Le Gouguec [Sun, 10 Jan 2021 09:43:41 +0000 (10:43 +0100)]
Change default-directory before prompting in project-compile

This causes command completion to work from the project root, letting
users complete top-level folders, make targets, etc (bug#45765).

* lisp/progmodes/project.el (project-compile): Simplify using
call-interactively, as done with project(-async)-shell-command.

3 years ago* src/dispnew.c (sit_for): Return nil when interrupted by process output
Stefan Monnier [Sat, 16 Jan 2021 03:38:52 +0000 (22:38 -0500)]
* src/dispnew.c (sit_for): Return nil when interrupted by process output

Before adbb4eacc2a984c0fc0b65ec761368fd9067d6c5,
`read_and_dispose_of_process_output` called
`record_asynch_buffer_change` which added "artificial" input events
(in the form of BUFFER_SWITCH_EVENTs), causing sit_for to return
Qnil when interrupted by process output.  Without those BUFFER_SWITCH_EVENTs,
sit_for now tends to return Qt when interrupted by process output
making `read_char` believe that we've waited the whole timeout,
As consequence incoming process output tended to cause premature
auto-saving of files (sometimes right after almost every key press).

This patch recovers the previous behavior, which is not ideal
(incoming process output can delay auto-save indefinitely), but has
been good enough for many years.

3 years ago; Remove recent spurious addition in window.el
Basil L. Contovounesios [Fri, 15 Jan 2021 21:30:14 +0000 (21:30 +0000)]
; Remove recent spurious addition in window.el

* lisp/window.el (display-buffer-use-some-window): Remove spurious
message included in 2021-01-11 "Support using auth-source for
NickServ passwords in ERC" (bug#45340#44).

3 years agoRemove support for 32 bit build
Phillip Lord [Thu, 14 Jan 2021 22:51:13 +0000 (22:51 +0000)]
Remove support for 32 bit build

* admin/nt/dist-build/README-scripts: Update
* admin/nt/dist-build/README-windows-binaries: Update
* admin/nt/dist-build/build-zips.sh: Remove 32 bit and fix paths
* admin/nt/dist-build/build-dep-zips.py: Remove 32 bit and update
  paths
* admin/nt/dist-build/emacs.nsi: Remove 32 bit and fix paths

3 years agoUpdate dependency capture
Phillip Lord [Thu, 7 Jan 2021 22:06:53 +0000 (22:06 +0000)]
Update dependency capture

* admin/nt/dist-build/build-dep-zips.py: Use ntldd to directly
  determine DLL dependencies

3 years ago* .gitignore: add src/fingerprint.c
Stephen Leake [Fri, 15 Jan 2021 18:03:06 +0000 (10:03 -0800)]
* .gitignore: add src/fingerprint.c

* lisp/dired-x.el (dired-file-name-at-point): Fix spelling in obsolete
message.

3 years agoFix 'window-text-pixel-size' when there are leading/trailing spaces
Aaron Jensen [Sun, 10 Jan 2021 02:43:32 +0000 (20:43 -0600)]
Fix 'window-text-pixel-size' when there are leading/trailing spaces

First, scan to find the first non-whitespace character and then
backtrack to find the beginning of the line.  The previous
algorithm always started on the non-whitespace character during
the backtrack, causing it to stop immediately and not actually
find the beginning of the line.  The same applies to the end of
line calculation.
* src/xdisp.c: (Fwindow_text_pixel_size): Fix off by one error.
(Bug#45748)

* test/src/xdisp-tests.el (xdisp-tests--window-text-pixel-size)
(xdisp-tests--window-text-pixel-size-leading-space)
(xdisp-tests--window-text-pixel-size-trailing-space): New tests.

3 years agoMake libraries works with xterm-mouse-mode.
Jared Finder [Sat, 2 Jan 2021 22:10:17 +0000 (14:10 -0800)]
Make libraries works with xterm-mouse-mode.

Change calls from 'read-event' to 'read-key' in libraries expecting
mouse events.  Do this only when 'xterm-mouse-mode' is enabled.  That
way those libraries read decoded mouse events instead of the
underlying escape sequence.  Add a parameter to 'read-key' that avoids
running any of the unbound fallbacks in 'read-key-sequence' so the
libraries can read mouse button-down events.

For backward compatibility purposes, the above logic is contained in a
new internal-only function: 'read--potential-mouse-event'.

* doc/lispref/commands.texi (Reading One Event): Document new
parameter to 'read-key'.  Mention that non-character events on
terminals need 'read-key'.
* lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'.
(read-key): Add new parameter 'fallbacks-disabled' to prevent running
any of the unbound fallbacks normally run by 'read-key-sequence'.
(read--potential-mouse-event): Add new function that calls 'read-key'
or 'read-event' depending on if 'xterm-mouse-mode' is set.
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag):
* lisp/mouse.el (mouse-drag-secondary):
* lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column)
(ruler-mode-mouse-drag-any-column-iteration):
* lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke):
* lisp/textmodes/artist.el (artist-mouse-draw-continously)
(artist-mouse-draw-poly, artist-mouse-draw-2points):
* lisp/vc/ediff-wind.el (ediff-get-window-by-clicking):
* lisp/wid-edit.el (widget-button--check-and-call-button)
(widget-button-click): Call 'read--potential-mouse-event' instead of
'read-event'.
* lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key'
with 'fallbacks-disabled' set instead of 'read-event'.  Unlike above
changes, this is unconditionally applied so it works for function
keys too.  Apply 'local-function-key-map' instead of
'function-key-map' as that contains the full terminal translations.
* lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if
a mouse is available.
* src/lread.c (Fread_event): Recommend 'read-key' in docstring for
'read-event' for non-character events.

3 years agoSome Tramp adaptions, mainly direct async processes
Michael Albinus [Fri, 15 Jan 2021 10:32:12 +0000 (11:32 +0100)]
Some Tramp adaptions, mainly direct async processes

* doc/misc/tramp.texi (Firewalls, Remote processes)
(Frequently Asked Questions): Add @vindex.
(Predefined connection information): Precise precondition or direct
async processes.
(Remote shell setup): Ban ssh RemoteCommand option.
(Frequently Asked Questions): Adapt quoting.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.1-pre".

* lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async'
parameter.
(tramp-adb-handle-make-process): Adapt docstring.

* lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>:
Add `tramp-direct-async' parameter.
(tramp-sh-handle-insert-directory): Simplify merkers.
(tramp-sh-handle-make-process): Adapt docstring.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-debug-message): Suppress lockfiles.
(tramp-test-message): New defun.
(tramp-direct-async-process-p): Check also for `tramp-direct-async'.
(tramp-handle-make-process): Do not check for `tramp-direct-async-args'.

* test/lisp/net/tramp-tests.el (all): Replace `string-match' by
`string-match-p'.
(dired-copy-dereference): Declare.
(tramp-test-temporary-file-directory):
Remove `tramp-direct-async-args` for mock method.
(tramp-test15-copy-directory, tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls, tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Skip for tramp-rclone.el.
(tramp--test--deftest-direct-async-process): Do not skip for mock
method.
(tramp-test32-shell-command): Adapt test for direct async processes.
(tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p):
Use `tramp-test-vec'.

3 years ago* lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix).
Glenn Morris [Fri, 15 Jan 2021 09:38:20 +0000 (09:38 +0000)]
* lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix).

gitmerge-skip-regexp does not handle line breaks.

3 years agoFix 'kill-visual-line'
Eli Zaretskii [Fri, 15 Jan 2021 08:12:09 +0000 (10:12 +0200)]
Fix 'kill-visual-line'

* lisp/simple.el (kill-whole-line): Mention in the doc string that
this option affects 'kill-visual-line' as well.
(kill-visual-line): Improve the doc string.  Delete the character
at which the line was wrapped under 'visual-line-mode'.  Don't
indiscriminately delete whitespace following the wrap point.
(Bug#45837)

3 years ago* lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor
Stefan Monnier [Thu, 14 Jan 2021 22:37:57 +0000 (17:37 -0500)]
* lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor

This is redundant because this was set based on "X" resources under
(memq window-system '(x w32 ns)) but the exact same resources and
values are tested in `x-apply-session-resources` which is also used for
those 3 window systems.

3 years ago* lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor
Stefan Monnier [Thu, 14 Jan 2021 22:21:56 +0000 (17:21 -0500)]
* lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor

This was set when (or noninteractive emacs-basic-display), but
the code that sets `emacs-basic-display` also sets `no-blinking-cursor`
and `blink-cursor-mode`s value already tests `noninteractive`
alongside `no-blinking-cursor`.

3 years agoFix marking "delayed-initialization" vars as dynamically scoped
Stefan Monnier [Thu, 14 Jan 2021 21:45:40 +0000 (16:45 -0500)]
Fix marking "delayed-initialization" vars as dynamically scoped

We used to mark those vars as dynbound in `custom-reevaluate-setting`
which forced us to bind `current-load-list` around it to avoid having
the vars be associated with the wrong file.  Move this marking to
`custom-initialize-delay` so we don't need this workaround.

* lisp/custom.el (custom-initialize-delay): Mark the var as dynamic.
(custom-reevaluate-setting): Don't use `defvar` here.

* lisp/startup.el (command-line): Don't let-bind `current-load-list`
around calls to `custom-reevaluate-setting`.

3 years ago* lisp/info.el (Info-search): Don't deactivate mark when landed in same node
Juri Linkov [Thu, 14 Jan 2021 19:08:46 +0000 (21:08 +0200)]
* lisp/info.el (Info-search): Don't deactivate mark when landed in same node

(bug#45839)

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 14 Jan 2021 15:50:28 +0000 (07:50 -0800)]
Merge from origin/emacs-27

488204cdc6 (origin/emacs-27) Remove one of recently added warnings ab...
55bc1560ac Fix assertion failure in window_box_height (Bug#45737)
27743e9e70 Fix cl-concatenate inlining
32a3758c84 Fix infloop in 'pixel-scroll-mode'
74d18957b8 Fix inhibiting the default.el loading in user init file

3 years ago; Merge from origin/emacs-27
Glenn Morris [Thu, 14 Jan 2021 15:50:28 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

5d76288660 Fix problem with 8bit content-transfer-encoding in nndoc m...

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 14 Jan 2021 15:50:25 +0000 (07:50 -0800)]
Merge from origin/emacs-27

149d64bbb2 * doc/misc/tramp.texi (Quick Start Guide): Fix thinko.
97747e6fb9 Tell people how to remove fontconfig customizations
33d0c603c6 ; * doc/lispref/modes.texi (SMIE Indentation Example): Fix...
03080b5545 Remove extraneous closing paren

3 years agoEMBA infrastructure improvements for Emacs build testing.
Ted Zlatanov [Thu, 14 Jan 2021 10:34:09 +0000 (10:34 +0000)]
EMBA infrastructure improvements for Emacs build testing.

* .gitlab-ci.yml: Use job templates and rules. Split tests into
fast/normal/slow. Make Docker images for each tested platform
(inotify, filenotify-gio, gnustep). Increase timeout.
* test/Makefile.in (check-lisp, check-net): Add new testing
targets.
* test/README: Document them.
* test/file-organization.org: Mention test/infra.
* test/infra/Dockerfile.emba: Add special Docker recipes for EMBA
testing.