]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago* Rename comp-function-optimizable -> comp-function-optimizable-p
Andrea Corallo [Sun, 7 Jun 2020 12:42:12 +0000 (14:42 +0200)]
* Rename comp-function-optimizable -> comp-function-optimizable-p

* lisp/emacs-lisp/comp.el (comp-function-optimizable): Rename into
'comp-function-optimizable-p'.
(comp-function-call-maybe-remove): Use the new name.

4 years ago* Fix comp-call-optim-form-call for null `callee'
Andrea Corallo [Sun, 7 Jun 2020 11:58:27 +0000 (13:58 +0200)]
* Fix comp-call-optim-form-call for null `callee'

* lisp/emacs-lisp/comp.el (comp-call-optim-form-call): Guard
agains null `calle'.

4 years ago* Improve propagate pass
Andrea Corallo [Sun, 7 Jun 2020 09:46:08 +0000 (11:46 +0200)]
* Improve propagate pass

As function folding can generate 'setimm' insns handle them in the
`comp-propagate-insn'.

* lisp/emacs-lisp/comp.el (comp-propagate-insn): Handle 'setimm'
insn.

4 years ago* Optimize optimizable variables
Andrea Corallo [Sat, 6 Jun 2020 22:34:21 +0000 (00:34 +0200)]
* Optimize optimizable variables

* lisp/emacs-lisp/comp.el (comp-symbol-values-optimizable): New
defconst.
(comp-function-call-maybe-remove): New logic to to remove
unnecessary `symbol-value' calls.

4 years ago* Mitigate possible speed 3 miss-optimization
Andrea Corallo [Sat, 6 Jun 2020 14:53:34 +0000 (16:53 +0200)]
* Mitigate possible speed 3 miss-optimization

Do not perform trampoline optimization at speed 3 on function if their
name is not unique inside the compilation unit.  Note that the
function can still be redefined in any other way therefore this is a
mitigation.

* lisp/emacs-lisp/comp.el (comp-func-unique-in-cu-p): New
predicate.
(comp-call-optim-form-call): Perform trampoline optimization
for named functions only if they are unique within the current
compilation unit.

4 years ago* Allow for optimizing anonymous lambdas in call-optim
Andrea Corallo [Sat, 6 Jun 2020 12:49:01 +0000 (14:49 +0200)]
* Allow for optimizing anonymous lambdas in call-optim

* lisp/emacs-lisp/comp.el (comp-func-in-unit): New function.
(comp-call-optim-form-call): Update logic for optimizing
anonymous lambdas.

4 years ago* Clean-up unnecessary lisp_X context definition
Andrea Corallo [Sat, 6 Jun 2020 12:20:47 +0000 (14:20 +0200)]
* Clean-up unnecessary lisp_X context definition

* src/comp.c (Fcomp__init_ctxt, comp_t): Remove lisp_X
definition as is used only locally.

4 years agoChange 'direct-call' 'direct-callref' LIMPLE ops sematinc
Andrea Corallo [Sat, 6 Jun 2020 11:30:59 +0000 (13:30 +0200)]
Change 'direct-call' 'direct-callref' LIMPLE ops sematinc

Is cleaner to have the function c-name as first argument of
'direct-call' 'direct-callref'.  This is preparatory to anonymous
lambdas optimization.

* lisp/emacs-lisp/comp.el (comp-propagate-insn): Use c-name when
gathering the comp-func definition for direct calls.
(comp-call-optim-form-call): Add put c-name as first argument of
direct-call direct-callref when optimizing.

* src/comp.c (emit_call): Update logic for having c-name as
first arg of direct calls.
(emit_call_ref): Rename 'subr_sym' into 'func'.

4 years agoReduce the number of files probed when finding a lisp file.
Nicolás Bértolo [Mon, 25 May 2020 21:05:23 +0000 (18:05 -0300)]
Reduce the number of files probed when finding a lisp file.

* src/lread.c (get-load-suffixes): Do not add any suffix to files that
need to be loaded by the dynamic linker.
(effective_load_path): Remove function.
(load): Don't add any suffix if file ends in a suffix already.
(effective_load_path): Remove function.
(openp_add_middle_dir_to_suffixes): Add helper function to create
pairs of middle directories and suffixes.
(openp_max_middledir_and_suffix_len): Add helper function to count the
number of bytes needed to store the middle directory and suffix.
(openp_fill_filename_buffer): Add helper function to copy middle
directory, basename and suffix to the filename buffer.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sat, 6 Jun 2020 19:52:00 +0000 (21:52 +0200)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agomake-text-button no longer modifies its string arg
Paul Eggert [Sat, 6 Jun 2020 19:05:10 +0000 (12:05 -0700)]
make-text-button no longer modifies its string arg

* etc/NEWS: Mention this.
* lisp/apropos.el (apropos-library-button):
* lisp/ibuf-ext.el (ibuffer-old-saved-filters-warning):
There’s no longer a need copy make-text-button’s string arg.
* lisp/button.el (make-text-button): Return a copy of a string arg.
Delay making the copy until after error-checking.

4 years agoUn-deprecate oset and oset-default
Basil L. Contovounesios [Wed, 3 Jun 2020 16:35:59 +0000 (17:35 +0100)]
Un-deprecate oset and oset-default

For discussion see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00674.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html

* lisp/emacs-lisp/eieio.el (oset, oset-default): Un-deprecate.
* lisp/emacs-lisp/eieio-core.el (eieio-oref): Declare gv-setter here
instead of in lisp/emacs-lisp/eieio.el.  Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.
(eieio-oref-default): Add gv-setter declaration.
* etc/NEWS: Announce these changes.
* doc/misc/eieio.texi (Accessing Slots): Document oref and
oref-default as generalized variables.  Consistently document
getters before setters.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Use
lexical-binding.
(eieio-test-13-init-methods): Simplify.
(eieio-test-33-instance-tracker): Declare IT-list as special.

4 years agoSome fixes for --without-nativecomp config
Andrea Corallo [Sat, 6 Jun 2020 12:00:45 +0000 (13:00 +0100)]
Some fixes for --without-nativecomp config

* src/pdumper.c (dump_subr): Do not add RELOC_NATIVE_SUBR for
VERY_LATE_RELOCS in --without-nativecomp.
(dump_do_dump_relocation): Add a sanity check that no
RELOC_NATIVE_SUBR exists in --without-nativecomp.

* src/lread.c (Fload): As Fnative_elisp_load is not defined
in --without-nativecomp so ifdef this block.

4 years agoImprove battery status display via GNU/Linux sysfs
Ellington Santos [Tue, 26 May 2020 14:37:04 +0000 (11:37 -0300)]
Improve battery status display via GNU/Linux sysfs

* lisp/battery.el (battery-linux-sysfs): Support %b format.
Improve the display of %p.  (Bug#41542)

Copyright-paperwork-exempt: yes

4 years agoAvoid zero-width glyphs and the resulting cursor artifacts
Pip Cet [Thu, 4 Jun 2020 22:28:53 +0000 (22:28 +0000)]
Avoid zero-width glyphs and the resulting cursor artifacts

* src/xdisp.c (fill_gstring_glyph_string): Handle unavailable glyphs.
(append_composite_glyph): Mark unavailable glyphs.
(gui_produce_glyphs): Make glyphs unavailable for zero-width
compositions.  (Bug#41645)

4 years agoStreamline live_*_holding
Paul Eggert [Fri, 5 Jun 2020 01:46:11 +0000 (18:46 -0700)]
Streamline live_*_holding

(live_string_holding, live_cons_holding, live_symbol_holding)
(live_float_p, live_vector_holding):
Assert that m->type is correct, instead of testing this at
runtime.  All callers changed.
(live_large_vector_holding, live_small_vector_holding):
Now two functions instead of the old live_vector_holding.
All callers changed.
(live_large_vector_p, live_small_vector_p):
Now two functions instead of the old live_vector_p.
All callers changed.
(mark_maybe_object): Ignore Lisp_Type_Unused0 quickly too,
since that cannot possibly be an object.
(CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
New arg MEM_TYPE.  All callers changed.
(CHECK_ALLOCATED_AND_LIVE_SYMBOL): Simplify by combining
GC_CHECK_MARKED_OBJECTS code.

4 years agoMake live_*_p more accurate
Paul Eggert [Fri, 5 Jun 2020 01:46:10 +0000 (18:46 -0700)]
Make live_*_p more accurate

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_vector_holding):
Return a C pointer, not a Lisp_Object.  All callers changed.
This helps the compiler a bit.
(live_string_p, live_cons_p, live_symbol_p, live_vector_p):
Require that P point directly at the object, rather than
somewhere within the object.  This fixes some false positives
with valid_lisp_object_p (used only in debugging).
(mark_maybe_object): Rely on the new accuracy.

4 years agoFix some side-effecting uses of make-text-button
Basil L. Contovounesios [Thu, 4 Jun 2020 22:08:28 +0000 (23:08 +0100)]
Fix some side-effecting uses of make-text-button

For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00117.html

* lisp/apropos.el (apropos-library-button):
* lisp/help-fns.el (help-fns--first-release): Return result of
make-text-button instead of relying on its side effects.
* lisp/ibuf-ext.el (ibuffer-old-saved-filters-warning): Avoid
modifying an immutable string.

4 years ago* lisp/dired.el (dired-toggle-marks): Use region for non-nil dired-mark-region
Juri Linkov [Thu, 4 Jun 2020 22:17:30 +0000 (01:17 +0300)]
* lisp/dired.el (dired-toggle-marks): Use region for non-nil dired-mark-region

(dired-mark--region-use-p, dired-mark--region-beginning)
(dired-mark--region-end): New internal functions.
(dired-mark-if): Use new functions.  (Bug#39902)

4 years agoChange default project list filename to "projects"
Simen Heggestøyl [Thu, 4 Jun 2020 17:58:36 +0000 (19:58 +0200)]
Change default project list filename to "projects"

* lisp/progmodes/project.el (project-list-file): Change the default
filename to "projects".

4 years agoUse characters for keys in project-switch-commands
Simen Heggestøyl [Thu, 4 Jun 2020 17:56:32 +0000 (19:56 +0200)]
Use characters for keys in project-switch-commands

* lisp/progmodes/project.el (project-switch-commands): Use
characters for keys instead of string for better future
compatibility with 'read-multiple-choice'.
(project-switch-project): Adjust to above change.

4 years ago; Small cleanup in project.el
Simen Heggestøyl [Thu, 4 Jun 2020 17:29:10 +0000 (19:29 +0200)]
; Small cleanup in project.el

* lisp/progmodes/project.el (project--add-to-project-list-front):
Minor simplification after recent changes.

4 years ago* lisp/font-lock.el (font-lock--syntax-table-affects-ppss): New var
Stefan Monnier [Thu, 4 Jun 2020 13:58:22 +0000 (09:58 -0400)]
* lisp/font-lock.el (font-lock--syntax-table-affects-ppss): New var

This tries to make `font-lock-syntax-table` work correctly even when
it changes the parsing of strings and comments, as was the case in
`font-latex.el`.

We should probably deprecate the use of `font-lock-syntax-table` since
the present fix is still not 100% and since it comes with performance
problems in large files.

(font-lock-set-defaults): Set it.
(font-lock-fontify-syntactically-region): Don't use `syntax-ppss`
when we think that `font-lock-syntax-table` would interfere.

4 years ago* Fix build for --enable-check-lisp-object-type=yes (bug#41703)
Andrea Corallo [Thu, 4 Jun 2020 10:02:51 +0000 (11:02 +0100)]
* Fix build for --enable-check-lisp-object-type=yes (bug#41703)

* src/comp.c (emit_coerce): Add missing declaration.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Thu, 4 Jun 2020 09:33:07 +0000 (10:33 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago; * test/src/xfaces-tests.el (xfaces-color-distance): Fix bug id
Mattias Engdegård [Thu, 4 Jun 2020 08:55:16 +0000 (10:55 +0200)]
; * test/src/xfaces-tests.el (xfaces-color-distance): Fix bug id

4 years agoDon’t default to Valgrind unless ENABLE_CHECKING
Paul Eggert [Thu, 4 Jun 2020 01:58:45 +0000 (18:58 -0700)]
Don’t default to Valgrind unless ENABLE_CHECKING

* src/alloc.c (USE_VALGRIND): If not defined, don’t default it to
1 unless ENABLE_CHECKING.  The Valgrind hooks bloat the garbage
collector a bit in production, and there’s no need for them these
days if one has a Valgrind suppressions file (which one needs anyway).
(mark_maybe_pointer): Use ‘#if USE_VALGRIND’ instead of ‘#ifdef
USE_VALGRIND’ for consistency with other uses of USE_VALGRIND.
This is in case someone builds with ‘-DENABLE_CHECKING
-DUSE_VALGRIND=0’ in CFLAGS.

4 years agoRevert make-text-button string copy
Paul Eggert [Thu, 4 Jun 2020 01:15:54 +0000 (18:15 -0700)]
Revert make-text-button string copy

* lisp/button.el (make-text-button): Don’t make a copy of
a button’s string label.  This reverts the change made in
2020-05-17T05:23:28Z!eggert@cs.ucla.edu, which broke SLY.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html
However, we’ll need a better fix for this once string
literals become contents, if SLY uses string constants
for text button labels.

4 years agoFix make-text-button bug with string copy
Paul Eggert [Wed, 3 Jun 2020 22:39:29 +0000 (15:39 -0700)]
Fix make-text-button bug with string copy

* lisp/button.el (make-text-button): Use the copy of BEG
uniformly, instead of in just one place.  This fixes a typo
introduced in 2020-05-17T05:23:28Z!eggert@cs.ucla.edu.
Problem reported by João Távora in:
https://lists.gnu.org/r/emacs-devel/2020-06/msg00117.html

4 years ago* Introduce `comp-loop-insn-in-block'
Andrea Corallo [Wed, 3 Jun 2020 21:06:26 +0000 (22:06 +0100)]
* Introduce `comp-loop-insn-in-block'

* lisp/emacs-lisp/comp.el (comp-loop-insn-in-block): New macro.
(comp-call-optim-func, comp-dead-assignments-func)
(comp-remove-type-hints-func): Use `comp-loop-insn-in-block'.

4 years agoEnsure Jsonrpc processes are created in correct buffer
João Távora [Wed, 3 Jun 2020 19:53:35 +0000 (20:53 +0100)]
Ensure Jsonrpc processes are created in correct buffer

Report and original implementation by Steve Purcell
<steve@sanityinc.com>.  See also See
https://github.com/joaotavora/eglot/pull/493 for details

* lisp/jsonrpc.el (initialize-instance): Make process in original
buffer.
(Version): Bump to 1.0.12

4 years agoMake color-distance symmetric and more accurate
Mattias Engdegård [Tue, 2 Jun 2020 20:31:14 +0000 (22:31 +0200)]
Make color-distance symmetric and more accurate

* src/xfaces.c (color_distance): Don't throw away the low 8 bits of
the colours, and make the function symmetric (bug41544)
(Fcolor_distance): Add caution about this not being a true metric.
* test/src/xfaces-tests.el: New file.

4 years ago; Clean up recent project.el additions
Basil L. Contovounesios [Wed, 3 Jun 2020 10:45:54 +0000 (11:45 +0100)]
; Clean up recent project.el additions

* lisp/progmodes/project.el (project): Add :version tag.
(project-list-file): Fix custom :type and add :version tag.

4 years agoHandle mid-gstring face changes
Pip Cet [Sun, 31 May 2020 19:55:48 +0000 (19:55 +0000)]
Handle mid-gstring face changes

* src/xdisp.c (fill_gstring_glyph_string): Don't extend the glyph
string past face changes.  (Bug#41454)

4 years agoFix bug in recent byte-code checking hoist
Paul Eggert [Wed, 3 Jun 2020 01:40:10 +0000 (18:40 -0700)]
Fix bug in recent byte-code checking hoist

Problem reported by Daniel Colascione (Bug#41680).
* src/lread.c (read1): Check that AREF (tmp, COMPILED_BYTECODE)
is a string before subjecting it to STRING_MULTIBYTE.
Be more consistent about using AREF in the neighborhood,
to help prevent this sort of problem from recurring.

4 years agoAvoid losing composition state in handle_stop_backwards
Pip Cet [Sun, 31 May 2020 16:58:19 +0000 (16:58 +0000)]
Avoid losing composition state in handle_stop_backwards

* src/xdisp.c (handle_stop_backwards): Save composition iterator state
across our forward scan.  (Bug#41626)

4 years agoFix DLL imports of gccjit version functions.
Nicolás Bértolo [Mon, 1 Jun 2020 22:53:00 +0000 (19:53 -0300)]
Fix DLL imports of gccjit version functions.

* src/comp.c (init_gccjit_functions): Use LOAD_DLL_FN_OPT macro to
load gcc_jit_version_major, gcc_jit_version_major and
gcc_jit_version_patchlevel.
* src/w32common.h (LOAD_DLL_FN_OPT): Add macro optionally load a
function from a DLL.

4 years ago; NEWS updates
Dmitry Gutov [Tue, 2 Jun 2020 22:10:16 +0000 (01:10 +0300)]
; NEWS updates

4 years agoSmall cleanup
Dmitry Gutov [Tue, 2 Jun 2020 21:33:14 +0000 (00:33 +0300)]
Small cleanup

* lisp/progmodes/project.el (project--add-to-project-list-front):
Small simplification.
(project--remove-from-project-list): Remove oudated comment.

4 years agoproject-list-file: New user option
Dmitry Gutov [Tue, 2 Jun 2020 21:27:29 +0000 (00:27 +0300)]
project-list-file: New user option

* lisp/progmodes/project.el (project): New custom group.
(project-vc): Use it as parent.
(project-vc-merge-submodules): Tag with Emacs version.
(project-read-file-name-function): Assign to the 'project' group.
(project-list-file): New user option (bug#41600).
(project--write-project-list, project--read-project-list): Use it.

4 years ago; * src/composite.c (syms_of_composite): Fix last change.
Eli Zaretskii [Tue, 2 Jun 2020 17:46:26 +0000 (20:46 +0300)]
; * src/composite.c (syms_of_composite): Fix last change.

4 years agoFix Arabic composition rules
Eli Zaretskii [Tue, 2 Jun 2020 17:44:59 +0000 (20:44 +0300)]
Fix Arabic composition rules

* lisp/language/misc-lang.el (composition-function-table): Reorder
Arabic composition rules in descending order of lookback.

* src/composite.c (syms_of_composite): Document the order of rules
in 'composition-function-table'.

4 years agoWrite project list to file only when changed
Simen Heggestøyl [Tue, 2 Jun 2020 17:20:14 +0000 (19:20 +0200)]
Write project list to file only when changed

* lisp/progmodes/project.el (project--add-to-project-list-front):
Write the project list to file only when it has changed.

4 years agoRemove 'project--ensure-file-exists'
Simen Heggestøyl [Fri, 29 May 2020 14:58:09 +0000 (16:58 +0200)]
Remove 'project--ensure-file-exists'

* lisp/progmodes/project.el (project--ensure-file-exists): Remove.
(project--read-project-list): Set 'project--list' to nil when the
project list file doesn't exist.

4 years agoFix handling of CGJ in Hebrew text
Eli Zaretskii [Tue, 2 Jun 2020 15:42:09 +0000 (18:42 +0300)]
Fix handling of CGJ in Hebrew text

* lisp/language/hebrew.el (hebrew): Add CGJ U+034F to the
combining characters supported in Hebrew compositions. (Bug#41645)

4 years agoSimplify and regularize some offset tests in alloc.c
Paul Eggert [Tue, 2 Jun 2020 05:41:33 +0000 (22:41 -0700)]
Simplify and regularize some offset tests in alloc.c

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_float_p): Simplify and regularize.

4 years agoMerge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:33 +0000 (22:26 -0700)]
Merge from origin/emacs-27

0260d2d2db Don't call 'mbrtowc' on WINDOWSNT

4 years ago; Merge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:33 +0000 (22:26 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

fb90f46f47 ; Auto-commit of loaddefs files.

4 years agoMerge from origin/emacs-27
Paul Eggert [Tue, 2 Jun 2020 05:26:32 +0000 (22:26 -0700)]
Merge from origin/emacs-27

44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi...
68b6dad1d8 Be more aggressive in marking objects during GC
36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m...
41232e6797 Avoid crashes due to bidi cache being reset during redisplay
f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ...
d3e0023aaa ; * etc/TODO: Fix formatting.  (Bug#41497)
a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve'

# Conflicts:
# lisp/tab-bar.el
# nt/inc/ms-w32.h
# src/alloc.c

4 years ago* lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.
Juri Linkov [Mon, 1 Jun 2020 23:01:25 +0000 (02:01 +0300)]
* lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.

(project-compile): Add args and interactive spec like in 'compile'.
(project-switch-commands): Bind project-vc-dir to "v",
project-shell to "s", and rebind project-find-regexp from "s" to "r".

* doc/emacs/maintaining.texi (Project File Commands):
Describe project-vc-dir and project-shell.

4 years ago* Throw an ICE when asked to emit a cast with sign extension.
Nicolás Bértolo [Sun, 31 May 2020 21:09:12 +0000 (18:09 -0300)]
* Throw an ICE when asked to emit a cast with sign extension.

* src/comp.c (cast_kind_of_type): Enum that specifies the kind of type
in the cast enum (unsigned, signed, pointer).
(emit_coerce): Throw an ICE when asked to emit a cast with sign
extension.
(define_cast_from_to): Return NULL for casts involving sign extension.
(define_cast_functions): Specify the kind of each type in the cast
union.

4 years ago* Define casts using functions.
Nicolás Bértolo [Sat, 30 May 2020 21:33:58 +0000 (18:33 -0300)]
* Define casts using functions.

This is to dump prettier C files.
This does not affect compilation times in my tests.

* src/comp.c: Define a 15x15 cast matrix. Use it in emit_coerce().

4 years ago* Remove unnecessary DLL load of gcc_jit_block_add_assignment_op.
Nicolás Bértolo [Sun, 31 May 2020 18:55:18 +0000 (15:55 -0300)]
* Remove unnecessary DLL load of gcc_jit_block_add_assignment_op.

* src/comp.c (gcc_jit_block_add_assignment_op): Remove unnecessary
func import.

4 years agoDon't call 'mbrtowc' on WINDOWSNT
Eli Zaretskii [Mon, 1 Jun 2020 15:57:39 +0000 (18:57 +0300)]
Don't call 'mbrtowc' on WINDOWSNT

* src/emacs.c (using_utf8): Don't call 'mbrtowc' on WINDOWSNT
systems, as it's not available on Windows 9X.

4 years ago; Fix some recent byte-compilation warnings
Basil L. Contovounesios [Mon, 1 Jun 2020 15:56:26 +0000 (16:56 +0100)]
; Fix some recent byte-compilation warnings

For discussion of the autoloaded function declaration, see
https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00910.html.

* lisp/dnd.el (dnd-handle-one-url): It is no longer necessary to
declare the autoloaded function browse-url-select-handler after
ldefs-boot.el was updated.
* lisp/progmodes/elisp-mode.el: Declare xref.el function to silence
byte-compiler.

4 years agoBug #41061 patch: Fix typos and amend code slightly
Alan Mackenzie [Mon, 1 Jun 2020 15:21:54 +0000 (15:21 +0000)]
Bug #41061 patch: Fix typos and amend code slightly

* lisp/progmodes/cc-align.el (c-lineup-ternary-bodies)
* doc/misc/cc-mode.texi (Operator Line-Up): Fix typos and amend code.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jun 2020 13:27:51 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jun 2020 13:11:55 +0000 (06:11 -0700)]
; Auto-commit of loaddefs files.

4 years agoChange xref-find-apropos to pass PATTERN to backend verbatim
Dmitry Gutov [Mon, 1 Jun 2020 01:44:33 +0000 (04:44 +0300)]
Change xref-find-apropos to pass PATTERN to backend verbatim

* lisp/progmodes/xref.el (xref-backend-apropos): Rename this
generic's second arg to PATTERN, to clarify that it should be
handled entirely in the backend, with no pre-processing by the
command.
(xref-find-apropos): Update accordingly, but keep compatibility
with backends in older Emacs versions.
(xref-apropos-regexp): Extract from xref-find-apropos.

* lisp/progmodes/etags.el (xref-backend-apropos): Use it here.

* lisp/progmodes/elisp-mode.el (xref-backend-apropos): And here.

4 years ago* doc/emacs/buffers.texi (Icomplete): Mention icomplete-minibuffer-setup-hook.
João Távora [Mon, 1 Jun 2020 00:29:50 +0000 (01:29 +0100)]
* doc/emacs/buffers.texi (Icomplete): Mention icomplete-minibuffer-setup-hook.

4 years agoBe more aggressive in marking objects during GC
Paul Eggert [Sun, 31 May 2020 22:29:23 +0000 (15:29 -0700)]
Be more aggressive in marking objects during GC

Simplified version of a patch from Pip Cet (Bug#41321#299).
* src/alloc.c (maybe_lisp_pointer): Remove.  All uses removed.
(mark_memory): Also look at the pointer offset by ‘lispsym’,
for symbols.

4 years agoStore libgccjit version into generated code
Andrea Corallo [Sun, 31 May 2020 21:26:08 +0000 (22:26 +0100)]
Store libgccjit version into generated code

* src/comp.c (emit_ctxt_code): Add libgccjit version into
stored optimize qualities.
(syms_of_comp): Define Qgccjit here.

* src/w32fns.c (syms_of_w32fns): Move out Qgccjit definition.

4 years ago* Optimize 'emit_static_object' for load-time
Andrea Corallo [Sun, 31 May 2020 19:28:31 +0000 (20:28 +0100)]
* Optimize 'emit_static_object' for load-time

* src/comp.c (emit_static_object): Use a chunck size of 200 bytes
on bugged GCCs and a longer one (1024) in sane ones. Rename
str in buff to disambiguate and prefer xmalloc to a VLA given
the buffer is not that small.

4 years ago* Add `comp-libgccjit-version' subr
Andrea Corallo [Sun, 31 May 2020 19:47:50 +0000 (20:47 +0100)]
* Add `comp-libgccjit-version' subr

* src/comp.c (gcc_jit_version_major, gcc_jit_version_minor)
(gcc_jit_version_patchlevel): Import.
(Fcomp_libgccjit_version): New Lisp function.
(syms_of_comp): Update for 'comp-libgccjit-version'.

4 years agoUnbreak compilation with CHECK_STRUCTS defined.
Philipp Stephani [Sun, 31 May 2020 17:50:04 +0000 (19:50 +0200)]
Unbreak compilation with CHECK_STRUCTS defined.

* src/pdumper.c (dump_float): Update hash value after commit
9f7bfb6cb06f1480a0904184cabf187e03628e55.  The struct layout is still
compatible.

4 years ago; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
Eli Zaretskii [Sun, 31 May 2020 17:34:00 +0000 (20:34 +0300)]
; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 31 May 2020 17:32:13 +0000 (18:32 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* Cut down compile-time emitting static data as string literals
Nicolás Bértolo [Wed, 20 May 2020 03:34:32 +0000 (00:34 -0300)]
* Cut down compile-time emitting static data as string literals

This change drastically reduce compile time.  Apparently GCC optimizer
does not scale up well at all for long sequences of assignments into a
single array.

Nicolás Bértolo <nicolasbertolo@gmail.com>
Andrea Corallo  <akrl@sdf.org>

* src/comp.c (gcc_jit_context_new_string_literal)
(gcc_jit_block_add_assignment_op): New imports.
(comp_t): New 'size_t_type' 'memcpy' fields.
(emit_static_object): Define static objects using string literals
and memcpy.
(define_memcpy): New function.
(Fcomp__init_ctxt): Define 'size_t_type' and 'memcpy'.

4 years agoFix bug #41618 "(byte-compile 'foo) errors when foo is a macro."
Alan Mackenzie [Sun, 31 May 2020 16:46:06 +0000 (16:46 +0000)]
Fix bug #41618 "(byte-compile 'foo) errors when foo is a macro."

* lisp/emacs-lisp/bytecomp.el (byte-compile): Disentangle the eval of the
final form from the pushing of 'macro onto it, doing the former first.

4 years ago* Emit better debug comments in emit_static_object
Andrea Corallo [Sun, 31 May 2020 11:22:46 +0000 (12:22 +0100)]
* Emit better debug comments in emit_static_object

* src/comp.c (emit_static_object): Do not truncate debug
comments at the first NULL character.

4 years agoRemove mhtml--extend-font-lock-region (Bug#41441)
Tom Tromey [Sun, 31 May 2020 16:20:12 +0000 (10:20 -0600)]
Remove mhtml--extend-font-lock-region (Bug#41441)

* lisp/textmodes/mhtml-mode.el (mhtml--extend-font-lock-region):
Remove.
(mhtml-mode): Don't set font-lock-extend-region-functions.

4 years agoProtect bidi cache from inadvertent resets
Eli Zaretskii [Sun, 31 May 2020 14:34:09 +0000 (17:34 +0300)]
Protect bidi cache from inadvertent resets

* src/xdisp.c (Fline_pixel_height, Fmove_point_visually): Save and
restore the bidi cache, to avoid inadvertently resetting it by
starting a new iteration through buffer text.  This could cause
trouble if these functions are called during a redisplay cycle,
especially while we were processing RTL text.

4 years agoAvoid crashes due to bidi cache being reset during redisplay
Eli Zaretskii [Sun, 31 May 2020 14:23:11 +0000 (17:23 +0300)]
Avoid crashes due to bidi cache being reset during redisplay

If automatic character composition triggers GC, and
'garbage-collection-messages' are turned on, we could have the
bidi cache reset while processing RTL text, which would then
consistently crash.
* src/xdisp.c (display_echo_area_1): Protect the bidi cache
against changes inside 'try_window'.

4 years agooccur: Add bindings for next-error-no-select
Tino Calancha [Sun, 31 May 2020 10:31:27 +0000 (12:31 +0200)]
occur: Add bindings for next-error-no-select

Make the navigation in the occur buffer closer
to the navigation in the compilation buffer.

Add bindings to navigate the occur matches (Bug#39121).
Honor `next-error-highlight' and `next-error-highlight-no-select'
when navigating the occurrences.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
New variables.
(occur-1): Set `occur-highlight-regexp' to the searched regexp.
(occur-goto-locus-delete-o, occur--highlight-occurrence): New defuns.
(occur-mode-display-occurrence, occur-mode-goto-occurrence):
Use `occur--highlight-occurrence'.
(occur-mode-map): Bind n to `next-error-no-select'
and p to `previous-error-no-select'

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce this change.

* test/lisp/replace-tests.el (replace-tests-with-highlighted-occurrence):
Add helper macro.
(occur-highlight-occurrence): Add test.

4 years agoFix loading of libgccjit.dll while dumping in Windows.
Nicolás Bértolo [Sat, 30 May 2020 00:08:37 +0000 (21:08 -0300)]
Fix loading of libgccjit.dll while dumping in Windows.

loadup.el calls `native-comp-available-p', that calls
load_gccjit_if_necessary() in Windows. That function tries to load
libgccjit using the mappings defined in `dynamic-library-alist'. That
mapping is filled by term/w32-win.el, but that file may be loaded too
late.

* src/emacs.c (syms_of_emacs): Add libgccjit to the
`dynamic-library-alist' used when starting to dump so
`native-comp-available-p' always works in Windows.

4 years agoDo not call `gensym' too early when loading a dump file.
Nicolás Bértolo [Sat, 30 May 2020 00:03:00 +0000 (21:03 -0300)]
Do not call `gensym' too early when loading a dump file.

This happened when subr.eln was not the first native compilation unit
to be loaded. register_native_comp_unit() is called when loading a
native compilation unit and that in turn used to call `gensym', which
was not loaded yet. This led to a SIGSEGV.

* src/comp.c (register_native_comp_unit): Replace the call to `gensym'
with an ad-hoc counter.

4 years ago* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.
Juri Linkov [Sat, 30 May 2020 22:30:34 +0000 (01:30 +0300)]
* lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize buffer.

* lisp/tab-bar.el (switch-to-buffer-other-tab): Use
'window-normalize-buffer-to-switch-to' on 'buffer-or-name',
like does 'pop-to-buffer' used by 'switch-to-buffer-other-frame',
instead of raising the error "Invalid buffer" on a non-existent buffer name.

4 years agoDon't return transient projects with MAYBE-PROMPT=nil
Dmitry Gutov [Sat, 30 May 2020 16:57:06 +0000 (19:57 +0300)]
Don't return transient projects with MAYBE-PROMPT=nil

* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).

4 years ago; * etc/TODO: Fix formatting. (Bug#41497)
Eli Zaretskii [Sat, 30 May 2020 16:10:14 +0000 (19:10 +0300)]
; * etc/TODO: Fix formatting.  (Bug#41497)

4 years agoMinor fix in 'find-alternate-file'
immerrr [Sun, 17 May 2020 11:47:23 +0000 (13:47 +0200)]
Minor fix in 'find-alternate-file'

This fixes the use case when, for example, 'find-file-hooks'
fails.
* lisp/files.el (find-alternate-file): If buffer 'oname' exists,
kill it before renaming the new one.  (Bug#41359)

4 years agoRemove private prototype for 'execve' and its uses in MinGW build
Eli Zaretskii [Sat, 30 May 2020 10:56:20 +0000 (13:56 +0300)]
Remove private prototype for 'execve' and its uses in MinGW build

* src/sysdep.c (emacs_exec_file): Don't compile this function
anymore on WINDOWSNT, since it is not used there.  This function
was the only reason for having 'execve' prototype in ms-w32.h.

* nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs
ming.org mess that it causes.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sat, 30 May 2020 10:52:27 +0000 (11:52 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* Avoid calling Ffile_exists_p too early
Andrea Corallo [Sat, 30 May 2020 10:13:38 +0000 (11:13 +0100)]
* Avoid calling Ffile_exists_p too early

Being quite early in startup initialization is better not to rely on
Ffile_exists_p, this call Ffile_expand and not all the necessary
initialization already happened.

* src/pdumper.c (dump_do_dump_relocation): Use fopen instead of
Ffile_exists_p.

4 years agoFix mingw.org's MinGW GCC 9 warning about 'execve'
Eli Zaretskii [Sat, 30 May 2020 10:19:13 +0000 (13:19 +0300)]
Fix mingw.org's MinGW GCC 9 warning about 'execve'

* nt/inc/ms-w32.h (execve) [__GNUC__ > 9]: Provide a different
prototype for mingw.org's MinGW as well, to match the GCC builtin.

4 years agoAnother fix of display of line-prefix with fringe bitmaps
Eli Zaretskii [Fri, 29 May 2020 20:02:10 +0000 (23:02 +0300)]
Another fix of display of line-prefix with fringe bitmaps

* src/xdisp.c (redisplay_internal): Don't use "optimization 1"
if a glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)

4 years ago* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent
Stefan Monnier [Fri, 29 May 2020 19:01:58 +0000 (15:01 -0400)]
* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent

Use the new "space after paren" convention to get the desired indentation

4 years agoproject-prompt-project-dir: Use more consistent prompts
Dmitry Gutov [Fri, 29 May 2020 18:37:12 +0000 (21:37 +0300)]
project-prompt-project-dir: Use more consistent prompts

* lisp/progmodes/project.el (project-prompt-project-dir):
Use more consistent prompts.

4 years agoFix display of line-prefix with fringe bitmaps
Eli Zaretskii [Fri, 29 May 2020 14:00:52 +0000 (17:00 +0300)]
Fix display of line-prefix with fringe bitmaps

* src/xdisp.c (try_window_id): Don't use this optimization if a
glyph row from which to start display begins with a display
property that draws into the fringes.  (Bug#41584)

4 years agoCommit indian.el forgotten in previous change.
Eli Zaretskii [Fri, 29 May 2020 13:30:44 +0000 (16:30 +0300)]
Commit indian.el forgotten in previous change.

4 years ago* lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".
Michael Albinus [Fri, 29 May 2020 09:41:54 +0000 (11:41 +0200)]
* lisp/net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".

4 years ago* lisp/emacs-lisp/lisp-mode.el: Add new indentation convention
akater [Fri, 29 May 2020 04:26:09 +0000 (00:26 -0400)]
* lisp/emacs-lisp/lisp-mode.el: Add new indentation convention

(calculate-lisp-indent): To distinguish code and data when indenting,
introduce the convention that a space between an open paren and
a symbol indicate that this should be indented as a simple data list.

4 years agoCreate a buffer-local binding to improve performance
Arnold Noronha [Thu, 28 May 2020 23:35:58 +0000 (02:35 +0300)]
Create a buffer-local binding to improve performance

* lisp/ido.el (ido-make-buffer-list-1):
Create a buffer-local binding to improve performance when a lot of
buffers are open (bug#41029).

Copyright-paperwork-exempt: yes

4 years agonext-error-find-buffer-function: Back to #'ignore
Dmitry Gutov [Thu, 28 May 2020 23:03:41 +0000 (02:03 +0300)]
next-error-find-buffer-function: Back to #'ignore

* lisp/simple.el (next-error-find-buffer-function):
Change the default back, to simplify the default behavior
(bug#40919).

4 years ago; project.el: Update TODO
Dmitry Gutov [Thu, 28 May 2020 20:01:08 +0000 (23:01 +0300)]
; project.el: Update TODO

4 years agoImprove Malayalam language transliteration
James Thomas [Mon, 27 Apr 2020 02:36:48 +0000 (08:06 +0530)]
Improve Malayalam language transliteration

The existing ITRANS scheme did not support some characters and
language quirks like 'chillu's.  The Inscript method had errors.
* lisp/language/ind-util.el (indian-mlm-base-table): Add archaic
chars, Mozhi combos; cleanup.
(indian-mlm-mozhi-table): New scheme Mozhi.
* lisp/leim/quail/indian.el (inscript-mlm-keytable): Correct
errors.  Add Inscript chillus & zero-width chars, Mozhi scheme.
* etc/NEWS: Mention the changes.

4 years agoMerge branch 'feature/project-switching'
Simen Heggestøyl [Thu, 28 May 2020 15:02:17 +0000 (17:02 +0200)]
Merge branch 'feature/project-switching'

4 years agoDocument that {en,de}code-coding-string preserve match data
Mattias Engdegård [Thu, 28 May 2020 14:37:27 +0000 (16:37 +0200)]
Document that {en,de}code-coding-string preserve match data

* lisp/international/mule.el (define-coding-system):
Require :pre-write-conversion and :post-read-conversion functions
to leave the match data untouched.
* src/coding.c (Fdecode_coding_string, Fencode_coding_string):
Document functions as match-data-preserving.

Suggested by Stefan Monnier (see bug#41445).

4 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 28 May 2020 14:50:26 +0000 (07:50 -0700)]
Merge from origin/emacs-27

bd7b681dc4 (origin/emacs-27) Tiny texinfo markup fixes
d0dd0e0612 ; Fix more @var/@code mixups in Elisp manual
313dc0439e ; Fix another format-spec typo in the Elisp manual
9d7fd78421 Make next-error behavior a bit more flexible
0691d25295 * etc/NEWS.25: Belatedly announce upcase-dwim and downcase...
df91c94ca8 Fix access to single-byte characters in buffer text

4 years ago; Merge from origin/emacs-27
Glenn Morris [Thu, 28 May 2020 14:50:26 +0000 (07:50 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

478638e470 Revert "Fix eshell-mode-map initialization"

4 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 28 May 2020 14:50:25 +0000 (07:50 -0700)]
Merge from origin/emacs-27

e7a3ed8a6d Fix tab-bar-tab-name-ellipsis initialization
4737d0af75 Fix Elisp manual entry for format-spec
0195809bb6 Fix rare assertion violations in 'etags'
cddb0079ff ; * lisp/format-spec.el (format-spec): Fix typo.