]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 29 Mar 2020 11:31:24 +0000 (12:31 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoFix free function compilation
Andrea Corallo [Sun, 29 Mar 2020 10:21:55 +0000 (11:21 +0100)]
Fix free function compilation

4 years ago* comp.el (comp-output-base-filename): Handle src being a symbol
Andrea Corallo [Sun, 29 Mar 2020 10:09:02 +0000 (11:09 +0100)]
* comp.el (comp-output-base-filename): Handle src being a symbol

4 years agoAdd comp-test-40187 checking function shadowing.
Andrea Corallo [Sun, 29 Mar 2020 09:57:36 +0000 (10:57 +0100)]
Add comp-test-40187 checking function shadowing.

4 years ago* test/src/comp-tests.el (comp-tests-doc): Fix
Andrea Corallo [Sun, 29 Mar 2020 09:51:12 +0000 (10:51 +0100)]
* test/src/comp-tests.el (comp-tests-doc): Fix

4 years ago* test/src/comp-test-funcs.el (comp-test-big-interactive): New test
Andrea Corallo [Sun, 29 Mar 2020 09:44:11 +0000 (10:44 +0100)]
* test/src/comp-test-funcs.el (comp-test-big-interactive): New test

4 years agoPrevent collisions in C namespace and function shadowing
Andrea Corallo [Sat, 28 Mar 2020 20:56:47 +0000 (20:56 +0000)]
Prevent collisions in C namespace and function shadowing

This rework make functions being indexed by their unique C symbol name
preventing multiple lisp function with the same name colliding.

4 years ago* comp.c (maybe_defer_native_compilation): Compile comp dependecies.
Andrea Corallo [Thu, 26 Mar 2020 15:47:36 +0000 (15:47 +0000)]
* comp.c (maybe_defer_native_compilation): Compile comp dependecies.

Make maybe_defer_native_compilation able to compile comp dependecies
breaking circularity.

4 years agosrc/comp.c (Fcomp__init_ctxt): Aesthetic
Andrea Corallo [Sun, 29 Mar 2020 11:26:45 +0000 (12:26 +0100)]
src/comp.c (Fcomp__init_ctxt): Aesthetic

4 years ago* .gitlab-ci.yml (test-native-bootstrap-speed*): Timeout to 8h
Andrea Corallo [Tue, 24 Mar 2020 20:36:46 +0000 (20:36 +0000)]
* .gitlab-ci.yml (test-native-bootstrap-speed*): Timeout to 8h

Running in tests in parall takes longer.

4 years agoImprove Tramp cache for asynchronous processes
Michael Albinus [Sun, 29 Mar 2020 10:24:04 +0000 (12:24 +0200)]
Improve Tramp cache for asynchronous processes

* lisp/net/tramp-adb.el (tramp-adb-handle-exec-path)
(tramp-adb-get-device):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askquestion):
* lisp/net/tramp-sh.el (tramp-remote-selinux-p, tramp-remote-acl-p)
(tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection, tramp-get-remote-path)
(tramp-get-inline-compress, tramp-get-inline-coding):
* lisp/net/tramp-smb.el (tramp-smb-get-cifs-capabilities)
(tramp-smb-get-stat-capability):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-remote-acl-p)
(tramp-sudoedit-remote-selinux-p): Cache property in main process.

* lisp/net/tramp-cache.el (tramp-cache-undefined): New defconst.
(tramp-get-hash-table, tramp-connection-property-p): Use it.
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-flush-connection-properties): Add sanity checks.
(tramp-get-file-property, tramp-set-file-property)
(tramp-get-connection-property, tramp-set-connection-property)
(tramp-dump-connection-properties): Adapt docstring.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Delete all
processes.

* lisp/net/tramp-gvfs.el (tramp-gvfs-unmount):
Use `tramp-cleanup-connection'.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
Use `bound-and-true-p'.

* lisp/net/tramp.el (tramp-get-process): New defun.

4 years ago; * doc/lispref/internals.texi (Module Misc): Fix version
Philipp Stephani [Sun, 29 Mar 2020 08:22:35 +0000 (10:22 +0200)]
; * doc/lispref/internals.texi (Module Misc): Fix version

4 years ago* lisp/vc/vc-dir.el (vc-dir-root): New command (bug#12492, bug#34949).
Juri Linkov [Sun, 29 Mar 2020 00:08:05 +0000 (02:08 +0200)]
* lisp/vc/vc-dir.el (vc-dir-root): New command (bug#12492, bug#34949).

* lisp/vc/vc-hooks.el (vc-menu-map): Change menu command from
'vc-dir' to 'vc-dir-root'.

4 years agoSwitch to literal mode with message when regexp is too big in char-fold search
Juri Linkov [Sat, 28 Mar 2020 23:41:29 +0000 (01:41 +0200)]
Switch to literal mode with message when regexp is too big in char-fold search

* lisp/char-fold.el (char-fold-to-regexp): Don't use regexp-quote
when the length of regexp reaches 5000.  (Bug#40216)

* lisp/isearch.el (isearch-search): On big regexp in char-fold mode
gracefully fall back to literal mode, try to search again and display
momentary-message about switching to literal mode.
(isearch--momentary-message): Add optional arg SECONDS.

4 years agoStop using newly-deprecated dosname Gnulib module
Paul Eggert [Sat, 28 Mar 2020 20:58:44 +0000 (13:58 -0700)]
Stop using newly-deprecated dosname Gnulib module

Code is supposed to use the filename module now.
* admin/merge-gnulib (GNULIB_MODULES): Replace dosname with filename.
* lib/dosname.h: Remove this forwarding stub.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/emacsclient.c, src/fileio.c:
Include filename.h instead of dosname.h.

4 years agoUpdate from Gnulib
Paul Eggert [Sat, 28 Mar 2020 20:50:02 +0000 (13:50 -0700)]
Update from Gnulib

This incorporates:
2020-03-28 Use module 'filename' instead of module 'dosname'
2020-03-28 dosname: Redirect to 'filename'
* lib/at-func.c, lib/canonicalize-lgpl.c, lib/dosname.h:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/filename.h: New file, copied from Gnulib.

4 years ago* lisp/jit-lock.el (jit-lock-mode): Pass `local` to add-hook
Stefan Monnier [Sat, 28 Mar 2020 14:16:58 +0000 (10:16 -0400)]
* lisp/jit-lock.el (jit-lock-mode): Pass `local` to add-hook

The old code used local=nil knowing that add-hook would affect the
local part only anyway.  Remove this hideous assumption.
Remove redundant `:group` args while we're at it.

4 years ago* lisp/progmodes/ebrowse.el (ebrowse-tags-loop-call): Rename
Stefan Monnier [Sat, 28 Mar 2020 13:41:15 +0000 (09:41 -0400)]
* lisp/progmodes/ebrowse.el (ebrowse-tags-loop-call): Rename

Used to be called `ebrowse-tags-loop-form` and passed to `eval`.
Now it's passed to `apply` instead, which is better for karma.
(ebrowse-tags-loop-continue, ebrowse-tags-search)
(ebrowse-tags-query-replace, ebrowse-tags-search-member-use):
Adjust accordingly.
(ebrowse-electric-position-mode-map): Move init into declaration.
(ebrowse-electric-position-mode): Derive from special.

4 years agoTurn compilation-error-case-fold-search into a defvar
Mattias Engdegård [Thu, 26 Mar 2020 09:58:30 +0000 (10:58 +0100)]
Turn compilation-error-case-fold-search into a defvar

See bug#40119, and the discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00653.html

* lisp/progmodes/compile.el (compilation-error-case-fold-search):
Turn into a defvar.
* etc/NEWS: Update.

4 years agoTramp cache fixes
Michael Albinus [Sat, 28 Mar 2020 11:59:03 +0000 (12:59 +0100)]
Tramp cache fixes

* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Flush the
cache after the file has been written.

4 years agoUse ATTRIBUTE_CONST for some bignum functions
Paul Eggert [Fri, 27 Mar 2020 21:17:44 +0000 (14:17 -0700)]
Use ATTRIBUTE_CONST for some bignum functions

* src/bignum.h (mpz_get_d_rounded):
* src/lisp.h (bignum_to_double, bignum_to_intmax)
(bignum_to_uintmax, bignum_bufsize):
Declare as ATTRIBUTE_CONST.

4 years ago* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Declare the type immediately
Stefan Monnier [Fri, 27 Mar 2020 21:14:34 +0000 (17:14 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Declare the type immediately

4 years ago* lisp/gnus/gnus-registry.el: Use lexical-binding
Stefan Monnier [Fri, 27 Mar 2020 20:38:52 +0000 (16:38 -0400)]
* lisp/gnus/gnus-registry.el: Use lexical-binding

(gnus-registry-install-shortcuts): Use a closure (with dynamic :documentation)
(gnus-registry-user-format-function-M): Use define-obsolete-function-alias.
(gnus-registry-article-marks-to-names): η-reduce.

4 years ago* lisp/textmodes/tex-mode.el: Replace double-definition hack with an advice
Stefan Monnier [Fri, 27 Mar 2020 16:54:52 +0000 (12:54 -0400)]
* lisp/textmodes/tex-mode.el: Replace double-definition hack with an advice

(tex-verbatim-environments): Add "Verbatim".
(tex--guess-mode): Rename from tex-guess-mode and return the mode
rather than calling it.
(tex-mode): Replace second definition with an advice.

4 years ago* lisp/progmodes/ebrowse.el: Prefer hash-tables to obarrays
Stefan Monnier [Fri, 27 Mar 2020 16:24:19 +0000 (12:24 -0400)]
* lisp/progmodes/ebrowse.el: Prefer hash-tables to obarrays

Remove redundant :group args.
Use `defvar-local` and `setq-local` where possible.

(ebrowse-some): Use seq-some instead.
(ebrowse-every): Use seq-every-p instead.
(ebrowse-position): Use seq-position.
(ebrowse--tree-table): Rename from `ebrowse--tree-obarray`.
Change all users to use a hash-table rather than an obarray.
(ebrowse-for-all-trees): Adjust to the table being a hash-table.
(ebrowse-tree-table-as-alist): Rename from `ebrowse-tree-obarray-as-alist`.
(ebrowse-build-tree-obarray): Rename from `ebrowse-build-tree-obarray`.
(ebrowse-tree-mode): Remove redundant setting of `ebrowse--tree-obarray`.
(ebrowse-set-tree-indentation, ebrowse-view-file-other-frame)
(ebrowse-last-completion-table): Rename from
ebrowse-last-completion-obarray.
(ebrowse-position): Make it a proper struct.

4 years agoPort the 'module/async-pipe' test to MS-Windows
Eli Zaretskii [Fri, 27 Mar 2020 12:43:20 +0000 (15:43 +0300)]
Port the 'module/async-pipe' test to MS-Windows

These changes let the code compile and produce a valid DLL, but the
test hangs.  It looks like the hang is in Fdelete_process, when it
closes one of the descriptors of the pipe process.
In addition, this use of the pipe process cannot currently work
on MS-Windows, since make-pipe-process doesn't set up the reader
thread to read from the Emacs's side of the pipe, so the select
emulation doesn't know there's stuff to read from that pipe.
* test/data/emacs-module/mod-test.c [WINDOWSNT]: Include
windows.h.
(ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds.
(sleep_for_half_second): New function.
(write_to_pipe): Declare return type differently for WINDOWSNT.
Call sleep_for_half_second.
(Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute
for pthread_create.
(invalid_finalizer): Replace non_ASCII character in a comment.

* test/src/emacs-module-tests.el (module/async-pipe): Skip on
MS-Windows, as the test fails and then hangs.

4 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 27 Mar 2020 10:02:32 +0000 (11:02 +0100)]
; * etc/NEWS: Fix typos.

4 years agoAdd manual and NEWS entries for previous gdb-mi changes
Yuan Fu [Fri, 27 Mar 2020 08:43:49 +0000 (09:43 +0100)]
Add manual and NEWS entries for previous gdb-mi changes

* etc/NEWS: Add entries for saving and restoring GDB window
configurations.
* doc/emacs/building.texi (GDB User Interface Layout): Add
documentation for 'gdb-save-window-configuration',
'gdb-load-window-configuration',
'gdb-default-window-configuration-file',
'gdb-window-configuration-directory',
'gdb-restore-window-configuration-after-quit'.  Change 'many-windows
layout' to 'default layout'.

4 years agoTreat out-of-range positions consistently
Paul Eggert [Fri, 27 Mar 2020 07:58:31 +0000 (00:58 -0700)]
Treat out-of-range positions consistently

If a position argument to get-byte etc. is an out-of-range integer,
treat it the same regardless of whether it is a fixnum or a bignum.
* src/buffer.c (fix_position): New function.
* src/buffer.c (validate_region):
* src/character.c (Fget_byte):
* src/coding.c (Ffind_coding_systems_region_internal)
(Fcheck_coding_systems_region):
* src/composite.c (Ffind_composition_internal):
* src/editfns.c (Fposition_bytes, Fchar_after, Fchar_before)
(Finsert_buffer_substring, Fcompare_buffer_substrings)
(Fnarrow_to_region):
* src/fns.c (Fsecure_hash_algorithms):
* src/font.c (Finternal_char_font, Ffont_at):
* src/fringe.c (Ffringe_bitmaps_at_pos):
* src/search.c (search_command):
* src/textprop.c (get_char_property_and_overlay):
* src/window.c (Fpos_visible_in_window_p):
* src/xdisp.c (Fwindow_text_pixel_size):
Use it instead of CHECK_FIXNUM_COERCE_MARKER, so that
the code is simpler and treats bignums consistently with fixnums.
* src/buffer.h (CHECK_FIXNUM_COERCE_MARKER): Define here
rather than in lisp.h, and reimplement in terms of fix_position
so that it treats bignums consistently with fixnums.
* src/lisp.h (CHECK_FIXNUM_COERCE_MARKER): Move to buffer.h.
* src/textprop.c (validate_interval_range): Signal with original
bounds rather than modified ones.

4 years agoDisable enable-local-variables for hunk-only in diff-syntax-fontify-props
Juri Linkov [Thu, 26 Mar 2020 23:44:17 +0000 (01:44 +0200)]
Disable enable-local-variables for hunk-only in diff-syntax-fontify-props

* lisp/vc/diff-mode.el (diff-syntax-fontify-props): Let-bind
enable-local-variables to nil when hunk-only is non-nil (bug#39190)

4 years agoRefactor and fix typo in CHECK_*_COERCE_MARKER
Paul Eggert [Thu, 26 Mar 2020 23:12:21 +0000 (16:12 -0700)]
Refactor and fix typo in CHECK_*_COERCE_MARKER

* src/data.c (check_integer_coerce_marker)
(check_number_coerce_marker): New functions.
Also, fix a typo in the former, by having it use
Qinteger_or_marker_p not Qnumber_or_marker_p.
(arithcompare, floatop_arith_driver, bignum_arith_driver)
(arith_driver, Fplus, Fminus, Ftimes, Fquo, Frem, Fmod)
(minmax_driver, Flogand, Flogior, Flogxor, Fadd1, Fsub1):
Use them in place of the similarly-named macros.
* src/lisp.h (CHECK_NUMBER_COERCE_MARKER)
(CHECK_INTEGER_COERCE_MARKER): Remove; no longer used.

4 years agoAdd a module function to open a file descriptor connected to a pipe.
Philipp Stephani [Thu, 26 Mar 2020 16:22:25 +0000 (17:22 +0100)]
Add a module function to open a file descriptor connected to a pipe.

A common complaint about the module API is that modules can't
communicate asynchronously with Emacs.  While it isn't possible to
call arbitrary Emacs functions asynchronously, writing to a pipe
should always be fine and is a pretty low-hanging fruit.

This patch implements a function that adapts an existing pipe
process.  That way, users can use familiar tools like process filters
or 'accept-process-output'.

* src/module-env-28.h: Add 'open_channel' module function.

* src/emacs-module.c (module_open_channel): Provide definition for
'open_channel'.
(initialize_environment): Use it.

* src/process.c (open_channel_for_module): New helper function.
(syms_of_process): Define necessary symbol.

* test/src/emacs-module-tests.el (module/async-pipe): New unit test.

* test/data/emacs-module/mod-test.c (signal_system_error): New helper
function.
(signal_errno): Use it.
(write_to_pipe): New function running in the background.
(Fmod_test_async_pipe): New test module function.
(emacs_module_init): Export it.

* doc/lispref/internals.texi (Module Misc): Document new module
function.

* doc/lispref/processes.texi (Asynchronous Processes): New anchor
for pipe processes.

* etc/NEWS: Document 'open_channel' function.

4 years agoRemove COERCE_MARKER
Paul Eggert [Thu, 26 Mar 2020 20:06:12 +0000 (13:06 -0700)]
Remove COERCE_MARKER

* src/xdisp.c (COERCE_MARKER): Remove.  All uses replaced by
Fmarker_position; this is simpler as the macro was invoked only on
markers.

4 years agoline-beginning-position args can be bignums
Paul Eggert [Thu, 26 Mar 2020 01:32:19 +0000 (18:32 -0700)]
line-beginning-position args can be bignums

* src/editfns.c (Fline_beginning_position, Fline_end_position):
Do not restrict integer arguments to fixnums.

4 years agoFix integer overflow in internal_self_insert
Paul Eggert [Thu, 26 Mar 2020 01:20:31 +0000 (18:20 -0700)]
Fix integer overflow in internal_self_insert

* src/cmds.c (internal_self_insert): Avoid undefined behavior
on integer overflow by using saturated add.

4 years agoFix integer overflow in forward-point
Paul Eggert [Thu, 26 Mar 2020 00:40:57 +0000 (17:40 -0700)]
Fix integer overflow in forward-point

* lisp/subr.el (forward-point): Rewrite in Lisp and move here ...
* src/cmds.c (Fforward_point): ... from here.  This fixes an
integer overflow bug with (forward-point most-positive-fixnum).

4 years agoMake compilation-mode regexp matching case-sensitive (bug#40119)
Mattias Engdegård [Wed, 18 Mar 2020 15:01:02 +0000 (16:01 +0100)]
Make compilation-mode regexp matching case-sensitive (bug#40119)

The number of regexps is large, they are written independently of one
another, and they frequently intersect.  Using case-sensitive matching
improves separation and performance, and is probably what everyone
have being assuming was used by compilation-mode all along.

* lisp/progmodes/compile.el (compilation-error-case-fold-search): New.
(compilation-parse-errors): Bind case-fold-search to
compilation-error-case-fold-search during matching.
* etc/NEWS: Announce.

4 years agoUpdate from gnulib
Paul Eggert [Wed, 25 Mar 2020 20:39:21 +0000 (13:39 -0700)]
Update from gnulib

This incorporates:
2020-03-25 getopt-posix: port __GETOPT_PREFIX to macOS
2020-03-22 acl-permissions: Improve autoconf macro
* lib/getopt-pfx-core.h, m4/acl.m4: Copy from Gnulib.

4 years agoPacify --enable-gcc-warnings for lock_file
Paul Eggert [Wed, 25 Mar 2020 20:37:23 +0000 (13:37 -0700)]
Pacify --enable-gcc-warnings for lock_file

* src/filelock.c (lock_file): Pacify gcc -Wmaybe-uninitialized
after recent change to this function.

4 years ago* lisp/textmodes/conf-mode.el (conf-mode): Fix last change
Stefan Monnier [Wed, 25 Mar 2020 18:09:48 +0000 (14:09 -0400)]
* lisp/textmodes/conf-mode.el (conf-mode): Fix last change

`delay-mode-hooks` cannot be tested from within `define-derived-mode`
because it's always non-nil in there, so arrange to test it before we
enter the body.

4 years agoImprove the UI of 'list-timers'
Eli Zaretskii [Wed, 25 Mar 2020 14:18:37 +0000 (16:18 +0200)]
Improve the UI of 'list-timers'

* lisp/emacs-lisp/timer-list.el (list-timers): Display both "Next"
and "Repeat" in units of seconds, for consistency.
(timer-list-mode): Add help-echo to column headers.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 25 Mar 2020 13:59:19 +0000 (15:59 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoRename dired-mark-region choices and ignore empty region.
Juri Linkov [Tue, 24 Mar 2020 21:58:01 +0000 (23:58 +0200)]
Rename dired-mark-region choices and ignore empty region.

* lisp/dired.el (dired-mark-region): Rename choices
'exclusive' to 'file', and 'inclusive' to 'line'.
(dired-mark-if, dired-mark): Check for non-empty region explicitly
instead of using use-region-p to ignore non-nil value of
use-empty-active-region.  (Bug#39902)

4 years agoFix gravatar tests
Robert Pluim [Tue, 24 Mar 2020 21:21:26 +0000 (22:21 +0100)]
Fix gravatar tests

* lisp/image/gravatar.el (gravatar--service-libravatar): Don't error
when failing to parse email address, just return the default URL.

* test/lisp/image/gravatar-tests.el (gravatar-build-url): Adjust
for new default gravatar url.

4 years ago; fix previous commit
Robert Pluim [Tue, 24 Mar 2020 20:19:23 +0000 (21:19 +0100)]
; fix previous commit

4 years ago; * etc/NEWS: Clarify news entry for message-draft-headers change
Eric Abrahamsen [Tue, 24 Mar 2020 20:08:30 +0000 (13:08 -0700)]
; * etc/NEWS: Clarify news entry for message-draft-headers change

4 years ago* comp.c (emit_mvar_access): Fix speed 1 compilation
Andrea Corallo [Tue, 24 Mar 2020 18:47:39 +0000 (18:47 +0000)]
* comp.c (emit_mvar_access): Fix speed 1 compilation

At speed 1 propagate does not run and all mvars are allocated in array
0.

4 years ago* comp.el (native-compile-async): Fix excessive messaging
Andrea Corallo [Tue, 24 Mar 2020 19:10:20 +0000 (19:10 +0000)]
* comp.el (native-compile-async): Fix excessive messaging

4 years agoAdd support for multiple Gravatar services
Philip K [Tue, 17 Mar 2020 14:29:53 +0000 (15:29 +0100)]
Add support for multiple Gravatar services

Now supports Libravatar and Unicornify, next to Gravatar (Bug#39965).

* lisp/image/gravatar.el (gravatar-base-url): Remove constant.
(gravatar-service-alist): List supported services.
(gravatar-service): Add user option to specify service, defaults to
Libravatar.
(gravatar--service-libravatar): New function, libravatar image host
resolver implementation.
(gravatar-build-url): Use alist gravatar-service-alist instead of
gravatar-base-url.
* etc/NEWS: Mention new gravatar service option.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Tue, 24 Mar 2020 16:22:06 +0000 (16:22 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoFix sending signals and EOF to the inferior process in gdb-mi.el
Eli Zaretskii [Tue, 24 Mar 2020 14:56:10 +0000 (16:56 +0200)]
Fix sending signals and EOF to the inferior process in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-io-interrupt, gdb-io-quit)
(gdb-io-stop, gdb-io-eof): Send signal/EOF to the inferior
process, not to GDB.  (Bug#40210)

4 years agoDon't add repeated xlmns:xlink declarations in svg-create
Lars Ingebrigtsen [Tue, 24 Mar 2020 04:30:49 +0000 (05:30 +0100)]
Don't add repeated xlmns:xlink declarations in svg-create

* lisp/svg.el (svg-create): Fix previous unconditional addition of
the xmlns:xlink declaration -- callers may already add one, and
having it twice is something most svg libraries doesn't like.

4 years agoMake cl-concatenate an alias of seq-concatenate
Noam Postavsky [Mon, 23 Mar 2020 22:58:21 +0000 (18:58 -0400)]
Make cl-concatenate an alias of seq-concatenate

* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use defalias instead
of apply.  This is simpler and more efficient.

4 years ago* comp.el : Fix typo introduced by f8b07ff4f3
Andrea Corallo [Mon, 23 Mar 2020 22:27:17 +0000 (22:27 +0000)]
* comp.el : Fix typo introduced by f8b07ff4f3

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Mon, 23 Mar 2020 20:38:07 +0000 (20:38 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoGuard against function redefinition during deferred load
Andrea Corallo [Mon, 23 Mar 2020 15:57:48 +0000 (15:57 +0000)]
Guard against function redefinition during deferred load

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 23 Mar 2020 16:48:15 +0000 (09:48 -0700)]
Merge from origin/emacs-27

d66331aea4 (origin/emacs-27) Don't build the Gnulib 'utimens' module ...
f2351a689b Add Harfbuzz dependency
8944310d7c Don't signal during backtrace unrewind (Bug#40088)
8709aaddd8 Fix a couple of problems in changelog generating functions
9ab85f087f Fix cl-concatenate (Bug#40180)
561e9fb91b Improve documentation of project.el commands
b28a9a6cc3 Make svg images with links valid
7515252cce * lisp/tab-line.el (tab-line-new-button-show): New defcustom.

# Conflicts:
# etc/NEWS
# nt/gnulib-cfg.mk

4 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 23 Mar 2020 16:46:39 +0000 (09:46 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

d801d1d8cc Don't have exif bugging out on short strings

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 23 Mar 2020 16:46:39 +0000 (09:46 -0700)]
Merge from origin/emacs-27

bed04c502c Use correct registry name for windows-1251 charset
1aa1529301 ERC: Update maintainer address

4 years agoDon't build the Gnulib 'utimens' module on MinGW
Eli Zaretskii [Mon, 23 Mar 2020 14:37:27 +0000 (16:37 +0200)]
Don't build the Gnulib 'utimens' module on MinGW

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_utimens): Omit the
'utimens' module in the MinGW build: 'utimens' is not used by
Emacs, and 'fdutimens' is implemented in w32.c.

4 years agoAdd Harfbuzz dependency
Phillip Lord [Mon, 23 Mar 2020 09:38:36 +0000 (09:38 +0000)]
Add Harfbuzz dependency

* admin/nt/dist-build/build-dep-zips.py: Add harfbuzz as a dependency.

4 years agoDon't signal during backtrace unrewind (Bug#40088)
Noam Postavsky [Fri, 20 Mar 2020 08:07:39 +0000 (04:07 -0400)]
Don't signal during backtrace unrewind (Bug#40088)

backtrace_eval_unrewind is used to temporarily reverse
let-bindings (it's called with a positive argument to reverse
bindings, and then a negative argument to re-apply them) by
backtrace--locals and backtrace-eval.  For the SPECPDL_LET_DEFAULT and
SPECPDL_LET_LOCAL cases (which occur for let-bindings on buffer-local
variables), the code calls Fdefault_value and Fbuffer_local_value on
the symbol.

For symbols which are unbound at top-level, the first (with positive
argument) call to backtrace_eval_unrewind will set the symbol's value
to unbound (putting the current value in the specpdl's "old value"
slot).  On the second (with negative argument) call,
backtrace_eval_unrewind attempts to retrieve the symbol's value with
Fdefault_value or Fbuffer_local_value, but that raises a void-variable
signal.  This interrupts the restoration of the let-bindings, so any
other variables more recent on the stack will now have the wrong
value.

* src/data.c (default_value): Make non-static.
* src/lisp.h: Declare it.
* src/eval.c (backtrace_eval_unrewind): Replace the calls to
Fdefault_value and Fbuffer_local_value with default_value and
buffer_local_value, respectively.  The latter do exactly the same as
the former, except if the symbol's value is Qunbound they just return
it instead of signaling void-variable.

4 years agoFix a couple of problems in changelog generating functions
Noam Postavsky [Fri, 20 Mar 2020 10:00:11 +0000 (06:00 -0400)]
Fix a couple of problems in changelog generating functions

* lisp/vc/diff-mode.el (diff-add-log-current-defuns): If there is a
scan-error when calling end-of-defun, go to end of hunk.  This can
easily happen since we are calling end-of-defun on a partial code
fragment from a diff.
* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff): Bind
display-buffer-overriding-action around the log-edit-show-diff call
only.  Otherwise, it can affect, for example, debugger windows
triggered by the diff-add-log-current-defuns call.

4 years agoFix cl-concatenate (Bug#40180)
Noam Postavsky [Sun, 22 Mar 2020 11:48:14 +0000 (07:48 -0400)]
Fix cl-concatenate (Bug#40180)

* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use apply, to avoid
adding extra nesting of args.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-concatenate): New test.

4 years agoAvoid extra "changed on disk" prompt in save-buffer (Bug#18336)
Noam Postavsky [Sun, 22 Mar 2020 01:00:08 +0000 (21:00 -0400)]
Avoid extra "changed on disk" prompt in save-buffer (Bug#18336)

* src/filelock.c (lock_file): Don't query the user if the current
session already owns the lock.

4 years ago* lisp/dired.el (dired-mark-region): New defcustom (bug#39902)
Juri Linkov [Mon, 23 Mar 2020 00:35:33 +0000 (02:35 +0200)]
* lisp/dired.el (dired-mark-region): New defcustom (bug#39902)

* lisp/dired.el (dired-mark-if): Use dired-mark-region.
(dired-mark): Use dired-mark-region.  Fix docstring.
(dired-mark-files-regexp, dired-mark-files-containing-regexp)
(dired-mark-symlinks, dired-mark-directories)
(dired-mark-executables, dired-flag-auto-save-files)
(dired-flag-backup-files): Mention dired-mark-region in docstring.

* lisp/dired-aux.el (dired-compare-directories):
* lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp):
Mention dired-mark-region in docstring.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 22 Mar 2020 16:11:53 +0000 (16:11 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* comp.c (maybe_defer_native_compilation): Fix
Andrea Corallo [Sun, 22 Mar 2020 15:08:58 +0000 (15:08 +0000)]
* comp.c (maybe_defer_native_compilation): Fix

Prevent recursive compilation while deferring compilation.

4 years ago* comp.c (maybe_defer_native_compilation): Add some debug code
Andrea Corallo [Sun, 22 Mar 2020 14:50:01 +0000 (14:50 +0000)]
* comp.c (maybe_defer_native_compilation): Add some debug code

4 years ago* comp.el: Add missing require
Andrea Corallo [Sun, 22 Mar 2020 09:35:55 +0000 (09:35 +0000)]
* comp.el: Add missing require

4 years ago* .gitlab-ci.yml: CI test native bootstrap speed1 and speed2
Andrea Corallo [Sat, 21 Mar 2020 19:32:01 +0000 (19:32 +0000)]
* .gitlab-ci.yml: CI test native bootstrap speed1 and speed2

Do just a fast bootstrap for these two.

4 years agoHave a fast build option triggered by env var NATIVE_FAST_BOOT
Andrea Corallo [Sat, 21 Mar 2020 14:11:41 +0000 (14:11 +0000)]
Have a fast build option triggered by env var NATIVE_FAST_BOOT

4 years agoRevert "Signal user-error on duplicate package refresh" (Bug#39187)
Stefan Kangas [Sun, 22 Mar 2020 10:57:06 +0000 (11:57 +0100)]
Revert "Signal user-error on duplicate package refresh" (Bug#39187)

This reverts commit a6d87ea045d9df73f70765bedfb02522043efd9b.

4 years ago; * etc/NEWS: Note changed default of message-draft-headers
Eric Abrahamsen [Sat, 21 Mar 2020 18:46:06 +0000 (11:46 -0700)]
; * etc/NEWS: Note changed default of message-draft-headers

4 years agoImprove documentation of project.el commands
Eli Zaretskii [Sat, 21 Mar 2020 11:26:19 +0000 (13:26 +0200)]
Improve documentation of project.el commands

* lisp/progmodes/project.el (project-find-regexp): Require 'grep'
to be able to call 'grep-read-files'.
(project-search, project-query-replace-regexp): Doc fixes.

* doc/emacs/maintaining.texi (Projects): New section.
* doc/emacs/emacs.texi (Top): Add "Projects" to the detailed menu.

4 years agoFix Bug#40156 in Tramp
Michael Albinus [Sat, 21 Mar 2020 09:30:26 +0000 (10:30 +0100)]
Fix Bug#40156 in Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Copy to temp file
only if FILENAME exists.  (Bug#40156)

* test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.

4 years agoRemove more XEmacs compat code from ediff*.el
Stefan Kangas [Sat, 21 Mar 2020 06:59:05 +0000 (07:59 +0100)]
Remove more XEmacs compat code from ediff*.el

* lisp/vc/ediff-init.el (ediff-H-glyph):
* lisp/vc/ediff-util.el (ediff-inferior-compare-regions)
(ediff-setup-keymap):
* lisp/vc/ediff-wind.el (ediff-control-frame-parameters)
(ediff-prefer-iconified-control-frame)
(ediff-setup-control-frame, ediff-xemacs-select-frame-hook): Remove
XEmacs compat code and declare compatibility functions obsolete.

* lisp/vc/ediff-init.el (ediff-temp-file-prefix): Redefine as
obsolete variable alias for 'temporary-file-directory'.
* lisp/vc/ediff-util.el (ediff-make-temp-file): Don't use obsolete
variable name.

4 years agoRemove obsolete XEmacs comment
Stefan Kangas [Sat, 21 Mar 2020 06:38:21 +0000 (07:38 +0100)]
Remove obsolete XEmacs comment

* lisp/emacs-lisp/edebug.el (edebug--display-1): Remove comment
regarding an XEmacs exclusive variable.

4 years agoDeclare some <package>-version variables obsolete
Stefan Kangas [Sat, 21 Mar 2020 01:47:08 +0000 (02:47 +0100)]
Declare some <package>-version variables obsolete

These are not used for anything these days and can therefore be
removed.  Package developers should check the Emacs version instead.
Ref: https://lists.gnu.org/r/emacs-devel/2020-03/msg00080.html

* lisp/calendar/icalendar.el (icalendar-version):
* lisp/dframe.el (dframe-version):
* lisp/emacs-lisp/checkdoc.el (checkdoc-version):
* lisp/emulation/edt.el (edt-version):
* lisp/international/mule.el (mule-version)
(mule-version-date):
* lisp/linum.el (linum-version):
* lisp/play/bubbles.el (bubbles-version):
* lisp/speedbar.el (speedbar-version):
* lisp/textmodes/remember.el (remember-version):
* lisp/url/url-vars.el (url-version):
* lisp/woman.el (woman-version): Declare obsolete.

* lisp/emacs-lisp/checkdoc.el (checkdoc-start-section):
* lisp/speedbar.el (speedbar-mode):
* lisp/url/url-about.el (url-about-protocols):
* lisp/url/url-http.el (url-http--user-agent-default-string):
* lisp/url/url-news.el (url-news-fetch-message-id):
* lisp/woman.el (woman-menu, woman-mode): Stop using variables
declared obsolete above.

4 years agoAdd "Old-" prefix to "Version" header in some cases
Stefan Kangas [Sat, 21 Mar 2020 01:46:53 +0000 (02:46 +0100)]
Add "Old-" prefix to "Version" header in some cases

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

* lisp/calendar/icalendar.el:
* lisp/emacs-lisp/checkdoc.el:
* lisp/hippie-exp.el:
* lisp/linum.el:
* lisp/master.el:
* lisp/progmodes/cwarn.el:
* lisp/repeat.el:
* lisp/ruler-mode.el:
* lisp/textmodes/remember.el:
* lisp/wdired.el:
* lisp/woman.el: Change "Version" header to "Old-Version".

4 years agoRemove the Date header from message-draft-headers
Eric Abrahamsen [Fri, 20 Mar 2020 17:53:49 +0000 (10:53 -0700)]
Remove the Date header from message-draft-headers

* lisp/gnus/message.el (message-draft-headers): The Date header should
reflect when the message is sent, not when it was saved or delayed.

4 years agoMake svg images with links valid
Zhu Zihao [Fri, 20 Mar 2020 15:35:31 +0000 (16:35 +0100)]
Make svg images with links valid

* lisp/svg.el (svg-create): Specify xlink namespace for svg images
(bug#40010).

Copyright-paperwork-exempt: yes

4 years ago* lisp/tab-line.el (tab-line-new-button-show): New defcustom.
Juri Linkov [Thu, 19 Mar 2020 23:21:57 +0000 (01:21 +0200)]
* lisp/tab-line.el (tab-line-new-button-show): New defcustom.

* lisp/tab-line.el (tab-line-format-template): Use tab-line-new-button-show.
(tab-line-new-tab-choice): Remove choice 'nil' with "No button".
(tab-line-separator): Add docstring.

4 years ago* comp.el (comp-async-jobs-number): Fix customize type.
Andrea Corallo [Thu, 19 Mar 2020 18:37:32 +0000 (18:37 +0000)]
* comp.el (comp-async-jobs-number): Fix customize type.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Thu, 19 Mar 2020 16:49:55 +0000 (16:49 +0000)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago* comp.el (comp-run-async-workers): Load only if compilation succeed
Andrea Corallo [Wed, 18 Mar 2020 20:16:05 +0000 (20:16 +0000)]
* comp.el (comp-run-async-workers): Load only if compilation succeed

4 years agoDon't have exif bugging out on short strings
Lars Ingebrigtsen [Thu, 19 Mar 2020 15:15:04 +0000 (16:15 +0100)]
Don't have exif bugging out on short strings

* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.

4 years agoDon't have exif bugging out on short strings
Lars Ingebrigtsen [Thu, 19 Mar 2020 15:15:04 +0000 (16:15 +0100)]
Don't have exif bugging out on short strings

* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.

4 years agoFix display of :box face when overlay strings are around
Eli Zaretskii [Thu, 19 Mar 2020 14:57:35 +0000 (16:57 +0200)]
Fix display of :box face when overlay strings are around

* src/xdisp.c (reset_box_start_end_flags): New function.
(handle_face_prop): Only set the start_of_box_run_p flag, don't
reset it.
(pop_it): Set the face_box_p flag, if the popped face requires
that, when continuing iteration over buffer text.
(get_next_display_element, next_element_from_display_vector): Only
set the end_of_box_run_p flag, never reset it here.
(set_iterator_to_next): Don't reset the start_of_box_run_p and
end_of_box_run_p flags here.  They are now reset as side effect of
PRODUCE_GLYPHS.
(append_space_for_newline): Restore the end_of_box_run_p flag
after PRODUCE_GLYPHS where we previously didn't reset it.
* src/dispextern.h (PRODUCE_GLYPHS): Call
reset_box_start_end_flags after producing glyphs.
(Bug#40124)

4 years agoUse correct registry name for windows-1251 charset
Robert Pluim [Wed, 18 Mar 2020 20:37:55 +0000 (21:37 +0100)]
Use correct registry name for windows-1251 charset

* src/ftfont.c (fc_charset_table): The registry to use to lookup
windows-1251 charset is microsoft-cp1251, not windows-1251.
(Bug#40097)

4 years agoTiny simplification of frac_to_double
Paul Eggert [Thu, 19 Mar 2020 06:58:46 +0000 (23:58 -0700)]
Tiny simplification of frac_to_double

* src/timefns.c (frac_to_double): Remove unnecessary runtime check,
since the denominator is always positive.

4 years agoOmit timestamp optimization invalid on 387 FPU
Paul Eggert [Wed, 18 Mar 2020 21:48:52 +0000 (14:48 -0700)]
Omit timestamp optimization invalid on 387 FPU

* src/timefns.c (frac_to_double): Omit optimization that is
invalid on machines with excess precision (e.g., gcc x86 with 387
FPU), because it double-rounds.  Found via ‘gcc -m32’ on x86-64.

4 years agoERC: Update maintainer address
Amin Bandali [Thu, 19 Mar 2020 01:27:49 +0000 (21:27 -0400)]
ERC: Update maintainer address

4 years ago* comp.c (native-elisp-load): Guard against misisng file.
Andrea Corallo [Wed, 18 Mar 2020 20:00:43 +0000 (20:00 +0000)]
* comp.c (native-elisp-load): Guard against misisng file.

4 years agoCommand late load when deferring compilation
Andrea Corallo [Wed, 18 Mar 2020 21:20:52 +0000 (21:20 +0000)]
Command late load when deferring compilation

4 years ago* comp.el: Extend `native-compile-async' for load and late-load
Andrea Corallo [Wed, 18 Mar 2020 19:52:36 +0000 (19:52 +0000)]
* comp.el: Extend `native-compile-async' for load and late-load

4 years agoExtend low level code for late load
Andrea Corallo [Wed, 18 Mar 2020 19:48:50 +0000 (19:48 +0000)]
Extend low level code for late load

4 years ago* comp.el: late-load support optional as `native-compile' parameter
Andrea Corallo [Tue, 17 Mar 2020 22:24:52 +0000 (22:24 +0000)]
* comp.el: late-load support optional as `native-compile' parameter

4 years ago* comp.el: Have the compiler generates 'late_top_level_run'
Andrea Corallo [Tue, 17 Mar 2020 21:35:11 +0000 (21:35 +0000)]
* comp.el: Have the compiler generates 'late_top_level_run'

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 18 Mar 2020 14:50:37 +0000 (07:50 -0700)]
Merge from origin/emacs-27

e92b8e535a (origin/emacs-27) Remove raw carriage return characters fr...
5747a59a88 Recalculate default font when switching font backend
a2dd8c4234 * lisp/tab-line.el: Fix tab-line-format and tab-line-forma...
a7b8291b6c * etc/NEWS: Make the `--eval` example slightly more precise
f8254aad14 * lisp/image/image-converter.el: Support more ImageMagick ...
5beb269505 Support Unicode 13.0
3a671ad7ed Fix regression in wisent-total-conflicts

# Conflicts:
# etc/NEWS