]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago* Move context output computation in `comp-spill-lap-function'
Andrea Corallo [Sat, 10 Oct 2020 19:16:40 +0000 (21:16 +0200)]
* Move context output computation in `comp-spill-lap-function'

* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Move
output filename computation here.
(native-compile): From here.

4 years agoFix some compilation warnings in non nativecomp build (bug#43892)
Brian Leung [Mon, 12 Oct 2020 18:55:38 +0000 (18:55 +0000)]
Fix some compilation warnings in non nativecomp build (bug#43892)

* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
Declare function.
* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
variable.
* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
Declare function.
* lisp/files.el (comp-eln-to-el-h): Declare variable.
* lisp/help.el (subr-native-lambda-list): Declare function.

4 years agoRevert "Fix some compilation warnings in non nativecomp build (bug#43892)"
Andrea Corallo [Mon, 12 Oct 2020 19:25:00 +0000 (21:25 +0200)]
Revert "Fix some compilation warnings in non nativecomp build (bug#43892)"

This reverts commit 6606ec8e313bf48a1ac7b63c52bfeb64c4257107.

4 years agoFix some compilation warnings in non nativecomp build (bug#43892)
Andrea Corallo [Mon, 12 Oct 2020 18:55:38 +0000 (18:55 +0000)]
Fix some compilation warnings in non nativecomp build (bug#43892)

* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
Declare function.
* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
variable.
* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
Declare function.
* lisp/files.el (comp-eln-to-el-h): Declare variable.
* lisp/help.el (subr-native-lambda-list): Declare function.

4 years ago* lisp/help.el (help-function-arglist): Fix non nativecomp builds (bug#43914)
Andrea Corallo [Sat, 10 Oct 2020 19:30:04 +0000 (21:30 +0200)]
* lisp/help.el (help-function-arglist): Fix non nativecomp builds (bug#43914)

4 years ago* As edges are indexed store them in an hash table
Andrea Corallo [Sun, 27 Sep 2020 21:43:35 +0000 (23:43 +0200)]
* As edges are indexed store them in an hash table

* lisp/emacs-lisp/comp.el (comp-edge): Update doc for 'number'
slot.
(comp-func): Rename 'edges' slot into 'edges-h'.
(comp-log-edges): Update logic for edges in an hash table.
(comp-clean-ssa, comp-compute-edges): Likewise.

4 years ago* Add into phi l-value args basic block names
Andrea Corallo [Sun, 27 Sep 2020 21:24:24 +0000 (23:24 +0200)]
* Add into phi l-value args basic block names

* lisp/emacs-lisp/comp.el (comp-ssa-rename-insn): Clean-up a
leftover space.
(comp-finalize-phis): Cons the blasic block name providing the
mvar together with the mvar itself while forming the phi.
(comp-fwprop-insn): Destructure correctly the phi.

4 years agoProvide feature nativecomp and make use of it
Andrea Corallo [Sat, 10 Oct 2020 16:18:09 +0000 (18:18 +0200)]
Provide feature nativecomp and make use of it

* lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Use
`featurep' to identify if the native compiler is available.
* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
* lisp/emacs-lisp/package.el (package--delete-directory): Likewise.
* lisp/loadup.el: Likewise.
* src/comp.c (syms_of_comp): Provide feature nativecomp.

4 years ago* lisp/emacs-lisp/comp.el (comp-func): Fix doc for blocks slot.
Andrea Corallo [Sat, 10 Oct 2020 15:54:27 +0000 (17:54 +0200)]
* lisp/emacs-lisp/comp.el (comp-func): Fix doc for blocks slot.

4 years ago* Fix LIMPLE latch block name coloring in "*Native-compile-Log*"
Andrea Corallo [Sat, 10 Oct 2020 12:31:03 +0000 (14:31 +0200)]
* Fix LIMPLE latch block name coloring in "*Native-compile-Log*"

* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Fix
latch block name coloring.

4 years agoVarious typo fixes in native compiler related files
Brian Leung [Sat, 10 Oct 2020 09:06:56 +0000 (09:06 +0000)]
Various typo fixes in native compiler related files

* lisp/emacs-lisp/comp.el (native-compiler-error-dyn-func)
(comp-func, comp-func-l)
(comp-func-d, comp-ensure-native-compiler, comp-type-hint-p)
(comp-func-unique-in-cu-p, comp-alloc-class-to-container)
(comp-limple-mode, comp-loop-insn-in-block)
(comp-lex-byte-func-p, comp-c-func-name, comp-decrypt-arg-list)
(comp-spill-lap-function, comp-intern-func-in-ctxt)
(comp-spill-lap-function, comp-spill-lap, comp-emit-handler)
(comp-prepare-args-for-top-level): Various typo fixes.
* src/comp.c (Fcomp_el_to_eln_filename): Fix typo in error
message.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sat, 10 Oct 2020 09:00:35 +0000 (11:00 +0200)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)
Andrea Corallo [Sat, 10 Oct 2020 08:15:21 +0000 (10:15 +0200)]
* Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)

* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Try to create
the eln-cache dir if this is not existing, if fails to do that
move on to the next one.

4 years ago* Fix typo name plus make error homogeneous in `comp-trampoline-compile'
Andrew Whatson [Sat, 10 Oct 2020 08:13:26 +0000 (10:13 +0200)]
* Fix typo name plus make error homogeneous in `comp-trampoline-compile'

* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix typo
renaming `comp-tampoline-compile' -> `comp-trampoline-compile'.
Change error to be consistent.
(comp-subr-trampoline-install): Use `comp-trampoline-compile'.

4 years agoAdd Euro Sign to Latin language input methods
Eli Zaretskii [Fri, 9 Oct 2020 14:28:24 +0000 (17:28 +0300)]
Add Euro Sign to Latin language input methods

* lisp/leim/quail/latin-post.el ("danish-postfix")
("finnish-postfix", "french-postfix", "german-postfix")
("icelandic-postfix", "italian-postfix", "norwegian-postfix")
("scandinavian-postfix", "spanish-postfix", "swedish-postfix"):
Add "E=" for the Euro Sign.  (Bug#43866)

4 years ago; shorten https://lists.gnu.org/archive/html/... links
Stefan Kangas [Fri, 9 Oct 2020 10:23:02 +0000 (12:23 +0200)]
; shorten https://lists.gnu.org/archive/html/... links

4 years ago; Fix typos
Stefan Kangas [Fri, 9 Oct 2020 09:51:32 +0000 (11:51 +0200)]
; Fix typos

4 years agoCalc: fix arithmetic right shift sign bit detection
Mattias Engdegård [Fri, 9 Oct 2020 09:12:53 +0000 (11:12 +0200)]
Calc: fix arithmetic right shift sign bit detection

Arithmetic right shift didn't compute the bit to shift in correctly.
For example, #x600000000 right-shifted 8 steps (with 32 bit word size)
resulted in #xff000000 rather than 0. (Bug#43764)

* lisp/calc/calc-bin.el (calcFunc-ash): Fix condition.
* test/lisp/calc/calc-tests.el (calc-tests--clip, calc-tests--lsh)
(calc-tests--rsh, calc-tests--ash, calc-tests--rash, calc-tests--rot):
New.
(calc-shift-binary): New test.

4 years agoMatch OpenBSD doas password prompt in comint
Nick Gasson [Fri, 9 Oct 2020 04:57:07 +0000 (06:57 +0200)]
Match OpenBSD doas password prompt in comint

* lisp/comint.el (comint-password-prompt-regexp): match OpenBSD doas
password prompt. OpenBSD 5.8 replaced sudo with doas in the base
install.

* test/lisp/comint-tests.el (comint-testsuite-password-strings): test
that the doas password prompt is matched (bug#43846).

Copyright-paperwork-exempt: yes

4 years agomessage-signature doc fix
Lars Ingebrigtsen [Fri, 9 Oct 2020 04:48:51 +0000 (06:48 +0200)]
message-signature doc fix

* lisp/gnus/message.el (message-signature): Mention
message-signature-insert-empty-line (bug#43853).

4 years agoClarify define-minor-mode hooks
Lars Ingebrigtsen [Fri, 9 Oct 2020 04:36:53 +0000 (06:36 +0200)]
Clarify define-minor-mode hooks

* doc/lispref/modes.texi (Defining Minor Modes): Note that the
code (and the hook) is run both when the mode is enabled and
disabled (bug#43868).

4 years agoRevert "Don't eagerly store articles in the Agent by default"
Lars Ingebrigtsen [Fri, 9 Oct 2020 04:26:17 +0000 (06:26 +0200)]
Revert "Don't eagerly store articles in the Agent by default"

This reverts commit def34a20766ea5179afd5e5ed090a2b86fcccb5e.

This made storing articles in the Agent very slow.

4 years agoOnly skip directories in lgrep, not the other grep commands
Lars Ingebrigtsen [Fri, 9 Oct 2020 04:15:02 +0000 (06:15 +0200)]
Only skip directories in lgrep, not the other grep commands

* lisp/progmodes/grep.el (lgrep): Do the directory ignores here
(bug#23590).
(grep-compute-defaults): ... instead of here, because this would
affect all grep commands, not just lgrep.

4 years agoCC Mode: Move the handling of keyword auto into type handling for C++.
Alan Mackenzie [Thu, 8 Oct 2020 16:49:49 +0000 (16:49 +0000)]
CC Mode: Move the handling of keyword auto into type handling for C++.

This should allow auto, const, static, ... to be in any order.

* lisp/progmodes/cc-engine.el (c-forward-type): New return value 'no-id for
when auto precludes the parsing of a type identifier.  Adapt processing for
this.
(c-forward-decl-or-cast-1): Use the new facility from c-forward-type.

* lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): Insert the value
of c-no-type-kwds into the value.
(c-no-type-kwds, c-no-type-key): New lang consts/vars, basically "auto".
(c-typeless-decl-kwds, c-modifier-kwds): Remove "auto" from the C++ value.

4 years ago* src/ftcrfont.c (ftcrfont_open): Initialize the `max_width` field
Stefan Monnier [Thu, 8 Oct 2020 13:49:20 +0000 (09:49 -0400)]
* src/ftcrfont.c (ftcrfont_open): Initialize the `max_width` field

On a 32bit build, Emacs can otherwise crash with a !FIXNUM_OVERFLOW_P
assertion in `Ffont_info` by simply doing `emacs -Q` and then `C-s`.

* src/font.c: Try and detect uninitialized `max_width` fields.
(font_make_object): Set max_width to a silly value.
(Ffont_info): Check the value is not silly any more.

4 years ago* lisp/doc-view.el: Fix "can't resize root window" error
Stefan Monnier [Wed, 7 Oct 2020 14:51:35 +0000 (10:51 -0400)]
* lisp/doc-view.el: Fix "can't resize root window" error

(doc-view-fit-window-to-page): Change approach to detect when the
frame needs to be resized.

4 years agoMention two more functions in the commentary
Dmitry Gutov [Mon, 5 Oct 2020 00:02:10 +0000 (03:02 +0300)]
Mention two more functions in the commentary

* lisp/progmodes/project.el:
Mention two more functions in the commentary (bug#43595).

4 years ago* Fix failure when eln-cache is removed (introduced by 4a1bb46260)
Andrea Corallo [Wed, 7 Oct 2020 21:38:00 +0000 (23:38 +0200)]
* Fix failure when eln-cache is removed (introduced by 4a1bb46260)

* src/comp.c (make_directory_wrapper, make_directory_wrapper_1):
New functions.
(Fcomp_el_to_eln_filename): If base_dir is not
specified and we are searching across `comp-load-path' try to
create a directory if does not exists.

4 years ago* Fix some nits in comp.el
Andrea Corallo [Wed, 7 Oct 2020 18:43:00 +0000 (20:43 +0200)]
* Fix some nits in comp.el

* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Use
`cl-defmethod' where correct in place of `cl-defgeneric'.
(comp-tampoline-compile): Add missing #.

4 years agoImprove documentation of 'isearch-group-N' faces
Eli Zaretskii [Wed, 7 Oct 2020 09:12:06 +0000 (12:12 +0300)]
Improve documentation of 'isearch-group-N' faces

* etc/NEWS:
* doc/emacs/search.texi (Search Customizations): Improve and
clarify the wording of the 'isearch-group-N' faces description.

* lisp/isearch.el (search-highlight-submatches): Doc fix.

4 years agoFix last change in frame.el.
Eli Zaretskii [Wed, 7 Oct 2020 08:35:59 +0000 (11:35 +0300)]
Fix last change in frame.el.

* lisp/frame.el (frame-set-background-mode): Fix last change: yet
another place where FRAME was not taken into account, using the
selected frame instead.  (Bug#43837)

4 years agoFix face recalculation when frame's background mode changes
Eli Zaretskii [Wed, 7 Oct 2020 07:02:20 +0000 (10:02 +0300)]
Fix face recalculation when frame's background mode changes

* lisp/frame.el (frame-set-background-mode): Use the FRAME
argument instead of the selected frame, when calling
'face-spec-match-p'.  (Bug#43837)

4 years ago* Do use echo area for async compilation started/finished messages
Andrea Corallo [Wed, 7 Oct 2020 05:41:00 +0000 (07:41 +0200)]
* Do use echo area for async compilation started/finished messages

* lisp/emacs-lisp/comp.el (comp-run-async-workers)
(native-compile-async): Do not write into the echo area.

4 years ago* Better libgccjit related error messaging during configure
Andrea Corallo [Wed, 7 Oct 2020 06:40:00 +0000 (08:40 +0200)]
* Better libgccjit related error messaging during configure

* configure.ac: Distinguish the case when libgccjit is missing,
its headers are missing, or libgccjit is broken.  Message the user
based on that.

4 years agoRemove mention of the obsolete cust-print.el from the manual
Lars Ingebrigtsen [Wed, 7 Oct 2020 04:42:05 +0000 (06:42 +0200)]
Remove mention of the obsolete cust-print.el from the manual

* doc/lispref/edebug.texi (Printing in Edebug): Remove mention of
the obsolete cust-print.el (bug#37956) and adjust the text a bit.

4 years agoUpdate documentation on this-command-keys to reflect new behavior
Lars Ingebrigtsen [Wed, 7 Oct 2020 04:09:18 +0000 (06:09 +0200)]
Update documentation on this-command-keys to reflect new behavior

* doc/lispref/commands.texi (Command Loop Info):
`this-command-keys' does not include the C-u any more, so remove
that from the description and the example
(bug#22107).

* src/keyboard.c (Fthis_single_command_keys): Don't say that
`this-command-keys' returns the C-u prefix (bug#22111).

4 years agoDefault the grep commands to skip directories
Alex Gramiak [Wed, 7 Oct 2020 03:41:23 +0000 (05:41 +0200)]
Default the grep commands to skip directories

* lisp/progmodes/grep.el (grep-compute-defaults): Skip directories
(bug#23590).

4 years agoMake artist-mode work when display-line-numbers-mode is on
Lars Ingebrigtsen [Wed, 7 Oct 2020 03:23:26 +0000 (05:23 +0200)]
Make artist-mode work when display-line-numbers-mode is on

* lisp/textmodes/artist.el (artist--adjust-x): New function.
(artist-mouse-draw-continously, artist-mouse-draw-poly)
(artist-mouse-draw-1point, artist-mouse-draw-2points): Use it to
take `display-line-numbers-mode' widths into account.

4 years agoRemove reference to outdated Gnus variable from the manual
Lars Ingebrigtsen [Wed, 7 Oct 2020 03:05:20 +0000 (05:05 +0200)]
Remove reference to outdated Gnus variable from the manual

* doc/misc/gnus.texi (Startup Variables): Remove reference to
gnus-use-backend-marks, which was removed in 2011 (bug#43833).

4 years agoalist-get doc string further clarification
Lars Ingebrigtsen [Wed, 7 Oct 2020 02:50:52 +0000 (04:50 +0200)]
alist-get doc string further clarification

* lisp/subr.el (alist-get): Mention generalized variables again
for easier cross-referencing (bug#43836).

4 years agoClarify what ``chrooted environment means'' for TRAMP
Hong Xu [Wed, 7 Oct 2020 02:41:29 +0000 (04:41 +0200)]
Clarify what ``chrooted environment means'' for TRAMP

* doc/misc/tramp.texi (Frequently Asked Questions): Clarify what
``chrooted environment means'' for TRAMP (bug#43839).

4 years agoMake the State button in Custom use extended menus
Mauro Aranda [Wed, 7 Oct 2020 02:35:52 +0000 (04:35 +0200)]
Make the State button in Custom use extended menus

* lisp/cus-edit.el (custom-actioned-widget): New variable.
Dynamically hold the widget for which to show the menu.
(custom-variable-extended-menu, custom-face-extended-menu)
(custom-group-extended-menu): Keymap menus for the State menu.  Use
custom-actioned-widget for the :enable and :selected forms.  Make
related items radio buttons.  (Bug#4787)
(custom-variable-menu, custom-face-menu, custom-group-menu): Keep for
backward compatibility, but default to nil, so we prefer the keymap
menus instead.
(custom-variable-action, custom-face-action, custom-group-action):
Pass the keymap menu to widget-choose when the simplified menus
are nil.

4 years ago* test/lisp/progmodes/ruby-mode-tests.el: Fix obsolete warnings
Stefan Monnier [Wed, 7 Oct 2020 02:08:02 +0000 (22:08 -0400)]
* test/lisp/progmodes/ruby-mode-tests.el: Fix obsolete warnings

4 years agoAdd match-data to isearch state and repeat faces to highlight group matches
Juri Linkov [Tue, 6 Oct 2020 20:14:26 +0000 (23:14 +0300)]
Add match-data to isearch state and repeat faces to highlight group matches

* lisp/isearch.el (isearch-match-data): New variable.
(isearch-mode): Set isearch-match-data to nil.
(isearch-update): Call isearch-highlight with isearch-match-data.
(isearch--state): Add isearch-match-data.
(isearch--set-state): Restore isearch-match-data.
(with-isearch-suspended): Preserve isearch-match-data.
(isearch-search): Set isearch-match-data to integers.
(isearch-group-1): Rename from isearch-group-odd and adjust colors.
(isearch-group-2): Rename from isearch-group-even and adjust colors.
(isearch-highlight): Add optional arg 'match-data'.
Rewrite search-highlight-submatches part to recycle faces.

* doc/emacs/search.texi (Search Customizations): Amend the
documentation for isearch-group faces.

(bug#6227, bug#43702)

4 years agoFix crash when creating new NS frame (bug#43812)
Alan Third [Mon, 5 Oct 2020 19:38:45 +0000 (20:38 +0100)]
Fix crash when creating new NS frame (bug#43812)

* src/nsterm.m (ns_clear_under_internal_border): Check the frame is
live.

4 years agoAdd check for bound and true 'ido-everywhere' in multi-occur--prompt
Juri Linkov [Tue, 6 Oct 2020 18:35:53 +0000 (21:35 +0300)]
Add check for bound and true 'ido-everywhere' in multi-occur--prompt

* lisp/replace.el (multi-occur--prompt): Check if 'ido-everywhere' is
bound and true (bug#41633).

4 years agoFix args of truncate-string-to-width in ibuffer-compile-make-substring-form
Juri Linkov [Tue, 6 Oct 2020 18:33:20 +0000 (21:33 +0300)]
Fix args of truncate-string-to-width in ibuffer-compile-make-substring-form

* lisp/ibuffer.el (ibuffer-compile-make-substring-form): Fix args of
truncate-string-to-width call (bug#41250)

4 years ago* Native compiling do not target a directory with no write permission
Andrea Corallo [Tue, 6 Oct 2020 15:44:13 +0000 (17:44 +0200)]
* Native compiling do not target a directory with no write permission

* src/comp.c (Fcomp_el_to_eln_filename): Check for write
permission while choosing the output directory in
`comp-eln-load-path'.

4 years ago* lisp/international/mule.el (define-coding-system): Revert accidental change
Stefan Monnier [Tue, 6 Oct 2020 15:02:00 +0000 (11:02 -0400)]
* lisp/international/mule.el (define-coding-system): Revert accidental change

This was accidentally included in a9f147af716aa026ec7778202901c4cb4bd5487d
"Use the full name of the null byte/character, not its abbreviation".

4 years ago* lisp/international/mule-util.el: Revert bug#41250 workaround
Stefan Monnier [Tue, 6 Oct 2020 13:38:25 +0000 (09:38 -0400)]
* lisp/international/mule-util.el: Revert bug#41250 workaround

(truncate-string-ellipsis): Use the '…' character itself since it
should work now and is more readable.

4 years ago* lisp/international/ja-dic-cnv.el: Attempt to fix bug#41250
Stefan Monnier [Tue, 6 Oct 2020 13:34:20 +0000 (09:34 -0400)]
* lisp/international/ja-dic-cnv.el: Attempt to fix bug#41250

(skkdic-convert): Only bind `coding-system-for-read` where needed.

4 years agoSuppress obsoletion warning in test of obsolete rx function
Mattias Engdegård [Tue, 6 Oct 2020 12:22:57 +0000 (14:22 +0200)]
Suppress obsoletion warning in test of obsolete rx function

* test/lisp/emacs-lisp/rx-tests.el (rx-compat): Add byte-compilation
warning suppression.

4 years ago; * lisp/international/mule-util.el (truncate-string-ellipsis): Fix comment.
Eli Zaretskii [Tue, 6 Oct 2020 11:51:13 +0000 (14:51 +0300)]
; * lisp/international/mule-util.el (truncate-string-ellipsis): Fix comment.

4 years agoFix last change
Mattias Engdegård [Tue, 6 Oct 2020 11:09:58 +0000 (13:09 +0200)]
Fix last change

* lisp/international/mule-util.el (truncate-string-ellipsis):
Use Unicode hex escapes instead of named escapes here, because \N{...}
is not available during bootstrapping.  (Bug#41250)

4 years agoFix last change
Eli Zaretskii [Tue, 6 Oct 2020 08:24:15 +0000 (11:24 +0300)]
Fix last change

* lisp/international/mule-util.el (truncate-string-ellipsis): Add
a FIXME comment that explains the last change.  (Bug#41250)

4 years agoDon't use the character '…' literally in mule-util.el (bug#41250)
Juri Linkov [Tue, 6 Oct 2020 07:50:46 +0000 (10:50 +0300)]
Don't use the character '…' literally in mule-util.el (bug#41250)

* lisp/international/mule-util.el (truncate-string-ellipsis):
Replace the character '…' with its Unicode name.

4 years agoFix animate test that somehow changed recently
Lars Ingebrigtsen [Tue, 6 Oct 2020 01:51:17 +0000 (03:51 +0200)]
Fix animate test that somehow changed recently

4 years agoFix mule-util-tests after recent truncation changes
Lars Ingebrigtsen [Tue, 6 Oct 2020 01:48:00 +0000 (03:48 +0200)]
Fix mule-util-tests after recent truncation changes

* test/lisp/international/mule-util-tests.el: Fix truncation checks.

4 years agoAdd missing full stop in MS-DOS processes documentation
Daniel Martín [Tue, 6 Oct 2020 01:42:44 +0000 (03:42 +0200)]
Add missing full stop in MS-DOS processes documentation

* doc/emacs/msdos-xtra.texi (MS-DOS Processes): Minor copy edig
(bug#43820).

4 years agocperl-mode: Fix a test to ensure cperl-mode is active
Harald Jörg [Tue, 6 Oct 2020 01:39:55 +0000 (03:39 +0200)]
cperl-mode: Fix a test to ensure cperl-mode is active

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-indent-exp): Make sure that cperl-mode is active
for testing 'cperl-indent-exp', also skip this test under
perl-mode.

* test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl:
Eliminate dependency on unrelated customizable variables (bug#10483).

4 years ago* Fix a test in test/lisp/subr-tests.el
Andrea Corallo [Sat, 3 Oct 2020 19:33:08 +0000 (21:33 +0200)]
* Fix a test in test/lisp/subr-tests.el

* test/lisp/subr-tests.el (subr-tests-bug22027): Redefine
`read-string' with a lambda with the same number of arguments.

4 years agoAdd a test for primitive redefinition
Andrea Corallo [Sat, 3 Oct 2020 14:12:19 +0000 (16:12 +0200)]
Add a test for primitive redefinition

* test/src/comp-tests.el (primitive-redefine): New test.
* test/src/comp-test-funcs.el (comp-test-primitive-redefine-f):
New function.

4 years agoMake primitive redefinition effective through trampoline synthesis
Andrea Corallo [Fri, 2 Oct 2020 20:36:05 +0000 (22:36 +0200)]
Make primitive redefinition effective through trampoline synthesis

* lisp/loadup.el (dump-mode): Set `comp-enable-subr-trampolines'
when finished bootstrap.
* src/data.c (Ffset): Call `comp-enable-subr-trampolines' when
redefining a subr.
* src/comp.c (syms_of_comp): Define `comp-subr-trampoline-install'
symbol.
(syms_of_comp): Define `comp-enable-subr-trampolines' variable.

4 years agoRename comp-subr-safe-advice -> comp-subr-trampoline-install
Andrea Corallo [Fri, 2 Oct 2020 20:18:57 +0000 (22:18 +0200)]
Rename comp-subr-safe-advice -> comp-subr-trampoline-install

4 years agoRevert "Use `advice-flet' in place of `cl-letf' to avoid primitive...
Andrea Corallo [Sun, 4 Oct 2020 18:09:04 +0000 (20:09 +0200)]
Revert "Use `advice-flet' in place of `cl-letf' to avoid primitive...

This reverts commit 825e85b393a3d78ba43176ecc5bc1a9595d0fbea.

4 years agoRevert "Add `advice-flet' macro"
Andrea Corallo [Fri, 2 Oct 2020 20:17:09 +0000 (22:17 +0200)]
Revert "Add `advice-flet' macro"

This reverts commit d07d7ab1a0e321ced62ebe5dd9db27eb7e93430e.

4 years agoUse the full name of the null byte/character, not its abbreviation
Andreas Schwab [Mon, 5 Oct 2020 17:59:00 +0000 (19:59 +0200)]
Use the full name of the null byte/character, not its abbreviation

* lisp/subr.el (inhibit-nul-byte-detection): Make it an obsolete alias.
* src/coding.c (setup_coding_system): Use original name.
(detect_coding): Rename nul_byte_found => null_byte_found.
(detect_coding_system): Use original name.
Rename nul_byte_found => null_byte_found.
(Fdefine_coding_system_internal): Use original name.
(syms_of_coding): Rename inhibit-nul-byte-detection to
inhibit-null-byte-detection.
* src/w16select.c (get_clipboard_data): Rename nul_char to null_char.
* src/json.c (check_string_without_embedded_nulls): Rename from
check_string_without_embedded_nuls.
(Fjson_parse_string): Adjust accordingly.
* src/coding.h (enum define_coding_undecided_arg_index)
(enum coding_attr_index): Rename ...nul_byte... to ...null_byte....
* lisp/info.el (info-insert-file-contents, Info-insert-dir):
* lisp/international/mule.el (define-coding-system):
* lisp/vc/vc-git.el (vc-git--call):
* doc/lispref/nonascii.texi (Lisp and Coding Systems): Use original name.

4 years ago* src/dbusbind.c (xd_signature): Better type check for array elements.
Michael Albinus [Mon, 5 Oct 2020 11:58:28 +0000 (13:58 +0200)]
* src/dbusbind.c (xd_signature): Better type check for array elements.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.

4 years agoSort items in tmm properly, and allow clicking the final item
Jared Finder [Mon, 5 Oct 2020 08:20:56 +0000 (10:20 +0200)]
Sort items in tmm properly, and allow clicking the final item

* lisp/tmm.el (tmm-menubar-keymap): Sort the final items properly.
(tmm-menubar): Allow clicking the final menu item (bug#43756).

4 years agoUse … in Gnus mode lines (when shortening them)
Juri Linkov [Mon, 5 Oct 2020 07:01:03 +0000 (09:01 +0200)]
Use … in Gnus mode lines (when shortening them)

* lisp/gnus/gnus-sum.el (gnus-set-mode-line): Defer ellipsis
creation to `truncate-string-to-width' (bug#41250).  This uses …
by default.

4 years ago* configure.ac (lispdirrel): Fix value for MacOS build.
Andrea Corallo [Mon, 5 Oct 2020 06:42:12 +0000 (08:42 +0200)]
* configure.ac (lispdirrel): Fix value for MacOS build.

4 years agoImprove support for using vc commands in indirect buffers
Nathan Moreau [Mon, 5 Oct 2020 06:50:08 +0000 (08:50 +0200)]
Improve support for using vc commands in indirect buffers

* lisp/vc/vc.el (vc-deduce-fileset-1): New defun.
(vc-deduce-fileset): Adapt.
(vc-maybe-buffer-sync): New defun.
(vc-diff): Adapt.
(vc-ediff): Adapt.
(vc-root-diff): Adapt.
(vc-revision-other-window): Adapt (bug#40967).

4 years agoFix the documentation parts of a recent commit
Eli Zaretskii [Mon, 5 Oct 2020 05:37:02 +0000 (08:37 +0300)]
Fix the documentation parts of a recent commit

* lisp/international/mule-util.el (truncate-string-ellipsis): Doc
fix.

* doc/lispref/display.texi (Size of Displayed Text): Improve
wording and accuracy of the documentation of
'truncate-string-to-width'.  Document the function
'truncate-string-ellipsis'.

* etc/NEWS: Improve the wording of the entry for
'truncate-string-to-width'.

4 years ago* src/xdisp.c (syms_of_xdisp): New var `redisplay_skip_initial_frame`.
Stefan Monnier [Mon, 5 Oct 2020 02:50:38 +0000 (22:50 -0400)]
* src/xdisp.c (syms_of_xdisp): New var `redisplay_skip_initial_frame`.

This makes it possible to run most of the redisplay code (tho not the
actual drawing since there's nowhere to draw) even when there's no
real frame at hand, as is the case in batch mode.
This makes `xdisp-tests--minibuffer-resizing` work even in batch.

(redisplay_internal): Obey it.
(init_xdisp): Set `echo_area_window` even in noninteractive mode.
* src/dispnew.c (update_frame): Skip the initial frame.
* src/frame.c (make_frame): Use 80x25 as the default initial size.

* test/src/xdisp-tests.el (xdisp-tests--minibuffer-resizing):
Use the new var and fix use of `executing-kbd-macro`.

4 years ago* configure.ac : Fix typo for MacOS nativecomp introduced by afb765ab3c
Andrea Corallo [Sun, 4 Oct 2020 20:48:37 +0000 (22:48 +0200)]
* configure.ac : Fix typo for MacOS nativecomp introduced by afb765ab3c

4 years agoUse '…' for ellipsis in truncate-string-to-width by default (bug#41250)
Juri Linkov [Sun, 4 Oct 2020 19:41:36 +0000 (22:41 +0300)]
Use '…' for ellipsis in truncate-string-to-width by default (bug#41250)

* lisp/international/mule-util.el (truncate-string-ellipsis):
Change the default value to nil.
(truncate-string-ellipsis): New function.
(truncate-string-to-width): Use the value returned from the
function 'truncate-string-ellipsis'.

* lisp/tab-bar.el (tab-bar-tab-name-truncated):
* lisp/tab-line.el (tab-line-tab-name-ellipsis):
Take advantage of the improvement of the ellipsis default value
in truncate-string-to-width and truncate-string-ellipsis.

* doc/lispref/display.texi (Size of Displayed Text):
Improve description of truncate-string-ellipsis.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 4 Oct 2020 17:45:05 +0000 (19:45 +0200)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoMake filename hashing compatible with self contained builds (bug#43532)
Andrea Corallo [Sun, 4 Oct 2020 07:16:24 +0000 (09:16 +0200)]
Make filename hashing compatible with self contained builds (bug#43532)

* Makefile.in (lispdirrel): Add replace template.
(epaths-force): Form correctly 'PATH_REL_LOADSEARCH' into epath.h
* configure.ac (lispdirrel): Define variable (relative path of the
lisp files from the installation directory).
* src/comp.c (Fcomp_el_to_eln_filename): Update algorithm not to
rely on 'PATH_DUMPLOADSEARCH' but on 'PATH_REL_LOADSEARCH'.
* src/epaths.in (PATH_REL_LOADSEARCH): Add macro template.

4 years ago* configure.ac: Better HAVE_NATIVE_COMP description
Andrea Corallo [Sun, 4 Oct 2020 07:12:49 +0000 (09:12 +0200)]
* configure.ac: Better HAVE_NATIVE_COMP description

4 years ago* Fix function description message for native compiled lisp functions
Andrea Corallo [Sat, 3 Oct 2020 19:54:27 +0000 (21:54 +0200)]
* Fix function description message for native compiled lisp functions

* lisp/help-fns.el (help-fns-function-description-header): Fix
message.

4 years ago* Fix two tests in help-fns-tests.el for native code
Andrea Corallo [Sat, 3 Oct 2020 18:57:57 +0000 (20:57 +0200)]
* Fix two tests in help-fns-tests.el for native code

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun)
(help-fns-test-lisp-defsubst): Fix description string
for native compiled functions.

4 years agoMake dbus-unregister-object work for monitors
Michael Albinus [Sun, 4 Oct 2020 16:56:45 +0000 (18:56 +0200)]
Make dbus-unregister-object work for monitors

* doc/misc/dbus.texi (Monitoring Messages): Rename from
"Monitoring Events".
(Register Objects, Monitoring Messages):
Mention returned object.

* lisp/net/dbus.el (dbus-unregister-object): Adapt docstring.
(dbus-unregister-object): Delete monitor if needed.
(dbus-register-monitor): Return proper object.

* src/dbusbind.c (dbus-registered-objects-table): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus--test-signal-handler):
Adapt docstring.
(dbus-test08-register-monitor): New test.

4 years agoMake update-file-autoloads respect generated-autoload-file
Lars Ingebrigtsen [Sun, 4 Oct 2020 14:32:16 +0000 (16:32 +0200)]
Make update-file-autoloads respect generated-autoload-file

* lisp/emacs-lisp/autoload.el (update-file-autoloads): Make
update-file-autoloads respect `generated-autoload-file', as
documented.

4 years agoAvoid segfaults in lookup_image when faces were freed
Eli Zaretskii [Sat, 3 Oct 2020 17:49:18 +0000 (20:49 +0300)]
Avoid segfaults in lookup_image when faces were freed

* src/image.c (lookup_image): Make sure the frame's face cache
exists and has at least the basic faces.  If FACE_ID is not a
basic face, and is no longer cached, fall back on the 'default'
face.  (Bug#43700)

4 years agoSupport extended menus in widget-choose
Mauro Aranda [Sat, 3 Oct 2020 17:31:50 +0000 (19:31 +0200)]
Support extended menus in widget-choose

* doc/misc/widget.texi (Utilities): Document widget-choose.

* etc/NEWS: Document the feature (bug#4787).
* lisp/wid-edit.el (widget--simplify-menu): New function, to convert
extended menus into simplified menus when using the menu to prompt
through the minibuffer.
(widget-choose): Accept a keymap menu.  When not using x-popup-menu,
simplify the menu with widget--simplify-menu.  Document the changes in
the docstring.

4 years ago; Fix more typos
Stefan Kangas [Fri, 2 Oct 2020 16:02:51 +0000 (18:02 +0200)]
; Fix more typos

4 years ago; Fix trivial typos in ChangeLogs
Stefan Kangas [Fri, 2 Oct 2020 15:56:41 +0000 (17:56 +0200)]
; Fix trivial typos in ChangeLogs

4 years agoEnhance syntax-tests.el to test comments in parse-partial-sexp
Alan Mackenzie [Fri, 2 Oct 2020 21:21:06 +0000 (21:21 +0000)]
Enhance syntax-tests.el to test comments in parse-partial-sexp

This now tests the interface between parse-partial-sexp and the low level
comment function in syntax.c

* test/src/syntax-tests.el (syntax-comments-midpoint): New function.
(syntax-pps-comments): New macro.
(top level): Two new syntax-br-comments tests and five new syntax-pps-comments
tests.

* test/data/syntax-comments.txt (top level): Amend some test fragments and add
some more.

4 years agoCalc: fix formatting and parsing Unix time (bug#43759)
Mattias Engdegård [Fri, 2 Oct 2020 16:50:50 +0000 (18:50 +0200)]
Calc: fix formatting and parsing Unix time (bug#43759)

The number of days from epoch to Jan 1, 1970 that was used in parsing
and formatting Unix time was incorrect.  The previous fix
(in e368697ce36) was incomplete.

Reported by Vincent Belaïche.

* lisp/calc/calc-forms.el (math-unix-epoch): New constant.
(math-format-date-part, math-parse-standard-date, calcFunc-unixtime):
Use math-unix-epoch instead of a constant that is sometimes wrong.
* test/lisp/calc/calc-tests.el (calc-unix-date): New test.

4 years agoUse `advice-flet' in place of `cl-letf' to avoid primitive redefinition
Andrea Corallo [Fri, 2 Oct 2020 16:38:02 +0000 (18:38 +0200)]
Use `advice-flet' in place of `cl-letf' to avoid primitive redefinition

* test/lisp/time-stamp-tests.el (with-time-stamp-system-name): Use
`advice-flet' to advice primitive avoiding redefinition.

* test/lisp/tempo-tests.el (tempo-p-element-test)
(tempo-P-element-test, tempo-r-element-test)
(tempo-s-element-test, tempo-r>-element-test): Likewise.

* test/lisp/subr-tests.el (subr-tests-bug22027): Likewise.

* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test06-literal-groups)
(shadow-test07-regexp-groups): Likewise.

* test/lisp/replace-tests.el (replace-tests-with-undo): Likewise.

* test/lisp/play/dissociate-tests.el
(dissociate-tests-dissociated-press): Likewise.

* test/lisp/net/tramp-tests.el (tramp-test10-write-region)
(tramp-test21-file-links): Likewise.

* test/lisp/kmacro-tests.el (kmacro-tests-call-macro-hint-and-repeat)
(kmacro-tests-repeat-on-last-key)
(kmacro-tests-repeat-view-and-run)
(kmacro-tests-bind-to-key-with-key-sequence-in-use): Likewise.

* test/lisp/files-tests.el (files-tests-read-file-in-~): Likewise.

* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice):
Likewise.

* test/lisp/bookmark-tests.el (bookmark-test-bmenu-locate):
Likewise.

* test/lisp/abbrev-tests.el
(inverse-add-abbrev-skips-trailing-nonword)
(inverse-add-abbrev-skips-trailing-nonword/positive-arg)
(inverse-add-abbrev-skips-trailing-nonword/negative-arg): Likewise.

4 years agoAdd `advice-flet' macro
Andrea Corallo [Fri, 2 Oct 2020 16:13:28 +0000 (18:13 +0200)]
Add `advice-flet' macro

The testsuite does large use of primitive redefinition, to avoid that
we define `advice-flet' to use instead as an easy `cl-letf'
replacement.

* lisp/emacs-lisp/nadvice.el (advice-flet): New macro.

4 years agoEnhance syntax-tests.el to test comments in scan-lists
Alan Mackenzie [Fri, 2 Oct 2020 17:25:02 +0000 (17:25 +0000)]
Enhance syntax-tests.el to test comments in scan-lists

This now tests the interface between scan_lists and the comment functions.

* test/src/syntax-tests.el (syntax-br-comments): New macro.
({-in, ;-in, /*-in): Set parse-sexp-ignore-comments to t.
(top level): Add 15 tests for comments inside brace lists.

* test/data/syntax-comments.txt (top level): Amend some test fragments.

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:38:24 +0000 (09:38 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

ef7bc1cc80 (origin/emacs-27) Fix electric-buffer-list buffer selection

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:38:24 +0000 (09:38 -0700)]
Merge from origin/emacs-27

78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
# lisp/allout.el
# lisp/progmodes/ebrowse.el

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:33:53 +0000 (09:33 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

9b47ae2304 Don't error if no GPG signing key configured
e274e3f44b 2020-03-29  Michael R. Mauger  <michael@mauger.com>

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:33:53 +0000 (09:33 -0700)]
Merge from origin/emacs-27

41dcbeccf3 Make aliases introduced in previous patch obsolete
4997032c05 Restore some public debugging functions removed in Emacs 27

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:33:53 +0000 (09:33 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

08bda922b4 (emacs-27) ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 2 Oct 2020 16:33:53 +0000 (09:33 -0700)]
Merge from origin/emacs-27

2af6b3147d Clarification in Tramp manual
8fbaca7d41 Check Emacs version used for Tramp compilation
90e5549f02 Don't signal an error when saving files on WdebDAV volumes
6f73cc3579 ; * lisp/net/eww.el (eww-search-words): Doc fix.
ce0842a165 * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it.  (...

4 years agoFix electric-buffer-list buffer selection
Lars Ingebrigtsen [Fri, 2 Oct 2020 06:07:53 +0000 (08:07 +0200)]
Fix electric-buffer-list buffer selection

* lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
restored, which isn't always the case if
global-display-line-numbers-mode (bug#43755).  This enables
selecting buffers again.

4 years ago* When advising search in `comp-eln-load-path' the first writable dir
Andrea Corallo [Fri, 2 Oct 2020 12:42:43 +0000 (14:42 +0200)]
* When advising search in `comp-eln-load-path' the first writable dir

* lisp/emacs-lisp/comp.el (comp-tampoline-compile): Do not crash
if we can't write in the first entry in `comp-eln-load-path' but
search for another one.