]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoClean up temporary files after package tests
Stefan Kangas [Fri, 23 Oct 2020 10:56:39 +0000 (12:56 +0200)]
Clean up temporary files after package tests

* test/lisp/emacs-lisp/package-tests.el (with-package-test): Remove
temporary files after test.  (Bug#43359)

4 years agoUse lexical binding in ffap.el
Mattias Engdegård [Fri, 23 Oct 2020 09:11:51 +0000 (11:11 +0200)]
Use lexical binding in ffap.el

* lisp/ffap.el (ffap-search-backward-file-end): Remove binding for
variable shadowing an optional (and never used) argument.
(ffap--gopher-var-on-line): Remove unused variable.

4 years ago* lisp/emacs-lisp/pcase.el: Add "extensions" to keyword header.
Stefan Kangas [Fri, 23 Oct 2020 03:25:22 +0000 (05:25 +0200)]
* lisp/emacs-lisp/pcase.el: Add "extensions" to keyword header.

4 years agoMerge branch 'scratch/substitute-command-keys'
Stefan Kangas [Thu, 22 Oct 2020 22:33:19 +0000 (00:33 +0200)]
Merge branch 'scratch/substitute-command-keys'

4 years ago* etc/HELLO: Use JavaScript for Javanese script (bug#43887)
Juri Linkov [Thu, 22 Oct 2020 20:09:24 +0000 (23:09 +0300)]
* etc/HELLO: Use JavaScript for Javanese script (bug#43887)

4 years agoFix SVG image dimension calculations (bug#44065)
Alan Third [Mon, 19 Oct 2020 20:19:57 +0000 (21:19 +0100)]
Fix SVG image dimension calculations (bug#44065)

* src/image.c (svg_load_image): Calculate the image size by using the
viewBox size and applying it to the image.
* etc/PROBLEMS: Describe the problem with librsvg 2.45 and below.

4 years agoFix crash when no face is defined (bug#44058, bug#43973)
Alan Third [Thu, 22 Oct 2020 18:47:17 +0000 (19:47 +0100)]
Fix crash when no face is defined (bug#44058, bug#43973)

* src/nsterm.m (ns_clear_under_internal_border): If face is null,
don't try drawing anything.

4 years agoRemove incorrect use of decode-coding-string
Stefan Kangas [Thu, 22 Oct 2020 18:32:32 +0000 (20:32 +0200)]
Remove incorrect use of decode-coding-string

* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): Don't use
decode-coding-string.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.

4 years agoeww: don't add keymap to <a> without href
Andreas Schwab [Thu, 22 Oct 2020 18:07:24 +0000 (20:07 +0200)]
eww: don't add keymap to <a> without href

* lisp/net/eww.el (eww-tag-a): Only add keymap if the href
attribute is present.  (Bug#44147)

4 years agoAdd missed file needed by time-tests.el
Stefan Kangas [Thu, 22 Oct 2020 16:28:21 +0000 (18:28 +0200)]
Add missed file needed by time-tests.el

* test/lisp/time-resources/non-empty: New file.  This file is needed
by time-tests.el but was missed when it was committed.

4 years ago; * lisp/progmodes/fortran.el: Call 'eval' with lexical binding.
Mattias Engdegård [Thu, 22 Oct 2020 16:31:31 +0000 (18:31 +0200)]
; * lisp/progmodes/fortran.el: Call 'eval' with lexical binding.

4 years agoRemove useless uses of bindat-get-field
Mattias Engdegård [Thu, 22 Oct 2020 16:26:24 +0000 (18:26 +0200)]
Remove useless uses of bindat-get-field

* lisp/progmodes/gdb-mi.el (gdb-var-list-children-handler)
(gdb-edit-register-value): bindat-get-field with a single argument is
identity; remove.

4 years agoAdd tests for perl-mode.el
Stefan Kangas [Thu, 22 Oct 2020 16:23:40 +0000 (18:23 +0200)]
Add tests for perl-mode.el

* test/lisp/progmodes/perl-mode-tests.el: New file.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into master
Ulf Jasper [Thu, 22 Oct 2020 15:47:29 +0000 (17:47 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into master

4 years agoMove test data for icalendar tests to separate files.
Ulf Jasper [Thu, 22 Oct 2020 15:45:59 +0000 (17:45 +0200)]
Move test data for icalendar tests to separate files.

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--data-dir, icalendar-tests--get-file-contents):
New.
(icalendar-tests--test-import, icalendar-tests--do-test-import):
Read input and expected results from files.
(icalendar-import-non-recurring, icalendar-import-rrule)
(icalendar-import-duration, icalendar-import-bug-6766)
(icalendar-import-bug-24199, icalendar-import-bug-33277)
(icalendar-import-multiple-vcalendars, icalendar-import-with-uid)
(icalendar-import-with-timezone, icalendar-real-world): Move test
data (input and expected result) to separate files.

* test/calendar/icalendar/*
New files containing test data for icalendar tests.

4 years agoUse lexical-binding in time-date.el and expand tests
Stefan Kangas [Thu, 22 Oct 2020 14:34:11 +0000 (16:34 +0200)]
Use lexical-binding in time-date.el and expand tests

* lisp/calendar/time-date.el: Use lexical-binding.
* test/lisp/calendar/time-date-tests.el
(test-obsolete-with-decoded-time-value)
(test-obsolete-encode-time-value, test-format-seconds)
(test-days-to-time, test-seconds-to-string): New tests.
(test-days-in-month, test-time-since, test-time-decoded-period):
Expand test with a few more values.

4 years agoMake State button interaction less confusing
Mauro Aranda [Thu, 22 Oct 2020 14:55:03 +0000 (16:55 +0200)]
Make State button interaction less confusing

* lisp/cus-edit.el (custom-variable-current-value): New function.
(custom-variable-backup-value): Use it.
(custom-variable-set, custom-variable-mark-to-reset-standard): Check
that old value is different than the new one.  If it is, make a
backup.  This way, we avoid offering the Set to Backup Value
unnecesarily.
(custom-variable-reset-saved): Reset the variable-comment property for
the variable, to help custom-variable-state be more correct.  Also
check if we should backup old value.
(custom-variable-state): If a variable was set to the standard value,
say its state is standard rather than set, which is more correct.
Getting the right variable state is important for menu options to be
enabled/disabled, and for displaying the right message to the user
(bug#12864).

4 years ago; fix docstring typo in last commit
Robert Pluim [Thu, 22 Oct 2020 14:49:10 +0000 (16:49 +0200)]
; fix docstring typo in last commit

4 years agoUse HTTP instead of Tramp for the ffap rfc path (and also fix it)
Lars Ingebrigtsen [Thu, 22 Oct 2020 13:36:59 +0000 (15:36 +0200)]
Use HTTP instead of Tramp for the ffap rfc path (and also fix it)

* lisp/ffap.el (ffap-rfc-path): Use an URL instead of an FTP tramp
file, since that's more widely supported (bug#41663).

4 years agoComment JSX lines using JSX syntax
Lars Ingebrigtsen [Thu, 22 Oct 2020 13:20:04 +0000 (15:20 +0200)]
Comment JSX lines using JSX syntax

* lisp/progmodes/js.el (js-jsx--comment-region): New function
(bug#41696).
(js-jsx-mode): Use it.

4 years agoTest for error with multibyte strings in bindat.el
Stefan Kangas [Wed, 21 Oct 2020 16:23:38 +0000 (18:23 +0200)]
Test for error with multibyte strings in bindat.el

* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): New tests.

4 years agoPretty print restricted sexp values too
Mauro Aranda [Thu, 22 Oct 2020 12:30:13 +0000 (14:30 +0200)]
Pretty print restricted sexp values too

* lisp/wid-edit.el (restricted-sexp widget): Use
widget-sexp-value-to-internal to pretty print the widget's value, when
it is a valid one (bug#7524).

4 years agoRemove reference HP-UX 8.0 and 9.x bug from FAQ
Stefan Kangas [Thu, 22 Oct 2020 11:58:23 +0000 (13:58 +0200)]
Remove reference HP-UX 8.0 and 9.x bug from FAQ

* doc/misc/efaq.texi (Meta key does not work in xterm): Remove section
about a bug on HP-UX 8.0 and 9.x.  Support for these platforms were
removed in 23.1.

4 years agoRemove two references to Emacs 21 from the FAQ
Stefan Kangas [Thu, 22 Oct 2020 11:52:42 +0000 (13:52 +0200)]
Remove two references to Emacs 21 from the FAQ

* doc/misc/efaq.texi (Turning on syntax highlighting): Remove some
references to Emacs 21 and older.

4 years agoAllow moving members of editable-list widget, via delete+insert
Mauro Aranda [Thu, 22 Oct 2020 11:52:42 +0000 (13:52 +0200)]
Allow moving members of editable-list widget, via delete+insert

* etc/NEWS (Widget): Announce the feature (bug#6419).
* lisp/wid-edit.el (widget-editable-list-delete-at): Save into a new
widget property, :last-deleted, the WIDGET to be deleted.  Add
docstring.
(widget-editable-list-insert-before): If there is a recently deleted
child for the editable list, insert that one, instead of a new default
widget.  Add docstring.
(insert-button widget): Make :help-echo a function to avoid the
help-echo string become too long.
(delete-button widget): Tweak the :help-echo string, to document this
behavior.

* test/lisp/wid-edit-tests.el (widget-test-moving-editable-list-item):
Test the feature.

4 years agoHandle Cairo errors in ftcrfont_open
Pip Cet [Thu, 22 Oct 2020 11:40:34 +0000 (13:40 +0200)]
Handle Cairo errors in ftcrfont_open

* src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627).

4 years agoUse lexical binding in fortran.el
Mattias Engdegård [Thu, 22 Oct 2020 10:18:16 +0000 (12:18 +0200)]
Use lexical binding in fortran.el

* lisp/progmodes/fortran.el: Use lexical binding.
(fortran-make-syntax-propertize-function): Hoist use of lexical
variable to outside the 'eval' call.

4 years ago* lisp/progmodes/cpp.el: Use lexical binding.
Mattias Engdegård [Thu, 22 Oct 2020 09:46:09 +0000 (11:46 +0200)]
* lisp/progmodes/cpp.el: Use lexical binding.

4 years agoUpdate TUTORIAL.de
Werner Lemberg [Thu, 22 Oct 2020 05:27:45 +0000 (07:27 +0200)]
Update TUTORIAL.de

This also includes the minor fix for bug #44123.

4 years agounload-feature: Correct doc string to match info manual and reality
Štěpán Němec [Mon, 6 Apr 2020 15:05:33 +0000 (17:05 +0200)]
unload-feature: Correct doc string to match info manual and reality

'unload-feature' doesn't try to "undo any additions the library has
made" to hooks, it tries to remove functions defined by the library
from hooks, no matter how they got there.

* lisp/loadhist.el (unload-feature): Correct the doc string.
* doc/lispref/loading.texi (Unloading): Clarify, fix typo.

4 years agounload-feature: Handle local hooks (bug#5293)
Štěpán Němec [Mon, 6 Apr 2020 11:30:11 +0000 (13:30 +0200)]
unload-feature: Handle local hooks (bug#5293)

Buffer-local hooks were introduced in

1994-09-30T20:47:13+00:00!rms@gnu.org
0e4d378b32 (add-hook): Initialize default value and local value.

but 'unload-feature' has not been updated to handle them.

* lisp/loadhist.el (unload-feature): Handle local hooks (bug#5293).

4 years agounload-feature: Improve logic (don't repeat computation)
Štěpán Němec [Mon, 6 Apr 2020 11:25:41 +0000 (13:25 +0200)]
unload-feature: Improve logic (don't repeat computation)

* lisp/loadhist.el (unload-feature): Don't do the same computation twice.

4 years agoConvert artist.el to lexical binding
Mattias Engdegård [Wed, 21 Oct 2020 16:15:14 +0000 (18:15 +0200)]
Convert artist.el to lexical binding

* lisp/textmodes/artist.el (artist-system, (artist-flood-fill):
Remove binding of the obsolete variables binary-process-input,
binary-process-output and input-queue.
(artist-down-mouse-1): Fix mistyped 'echo-keystrokes'; bind it to 0.
(artist-fill-rect, artist-fill-square, artist-pen-set-arrow-points)
(artist-spray-clear-circle, artist-spray-set-radius)
(artist-draw-ellipse-with-0-height, artist-fill-ellipse)
(artist-ff-is-topmost-line, artist-ff-is-bottommost-line)
(artist-set-arrow-points-for-2points, artist-key-undraw-continously)
(artist-key-undraw-poly, artist-key-undraw-1point)
(artist-key-undraw-2points, artist-key-do-continously-1point)
(artist-key-set-point-1point, artist-shift-has-changed)
(artist-mouse-draw-continously, artist-mouse-draw-1point)
(artist-submit-bug-report): Suppress warnings about unused parameters
which are there for function signature commonality.  Remove unused
variables.

4 years ago; * lisp/emacs-lisp/bindat.el (bindat-unpack): Fix typo.
Stefan Kangas [Wed, 21 Oct 2020 15:31:47 +0000 (17:31 +0200)]
; * lisp/emacs-lisp/bindat.el (bindat-unpack): Fix typo.

4 years agoTweak two time.el tests
Stefan Kangas [Wed, 21 Oct 2020 15:21:46 +0000 (17:21 +0200)]
Tweak two time.el tests

* test/lisp/time-tests.el (time-tests-display-time-update--load)
(time-tests-display-time-update): Tweak tests.

4 years ago* lisp/time.el: Use lexical-binding.
Stefan Kangas [Wed, 21 Oct 2020 15:00:11 +0000 (17:00 +0200)]
* lisp/time.el: Use lexical-binding.

4 years agoAdd tests for time.el
Stefan Kangas [Wed, 21 Oct 2020 14:59:50 +0000 (16:59 +0200)]
Add tests for time.el

* lisp/time.el (display-time-update--load)
(display-time-update--mail): Extract from...
(display-time-update): ...here.
* test/lisp/time-tests.el: New file.

4 years agoUse lexical-binding in bindat.el
Stefan Kangas [Wed, 21 Oct 2020 14:09:12 +0000 (16:09 +0200)]
Use lexical-binding in bindat.el

* lisp/emacs-lisp/bindat.el: Use lexical-binding.
(bindat-raw, bindat-idx, bindat-unpack, bindat-pack): Adjust for
lexical-binding.
(bindat--unpack-group, bindat--length-group): Fix byte-compiler
warning about unused variables last and vlen.
(bindat--unpack-group, bindat--length-group, bindat--pack-group)
(bindat-format-vector): Quote function symbols as such.

4 years agoRemove some compat code from uudecode.el and binhex.el
Stefan Kangas [Wed, 21 Oct 2020 13:37:13 +0000 (15:37 +0200)]
Remove some compat code from uudecode.el and binhex.el

* lisp/mail/uudecode.el (uudecode-char-int): Make obsolete.
(uudecode-decode-region-internal): Adjust callers.
* lisp/mail/binhex.el (binhex-char-int): Make obsolete.
(binhex-string-big-endian, binhex-string-little-endian)
(binhex-header): Adjust callers.

4 years agoDeclare old compat aliases in tcl.el obsolete
Stefan Kangas [Wed, 21 Oct 2020 13:25:45 +0000 (15:25 +0200)]
Declare old compat aliases in tcl.el obsolete

* lisp/progmodes/tcl.el (tcl-uncomment-region)
(tcl-indent-for-comment, add-log-tcl-defun, indent-tcl-exp)
(calculate-tcl-indent, tcl-beginning-of-defun, tcl-end-of-defun)
(tcl-mark-defun, tcl-mark): Make obsolete.

4 years agoAdd some top level domains
Stefan Kangas [Wed, 21 Oct 2020 12:49:04 +0000 (14:49 +0200)]
Add some top level domains

* lisp/mail/mail-extr.el (mail-extr-all-top-level-domains): Add
some geographic domains.

4 years agoRevert "Add emoji to etc/HELLO"
Lars Ingebrigtsen [Wed, 21 Oct 2020 12:10:58 +0000 (14:10 +0200)]
Revert "Add emoji to etc/HELLO"

This reverts commit a1fcdeec25be87e8f97ac5c14e6fbf6a4d1eb2d4.

There was already an emoji in there.

4 years ago* test/lisp/vc/vc-bzr-tests.el: Use lexical-binding.
Stefan Kangas [Wed, 21 Oct 2020 11:26:57 +0000 (13:26 +0200)]
* test/lisp/vc/vc-bzr-tests.el: Use lexical-binding.

4 years agoUse lexical-binding in files-x-tests.el
Stefan Kangas [Wed, 21 Oct 2020 11:25:39 +0000 (13:25 +0200)]
Use lexical-binding in files-x-tests.el

* test/lisp/files-x-tests.el: Use lexical-binding.
(remote-null-device): Declare.

4 years agoUse lexical-binding in iso-ascii.el
Stefan Kangas [Wed, 21 Oct 2020 11:19:02 +0000 (13:19 +0200)]
Use lexical-binding in iso-ascii.el

* lisp/international/iso-ascii.el: Use lexical-binding.  Remove
redundant :group args.

4 years agoUse lexical-binding in hfy-cmap.el and add tests
Stefan Kangas [Wed, 21 Oct 2020 11:05:32 +0000 (13:05 +0200)]
Use lexical-binding in hfy-cmap.el and add tests

* lisp/hfy-cmap.el: Use lexical-binding.
(hfy-cmap--parse-buffer): Extract from...
(htmlfontify-load-rgb-file): ...here.

* test/lisp/hfy-cmap-resources/rgb.txt:
* test/lisp/hfy-cmap-tests.el: New files.

4 years agoAdd emoji to etc/HELLO
Lars Ingebrigtsen [Wed, 21 Oct 2020 10:31:12 +0000 (12:31 +0200)]
Add emoji to etc/HELLO

4 years ago* etc/HELLO: Keep Javanese System.out.println("");
Michael Albinus [Wed, 21 Oct 2020 10:24:46 +0000 (12:24 +0200)]
* etc/HELLO: Keep Javanese System.out.println("");

4 years ago* lisp/outline.el: Use lexical-binding
Stefan Monnier [Tue, 20 Oct 2020 23:00:52 +0000 (19:00 -0400)]
* lisp/outline.el: Use lexical-binding

Remove redundant `group` arguments.
(outline-level): Move before first use.
(outline-mode): Use `setq-local`.
(outline-isearch-open-invisible-function): Give it a non-nil default.

4 years ago; Fix last change to idlw-complete-structtag.el
Basil L. Contovounesios [Tue, 20 Oct 2020 19:02:29 +0000 (20:02 +0100)]
; Fix last change to idlw-complete-structtag.el

4 years agoUse lexical-binding in m4-mode.el
Stefan Kangas [Tue, 20 Oct 2020 18:14:24 +0000 (20:14 +0200)]
Use lexical-binding in m4-mode.el

* lisp/progmodes/m4-mode.el: Use lexical-binding.  Remove redundant
:group args.
* lisp/progmodes/m4-mode.el (m4-m4-buffer, m4-m4-region): Quote
function symbols as such.

4 years agoMake more load-hooks obsolete (Bug#21563)
Stefan Kangas [Tue, 20 Oct 2020 17:10:51 +0000 (19:10 +0200)]
Make more load-hooks obsolete (Bug#21563)

* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-complete-structtag.el: Recommend
with-eval-after-load instead of load-hooks.
* lisp/calc/calc-ext.el (calc-ext-load-hook):
* lisp/emacs-lisp/bytecomp.el (bytecomp-load-hook):
* lisp/emacs-lisp/cl-extra.el (cl-extra-load-hook):
* lisp/emacs-lisp/cl-macs.el (cl-macs-load-hook):
* lisp/emacs-lisp/cl-seq.el (cl-seq-load-hook):
* lisp/gnus/message.el (message-load-hook):
* lisp/gnus/nnheader.el (nnheader-load-hook):
* lisp/gnus/nnmail.el (nnmail-load-hook):
* lisp/progmodes/dcl-mode.el (dcl-mode-load-hook):
* lisp/textmodes/tex-mode.el (tex-mode-load-hook):
* lisp/whitespace.el (whitespace-load-hook): Obsolete for
with-eval-after-load.  Note that these variables are never declared,
but the byte-compiler will still warn about them if used.

4 years agobyte-compile-file: Make optional LOAD argument obsolete
Stefan Kangas [Mon, 21 Sep 2020 22:16:22 +0000 (00:16 +0200)]
byte-compile-file: Make optional LOAD argument obsolete

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Declare optional
LOAD argument obsolete.  Adjust callers.  (Bug#38072)
(byte-recompile-file): Declare optional LOAD argument obsolete.
* doc/lispref/compile.texi (Compilation Functions): Update
documentation to reflect above obsoletion.
* etc/NEWS: Announce above obsoletion.

4 years agoSimplify regexp in last change to woman.el
Basil L. Contovounesios [Tue, 20 Oct 2020 16:35:29 +0000 (17:35 +0100)]
Simplify regexp in last change to woman.el

* lisp/woman.el (woman-decode-region): Use simpler character
alternative instead of alternation.

4 years agoSimplify syntax of shortdoc face specs
Basil L. Contovounesios [Tue, 20 Oct 2020 16:28:26 +0000 (17:28 +0100)]
Simplify syntax of shortdoc face specs

* lisp/emacs-lisp/shortdoc.el: Remove unused dependency.
(shortdoc-section, shortdoc-example): Use newer (DISPLAY . PLIST)
face spec syntax.

4 years agoTweak test data for signed package installation
Stefan Kangas [Tue, 20 Oct 2020 16:26:38 +0000 (18:26 +0200)]
Tweak test data for signed package installation

* test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el:
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el:
Use lexical-binding.
* test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh:
New file.
* test/lisp/emacs-lisp/package-resources/key.pub:
* test/lisp/emacs-lisp/package-resources/key.sec: Add new key.
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig:
* test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig:
Update signatures using new key.

4 years ago* lisp/textmodes/picture.el: Use lexical binding.
Mattias Engdegård [Tue, 20 Oct 2020 15:27:31 +0000 (17:27 +0200)]
* lisp/textmodes/picture.el: Use lexical binding.

4 years agoAvoid assertion violations in malformed Unicode escapes
Eli Zaretskii [Tue, 20 Oct 2020 15:27:47 +0000 (18:27 +0300)]
Avoid assertion violations in malformed Unicode escapes

* src/lread.c (read_escape): Produce better diagnostic for
malformed \u Unicode escapes, while avoiding assertion violation
when READCHAR returns -1 because the input is exhausted.
(Bug#44084)

4 years ago* lisp/language/utf-8-lang.el: Use lexical-binding.
Stefan Kangas [Tue, 20 Oct 2020 13:41:04 +0000 (15:41 +0200)]
* lisp/language/utf-8-lang.el: Use lexical-binding.

4 years ago; * etc/tutorials/TUTORIAL.fr: Fix typo.
Bastien Guerry [Tue, 20 Oct 2020 13:01:02 +0000 (15:01 +0200)]
; * etc/tutorials/TUTORIAL.fr: Fix typo.

4 years agoTweak the documentation for define-obsolete-variable-alias
Lars Ingebrigtsen [Tue, 20 Oct 2020 11:28:29 +0000 (13:28 +0200)]
Tweak the documentation for define-obsolete-variable-alias

* doc/lispref/variables.texi (Variable Aliases): Actually describe
the macro parameters (bug#44088).

* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias):
Ditto (bug#44088).

4 years agoFix some mpc.el updating quirks
Masahiro Nakamura [Tue, 20 Oct 2020 11:20:48 +0000 (13:20 +0200)]
Fix some mpc.el updating quirks

* lisp/mpc.el (mpc-songs-jump-to): Update the status buffer.

* lisp/mpc.el (mpc-stop): M-x mpc-stop clears playlist queue. So
updating *MPC-Songs* buffer is useful.

* lisp/mpc.el (mpc-cmd-delete): I noticed M-x mpc-playlist-delete
always messages “Deleted 1 songs” even if playlist queue has more
than one songs.  This is because mpc-cmd-delete’s sort modifies
songs-poss by side effect.  Using copy-sequence fixes this (bug#44093).
* lisp/mpc.el (mpc-cmd-move): Ditto.

4 years agoMan highlighting: Don't occasionally bold entire sections.
Jim Blandy [Tue, 20 Oct 2020 11:09:16 +0000 (13:09 +0200)]
Man highlighting: Don't occasionally bold entire sections.

* lisp/ansi-color.el (ansi-color-apply-on-region): Always save a
restart position in ansi-color-context-region if the region ends with
highlighting active.

4 years agoPreserve all `eval' elements from both .dir-locals files
Lars Ingebrigtsen [Tue, 20 Oct 2020 11:07:25 +0000 (13:07 +0200)]
Preserve all `eval' elements from both .dir-locals files

* lisp/files.el (dir-locals-read-from-dir): Preserve all `eval'
elements from both .dir-locals files (bug#44066).

4 years ago* lisp/image-file.el: Use lexical-binding.
Stefan Kangas [Tue, 20 Oct 2020 01:21:16 +0000 (03:21 +0200)]
* lisp/image-file.el: Use lexical-binding.

4 years agoMake a bookmark test more robust
Stefan Kangas [Tue, 20 Oct 2020 01:14:36 +0000 (03:14 +0200)]
Make a bookmark test more robust

* test/lisp/bookmark-tests.el (bookmark-tests-insert-annotation):
Make test more robust by not being timing dependent.

4 years ago; Fix last change in modus-themes.texi
Basil L. Contovounesios [Mon, 19 Oct 2020 20:12:04 +0000 (21:12 +0100)]
; Fix last change in modus-themes.texi

* doc/misc/modus-themes.texi (How do the themes look like): Update
xref with new spelling.

4 years agoAdd command package-menu-filter-upgradable
Stefan Kangas [Mon, 19 Oct 2020 18:30:52 +0000 (20:30 +0200)]
Add command package-menu-filter-upgradable

* lisp/emacs-lisp/package.el (package-menu-filter-upgradable):
New command.  (Bug#41436)
(package-menu-mode-map): Bind the new command.
* doc/emacs/package.texi (Package Menu): Document the new command.

4 years ago* lisp/progmodes/python.el: Bump version to release the f-string support
Stefan Monnier [Mon, 19 Oct 2020 17:39:42 +0000 (13:39 -0400)]
* lisp/progmodes/python.el: Bump version to release the f-string support

4 years ago* lisp/mail/rfc2231.el (rfc2231-decode-encoded-string): Fix match data error
Stefan Monnier [Mon, 19 Oct 2020 17:03:41 +0000 (13:03 -0400)]
* lisp/mail/rfc2231.el (rfc2231-decode-encoded-string): Fix match data error

Get (match-string 3 string) earlier, in case `mm-charset-to-coding-system`
clobbers the match data.
Also, check that `string-match` succeeded before using its match data.

4 years agoFix documentation of the Modus Themes (Bug#43944)
Protesilaos Stavrou [Mon, 19 Oct 2020 12:48:10 +0000 (15:48 +0300)]
Fix documentation of the Modus Themes (Bug#43944)

* doc/misc/modus-themes.texi (Installation): Remove reference to MELPA.
(Top)
(Install from the archives, GNU Guix)
(Load at a given time or at sunset/sunrise)
(Configure options prior to loading, Command prompts)
(Headings' font, Will NOT be supported): Fix spelling, wording,
markup.
(Acknowledgements): Spell contributor's surname correctly.

4 years agoMake auto-revert-mode tests run faster
Stefan Kangas [Sat, 12 Sep 2020 17:49:20 +0000 (19:49 +0200)]
Make auto-revert-mode tests run faster

* test/lisp/autorevert-tests.el (auto-revert--timeout): Make into
defun and shorten timeout by a factor 10.
(auto-revert--wait-for-revert): Cut timeouts in half.
(with-auto-revert-test): New macro to set timeout to 0.1.
(auto-revert-tests--write-file): New defun.
(auto-revert-test00-auto-revert-mode)
(auto-revert-test01-auto-revert-several-files)
(auto-revert-test02-auto-revert-deleted-file)
(auto-revert-test03-auto-revert-tail-mode)
(auto-revert-test04-auto-revert-mode-dired)
(auto-revert-test05-global-notify)
(auto-revert-test06-write-file): Adapt test to run faster.  Remove
:expensive-test marks.

This was discussed in:
https://lists.gnu.org/r/emacs-devel/2020-10/msg01233.html

4 years agoFurther clarification of directory-files* doc
Michael Albinus [Mon, 19 Oct 2020 11:31:33 +0000 (13:31 +0200)]
Further clarification of directory-files* doc

* doc/lispref/files.texi (Contents of Directories):
Precise description of MATCH-REGEXP of directory-files.  Add
directory-files-no-dot-files-regexp.

* lisp/files.el (directory-files-no-dot-files-regexp): Revert last fix.

* src/dired.c (Fdirectory_files)
(Fdirectory_files_and_attributes): Fix wording in docstring.

4 years agoKeep track of matching rules in compilation-mode
Mattias Engdegård [Mon, 19 Oct 2020 10:14:37 +0000 (12:14 +0200)]
Keep track of matching rules in compilation-mode

When matching messages in compilation-mode, keep track of the rule
employed for each match.  This facilitates debugging and allows us to
verify that each test case really exercises the rule that we expect it
to.

Naturally this uncovered several test cases that didn't check what the
author thought they did; the rules affixed to
compile-tests--test-regexps-data are those actually used, so that the
tests still pass.

* lisp/progmodes/compile.el (compilation--message): Add 'rule' slot.
(compilation-directory-properties, compilation-error-properties)
(compilation-internal-error-properties, compilation-parse-errors)
(compilation--compat-parse-errors): Set the rule slot.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-tests--grep-regexp-testcases)
(compile-tests--grep-regexp-tricky-testcases): Add rules to test cases.
(compile--test-error-line): Check that the rule matches what we expect.
(compile-test-grep-regexps): Adapt to test case format.
Remove now superfluous ert-info.

4 years agoHoist some loop-invariant variable bindings in compile.el
Mattias Engdegård [Mon, 19 Oct 2020 10:39:51 +0000 (12:39 +0200)]
Hoist some loop-invariant variable bindings in compile.el

* lisp/progmodes/compile.el (compilation-parse-errors):
Hoist the binding of case-fold-search and a memq call out of
the loop, eliminating a minor but unnecessary quadratic term.

4 years ago* lisp/info.el: Remove redundant :group args.
Stefan Kangas [Mon, 19 Oct 2020 10:18:40 +0000 (12:18 +0200)]
* lisp/info.el: Remove redundant :group args.

4 years agoImprove Info-streamline-headings defaults
Stefan Kangas [Mon, 19 Oct 2020 10:12:15 +0000 (12:12 +0200)]
Improve Info-streamline-headings defaults

* lisp/info.el (Info-streamline-headings): Improve defaults.  These
produce somewhat more consistent results on my system, and seems
slightly more in line with current GNU practices.  For example, gcc
uses the "Software development" heading instead of "Programming".

4 years ago`ffap-gopher-at-point' interminable without newlines
dickmao [Mon, 19 Oct 2020 09:56:36 +0000 (11:56 +0200)]
`ffap-gopher-at-point' interminable without newlines

* lisp/ffap.el (ffap-gopher-at-point): Stop when we get to the end
of the buffer.
* test/lisp/ffap-tests.el (ffap-test-no-newlines): Ensure
termination for corner case (bug#44048).

4 years agoExplain difference between Unicode and Emacs scripts
Robert Pluim [Mon, 19 Oct 2020 09:34:38 +0000 (11:34 +0200)]
Explain difference between Unicode and Emacs scripts

* nonascii.texi (Character Properties): Document that Emacs'
scripts and Unicode's scripts do not necessarily correspond.

4 years agocperl-mode: Delete a misleading comment, add tests for verification
Harald Jörg [Mon, 19 Oct 2020 08:57:57 +0000 (10:57 +0200)]
cperl-mode: Delete a misleading comment, add tests for verification

* lisp/progmodes/cperl-mode.el: Delete a comment which explains a
bug which has been fixed a long time ago (bug#44073).
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-fontify-punct-vars): Add regression tests to verify
that fontification of punctuation variables doesn't start strings.

4 years agoHandle "Before first headings" error in outline-cycle
Yuan Fu [Mon, 19 Oct 2020 08:45:14 +0000 (10:45 +0200)]
Handle "Before first headings" error in outline-cycle

* lisp/outline.el (outline-before-first-heading): New error.
(outline-back-to-heading): Signal the new error.
(outline-cycle): Ignore the error.
(outline-cycle-buffer): Simply pass 1 to 'outline-hide-sublevels'
(bug#41130).

4 years agoFfunction doc string clarification
Lars Ingebrigtsen [Mon, 19 Oct 2020 08:24:57 +0000 (10:24 +0200)]
Ffunction doc string clarification

* src/eval.c (Ffunction): Mention that `function' isn't quite like
`quote' in non-bytecompile circumstances, too (bug#41864).

4 years ago* src/dired.c (Fdirectory_files, Fdirectory_files_and_attributes):
Michael Albinus [Mon, 19 Oct 2020 07:48:51 +0000 (09:48 +0200)]
* src/dired.c (Fdirectory_files, Fdirectory_files_and_attributes):

Adapt docstring.

4 years ago* lisp/files.el (directory-files-no-dot-files-regexp): Adapt docstring.
Michael Albinus [Mon, 19 Oct 2020 07:41:11 +0000 (09:41 +0200)]
* lisp/files.el (directory-files-no-dot-files-regexp): Adapt docstring.

4 years ago; * admin/MAINTAINERS: Add entry for Michael Albinus.
Michael Albinus [Mon, 19 Oct 2020 07:41:01 +0000 (09:41 +0200)]
; * admin/MAINTAINERS: Add entry for Michael Albinus.

4 years ago; * etc/NEWS: Some copy edits.
Stefan Kangas [Mon, 19 Oct 2020 02:03:34 +0000 (04:03 +0200)]
; * etc/NEWS: Some copy edits.

4 years agoAdd new choice 'keep' to next-error-message-highlight (bug#32676)
Juri Linkov [Sun, 18 Oct 2020 20:37:57 +0000 (23:37 +0300)]
Add new choice 'keep' to next-error-message-highlight (bug#32676)

* lisp/simple.el (next-error-message-highlight): Add new choice 'keep'.
(next-error-message-highlight): Don't delete overlay when option is 'keep'.

4 years ago* etc/HELLO: Add Belarusian and use Javanese script for Javanese (bug#43887)
Juri Linkov [Sun, 18 Oct 2020 20:30:15 +0000 (23:30 +0300)]
* etc/HELLO: Add Belarusian and use Javanese script for Javanese (bug#43887)

4 years agoAdd "Old-" prefix to "Version" header in more cases
Stefan Kangas [Tue, 8 Sep 2020 14:12:43 +0000 (16:12 +0200)]
Add "Old-" prefix to "Version" header in more cases

These version numbers are historical accidents and not relevant today.
Ref: https://lists.gnu.org/r/emacs-devel/2020-03/msg00080.html

4 years agoPrefer Lisp version of describer in help--describe-vector
Stefan Kangas [Sun, 18 Oct 2020 14:49:55 +0000 (16:49 +0200)]
Prefer Lisp version of describer in help--describe-vector

* src/keymap.c (Fhelp__describe_vector):
* lisp/help.el (describe-map): Use Lisp versions of describe_command
and describe_translation.
* src/keymap.c (describe_command, describe_translation): Remove.
(describe_vector_basic): New function.

4 years agoRemove C version of substitute-command-keys
Stefan Kangas [Sun, 18 Oct 2020 13:19:09 +0000 (15:19 +0200)]
Remove C version of substitute-command-keys

* src/doc.c (Fsubstitute_command_keys_old): Remove.
(syms_of_doc): Remove defsubr for Fsubstitute_command_keys_old.
* src/keymap.c (describe_map, describe_map_tree)
(describe_map_compare, describe_map_elt): Remove.
* src/keymap.h: Remove 'describe_map_tree'.
* test/lisp/help-tests.el (with-substitute-command-keys-test)
(help-tests-substitute-command-keys/compare)
(help-tests-substitute-command-keys/compare-all):
Don't test the C version of 'substitute-command-keys' removed
above.

4 years agoPrefer Lisp version of describe-map-tree
Stefan Kangas [Sun, 18 Oct 2020 13:32:22 +0000 (15:32 +0200)]
Prefer Lisp version of describe-map-tree

This is a prerequisite to remove the old C functions, and gives a
measured 3 ms slowdown on my machine, from 0.27s to 0.30s per call to
describe-buffer-bindings (average over 50 calls).

* src/keymap.c (Fdescribe_buffer_bindings): Call Lisp function
describe-map-tree instead of C function describe_map_tree.

4 years agoImprove substitute-command-keys performance
Stefan Kangas [Sat, 17 Oct 2020 22:02:55 +0000 (00:02 +0200)]
Improve substitute-command-keys performance

The previous conversion of describe_vector from C to Lisp for the
keymap and char table case lead to an unacceptable performance hit.
Moving back to the C version, as we do here, makes this function
around 50 times faster.

The Lisp version of `substitute-command-keys' was benchmarked using
the form `(documentation 'dired-mode)', which now takes less than 8 ms
on my machine.  This is around 16 times slower than the previous C
version.

Thanks to Stefan Monnier for helpful pointers on benchmarking.

* src/keymap.c (Fhelp__describe_vector): New defun to expose
describe_vector to Lisp for keymaps and char tables.
(syms_of_keymap): New defsubr for Fhelp__describe_vector.
* lisp/help.el (describe-map): Use above defun instead of Lisp
version.
(help--describe-vector): Remove defun; keep it commented out for now.

4 years agoTranslate describe_vector to Lisp
Stefan Kangas [Sun, 23 Aug 2020 15:20:09 +0000 (17:20 +0200)]
Translate describe_vector to Lisp

* lisp/help.el (help--describe-vector): New Lisp implementation of
describe_vector.
* src/keymap.c (Fdescribe_vector_internal): Remove defun.
(syms_of_keymap): Remove defsubr for Fdescribe_vector_internal.

4 years agoTranslate describe_map to Lisp
Stefan Kangas [Wed, 19 Aug 2020 10:49:39 +0000 (12:49 +0200)]
Translate describe_map to Lisp

Third step in converting substitute-command-keys to Lisp.

* lisp/help.el (describe-map): New Lisp version of describe_map.
(help--describe-map-compare, help--describe-translation)
(help--describe-command, help--shadow-lookup): New helper
functions for describe-map.
(help--keymaps-seen, help--previous-description-column): New
variables.
* src/keymap.c
(Fkeymap__get_keyelt): New defun to expose get_keyelt to Lisp.
(Fdescribe_map_tree_old, Fdescribe_map): Remove defuns.
(Fdescribe_vector_internal): New defun to expose describe_vector to
Lisp in a way usable by describe-map.
(syms_of_keymap): New defsubrs for Fkeymap__get_keyelt and
Fdescribe_vector_internal.  Remove defsubrs for Fdescribe_map_tree_old
and Fdescribe_map.  Remove 'help--keymaps-seen'.

* test/lisp/help-tests.el
(help-tests-substitute-command-keys/shadow): Extend test.
(help-tests-substitute-command-keys/test-mode)
(help-tests-substitute-command-keys/compare-all)
(help-tests-describe-map-tree/no-menu-t)
(help-tests-describe-map-tree/no-menu-nil)
(help-tests-describe-map-tree/mention-shadow-t)
(help-tests-describe-map-tree/mention-shadow-nil)
(help-tests-describe-map-tree/partial-t)
(help-tests-describe-map-tree/partial-nil): New tests.

4 years agoTranslate describe_map_tree to Lisp
Stefan Kangas [Sat, 17 Oct 2020 18:55:04 +0000 (20:55 +0200)]
Translate describe_map_tree to Lisp

This is the second step in converting substitute-command-keys to Lisp.

* lisp/help.el (describe-map-tree): New Lisp version of
describe_map_tree.
(substitute-command-keys): Update to use above function.
* src/keymap.c (Fdescribe_map): New defun to expose describe_map to
Lisp.
* src/keymap.c (syms_of_keymap): New variable 'help--keymaps-seen'; a
temporary kludge planned for removal.  New defsubr for Fdescribe_map.

4 years agoAdd new Lisp implementation of substitute-command-keys
Stefan Kangas [Mon, 8 Jul 2019 16:37:50 +0000 (18:37 +0200)]
Add new Lisp implementation of substitute-command-keys

This is only the first step towards a full Lisp implementation, and
does not remove the old C code.  On the contrary, it is partly based
on using the old C code, which is to be replaced in steps.  This also
makes it easy to test that it produces the same output as the old.

* src/doc.c (Fsubstitute_command_keys_old): Rename from
Fsubstitute_command_keys.
(Fget_quoting_style): New defun to expose text_quoting_style to Lisp.
(syms_of_doc): Expose above symbols.
* lisp/help.el (substitute-command-keys): New Lisp version of
substitute-command-keys.  (Bug#8951)

* src/keymap.c
(Fdescribe_map_tree): New defun to expose describe_map_tree to Lisp.
(syms_of_keymap): New defsubr for Fdescribe_map_tree.

* src/keyboard.c (help_echo_substitute_command_keys):
* src/doc.c (Fdocumentation, Fdocumentation_property):
* src/print.c (print_error_message):
* src/syntax.c (Finternal_describe_syntax_value): Fix calls to use new
Lisp implementation of substitute-command-keys.

* test/src/doc-tests.el: Remove file.
* test/lisp/help-tests.el: Add tests for substitute-command-keys
copied from above file.

4 years ago; * etc/NEWS: Call out the new variable 'shr-offer-extend-specpdl'.
Eli Zaretskii [Sun, 18 Oct 2020 14:40:45 +0000 (17:40 +0300)]
; * etc/NEWS: Call out the new variable 'shr-offer-extend-specpdl'.

4 years agoStrengthen js-mode indentation tests
Mattias Engdegård [Sun, 18 Oct 2020 13:54:02 +0000 (15:54 +0200)]
Strengthen js-mode indentation tests

Test not only that the indentation engine is idempotent but that it
will indent a file to the expected shape from scratch.

* test/lisp/progmodes/js-tests.el (js-tests--remove-indentation): New.
(js-deftest-indent): Extend test.

4 years agoFix a misleading comment in Freplace_match
Lars Ingebrigtsen [Sun, 18 Oct 2020 08:18:57 +0000 (10:18 +0200)]
Fix a misleading comment in Freplace_match

* src/search.c (Freplace_match): Fix a misleading comment
(bug#42424).