1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-22 07:51:17 -08:00
Commit graph

149293 commits

Author SHA1 Message Date
Michael Albinus
6a6fde0375 Fix failed autorevert test on emba
* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
Check, whether buffer is alive.
2021-01-23 16:59:07 +01:00
Michael Albinus
f0517ab9c2 * test/infra/gitlab-ci.yml (.job-template): Check also for test/lib-src/*.el. 2021-01-23 12:13:03 +01:00
Eli Zaretskii
8d8e1dfd05 Clean up the recently added self-pipe mechanism for WINDOWSNT
* src/process.c (child_signal_init, child_signal_read)
(child_signal_notify): #ifdef away on WINDOWSNT.
2021-01-23 12:51:57 +02:00
Eli Zaretskii
3443a1c698 Fix last change
* doc/lispref/text.texi (Undo): Add a cross-reference to the
description of 'undo-amalgamate-change-group'.
(Atomic Changes): Expand and improve the description of
'undo-amalgamate-change-group'.  (Bug#42303)
2021-01-23 11:28:32 +02:00
Lars Ingebrigtsen
c8fa056a50 Mention undo-amalgamate-change-group in the lispref manual
* doc/lispref/text.texi (Atomic Changes): Mention
undo-amalgamate-change-group (bug#42303).

(cherry picked from commit ba25a82855)
2021-01-23 10:57:54 +02:00
Dmitry Gutov
cc98d0bf52 ; xref-revert-buffer: Drop the (goto-char) at the end 2021-01-23 02:58:53 +02:00
Dmitry Gutov
5821dee094 Erase the buffer only after fetching the new contents
* lisp/progmodes/xref.el (xref-revert-buffer):
Erase the buffer only after fetching the new contents (bug#46042).
2021-01-23 02:53:12 +02:00
Stefan Monnier
b9d0cdcacb * lisp/simple.el (newline-and-indent): Disable electric-indent-mode
With `electric-indent-mode` enabled, `newline-and-indent` ends up indenting
3 times: once for the original line and twice on the new line.
`reindent-then-newline-and-indent` is even worse, indenting twice
both lines.
None of those commands should be affected by `electric-indent-mode`
since they even explicitly say in their name when and how they do
indentation.

(reindent-then-newline-and-indent): Temporarily disable
`electric-indent-mode` as well.
2021-01-22 16:56:57 -05:00
Lars Ingebrigtsen
ba25a82855 Mention undo-amalgamate-change-group in the lispref manual
* doc/lispref/text.texi (Atomic Changes): Mention
undo-amalgamate-change-group (bug#42303).
2021-01-22 21:07:41 +01:00
Paul Eggert
b99ec5d5b1 Work around __has_attribute bug in clang 3.4
* src/conf_post.h (HAS_ATTRIBUTE):
* src/emacs-module.h.in (EMACS_ATTRIBUTE_NONNULL):
Port to clang 3.4 and earlier.
2021-01-22 12:02:56 -08:00
Paul Eggert
a900e641fa Update from Gnulib by running admin/merge-gnulib 2021-01-22 12:02:55 -08:00
Paul Eggert
9143eba0c6 Prepare for update from Gnulib
* configure.ac: Also create lib/malloc and lib/deps/malloc
if the dynarray module is in use, as Gnulib regex will
start needing it due to recent glibc changes.
2021-01-22 12:02:54 -08:00
Lars Ingebrigtsen
b7f318aa96 Fix up previous mh-speed.el ignored variable change
* lisp/mh-e/mh-speed.el (mh-speed-toggle, mh-speed-view): Mark the
ignored parameter with _ instead of using the Common Lispish
(declare (ignore args)) (which Emacs Lisp doesn't really support),
except by accident.
2021-01-22 19:22:07 +01:00
Keith David Bershatsky
2be55ad669 Add more isearch-related bindings to ns-win.el
* lisp/term/ns-win.el (minibuffer-local-isearch-map): Add more
bindings to mirror bindings in isearch.el (bug#15667).
2021-01-22 19:18:41 +01:00
Lars Ingebrigtsen
ef14acfb68 Make nnml handle invalid non-ASCII headers more consistently
* lisp/gnus/nnml.el (nnml--encode-headers): New function to
RFC2047-encode invalid Subject/From headers (bug#45925).  This
will make them be displayed more consistently in the Summary
buffer (but still "wrong" sometimes, since there's not that much
we can guess at at this stage, charset wise).
(nnml-parse-head): Use it.
2021-01-22 19:07:57 +01:00
Michael Albinus
b2b26bd4d6 Use RemoteCommand option for Tramp's sshx and scpx methods
* doc/misc/tramp.texi (Inline methods) <sshx>:
(External methods) <scpx>: Adapt call sequence.
(Remote shell setup): Mention, that sshx and scpx overwrite
RemoteCommand.
(Remote processes): Restriction: direct asynchronous processes
cannot be used when RemoteCommand is in use.
`tramp-remote-process-environment' is not ignored any longer.

* lisp/net/tramp-sh.el (tramp-methods) <sshx, scpx>: Handle login
shell via RemoteCommand.  Remove `tramp-direct-async' parameter.
(tramp-maybe-open-connection): Add "-i" to login.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_NOT_SUPPORTED".
(tramp-smb-handle-insert-directory): Fix point moving error.

* test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name):
Use `get-buffer-process' where appropriate.
2021-01-22 17:39:52 +01:00
Mattias Engdegård
4c0dce4b66 Calc: use big brackets around function arguments
* lisp/calc/calccomp.el (math-compose-expr): Use big brackets around
arguments in Big mode, so that expressions like sin(a/b) look a bit
better.
2021-01-22 15:49:50 +01:00
Eli Zaretskii
3f610177ad Avoid sending systemd shutdown notifications if non-daemon
* src/emacs.c (Fkill_emacs): Send the shutdown notification only
in daemon mode.  (Bug#46022)
2021-01-22 14:30:22 +02:00
Eli Zaretskii
561197e519 Fix last change for DOS_NT systems
* src/term.c (tty_draw_row_with_mouse_face)
(tty_write_glyphs_with_face): Don't define on MSDOS and WINDOWSNT,
as those have their own implementations of that.
2021-01-22 14:16:51 +02:00
João Távora
463300d431 Enable TTY mouse-face support when built without GPM support
* src/term.c (tty_write_glyphs_with_face): Move definition out of
ifdef block.
* src/xdisp.c (draw_row_with_mouse_face): Now called
unconditionally on all platforms.
2021-01-22 14:05:21 +02:00
Glenn Morris
6bfc672bc7 * lisp/textmodes/remember.el (remember-text-format-function): Fix type. 2021-01-22 08:52:12 +00:00
Eli Zaretskii
009df5cb3c * src/cmds.c (Fforward_line): Doc fix. (Bug#46027) 2021-01-22 10:10:21 +02:00
Eli Zaretskii
ee1c54ebc0 Improve documentation of sendmail.el defcustom's
* lisp/mail/sendmail.el (mail-archive-file-name)
(mail-default-reply-to, mail-self-blind, mail-default-headers):
Say in the doc string that 'message-default-mail-headers' shall be
customized when using 'message-mode' for email composition.
(Bug#46029)
2021-01-22 09:57:19 +02:00
Ted Zlatanov
90bd6d8ba6
* test/infra/gitlab-ci.yml: Copy newer files to image to build less often. 2021-01-21 21:39:48 +00:00
Stefan Monnier
b41b4add7b Fix spurious "Lexical argument shadows the dynamic variable" due to inlining
Before this patch doing:

    rm lisp/calendar/calendar.elc
    make lisp/calendar/cal-hebrew.elc

would spew out lots of spurious such warnings about a `date` argument,
pointing to code which has no `date` argument in sight.  This was
because that code had calls to inlinable functions (taking a `date`
argument) defined in `calendar.el`, and while `date` is a normal
lexical var at the site of those functions' definitions, it was
declared as dynbound at the call site.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
Don't impose our local context onto the inlined function.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add matching test.
2021-01-21 13:15:05 -05:00
Stefan Kangas
931be5ee7d * lisp/net/webjump.el: Add Maintainer: emacs-devel.
Ref: https://lists.gnu.org/r/emacs-devel/2021-01/msg01019.html
2021-01-21 18:59:48 +01:00
Lars Ingebrigtsen
2cf347a0a8 Don't have type-break-mode signal errors on corrupted files
* lisp/type-break.el (type-break-get-previous-time):
(type-break-get-previous-count): Signal a warning instead of an
error (bug#38246).  type-break will still continue to work even if
the database can't be loaded after a restart, but this allows
Emacs to be started.
2021-01-21 18:10:21 +01:00
Lars Ingebrigtsen
a6f030fc7b Fix message.el build warning from previous change
* lisp/gnus/message.el (subr-x): Fix build warning from previous
commit.
2021-01-21 18:10:21 +01:00
Ted Zlatanov
5d2ebcd896
* test/infra/gitlab-ci.yml: Revert to always building. 2021-01-21 16:08:57 +00:00
Lars Ingebrigtsen
de761b58f0 Add dired support for compressing .pax files
* lisp/dired-aux.el (dired-compress-files-alist): Add support for
compressing .pax files (bug#40135).
2021-01-21 17:08:28 +01:00
Lars Ingebrigtsen
7d122cf9a3 Tweak previous message-forward-included-mime-headers change
* lisp/gnus/message.el (message-forward-included-mime-headers):
Should probably not include Content-Transfer-Encoding, because we
will reencode anyway.
2021-01-21 16:48:01 +01:00
Lars Ingebrigtsen
a7fb4ab826 Make Message respect header removal instructions more
* doc/misc/message.texi (Forwarding): Document it.

* lisp/gnus/message.el (message-forward-ignored-headers): Improve
documentation.
(message-forward-included-headers): Ditto.
(message-forward-included-mime-headers): New user option.
(message-remove-ignored-headers): Use it to preserve the necessary
MIME headers.
(message-forward-make-body): Remove headers when forwarding as
MIME, too.
2021-01-21 16:44:53 +01:00
Eli Zaretskii
b2d30fd630 A better fix for 'kill-visual-line'
* lisp/simple.el (kill-visual-line): Use the 6th element of the
return value of 'posn-at-point', which provides the coordinates in
terms or row and column, and is thus more reliable for deciding
whether we moved to the next screen line.  (Bug#45837)
2021-01-21 16:21:45 +02:00
Lars Ingebrigtsen
8e7728a5bf Fix thinko in previous footnote.el change
* lisp/mail/footnote.el (footnote--regenerate-alist): Don't error
out when there's no footnotes.
2021-01-21 12:45:29 +01:00
Stefan Monnier
bacc24b5d0 Use lexical-binding in all the cal-*.el files
* lisp/calendar/cal-bahai.el: Use lexical-binding.
(calendar-bahai-date-string): Use `calendar-dlet*`.

* lisp/calendar/cal-china.el: Use lexical-binding.
(calendar-chinese-zodiac-sign-on-or-after)
(calendar-chinese-new-moon-on-or-after): Declare `year`.
(calendar-chinese-from-absolute-for-diary)
(calendar-chinese-to-absolute-for-diary)
(calendar-chinese-mark-date-pattern): Avoid dynbound var `date` as
function argument.

* lisp/calendar/cal-coptic.el: Use lexical-binding.
(calendar-coptic-date-string): Use `calendar-dlet*`.
(calendar-ethiopic-to-absolute, calendar-ethiopic-from-absolute)
(calendar-ethiopic-date-string, calendar-ethiopic-goto-date):
Avoid dynbound var `date` as function argument.

* lisp/calendar/cal-french.el: Use lexical-binding.

* lisp/calendar/cal-hebrew.el: Use lexical-binding.
(holiday-hebrew-hanukkah): Don't use the third form in `dotimes`.

* lisp/calendar/cal-islam.el: Use lexical-binding.
(calendar-islamic-to-absolute): Comment out unused vars `month` and `day`.

* lisp/calendar/cal-move.el:
* lisp/calendar/cal-mayan.el:
* lisp/calendar/cal-iso.el: Use lexical-binding.

* lisp/calendar/cal-persia.el: Use lexical-binding.
(calendar-persian-date-string): Use `calendar-dlet*`.

* lisp/calendar/cal-html.el: Use lexical-binding.
(cal-html-insert-minical): Comment out unused var `date`.
(cal-html-cursor-month, cal-html-cursor-year): Mark `event` arg as unused.

* lisp/calendar/cal-menu.el: Use lexical-binding.
(diary-list-include-blanks): Declare var.

* lisp/calendar/cal-x.el: Use lexical-binding.

* lisp/calendar/cal-tex.el: Use lexical-binding.
(diary-list-include-blanks): Declare var.
(cal-tex-insert-days, cal-tex-cursor-week-iso, cal-tex-week-hours)
(cal-tex-weekly-common, cal-tex-cursor-filofax-2week)
(cal-tex-cursor-filofax-daily, cal-tex-daily-page): Declare `date`
as dynbound for the benefit of `cal-tex-daily-string`.
2021-01-20 23:56:51 -05:00
Stefan Monnier
0c93d0d072 Use calendar-read-sexp instead of the now obsolete calendar-read
* lisp/calendar/diary-lib.el (diary-insert-cyclic-entry):
* lisp/calendar/cal-persia.el (calendar-persian-read-date):
* lisp/calendar/cal-move.el (calendar-goto-day-of-year):
* lisp/calendar/cal-mayan.el (calendar-mayan-read-haab-date)
(calendar-mayan-read-tzolkin-date):
* lisp/calendar/cal-julian.el (calendar-julian-goto-date)
(calendar-astro-goto-day-number):
* lisp/calendar/cal-iso.el (calendar-iso-read-date):
* lisp/calendar/cal-islam.el (calendar-islamic-read-date):
* lisp/calendar/cal-hebrew.el (calendar-hebrew-read-date)
(calendar-hebrew-list-yahrzeits):
* lisp/calendar/cal-french.el (calendar-french-goto-date):
* lisp/calendar/cal-coptic.el (calendar-coptic-read-date):
* lisp/calendar/cal-china.el (calendar-chinese-goto-date):
* lisp/calendar/cal-bahai.el (calendar-bahai-read-date):
* lisp/calendar/holidays.el (list-holidays): Use `calendar-read-sexp`.
2021-01-20 23:55:40 -05:00
Stefan Monnier
0f65baa03b * lisp/calendar/cal-french.el (calendar-french-accents-p): Obsolete function
Always assume accented letters can be used

(calendar-french-month-name-array)
(calendar-french-special-days-array): Use the accented names.
(calendar-french-multibyte-month-name-array)
(calendar-french-multibyte-special-days-array): Make those vars
obsolete aliases.
(calendar-french-month-name-array, calendar-french-day-name-array)
(calendar-french-special-days-array): Mark functions as obsolete.
(calendar-french-date-string, calendar-french-goto-date): Always use
the text with accents.
2021-01-20 23:50:52 -05:00
Stefan Monnier
d8a9828b3b * lisp/calendar/calendar.el (calendar-read-sexp): New function
(calendar-read): Mark as obsolete.
(calendar-read-date): Use it.  Add `default-date` argument.
Provide defaults for the month and day (fixes bug#32105).
2021-01-20 23:47:05 -05:00
Stefan Monnier
b9511362f5 * lisp/emacs-lisp/bytecomp.el (byte-compile--declare-var): Fix warning
Make sure the "declared after first use" is under the control of
the `lexical` option.
2021-01-20 20:17:11 -05:00
Lars Ingebrigtsen
0df23b73e4 Fix recent remember-diary-extract-entries change
* lisp/textmodes/remember.el (remember-diary-extract-entries): Use
`remember-diary-file' over `diary-file'.
2021-01-20 23:30:53 +01:00
Lars Ingebrigtsen
61b716bd30 checkdoc-spellcheck-documentation-flag doc string improvement
* lisp/emacs-lisp/checkdoc.el
(checkdoc-spellcheck-documentation-flag): Mention
`ispell-kill-ispell' (bug#6221).
2021-01-20 22:15:38 +01:00
Lars Ingebrigtsen
1a6ed932d9 Revert "Always send Lisp words to checkdoc-ispell-init"
This reverts commit 93141d5813.

This would make checkdoc words be used in other flyspell
buffers.
2021-01-20 22:11:38 +01:00
Lars Ingebrigtsen
93141d5813 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.
2021-01-20 22:01:08 +01:00
Juri Linkov
5065698c81 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.
2021-01-20 21:19:23 +02:00
Stefan Monnier
0d3635536d * lisp/emacs-lisp/subr-x.el (named-let): New macro 2021-01-20 14:13:15 -05:00
Stefan Monnier
66439d31ad * 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.
2021-01-20 14:13:15 -05:00
Stefan Monnier
4dfebf25c7 * 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).
2021-01-20 14:13:15 -05:00
Stefan Monnier
09bfb12edc * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Re-indent 2021-01-20 14:13:15 -05:00
Lars Ingebrigtsen
434057ad92 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.
2021-01-20 19:42:21 +01:00
Lars Ingebrigtsen
7fe7efe0bb 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).
2021-01-20 18:52:21 +01:00