]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Thu, 29 Oct 2020 15:55:12 +0000 (16:55 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years agoFix CUA Mode menu entry to be less confusing
Stefan Kangas [Thu, 29 Oct 2020 14:45:07 +0000 (15:45 +0100)]
Fix CUA Mode menu entry to be less confusing

Note that the old text was incorrect; shift-selection is controlled by
the variable shift-select-mode.

* lisp/menu-bar.el (menu-bar-options-menu): Make CUA Mode menu entry
less confusing when cua-enable-cua-keys is nil.  (Bug#43322)

4 years agoTweak previous article-treat-ansi-sequences fix
Lars Ingebrigtsen [Thu, 29 Oct 2020 11:38:13 +0000 (12:38 +0100)]
Tweak previous article-treat-ansi-sequences fix

* lisp/gnus/gnus-art.el (article-treat-ansi-sequences): Redo the
previous fix to avoid a compilation warning (bug#44299).

4 years ago* test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): New test.
Hugh Daschbach [Thu, 29 Oct 2020 11:16:45 +0000 (12:16 +0100)]
* test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): New test.

4 years agoDon't spill ansi-color across parts in articles
Andreas Schwab [Thu, 29 Oct 2020 09:15:40 +0000 (10:15 +0100)]
Don't spill ansi-color across parts in articles

* lisp/gnus/gnus-art.el (article-treat-ansi-sequences): Reset
ansi-color-context-region.  (Bug#44299)

4 years ago* lisp/bindings.el (narrow-map): Bind C-x n g to goto-line-relative (bug#9917)
Juri Linkov [Thu, 29 Oct 2020 09:18:33 +0000 (11:18 +0200)]
* lisp/bindings.el (narrow-map): Bind C-x n g to goto-line-relative (bug#9917)

4 years agoWiden buffer before going to point found by xref-find-definitions (bug#44294)
Juri Linkov [Thu, 29 Oct 2020 09:09:20 +0000 (11:09 +0200)]
Widen buffer before going to point found by xref-find-definitions (bug#44294)

* lisp/progmodes/elisp-mode.el (xref-location-marker): Widen before going
to the found position.

* lisp/progmodes/etags.el (etags-goto-tag-location): Rerun after removing
narrowing.

* lisp/simple.el (goto-line-read-args): Use buffer-narrowed-p.

4 years ago; * lisp/emacs-lisp/shortdoc.el (regexp): less contrived rx example
Mattias Engdegård [Wed, 28 Oct 2020 14:05:35 +0000 (15:05 +0100)]
; * lisp/emacs-lisp/shortdoc.el (regexp): less contrived rx example

4 years agoRun substitute-command-keys on shortdoc section headings
Stefan Kangas [Wed, 28 Oct 2020 13:46:43 +0000 (14:46 +0100)]
Run substitute-command-keys on shortdoc section headings

* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Run
substitute-command-keys on section headings before displaying.

4 years agoExtend the regexp shortdoc group
Stefan Kangas [Wed, 28 Oct 2020 13:46:28 +0000 (14:46 +0100)]
Extend the regexp shortdoc group

* lisp/emacs-lisp/shortdoc.el (regexp): New section "Match Data"; add
save-match-data.  New section "The `rx' Structured Regexp Notation".

4 years agoDocument all parameters on `indent-relative'
Lars Ingebrigtsen [Wed, 28 Oct 2020 11:47:00 +0000 (12:47 +0100)]
Document all parameters on `indent-relative'

* doc/lispref/text.texi (Relative Indent): Mention the FIRST-ONLY
parameter (bug#39330).

4 years agoDisable mml-sec-tests on MacOS
Lars Ingebrigtsen [Wed, 28 Oct 2020 10:54:53 +0000 (11:54 +0100)]
Disable mml-sec-tests on MacOS

* test/lisp/gnus/mml-sec-tests.el (test-conf): Disable tests on
MacOS (bug#44259).

4 years agoDisplay times in a more human-readable way in list-timers
Lars Ingebrigtsen [Wed, 28 Oct 2020 09:07:03 +0000 (10:07 +0100)]
Display times in a more human-readable way in list-timers

* lisp/emacs-lisp/timer-list.el (list-timers): Format the
intervals in a more human-readable way (bug#39956).

4 years ago* lisp/net/hmac-def.el: Use lexical-binding.
Stefan Kangas [Wed, 28 Oct 2020 08:49:59 +0000 (09:49 +0100)]
* lisp/net/hmac-def.el: Use lexical-binding.

4 years agoAdjust python tests after fix for bug#39398
Lars Ingebrigtsen [Wed, 28 Oct 2020 08:13:53 +0000 (09:13 +0100)]
Adjust python tests after fix for bug#39398

4 years ago* lisp/net/eudc-vars.el: Use lexical-binding.
Stefan Kangas [Wed, 28 Oct 2020 05:04:21 +0000 (06:04 +0100)]
* lisp/net/eudc-vars.el: Use lexical-binding.

4 years ago; Fix license statement in several files
Stefan Kangas [Wed, 28 Oct 2020 02:41:55 +0000 (03:41 +0100)]
; Fix license statement in several files

Add the line "This file is part of GNU Emacs."

4 years agoUse lexical-binding in netrc.el and add tests
Stefan Kangas [Wed, 28 Oct 2020 02:22:12 +0000 (03:22 +0100)]
Use lexical-binding in netrc.el and add tests

* lisp/net/netrc.el: Use lexical-binding.
(netrc-file): Remove redundant :group arg.
* test/lisp/net/netrc-resources/authinfo:
* test/lisp/net/netrc-resources/services:
* test/lisp/net/netrc-tests.el: New files.

4 years agoWarn against using the MD4 hash function
Stefan Kangas [Wed, 28 Oct 2020 01:37:18 +0000 (02:37 +0100)]
Warn against using the MD4 hash function

* lisp/md4.el (md4): Warn against using it, since its security is
non-existent and it has been declared obsolete.  It should probably
only be used by our NTLM support.  Point users to secure-hash instead.

4 years agocss--complete-property-value: Limit the backward search
Dmitry Gutov [Wed, 28 Oct 2020 01:43:47 +0000 (03:43 +0200)]
css--complete-property-value: Limit the backward search

* lisp/textmodes/css-mode.el (css--complete-property-value):
Don't search back when ppss-innermost-start is nil (bug#44214).

4 years agoRemove Emacs 20 compat code from ede/files.el
Stefan Kangas [Wed, 28 Oct 2020 01:08:39 +0000 (02:08 +0100)]
Remove Emacs 20 compat code from ede/files.el

* lisp/cedet/ede/files.el (ede--put-inode-dir-hash)
(ede--get-inode-dir-hash, ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Remove Emacs 20
compat code.

4 years agoRemove some compat code from feedmail.el
Stefan Kangas [Wed, 28 Oct 2020 01:07:05 +0000 (02:07 +0100)]
Remove some compat code from feedmail.el

* lisp/mail/feedmail.el (feedmail-message-action-help-blat)
(feedmail-run-the-queue, feedmail-queue-send-edit-prompt-inner)
(feedmail-send-it-immediately): Remove compat code for XEmacs,
Emacs 19 and 20.

4 years agoRemove some Emacs 20 compat code from speedbar.el
Stefan Kangas [Tue, 27 Oct 2020 21:32:37 +0000 (22:32 +0100)]
Remove some Emacs 20 compat code from speedbar.el

* lisp/speedbar.el (speedbar-easymenu-definition-trailer): Remove
Emacs 20 compat code.

4 years agoTweak how `C-c C-r' computes the region in python-mode
Lars Ingebrigtsen [Tue, 27 Oct 2020 19:29:08 +0000 (20:29 +0100)]
Tweak how `C-c C-r' computes the region in python-mode

* lisp/progmodes/python.el (python-shell-buffer-substring): Don't
extend the region to the start of the line (bug#39398), but allow
sending the actual region as marked.

4 years agoMake gnus-output-to-rmail appending work better
Lars Ingebrigtsen [Tue, 27 Oct 2020 18:28:57 +0000 (19:28 +0100)]
Make gnus-output-to-rmail appending work better

* lisp/gnus/gnus-util.el (gnus-output-to-rmail): Ensure we have a
blank line before the next line when using mbox format (bug#39580).

4 years agoFix intermittent rmail-summary-delete-forward problem
Lars Ingebrigtsen [Tue, 27 Oct 2020 17:54:41 +0000 (18:54 +0100)]
Fix intermittent rmail-summary-delete-forward problem

* lisp/mail/rmailsum.el (rmail-summary-delete-forward):
`rmail-delete-message' may apparently clear
`rmail-current-message' sometimes, so save the message number
before deleting (bug#39612).

4 years agogdb-mi: use lexical lambdas
Mattias Engdegård [Mon, 26 Oct 2020 21:02:55 +0000 (22:02 +0100)]
gdb-mi: use lexical lambdas

* lisp/progmodes/gdb-mi.el (gdb-tooltip-print-1, gud-watch)
(gdb-var-list-children, gdb-edit-value)
(gdb-bind-function-to-buffer, gdb-place-breakpoints)
(gdb-preempt-existing-or-display-buffer):
Expose lambdas to the compiler as lexical closures instead of building
them the old-fashioned way.  Remove #' before lambda.

4 years agoRemove unused function in gdb-mi.el
Mattias Engdegård [Tue, 27 Oct 2020 15:54:38 +0000 (16:54 +0100)]
Remove unused function in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-var-evaluate-expression-handler):
Remove.  (It was left behind in an old code reorganisation.)

4 years agoRevert "Fontify strings in {} better in tcl-mode"
Lars Ingebrigtsen [Tue, 27 Oct 2020 17:46:16 +0000 (18:46 +0100)]
Revert "Fontify strings in {} better in tcl-mode"

This reverts commit 7f32224dc324b0ee0f1b512c8d8b19aeb80141c1.

The changes led to things like

    proc foo5 () {
        return 6
    }

being fontified as a string, which is wrong.

4 years agoSmall fix to the new link for inherited faces in Customize
Mauro Aranda [Tue, 27 Oct 2020 17:34:40 +0000 (18:34 +0100)]
Small fix to the new link for inherited faces in Customize

* lisp/cus-edit.el (cus--face-link): Link to the current value of the
widget, rather than to the widget's value upon creation (bug#44154).

4 years agogdb-mi: Don't use bindat for field access
Mattias Engdegård [Sun, 25 Oct 2020 12:27:52 +0000 (13:27 +0100)]
gdb-mi: Don't use bindat for field access

Replace uses of bindat-get-field with a simpler accessor,
since nothing here uses the bindat machinery in any way.

* lisp/progmodes/gdb-mi.el (gdb-mi--field): New.
(gdb-get-many-fields): Remove.
(gdb-var-create-handler, gdb-var-list-children-handler)
(gdb-var-update-handler, gdb-current-buffer-frame)
(gdb-update-gud-running, gdb-thread-exited, gdb-thread-selected)
(gdb-running, gdb-stopped, gdb-breakpoints-list-handler-custom)
(gdb-place-breakpoints, gdb-thread-list-handler-custom)
(def-gdb-thread-buffer-simple-command, gdb-select-thread)
(def-gdb-thread-buffer-gud-command, gdb-read-memory-custom)
(gdb-invalidate-disassembly, gdb-disassembly-handler-custom)
(gdb-disassembly-place-breakpoints, gdb-toggle-breakpoint)
(gdb-delete-breakpoint, gdb-goto-breakpoint, gdb-frame-location)
(gdb-stack-list-frames-custom, gdb-select-frame)
(gdb-edit-locals-value, gdb-locals-handler-custom)
(gdb-registers-handler-custom, gdb-changed-registers-handler)
(gdb-register-names-handler, gdb-frame-handler):
Use gdb-mi--field.

4 years agoTemporarily mark two failing tests
Glenn Morris [Tue, 27 Oct 2020 15:35:10 +0000 (08:35 -0700)]
Temporarily mark two failing tests
; Persistently failing tests can cause problems for automated builds,
; and make it harder to spot new failures.

* test/lisp/xt-mouse-tests.el (xt-mouse-tracking-basic)
(xt-mouse-tracking-utf-8): Currently failing.

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 27 Oct 2020 15:24:56 +0000 (08:24 -0700)]
Merge from origin/emacs-27

e0de9f3295 (origin/emacs-27) Don't skip empty lines when fitting mini...
a4ec03fa9b ; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246)
20c02e628c Improve documentation of display-fill-column-indicator
e2005f1f2a * INSTALL: Mention efaq.texi for installation of intlfonts.
71661b2872 Use WebKit sandboxing

# Conflicts:
# etc/NEWS

4 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 27 Oct 2020 15:18:05 +0000 (08:18 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

8b1ccf5e7b Fix tramp-sh-handle-make-process; don't merge with master

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 27 Oct 2020 15:18:05 +0000 (08:18 -0700)]
Merge from origin/emacs-27

c847d5998f Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs i...

4 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 27 Oct 2020 15:18:05 +0000 (08:18 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

8101083c7a Fix an error in tramp-sh-handle-make-process.  Dont' merge...

4 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 27 Oct 2020 15:18:05 +0000 (08:18 -0700)]
Merge from origin/emacs-27

8b87ea6844 Recommend lexical-binding in Coding Conventions
e29cace60a Avoid rare crashes while producing line numbers

4 years agoComplete property values in multi-line CSS declarations
Simen Heggestøyl [Mon, 26 Oct 2020 09:01:44 +0000 (10:01 +0100)]
Complete property values in multi-line CSS declarations

* lisp/textmodes/css-mode.el (css--complete-property-value): Complete
property values even when preceded by a newline (bug#44214).

4 years agoFix history problem in `M-x shell' when started twice
Lars Ingebrigtsen [Tue, 27 Oct 2020 12:44:16 +0000 (13:44 +0100)]
Fix history problem in `M-x shell' when started twice

* lisp/comint.el (comint-input-ring-file-name): Avoid having this
variable being killed on mode restart while the other ring
variables aren't (bug#39667).  This would mean that `M-x
shell'/`C-d'/`M-x shell' didn't save commands entered after the
second `M-x shell'.

4 years agoERT: escape control characters in pretty-printed error output
Mattias Engdegård [Tue, 27 Oct 2020 12:20:20 +0000 (13:20 +0100)]
ERT: escape control characters in pretty-printed error output

* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Escape control characters which would otherwise be blasted directly to
the terminal (when running noninteractively) with unpleasant results.

4 years agoFix sunrise and sunset calculation (bug#44237)
Mattias Engdegård [Mon, 26 Oct 2020 17:44:05 +0000 (18:44 +0100)]
Fix sunrise and sunset calculation (bug#44237)

* lisp/calendar/solar.el (solar-moment): Use initial values for binary
search that won't end the loop prematurely and yield incorrect
answers.
* test/lisp/calendar/solar-tests.el: New file.

4 years agoDon't rely on bignums in ntlm.el
Mattias Engdegård [Tue, 27 Oct 2020 10:52:38 +0000 (11:52 +0100)]
Don't rely on bignums in ntlm.el

Since ntlm.el is distributed as a separate package in GNU ELPA and
should be able to run on older Emacs versions without bignums,
we cannot make use of them here.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-10/msg01665.html.
Instead, we add a small poor man's bignum implementation.

* lisp/net/ntlm.el (ntlm--bignat-of-int, ntlm--bignat-add)
(ntlm--bignat-shift-left, ntlm--bignat-mul-byte, ntlm--bignat-mul)
(ntlm--bignat-of-string, ntlm--bignat-of-digits)
(ntlm--bignat-to-int64): New.
(ntlm--time-to-timestamp): Use the ntlm--bignat- functions instead
of Lisp integers.
* test/lisp/net/ntlm-tests.el: New file.

4 years agoMake edit-abbrevs parsing less brittle
Lars Ingebrigtsen [Tue, 27 Oct 2020 11:18:27 +0000 (12:18 +0100)]
Make edit-abbrevs parsing less brittle

* lisp/abbrev.el (define-abbrevs): Make the parsing less brittle
-- allow more blank lines (bug#42611).

4 years ago* lisp/net/sieve-mode.el: Use lexical-binding.
Stefan Kangas [Tue, 27 Oct 2020 11:11:28 +0000 (12:11 +0100)]
* lisp/net/sieve-mode.el: Use lexical-binding.

4 years agoAdd a link to inherited faces in Customize
Lars Ingebrigtsen [Tue, 27 Oct 2020 10:32:14 +0000 (11:32 +0100)]
Add a link to inherited faces in Customize

* lisp/cus-edit.el (cus--face-link): New function (bug#44154).
(face): Use the function to format the link.

4 years agoDon't do compilation-transform-file-match-alist if there's no file name
Lars Ingebrigtsen [Tue, 27 Oct 2020 09:17:13 +0000 (10:17 +0100)]
Don't do compilation-transform-file-match-alist if there's no file name

* lisp/progmodes/compile.el (compilation-error-properties): There
may not be a file name (bug#40111).  In that case, don't do the
`compilation-transform-file-match-alist' thing.

4 years agoDon't skip empty lines when fitting mini frame to buffer (Bug#44080)
Clemens Radermacher [Tue, 27 Oct 2020 08:45:25 +0000 (09:45 +0100)]
Don't skip empty lines when fitting mini frame to buffer (Bug#44080)

* lisp/window.el (fit-mini-frame-to-buffer,
window--resize-mini-frame, fit-frame-to-buffer,
fit-frame-to-buffer-1): By default, fit a mini frame without skipping its
buffer's leading or trailing empty lines.
* src/frame.c (resize-mini-frames): Update doc-string.
* lisp/cus-start.el (resize-mini-frames): Update for customize.
* doc/lispref/minibuf.texi (resize-mini-frames): Update description.

4 years agoDon't leak result of nested byte-compilation to outer level
Paul Pogonyshev [Tue, 27 Oct 2020 08:43:55 +0000 (09:43 +0100)]
Don't leak result of nested byte-compilation to outer level

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Bind
`byte-compiler-error-flag' instead of setting it (bug#41065).
This fixes a problem of "leaking" the flag when compiling
something that then compiles something that errors out (i.e., an
"inner" compile).

4 years agoFontify strings in {} better in tcl-mode
mvar [Tue, 27 Oct 2020 08:27:51 +0000 (09:27 +0100)]
Fontify strings in {} better in tcl-mode

* lisp/progmodes/tcl.el (tcl-syntax-propertize-function):
Propertize {} forms after commands as strings (bug#39277).
(tcl-set-font-lock-keywords): Fontify as strings.  This allows
things like puts {"foo} to be fontified correctly.

Copyright-paperwork-exempt: yes

4 years ago`g' in *Help* doesn't require confirmation
Lars Ingebrigtsen [Tue, 27 Oct 2020 07:23:31 +0000 (08:23 +0100)]
`g' in *Help* doesn't require confirmation

* lisp/help-mode.el (help-mode-revert-buffer): Don't require
confirmation before reverting (bug#44202).  This mimics how most
other non-file reverting functions work.

4 years agoDefine backtab in text fields in eww
Nicolas Graner [Tue, 27 Oct 2020 07:15:22 +0000 (08:15 +0100)]
Define backtab in text fields in eww

* lisp/net/eww.el (eww-text-map):
(eww-textarea-map): Define backtab, as in the main mode map
(bug#44247).

4 years ago; * etc/NEWS: Fix a recent change.
Eli Zaretskii [Tue, 27 Oct 2020 03:25:17 +0000 (05:25 +0200)]
; * etc/NEWS: Fix a recent change.

4 years ago* lisp/mail/mail-prsvr.el: Use lexical-binding.
Stefan Kangas [Tue, 27 Oct 2020 02:53:02 +0000 (03:53 +0100)]
* lisp/mail/mail-prsvr.el: Use lexical-binding.

4 years ago* lisp/mail/mail-parse.el: Use lexical-binding.
Stefan Kangas [Tue, 27 Oct 2020 02:51:57 +0000 (03:51 +0100)]
* lisp/mail/mail-parse.el: Use lexical-binding.

4 years agoAllow pcomplete/gzip to complete on files in subdirectories
Stefan Kangas [Tue, 27 Oct 2020 02:09:44 +0000 (03:09 +0100)]
Allow pcomplete/gzip to complete on files in subdirectories

* lisp/pcmpl-gnu.el (pcmpl-gnu-zipped-files): Allow "gzip" to complete
on files in subdirectories.  (Bug#30271)

4 years agoAdd some missing docstrings in cua-rect.el
Boruch Baum [Tue, 27 Oct 2020 01:30:29 +0000 (02:30 +0100)]
Add some missing docstrings in cua-rect.el

* lisp/emulation/cua-rect.el (cua--rectangle)
(cua--last-rectangle, cua--restored-rectangle)
(cua--rectangle-overlays, cua--rectangle-operation)
(cua--tabify-start, cua--tabify-start, cua--insert-rectangle):
Add docstrings, in several cases by converting existing
comments.  (Bug#30085)
(cua--last-killed-rectangle): Update comment.

4 years agoUse lexical-binding in tool-bar.el
Stefan Kangas [Tue, 27 Oct 2020 00:29:43 +0000 (01:29 +0100)]
Use lexical-binding in tool-bar.el

* lisp/tool-bar.el: Use lexical-binding.
(tool-bar-add-item, tool-bar-add-item-from-menu): Quote function
symbols as such.

4 years agoDon't use obsolete variable write-contents-hooks
Stefan Kangas [Mon, 26 Oct 2020 23:49:28 +0000 (00:49 +0100)]
Don't use obsolete variable write-contents-hooks

* lisp/mh-e/mh-show.el (mh-display-msg):
* lisp/textmodes/rst.el: Don't use obsolete variable
write-contents-hooks.
Problem reported by Stefan Monnier <monnier@iro.umontreal.ca>.

4 years agoRemove XEmacs compat code from hashcash.el
Stefan Kangas [Mon, 26 Oct 2020 23:35:46 +0000 (00:35 +0100)]
Remove XEmacs compat code from hashcash.el

* lisp/mail/hashcash.el (hashcash-point-at-bol)
(hashcash-point-at-eol): Make obsolete.
(hashcash-token-substring): Don't use the above now obsolete aliases.

4 years agoFix an unbound variable in html skeletons
Stephen Berman [Mon, 26 Oct 2020 21:21:07 +0000 (22:21 +0100)]
Fix an unbound variable in html skeletons

* lisp/skeleton.el (skeleton-internal-list): Fix an unbound
variable in html skeletons (bug#44157).

4 years agovc-git-root: Remove unnecessary caching
Dmitry Gutov [Mon, 26 Oct 2020 21:01:08 +0000 (23:01 +0200)]
vc-git-root: Remove unnecessary caching

* lisp/vc/vc-git.el (vc-git-root): Simplify (bug#42966).

4 years ago; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246)
Philipp Stephani [Mon, 26 Oct 2020 20:38:13 +0000 (21:38 +0100)]
; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246)

4 years agoMake vc-responsible-backend choose the most specific backend
Lars Ingebrigtsen [Mon, 26 Oct 2020 20:10:36 +0000 (21:10 +0100)]
Make vc-responsible-backend choose the most specific backend

* lisp/vc/vc.el (vc-responsible-backend): Search through all the
VC backends instead of the first one, and choose the one that's
most specific (bug#42966).

4 years agoFix time-test error on machines with mail
Lars Ingebrigtsen [Mon, 26 Oct 2020 20:23:50 +0000 (21:23 +0100)]
Fix time-test error on machines with mail

* test/lisp/time-tests.el (time-tests-display-time-update): There
may be mail on the machine (bug#44241).

4 years agoMake the -modes variable autoloaded
Lars Ingebrigtsen [Mon, 26 Oct 2020 19:44:15 +0000 (20:44 +0100)]
Make the -modes variable autoloaded

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Make the -modes variable be autoloaded.

4 years ago; * etc/NEWS: Fix a recently-added entry.
Eli Zaretskii [Mon, 26 Oct 2020 18:38:42 +0000 (20:38 +0200)]
; * etc/NEWS: Fix a recently-added entry.

4 years agoTweak where global-display-fill-column-indicator-modes is on
Lars Ingebrigtsen [Mon, 26 Oct 2020 18:15:30 +0000 (19:15 +0100)]
Tweak where global-display-fill-column-indicator-modes is on

* lisp/display-fill-column-indicator.el
(global-display-fill-column-indicator-mode): Don't switch on in
special-mode buffers (bug#44232).

4 years agoImplement a :predicate parameter for globalized minor modes
Lars Ingebrigtsen [Mon, 26 Oct 2020 18:13:14 +0000 (19:13 +0100)]
Implement a :predicate parameter for globalized minor modes

* doc/lispref/modes.texi (Defining Minor Modes): Describe the new
:predicate keyword (bug#44232).

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow a new :predicate keyword.
(easy-mmode--globalized-predicate-p): New function.

4 years agoMake delete-selection-helper more resilient
Lars Ingebrigtsen [Mon, 26 Oct 2020 14:14:53 +0000 (15:14 +0100)]
Make delete-selection-helper more resilient

* lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g'
(bug#40357).

4 years agoTweak how shortdocs are displayed
Lars Ingebrigtsen [Mon, 26 Oct 2020 12:12:34 +0000 (13:12 +0100)]
Tweak how shortdocs are displayed

* lisp/emacs-lisp/shortdoc.el (shortdoc-example): Removed.
(shortdoc-section): Remove colors.
(shortdoc-separator): New face.
(shortdoc-display-group, shortdoc--display-function): Don't use
background colours, because that makes things harder to read.
Separate with a horizontal line instead.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 26 Oct 2020 16:15:37 +0000 (18:15 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoAvoid segfaults due to using fonts that were closed
Eli Zaretskii [Mon, 26 Oct 2020 16:14:32 +0000 (18:14 +0200)]
Avoid segfaults due to using fonts that were closed

* src/composite.c (composition_gstring_cache_clear_font): New
function.
* src/composite.h (composition_gstring_cache_clear_font): Add
prototype.
* src/font.c (font_clear_cache): When we are about to close a
font, remove from the gstring cache any lgstring that uses this
font.  (Bug#42943)

4 years agoRevert "Don't consider play-sound-file to be a 'safe' function (bug#44018)"
Mattias Engdegård [Mon, 26 Oct 2020 16:10:06 +0000 (17:10 +0100)]
Revert "Don't consider play-sound-file to be a 'safe' function (bug#44018)"

This reverts commit cdb3c9d662c772ce25ea4d803eccd2c9e6a6ae99.

4 years agoImprove documentation of display-fill-column-indicator
Eli Zaretskii [Mon, 26 Oct 2020 16:01:13 +0000 (18:01 +0200)]
Improve documentation of display-fill-column-indicator

* lisp/display-fill-column-indicator.el
(display-fill-column-indicator-mode): Mention the globalized
version in the doc string.

* doc/emacs/display.texi (Displaying Boundaries): Improve and
clarify the documentation of display-fill-column-indicator.
Suggest using the minor mode as the primary means for turning the
feature on.

* src/xdisp.c (syms_of_xdisp) <display-fill-column-indicator>
<display-fill-column-indicator-character>: Doc fix.  (Bug#44226)

4 years agoDon't consider play-sound-file to be a 'safe' function (bug#44018)
Mattias Engdegård [Mon, 26 Oct 2020 11:40:51 +0000 (12:40 +0100)]
Don't consider play-sound-file to be a 'safe' function (bug#44018)

While there are currently no known security holes in play-sound-file,
the attack surface is considerable and historically audio file
processing has had more than its share of security problems; the
benefit to risk ratio is low.

* lisp/emacs-lisp/unsafep.el: Don't mark play-sound-file as safe.

4 years agoAdd section "Replacing Match" to the regexp shortdoc group
Stefan Kangas [Sun, 25 Oct 2020 18:18:27 +0000 (19:18 +0100)]
Add section "Replacing Match" to the regexp shortdoc group

* lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match".

4 years agoRemove some Emacs 19 compat code and references
Stefan Kangas [Tue, 20 Oct 2020 17:31:40 +0000 (19:31 +0200)]
Remove some Emacs 19 compat code and references

* lisp/progmodes/sql.el:
* lisp/mh-e/mh-show.el (mh-display-msg): Remove Emacs 19 compat code.
* lisp/emacs-lisp/edebug.el (edebug-mark-marker): Make into
obsolete alias for mark-marker.
(edebug--display-1, edebug-bounce-point)
(edebug-outside-excursion): Adjust callers.
* lisp/net/snmp-mode.el:
* lisp/forms.el: Remove references to Emacs 19.
(forms-use-text-properties): Doc fix.

4 years agoImprove support for shaping Egyptian Hieroglyphs
Eli Zaretskii [Sun, 25 Oct 2020 16:05:37 +0000 (18:05 +0200)]
Improve support for shaping Egyptian Hieroglyphs

* src/composite.c (composition_gstring_lookup_cache): Renamed from
gstring_lookup_cache and made external.  All callers changed.
* src/composite.h (composition_gstring_lookup_cache): Add
prototype.
* src/font.c (Ffont_shape_gstring): Call
composition_gstring_lookup_cache and return the cached composition
if it is already in the cache.

* lisp/language/misc-lang.el (egyptian-shape-grouping): New
function.
(composition-function-table): Use egyptian-shape-grouping in
setting up compositions for Egyptian Hieroglyphs.  Fix the
composition setup for horizontal and vertical joiners.

4 years agoBetter file name in dynvars-check example
Mattias Engdegård [Sun, 25 Oct 2020 15:41:31 +0000 (16:41 +0100)]
Better file name in dynvars-check example

* doc/lispref/variables.texi (Converting to Lexical Binding):
Don't suggest an aggregate file name that matches the glob used when
generating it.

4 years agoFix syntax error in message-add-openpgp-header
Lars Ingebrigtsen [Sun, 25 Oct 2020 14:16:05 +0000 (15:16 +0100)]
Fix syntax error in message-add-openpgp-header

* lisp/gnus/message.el (message-add-openpgp-header): Remove
redundant (and syntactically wrong) check.

4 years agoFix problem when replacing the final char in checkdoc
Lars Ingebrigtsen [Sun, 25 Oct 2020 13:34:47 +0000 (14:34 +0100)]
Fix problem when replacing the final char in checkdoc

* lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-ask-replace):
Ensure that the end-of-doc-string marker is really at the end,
even if we replace the final " char in the string (bug#44201).

4 years ago* INSTALL: Mention efaq.texi for installation of intlfonts.
Michael Albinus [Sun, 25 Oct 2020 11:44:01 +0000 (12:44 +0100)]
* INSTALL: Mention efaq.texi for installation of intlfonts.

4 years agoRevert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for XRef.
Philipp Stephani [Sun, 25 Oct 2020 10:24:11 +0000 (11:24 +0100)]
Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for XRef.

XRef supports Emacs versions back to Emacs 26.3, so it can’t use newer
functions such as ‘ert-resource-directory’.

* test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Don’t use
‘ert-resource-directory’

4 years agoRevert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
Philipp Stephani [Sun, 25 Oct 2020 09:59:11 +0000 (10:59 +0100)]
Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.

Flymake supports all Emacs versions back to 26.1, so it can’t use
‘ert-resource-file’.

* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Recreate.
(flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.

4 years agoUse WebKit sandboxing
Paul Eggert [Sat, 24 Oct 2020 22:34:12 +0000 (15:34 -0700)]
Use WebKit sandboxing

* src/xwidget.c (Fmake_xwidget): Enable sandboxing if WebKit 2.26
or later.  Do this early, as required for sandboxing (Bug#43071).
Co-authored-by: Qiantan Hong <qhong@mit.edu>
Copyright-paperwork-exempt: yes

4 years agoAdd shortdoc group for alist
Stefan Kangas [Sat, 24 Oct 2020 23:40:27 +0000 (01:40 +0200)]
Add shortdoc group for alist

* lisp/emacs-lisp/shortdoc.el (alist): New shortdoc group.

4 years agoAdd shortdoc group for hash-table
Stefan Kangas [Sat, 24 Oct 2020 22:51:23 +0000 (00:51 +0200)]
Add shortdoc group for hash-table

* lisp/emacs-lisp/shortdoc.el (hash-table): New shortdoc group.

4 years agoMinor doprnt cleanup: remove memchr call
Paul Eggert [Sat, 24 Oct 2020 20:50:29 +0000 (13:50 -0700)]
Minor doprnt cleanup: remove memchr call

* src/doprnt.c (doprnt): Remove unnecessary call to memchr.

4 years agoRename doprnt_nul to doprnt_non_null_end
Paul Eggert [Sat, 24 Oct 2020 20:46:46 +0000 (13:46 -0700)]
Rename doprnt_nul to doprnt_non_null_end

* src/doprnt.c (doprnt_non_null_end): Rename from doprnt_nul,
as the old name was misleading (left over from a previous proposal).
Caller changed.

4 years agoImprove doprnt performance
Paul Eggert [Sat, 24 Oct 2020 20:41:01 +0000 (13:41 -0700)]
Improve doprnt performance

This patch implements some of my suggestions in Bug#8545,
with further changes suggested by Eli Zaretskii (Bug#43439).
* src/doprnt.c: Improve comments.
(SIZE_BOUND_EXTRA): Now at top level, for parse_format_integer.
(parse_format_integer): New static function, containing some of
the old doprnt.  Fix a bug that caused doprnt to infloop on
formats like "%10s" that Emacs does not use.  We could simplify
doprnt further if we dropped support for these never-used formats.
(doprnt_nul): New function.
(doprnt): Use it.  Change doprnt API to exit when either it finds NUL
or reaches the character specified by FORMAT_END.  In the typical case
where FORMAT_END is null, take just one pass over FORMAT, not two.
Assume C99 to make code clearer.  Do not use malloc or alloca to
allocate a copy of the format FMTCPY; instead, use a small fixed-size
array FMTSTAR, and use '*' in that array to represent width and
precision, passing them as separate int arguments.  Use eassume to
pacify GCC in switch statements.

4 years agoWarn about a bad default value in restricted-sexp widget
Mauro Aranda [Sat, 24 Oct 2020 19:40:42 +0000 (21:40 +0200)]
Warn about a bad default value in restricted-sexp widget

* lisp/wid-edit.el (restricted-sexp widget): New :value-to-external
function.  If value is not in the internal format, then we might be
dealing with a bad default value for the widget, so display a warning
about that (bug#25152).

4 years ago; Prefer https to http in more URLs
Stefan Kangas [Sat, 24 Oct 2020 18:22:33 +0000 (20:22 +0200)]
; Prefer https to http in more URLs

These were all tested and confirmed working.

4 years agoRework semantics of eldoc-echo-are-use-multiline-p
João Távora [Sun, 4 Oct 2020 18:31:02 +0000 (19:31 +0100)]
Rework semantics of eldoc-echo-are-use-multiline-p

Per bug#43543.  Now uses logical lines, not visual lines.

* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p): Rework
semantics.
(eldoc--echo-area-substring): New helper.
(eldoc--echo-area-prefer-doc-buffer-p): New helper.
(eldoc-display-in-echo-area): Rework using new helpers.

4 years agoRename ElDoc user option controlling display of truncation notice
João Távora [Sun, 4 Oct 2020 11:19:47 +0000 (12:19 +0100)]
Rename ElDoc user option controlling display of truncation notice

The new name makes it consistent with other variables controlling the
display of ElDoc documentation in the echo area.

Per bug#43543.

* etc/NEWS (Eldoc): Rename eldoc-display-truncation-message to
eldoc-echo-area-display-truncation-message.

* lisp/emacs-lisp/eldoc.el
(eldoc-echo-area-display-truncation-message): Rename from
eldoc-display-truncation-message.
(eldoc-display-in-echo-area): Use new variable name.

4 years agoRework eldoc-echo-area-prefer-doc-buffer (bug#42532)
João Távora [Sat, 3 Oct 2020 16:27:05 +0000 (17:27 +0100)]
Rework eldoc-echo-area-prefer-doc-buffer (bug#42532)

* lisp/emacs-lisp/eldoc.el:
(eldoc-echo-area-prefer-doc-buffer): Rename from
eldoc-echo-area-prefer-doc-buffer
(eldoc-display-in-echo-area): Rework to honour
eldoc-echo-area-prefer-doc-buffer.

4 years agoIntroduce eldoc-display-functions
João Távora [Sun, 6 Sep 2020 14:37:02 +0000 (15:37 +0100)]
Introduce eldoc-display-functions

See bug#43609.

* lisp/emacs-lisp/eldoc.el (eldoc--request-state): Add comment.
(eldoc--last-request-state): No longer buffer-local.
(eldoc--request-docs-p): Delete.
(eldoc-display-functions): New user variable.
(eldoc--doc-buffer-docs): New variable.
(eldoc-display-message-p): Rework.
(eldoc--format-doc-buffer): Rework from eldoc--handle-docs.
(eldoc-display-in-echo-area, eldoc-display-in-buffer): New
user-visible function.
(eldoc--invoke-strategy): Take INTERACTIVE arg.
Invoke eldoc-display-in-buffer
(eldoc-print-current-symbol-info): Simplify.
(Version): Bump to 1.11.0

* etc/NEWS: Mention eldoc-display-functions.

4 years ago; Fix last change
Basil L. Contovounesios [Sat, 24 Oct 2020 14:50:16 +0000 (15:50 +0100)]
; Fix last change

4 years agoRe-introduce variable for world clock timer
Stefan Kangas [Sat, 24 Oct 2020 13:47:26 +0000 (15:47 +0200)]
Re-introduce variable for world clock timer

* lisp/time.el (world-clock--timer): New variable.
(world-clock): Save timer to above variable when it is started.
(world-clock-cancel-timer): Delete timer saved in variable instead of
searching for the function name.

4 years agoUse lexical-binding in several language support libraries
Stefan Kangas [Sat, 24 Oct 2020 13:34:52 +0000 (15:34 +0200)]
Use lexical-binding in several language support libraries

* lisp/language/burmese.el:
* lisp/language/cham.el:
* lisp/language/czech.el:
* lisp/language/georgian.el:
* lisp/language/greek.el:
* lisp/language/khmer.el:
* lisp/language/romanian.el:
* lisp/language/sinhala.el:
* lisp/language/slovak.el:
* lisp/language/tai-viet.el:
* lisp/language/vietnamese.el: Use lexical-binding.

4 years agoAccept nil COMMAND in tramp-sh-handle-make-process (Bug#44151)
Michael Albinus [Sat, 24 Oct 2020 12:36:34 +0000 (14:36 +0200)]
Accept nil COMMAND in tramp-sh-handle-make-process (Bug#44151)

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
COMMAND.  (Bug#44151)

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Extend test.