]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago; * src/process.c (child_signal_read): Remove FIXME comment.
Eli Zaretskii [Sat, 23 Jan 2021 19:04:13 +0000 (21:04 +0200)]
; * src/process.c (child_signal_read): Remove FIXME comment.

3 years agoAdd a unit test testing interaction between threads and processes.
Philipp Stephani [Sat, 23 Jan 2021 18:10:22 +0000 (19:10 +0100)]
Add a unit test testing interaction between threads and processes.

This unit test tests that we can call 'accept-process-output' in
parallel from multiple threads.

* test/src/process-tests.el (process-tests/multiple-threads-waiting):
New unit test.

3 years agoAvoid a few compilation warnings in Objective-C code.
Philipp Stephani [Sat, 23 Jan 2021 18:08:52 +0000 (19:08 +0100)]
Avoid a few compilation warnings in Objective-C code.

* src/nsfns.m (Fns_frame_restack): Remove unused variable 'flag'.

* src/nsmenu.m (ns_update_menubar): Remove unused variable 'pool'.

* src/nsterm.m (focus_view, hide_bell): Define conditionally.
(ns_update_end): Define variable 'view' conditionally.
(ns_redraw_scroll_bars): Don't define unused function.
(copyRect): Don't perform arithmetic on 'void' pointers.
(nswindow_orderedIndex_sort): Make static.

3 years ago* .clang-format: Fix base style.
Philipp Stephani [Sat, 23 Jan 2021 18:04:53 +0000 (19:04 +0100)]
* .clang-format: Fix base style.

3 years agoAdd a FIXME comment to improve the SIGCHLD race condition handling.
Philipp Stephani [Sat, 23 Jan 2021 17:39:20 +0000 (18:39 +0100)]
Add a FIXME comment to improve the SIGCHLD race condition handling.

* src/process.c: Add FIXME comment describing how we could avoid the
self-pipe on modern Unix-like systems.

3 years agoMark both ends of self-pipe a nonblocking.
Philipp Stephani [Sat, 23 Jan 2021 16:24:34 +0000 (17:24 +0100)]
Mark both ends of self-pipe a nonblocking.

While no deadlocks caused by the blocking write end have been reported
yet, marking both ends nonblocking is consistent and also recommended
in the GNU/Linux manpage of 'select'.

* src/process.c (child_signal_init): Mark write end of self-pipe as
nonblocking.

3 years agoFix failed autorevert test on emba
Michael Albinus [Sat, 23 Jan 2021 15:59:07 +0000 (16:59 +0100)]
Fix failed autorevert test on emba

* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
Check, whether buffer is alive.

3 years ago* test/infra/gitlab-ci.yml (.job-template): Check also for test/lib-src/*.el.
Michael Albinus [Sat, 23 Jan 2021 11:13:03 +0000 (12:13 +0100)]
* test/infra/gitlab-ci.yml (.job-template): Check also for test/lib-src/*.el.

3 years agoClean up the recently added self-pipe mechanism for WINDOWSNT
Eli Zaretskii [Sat, 23 Jan 2021 10:51:57 +0000 (12:51 +0200)]
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.

3 years ago; xref-revert-buffer: Drop the (goto-char) at the end
Dmitry Gutov [Sat, 23 Jan 2021 00:58:53 +0000 (02:58 +0200)]
; xref-revert-buffer: Drop the (goto-char) at the end

3 years agoErase the buffer only after fetching the new contents
Dmitry Gutov [Sat, 23 Jan 2021 00:53:12 +0000 (02:53 +0200)]
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).

3 years ago* lisp/simple.el (newline-and-indent): Disable `electric-indent-mode`
Stefan Monnier [Fri, 22 Jan 2021 21:56:57 +0000 (16:56 -0500)]
* 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.

3 years agoMention undo-amalgamate-change-group in the lispref manual
Lars Ingebrigtsen [Fri, 22 Jan 2021 20:07:35 +0000 (21:07 +0100)]
Mention undo-amalgamate-change-group in the lispref manual

* doc/lispref/text.texi (Atomic Changes): Mention
undo-amalgamate-change-group (bug#42303).

3 years agoWork around __has_attribute bug in clang 3.4
Paul Eggert [Fri, 22 Jan 2021 19:47:22 +0000 (11:47 -0800)]
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.

3 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Fri, 22 Jan 2021 19:45:38 +0000 (11:45 -0800)]
Update from Gnulib by running admin/merge-gnulib

3 years agoPrepare for update from Gnulib
Paul Eggert [Fri, 22 Jan 2021 19:44:50 +0000 (11:44 -0800)]
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.

3 years agoFix up previous mh-speed.el ignored variable change
Lars Ingebrigtsen [Fri, 22 Jan 2021 18:22:07 +0000 (19:22 +0100)]
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.

3 years agoAdd more isearch-related bindings to ns-win.el
Keith David Bershatsky [Fri, 22 Jan 2021 18:18:41 +0000 (19:18 +0100)]
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).

3 years agoMake nnml handle invalid non-ASCII headers more consistently
Lars Ingebrigtsen [Fri, 22 Jan 2021 18:07:52 +0000 (19:07 +0100)]
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.

3 years agoUse RemoteCommand option for Tramp's sshx and scpx methods
Michael Albinus [Fri, 22 Jan 2021 16:39:52 +0000 (17:39 +0100)]
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.

3 years agoCalc: use big brackets around function arguments
Mattias Engdegård [Fri, 22 Jan 2021 14:47:48 +0000 (15:47 +0100)]
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.

3 years agoFix last change for DOS_NT systems
Eli Zaretskii [Fri, 22 Jan 2021 12:16:51 +0000 (14:16 +0200)]
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.

3 years agoEnable TTY mouse-face support when built without GPM support
João Távora [Sat, 16 Jan 2021 22:17:58 +0000 (14:17 -0800)]
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.

3 years ago* lisp/textmodes/remember.el (remember-text-format-function): Fix type.
Glenn Morris [Fri, 22 Jan 2021 08:52:12 +0000 (08:52 +0000)]
* lisp/textmodes/remember.el (remember-text-format-function): Fix type.

3 years ago* test/infra/gitlab-ci.yml: Copy newer files to image to build less often.
Ted Zlatanov [Thu, 21 Jan 2021 19:34:03 +0000 (19:34 +0000)]
* test/infra/gitlab-ci.yml: Copy newer files to image to build less often.

3 years agoFix spurious "Lexical argument shadows the dynamic variable" due to inlining
Stefan Monnier [Thu, 21 Jan 2021 18:15:05 +0000 (13:15 -0500)]
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.

3 years ago* lisp/net/webjump.el: Add Maintainer: emacs-devel.
Stefan Kangas [Thu, 21 Jan 2021 17:52:48 +0000 (18:52 +0100)]
* lisp/net/webjump.el: Add Maintainer: emacs-devel.

Ref: https://lists.gnu.org/r/emacs-devel/2021-01/msg01019.html

3 years agoDon't have type-break-mode signal errors on corrupted files
Lars Ingebrigtsen [Thu, 21 Jan 2021 17:10:16 +0000 (18:10 +0100)]
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.

3 years agoFix message.el build warning from previous change
Lars Ingebrigtsen [Thu, 21 Jan 2021 16:10:02 +0000 (17:10 +0100)]
Fix message.el build warning from previous change

* lisp/gnus/message.el (subr-x): Fix build warning from previous
commit.

3 years ago* test/infra/gitlab-ci.yml: Revert to always building.
Ted Zlatanov [Thu, 21 Jan 2021 16:02:28 +0000 (16:02 +0000)]
* test/infra/gitlab-ci.yml: Revert to always building.

3 years agoAdd dired support for compressing .pax files
Lars Ingebrigtsen [Thu, 21 Jan 2021 16:08:28 +0000 (17:08 +0100)]
Add dired support for compressing .pax files

* lisp/dired-aux.el (dired-compress-files-alist): Add support for
compressing .pax files (bug#40135).

3 years agoTweak previous message-forward-included-mime-headers change
Lars Ingebrigtsen [Thu, 21 Jan 2021 15:48:01 +0000 (16:48 +0100)]
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.

3 years agoMake Message respect header removal instructions more
Lars Ingebrigtsen [Thu, 21 Jan 2021 15:44:53 +0000 (16:44 +0100)]
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.

3 years agoA better fix for 'kill-visual-line'
Eli Zaretskii [Thu, 21 Jan 2021 14:21:45 +0000 (16:21 +0200)]
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)

3 years agoFix thinko in previous footnote.el change
Lars Ingebrigtsen [Thu, 21 Jan 2021 11:45:24 +0000 (12:45 +0100)]
Fix thinko in previous footnote.el change

* lisp/mail/footnote.el (footnote--regenerate-alist): Don't error
out when there's no footnotes.

3 years agoUse `lexical-binding` in all the cal-*.el files
Stefan Monnier [Thu, 21 Jan 2021 04:45:18 +0000 (23:45 -0500)]
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`.

3 years agoUse `calendar-read-sexp` instead of the now obsolete `calendar-read`
Stefan Monnier [Thu, 21 Jan 2021 04:14:25 +0000 (23:14 -0500)]
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`.

3 years ago* lisp/calendar/cal-french.el (calendar-french-accents-p): Obsolete function
Stefan Monnier [Thu, 21 Jan 2021 04:08:25 +0000 (23:08 -0500)]
* 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.

3 years ago* lisp/calendar/calendar.el (calendar-read-sexp): New function
Stefan Monnier [Thu, 21 Jan 2021 04:00:57 +0000 (23:00 -0500)]
* 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).

3 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile--declare-var): Fix warning
Stefan Monnier [Thu, 21 Jan 2021 01:17:11 +0000 (20:17 -0500)]
* 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.

3 years agoFix recent remember-diary-extract-entries change
Lars Ingebrigtsen [Wed, 20 Jan 2021 22:30:53 +0000 (23:30 +0100)]
Fix recent remember-diary-extract-entries change

* lisp/textmodes/remember.el (remember-diary-extract-entries): Use
`remember-diary-file' over `diary-file'.

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)