]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agocperl-mode: Fix bad parameter construction in cperl-etags
Harald Jörg [Wed, 5 Aug 2020 13:55:00 +0000 (15:55 +0200)]
cperl-mode: Fix bad parameter construction in cperl-etags

* lisp/progmodes/cperl-mode.el (cperl-etags): This fails with
(wrong-type-argument stringp cperl-sub-regexp). The error came
with incorporating Jonathan Rockway's work (bug#42355).

Copyright-paperwork-exempt: yes

4 years agocperl-mode: Workaround for failure of cperl-write-tags
Harald Jörg [Wed, 5 Aug 2020 13:37:13 +0000 (15:37 +0200)]
cperl-mode: Workaround for failure of cperl-write-tags

* lisp/progmodes/cperl-mode.el (cperl-mode): Accomodate recent
changes in etags (bug#42356).

4 years agoFix max-width/height for Message screenshots
Lars Ingebrigtsen [Wed, 5 Aug 2020 13:02:28 +0000 (15:02 +0200)]
Fix max-width/height for Message screenshots

* lisp/gnus/message.el (message-insert-screenshot):
:max-width/height apparently has to be integers.

4 years agomouse-drag-copy-region doc string clarification
Lars Ingebrigtsen [Wed, 5 Aug 2020 10:49:14 +0000 (12:49 +0200)]
mouse-drag-copy-region doc string clarification

* lisp/mouse.el (mouse-drag-copy-region): Clarify that the
variable only applies to selections in Emacs (bug#41856).

4 years agoMention C-y in the manual for yanking the primary selection
Lars Ingebrigtsen [Wed, 5 Aug 2020 10:43:18 +0000 (12:43 +0200)]
Mention C-y in the manual for yanking the primary selection

* doc/emacs/killing.texi (Primary Selection): Mention C-y here for
yanking the primary selection (bug#41857).

4 years ago; Silence recent byte-compiler warning in subr.el
Basil L. Contovounesios [Wed, 5 Aug 2020 10:40:27 +0000 (11:40 +0100)]
; Silence recent byte-compiler warning in subr.el

* lisp/subr.el (save-match-data-internal): Declare before first use.

4 years agoTweak the Message screenshot insertion
Lars Ingebrigtsen [Wed, 5 Aug 2020 10:31:44 +0000 (12:31 +0200)]
Tweak the Message screenshot insertion

* lisp/gnus/message.el (message-insert-screenshot): Force scaling
to 1, since the screenshot image will already be suitable for
displaying directly (it's the same resolution).

4 years agoImplement a screenshot command for Message mode
Lars Ingebrigtsen [Wed, 5 Aug 2020 10:21:35 +0000 (12:21 +0200)]
Implement a screenshot command for Message mode

* doc/misc/message.texi (MIME): Document it.

* lisp/gnus/message.el (message-screenshot-command): New variable.
(message-mode-map): New keystroke and menu item.  Also add
mml-attach-file to the menu.
(message-insert-screenshot): New command.

* lisp/gnus/mml.el (mml-parse-1): Allow having
content-transfer-encoding already in the part, so that we can have
inline base64-encoded binaries in the Message buffers.

4 years agoFontize $(...) slightly better in bash mode
Lars Ingebrigtsen [Wed, 5 Aug 2020 09:34:56 +0000 (11:34 +0200)]
Fontize $(...) slightly better in bash mode

* lisp/progmodes/sh-script.el (sh-font-lock-keywords-var): Fontize
$(...) slightly better (bug#42417).  Instead of just fontizing the
first word in the expression, fontize until the closing
parenthesis.  This doesn't work well if you have nested $(...)
expressions.

4 years agoMention undo in the doc string of dired-do-kill-lines
Lars Ingebrigtsen [Wed, 5 Aug 2020 09:27:54 +0000 (11:27 +0200)]
Mention undo in the doc string of dired-do-kill-lines

* lisp/dired-aux.el (dired-do-kill-lines): Mention that this can
be undone (bug#42707).

4 years agoFurther fix for erc-generate-new-buffer-name
Kevin Brubeck Unhammer [Wed, 5 Aug 2020 09:13:51 +0000 (11:13 +0200)]
Further fix for erc-generate-new-buffer-name

* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix buffer name
generation when there's two networks on the same
server:port (bug#40121).

4 years agoMake the erc /ignore command prompt for a timeout
Lars Ingebrigtsen [Wed, 5 Aug 2020 08:27:40 +0000 (10:27 +0200)]
Make the erc /ignore command prompt for a timeout

* lisp/erc/erc.el (erc--unignore-user): Separate into own function
(bug#40137).
(erc-cmd-IGNORE): Ask if the user wants a timeout.
(erc--read-time-period): New function.

4 years agoAdd new function decoded-time-period
Lars Ingebrigtsen [Wed, 5 Aug 2020 08:07:13 +0000 (10:07 +0200)]
Add new function decoded-time-period

* lisp/calendar/time-date.el (decoded-time-period): New function.

4 years ago* lisp/x-dnd.el: Use lexical-scoping
Stefan Monnier [Wed, 5 Aug 2020 00:15:41 +0000 (20:15 -0400)]
* lisp/x-dnd.el: Use lexical-scoping

4 years ago* lisp/generic-x.el (ansible-inventory-generic-mode): Fix filename (bug#42703)
Juri Linkov [Tue, 4 Aug 2020 23:51:00 +0000 (02:51 +0300)]
* lisp/generic-x.el (ansible-inventory-generic-mode): Fix filename (bug#42703)

4 years agoDon't smooth images when scaling up (bug#38394)
Alan Third [Sun, 2 Aug 2020 19:43:56 +0000 (20:43 +0100)]
Don't smooth images when scaling up (bug#38394)

* src/image.c (image_set_transform [HAVE_XRENDER]): Use different filter
when scaling up vs scaling down.
* src/nsimage.m (ns_image_set_smoothing):
([EmacsImage setSmoothing:]): New functions.
* src/nsterm.h: Add definitions.
* src/nsterm.m (ns_dumpglyphs_image): Disable smoothing if requested.

4 years agoWhen decrypting non-decrypted files, make epa show the raw files
Lars Ingebrigtsen [Tue, 4 Aug 2020 19:42:44 +0000 (21:42 +0200)]
When decrypting non-decrypted files, make epa show the raw files

* lisp/epa-file.el (epa-file-insert-file-contents): When trying to
decrypt a non-decrypted file, just show the bytes from the file
instead (bug#3829).

4 years agoAdd options for mode modern ciphers in smime-encrypt-cipher
Arik Mitschang [Tue, 4 Aug 2020 18:32:13 +0000 (20:32 +0200)]
Add options for mode modern ciphers in smime-encrypt-cipher

* lisp/gnus/smime.el (smime-encrypt-cipher): Add support for more
modern ciphers (bug#8474).

Copyright-paperwork-exempt: yes

4 years agoDrop support for -fcheck-pointer-bounds
Paul Eggert [Tue, 4 Aug 2020 18:09:55 +0000 (11:09 -0700)]
Drop support for -fcheck-pointer-bounds

GCC has removed the -fcheck-pointer bounds option, and the Linux
kernel has also removed support for Intel MPX, so there’s no point
to keeping this debugging option within Emacs.
* src/bytecode.c (BYTE_CODE_THREADED):
* src/lisp.h (DEFINE_LISP_SYMBOL, XSYMBOL, make_lisp_symbol):
Assume __CHKP__ is not defined.
* src/ptr-bounds.h: Remove.  All uses of ptr_bounds_clip,
ptr_bounds_copy, ptr_bounds_init, ptr_bounds_set removed.

4 years agoIgnore test/data/mml-sec/random_seed
Lars Ingebrigtsen [Tue, 4 Aug 2020 17:50:37 +0000 (19:50 +0200)]
Ignore test/data/mml-sec/random_seed

The file is generated when mml-sec-tests is run.

4 years agoRemove mistakenly checked-in random_seed file
Lars Ingebrigtsen [Tue, 4 Aug 2020 17:48:12 +0000 (19:48 +0200)]
Remove mistakenly checked-in random_seed file

4 years agoTweak mml-sec test that sometimes fails
Lars Ingebrigtsen [Tue, 4 Aug 2020 17:47:06 +0000 (19:47 +0200)]
Tweak mml-sec test that sometimes fails

* test/lisp/gnus/mml-sec-tests.el
(mml-first-secure-en-decrypt-sign-1): mml-secure-en-decrypt-sign-1
fail sometimes, on some machines, unless it's the first test.  I'm
guessing there's a race condition somewhere in the test, but put
it first now to avoid build reports.

4 years agoAdd tests for mml-sec.el
Jens Lechtenbörger [Tue, 4 Aug 2020 17:28:41 +0000 (19:28 +0200)]
Add tests for mml-sec.el

4 years agoFix two mml-sec minor bugs revealed by new test harness
Lars Ingebrigtsen [Tue, 4 Aug 2020 17:26:04 +0000 (19:26 +0200)]
Fix two mml-sec minor bugs revealed by new test harness

* lisp/gnus/mml-sec.el
(mml-secure-allow-signing-with-unknown-recipient): New variable
(bug#18393) (but this should probably be fixed in a different way).
(mml-secure-epg-sign): Use it.
(mml-secure-check-user-id): Protect against recipients that aren't
email addresses, like "No recipient".

4 years agoAdd test file lost when merged from Gnus in 2016
Lars Ingebrigtsen [Tue, 4 Aug 2020 16:53:47 +0000 (18:53 +0200)]
Add test file lost when merged from Gnus in 2016

4 years agoMark unused Gnus util function as obsolete
Lars Ingebrigtsen [Tue, 4 Aug 2020 16:52:31 +0000 (18:52 +0200)]
Mark unused Gnus util function as obsolete

* lisp/gnus/gnus-util.el (gnus-test-list): Mark utility function
as obsolete -- there are no in-tree usage.

4 years agoAdd new cconv-tests (Bug#28557)
Stefan Kangas [Fri, 31 Jul 2020 04:09:09 +0000 (06:09 +0200)]
Add new cconv-tests (Bug#28557)

These tests are all written by Gemini Lasswell <gazally@runbox.com>.

* test/lisp/emacs-lisp/cconv-tests.el
(top-level): Add two commented out tests which the byte-compiler
can't handle.
(cconv-tests-lambda-:documentation)
(cconv-tests-pcase-lambda-:documentation)
(cconv-tests-defun-:documentation)
(cconv-tests-cl-defun-:documentation)
(cconv-tests-function-:documentation)
(cconv-tests-cl-defgeneric-literal-:documentation)
(cconv-tests-defsubst-:documentation)
(cconv-tests-cl-defsubst-:documentation): New tests.
(cconv-tests-cl-iter-defun-:documentation)
(cconv-tests-iter-defun-:documentation)
(cconv-tests-iter-lambda-:documentation)
(cconv-tests-cl-function-:documentation)
(cconv-tests-cl-defgeneric-:documentation): New failing tests.

4 years agoFix viewing encrypted+signed messages from Outlook
Lars Ingebrigtsen [Tue, 4 Aug 2020 16:08:47 +0000 (18:08 +0200)]
Fix viewing encrypted+signed messages from Outlook

* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Fix
problem with CRLF-encoded encrypted+signed parts (bug#42637).

4 years agoFix previous network stream test
Lars Ingebrigtsen [Tue, 4 Aug 2020 15:34:21 +0000 (17:34 +0200)]
Fix previous network stream test

* test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): There's only one ipv6
localhost address.

4 years agoMake a network-stream test more robust
Lars Ingebrigtsen [Tue, 4 Aug 2020 15:25:36 +0000 (17:25 +0200)]
Make a network-stream test more robust

* test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): New function.
(echo-server-with-dns): Skip test if (system-name) doesn't look
like it's going to resolve (bug#42535).

4 years agoMark the end of file names correctly on Macos in wdired
Lars Ingebrigtsen [Tue, 4 Aug 2020 13:56:12 +0000 (15:56 +0200)]
Mark the end of file names correctly on Macos in wdired

* lisp/wdired.el (wdired--restore-dired-filename-prop): Fix
problem with finding the end of the name on Macos.

4 years agoFix debugging code checked in from wdired-tests
Lars Ingebrigtsen [Tue, 4 Aug 2020 13:15:36 +0000 (15:15 +0200)]
Fix debugging code checked in from wdired-tests

4 years agoFix svn tests on Macos
Lars Ingebrigtsen [Tue, 4 Aug 2020 12:48:33 +0000 (14:48 +0200)]
Fix svn tests on Macos

* test/lisp/vc/vc-tests.el (vc-test--svn-enabled): Macos machines
may have a dummy svn program that helpfully just outputs "There's
no svn program here", so also test for the svnadmin program
(bug#42536).

4 years agodired-ls-F-marks-symlinks should be set under Macos
Lars Ingebrigtsen [Tue, 4 Aug 2020 12:31:36 +0000 (14:31 +0200)]
dired-ls-F-marks-symlinks should be set under Macos

* lisp/dired.el (dired-ls-F-marks-symlinks): Not that this should
be set under Macos (bug#42537).

4 years agoFix wdired test for Macos
Lars Ingebrigtsen [Tue, 4 Aug 2020 12:30:13 +0000 (14:30 +0200)]
Fix wdired test for Macos

* test/lisp/wdired-tests.el (wdired-test-bug34915): Macos adds "@"
to the end of symlinks (bug#42537).

4 years ago* etc/NEWS: Add Tramp support of direct asynchronous process invocation.
Michael Albinus [Tue, 4 Aug 2020 12:20:16 +0000 (14:20 +0200)]
* etc/NEWS: Add Tramp support of direct asynchronous process invocation.

4 years agoAdd Tramp support of direct asynchronous process invocation
Michael Albinus [Tue, 4 Aug 2020 12:19:51 +0000 (14:19 +0200)]
Add Tramp support of direct asynchronous process invocation

* doc/misc/tramp.texi (Predefined connection information):
Add "direct-async-process".
(Remote processes): New subsection "Improving performance of
asynchronous remote processes".

* lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-login-program'
and `tramp-login-args'.
(tramp-adb-handle-make-process): Use `tramp-handle-make-process'.
(tramp-adb-maybe-open-connection): Add "set +o vi +o emacs" command.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-handle-make-process'.
(tramp-sh-file-name-handler-p, tramp-multi-hop-p): New defuns.
(tramp-compute-multi-hops): Use `tramp-multi-hop-p'.

* lisp/net/tramp.el (tramp-dissect-file-name, tramp-dissect-hop-name):
Use `tramp-multi-hop-p'.
(tramp-handle-insert-file-contents, tramp-local-host-p):
Use `tramp-sh-file-name-handler-p'.
(tramp-handle-make-process): New defun.

* test/README: Add another example how to use SELECTOR.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules):
Adapt test.
(tramp--test-sh-p): Use `tramp-sh-file-name-handler-p'.

4 years agoAdd sass @use rule to css-mode
Theodor Thornhill [Tue, 4 Aug 2020 10:12:46 +0000 (12:12 +0200)]
Add sass @use rule to css-mode

* lisp/textmodes/css-mode.el (scss-at-ids): Add 'use' to scss-at-ids
for autocompletion (bug#42700).

4 years agoUse void * for pointers in with_echo_area_buffer
Paul Eggert [Mon, 3 Aug 2020 22:21:59 +0000 (15:21 -0700)]
Use void * for pointers in with_echo_area_buffer

* src/xdisp.c (with_echo_area_buffer): Pass void * instead of
ptrdiff_t, since the values are typically pointers and this ports
better to (mostly-theoretical) hosts where ptrdiff_t is narrower
than intptr_t.  All uses changed.

4 years agoIgnore another memory leak
Paul Eggert [Mon, 3 Aug 2020 22:21:59 +0000 (15:21 -0700)]
Ignore another memory leak

* src/pdumper.c (dump_mmap_contiguous_heap):
Ignore the heap control block when checking for leaks.

4 years agoSimplify use of __lsan_ignore_object
Paul Eggert [Mon, 3 Aug 2020 22:21:59 +0000 (15:21 -0700)]
Simplify use of __lsan_ignore_object

* configure.ac: Use AC_CHECK_FUNCS_ONCE for __lsan_ignore_object.
* src/buffer.c, src/data.c, src/emacs-module.c, src/regex-emacs.c:
* src/search.c: Use __lsan_ignore_object unconditionally, and don’t
include sanitizer/lsan_interface.h.
* src/lisp.h (__lsan_ignore_object): Provide a dummy in the
typical case where leak sanitization is not available.

4 years agoSimplify pointer computation in mark_maybe_object
Paul Eggert [Mon, 3 Aug 2020 22:21:58 +0000 (15:21 -0700)]
Simplify pointer computation in mark_maybe_object

* src/alloc.c (mark_maybe_object):
Use simpler way to avoid -fsanitize=undefined false alarms,
by converting the word tag to intptr_t first.
Omit now-unnecessary runtime overflow check.
(mark_memory): Work even if UINTPTR_MAX <= INT_MAX (!).

4 years agoAvoid duplicate Edebug symbols when backtracking (Bug#42701)
Philipp Stephani [Mon, 3 Aug 2020 19:07:32 +0000 (21:07 +0200)]
Avoid duplicate Edebug symbols when backtracking (Bug#42701)

When Edebug backtracks, it nevertheless generates definitions for the
non-matching branches, see Bug#41988 and Bug#42701.  This should be
fixed eventually (probably by deferring the definition until a branch
is known to match), but for now add a band-aid to avoid these
duplicate symbols, at least for anonymous forms.

* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Regenerate
anonymous names.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-duplicate-symbol-backtrack): New regression test.

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 3 Aug 2020 15:32:39 +0000 (08:32 -0700)]
Merge from origin/emacs-27

8576297b2a (origin/emacs-27) ; lisp/so-long.el: Prevent potential err...
986c12b20f ; * lisp/so-long.el: Byte-compilation bug fix
19f8f36f11 ; * lisp/so-long.el (so-long-variable-overrides): Improve doc
83bc4ad369 ; * so-long.el: Documentation and spelling
72c5f71cd4 Avoid segfaults if XIM is set but not xim_styles
f54ddb0198 (emacs-27) ; * test/lisp/emacs-lisp/generator-tests.el: St...

# Conflicts:
# test/lisp/emacs-lisp/generator-tests.el

4 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 3 Aug 2020 15:31:15 +0000 (08:31 -0700)]
; Merge from origin/emacs-27

The following commits were skipped:

d767418b76 Backport: Make checking for liveness of global values more...
8c94ca94dc Backport: Fix subtle bug when checking liveness of module ...
8ecca2f09f Backport: Fix memory leak for global module objects (Bug#4...

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 3 Aug 2020 15:31:15 +0000 (08:31 -0700)]
Merge from origin/emacs-27

e12d1fbc15 ; ChangeLog.3 and etc/AUTHORS fixes
748f0d4bc6 * admin/authors.el (authors-aliases): Remove a faulty regexp.

# Conflicts:
# etc/AUTHORS

4 years agoFix last change in 'try_window'
Eli Zaretskii [Mon, 3 Aug 2020 14:56:40 +0000 (17:56 +0300)]
Fix last change in 'try_window'

* src/xdisp.c (try_window): Don't modify the logic when EOB is in
the viewport.  (Bug#42653)

4 years ago; lisp/so-long.el: Prevent potential error if comment-use-syntax is nil
Phil Sainty [Sat, 11 Jul 2020 07:40:27 +0000 (19:40 +1200)]
; lisp/so-long.el: Prevent potential error if comment-use-syntax is nil

* lisp/so-long.el (so-long-detected-long-line-p): Ensure that
`comment-start-skip' and `comment-end-skip' are both set if
`comment-use-syntax' is nil, as `comment-forward' requires them
to be bound in this scenario.

4 years ago; * lisp/so-long.el: Byte-compilation bug fix
Phil Sainty [Fri, 3 Jul 2020 13:43:08 +0000 (01:43 +1200)]
; * lisp/so-long.el: Byte-compilation bug fix

As this `require' is not at the top-level (it is only conditionally
evaluated, when loading the library over the top of an earlier
version), we need `eval-and-compile' to ensure that both macros and
functions from advice.el are accounted for.

4 years ago; * lisp/so-long.el (so-long-variable-overrides): Improve doc
Phil Sainty [Sun, 8 Dec 2019 10:35:48 +0000 (23:35 +1300)]
; * lisp/so-long.el (so-long-variable-overrides): Improve doc

4 years ago; * so-long.el: Documentation and spelling
Phil Sainty [Sat, 14 Dec 2019 13:00:05 +0000 (02:00 +1300)]
; * so-long.el: Documentation and spelling

Reverting certain changes from commits b0f20651e3 and d1a791f8ed.

Please refer to the comments on spelling at the end of the library.
M-x ispell-buffer should find no misspellings in the documentation.
See also test/lisp/so-long-tests/spelling-tests.el

(The current spelling will persist while so-long.el is maintained in
its own Savannah repository, to avoid unnecessary conflicts between
the two versions.  If in the future it is maintained solely in the
Emacs repository, changing the spelling would become an option.)

Note that "mitigations" (plural) is intentional -- this library
identifies a collection of different performance mitigations,
multiple of which will typically be in effect together.

4 years agoMake `n'/`p' in image-mode also find externally converted images
Lars Ingebrigtsen [Mon, 3 Aug 2020 07:14:52 +0000 (09:14 +0200)]
Make `n'/`p' in image-mode also find externally converted images

* lisp/image-file.el (image-file-name-regexp): Use it to make
`n'/`p' in image mode work (bug#39994).

* lisp/image/image-converter.el
(image-converter-file-name-extensions): New variable to keep track
of all suffixes.
(image-convert-p): Update.
(image-converter--find-converter): Set.

4 years agoFix problem with viewing .webp files from .zip buffers
Lars Ingebrigtsen [Mon, 3 Aug 2020 07:00:53 +0000 (09:00 +0200)]
Fix problem with viewing .webp files from .zip buffers

* lisp/image-mode.el (image-toggle-display-image): Make it
possible to view images (via external formatters, like webp) from
zip files (and other archive modes) (bug#39994).

4 years agoAdjust error message in image-mode
Lars Ingebrigtsen [Mon, 3 Aug 2020 06:18:39 +0000 (08:18 +0200)]
Adjust error message in image-mode

* lisp/image-mode.el (image-mode): Even when
`image-user-external-converter' is on, we may get
`unknown-image-type' (bug#39994).  Adjust the error message in
that case.

4 years agoFix problem where TLS connections would sometimes hang
Derek Zhou [Mon, 3 Aug 2020 05:56:22 +0000 (07:56 +0200)]
Fix problem where TLS connections would sometimes hang

* src/process.c (wait_reading_process_output): Before the select,
check every interesting gnutls stream for available data in the
buffer.  If some of them hit, and either there is no wait_proc or
the wait_proc is one of the gnutls streams with new data, set the
select timeout to 0 after the select, and merge the gnutls buffer
status into the select returns (bug#40665).  This fixes a problem
where TLS connections would sometimes hang.

4 years agoImprove Edebug symbols for inlined secondary methods (Bug#42671)
Philipp Stephani [Sun, 2 Aug 2020 20:07:27 +0000 (22:07 +0200)]
Improve Edebug symbols for inlined secondary methods (Bug#42671)

* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Include qualifiers in
Edebug symbol name.

* test/lisp/emacs-lisp/cl-generic-tests.el
(cl-defgeneric/edebug/method): Adapt unit test.

4 years agoIf gnus-visual is nil, don't fontify patches and the like
Lars Ingebrigtsen [Sun, 2 Aug 2020 17:44:30 +0000 (19:44 +0200)]
If gnus-visual is nil, don't fontify patches and the like

* doc/misc/emacs-mime.texi (Display Customization): Document it.

* lisp/gnus/gnus-art.el (gnus-mime-display-single): Bind it.

* lisp/gnus/mm-view.el (mm-inline-font-lock): New variable (bug#38421).
(mm-display-inline-fontify): Use it.

4 years agoAvoid segfaults if XIM is set but not xim_styles
Grégory Mounié [Sun, 2 Aug 2020 13:56:33 +0000 (15:56 +0200)]
Avoid segfaults if XIM is set but not xim_styles

Emacs segfaults at the X11 initialization if XIM is set
and xim_styles is NULL.  This patch avoids the crash.
* src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL.
(Bug#42676)  (Bug#42673)  (Bug#42677)

Copyright-paperwork-exempt: yes

4 years agoDocument that :width/:height in XBM images are peculiar
Lars Ingebrigtsen [Sun, 2 Aug 2020 17:03:07 +0000 (19:03 +0200)]
Document that :width/:height in XBM images are peculiar

* doc/lispref/display.texi (XBM Images): Note the peculiarities of
:width/:height in XBM images (bug#39735).

4 years agoAdd a workaround for Bug#42672
Philipp Stephani [Sun, 2 Aug 2020 16:05:36 +0000 (18:05 +0200)]
Add a workaround for Bug#42672

* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Work around Bug#42672
by uniquifying inline method names.

* test/lisp/emacs-lisp/cl-generic-tests.el
(cl-defgeneric/edebug/method): New regression test.

4 years ago; * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-flet): Fix typo.
Philipp Stephani [Sun, 2 Aug 2020 16:04:18 +0000 (18:04 +0200)]
; * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-flet): Fix typo.

4 years agoAvoid duplicate Edebug symbols when using ‘cl-flet’ (Bug#41989)
Philipp Stephani [Sun, 2 Aug 2020 15:17:00 +0000 (17:17 +0200)]
Avoid duplicate Edebug symbols when using ‘cl-flet’ (Bug#41989)

* lisp/emacs-lisp/edebug.el (edebug-match-:unique): Add a new
‘:unique’ specifier to generate unique names.

* lisp/emacs-lisp/cl-macs.el (cl-flet): Use it.  This requires
inlining the ‘cl-defun’ specification.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-flet): New
unit test.

* doc/lispref/edebug.texi (Specification List): Document new ‘:unique’
construct.

4 years agoRe-enable scroll-margin when cursor-motion optimization is disabled
Eli Zaretskii [Sun, 2 Aug 2020 15:27:33 +0000 (18:27 +0300)]
Re-enable scroll-margin when cursor-motion optimization is disabled

* src/xdisp.c (try_window): Fix logic of disabling margins when
cursor is close to BOB or EOB.  Account for header-line, if any,
when computing the scroll margin in pixels.  (Bug#42653)

4 years ago* src/alloc.c (mark_maybe_object): Avoid signed integer overflow
Philipp Stephani [Sun, 2 Aug 2020 14:05:44 +0000 (16:05 +0200)]
* src/alloc.c (mark_maybe_object): Avoid signed integer overflow

4 years agoDon’t generate duplicate symbols for secondary CL methods (Bug#42671)
Philipp Stephani [Sun, 2 Aug 2020 14:01:47 +0000 (16:01 +0200)]
Don’t generate duplicate symbols for secondary CL methods (Bug#42671)

* lisp/emacs-lisp/edebug.el
(edebug-match-cl-generic-method-qualifier): Add matcher for
‘cl-defmethod’ qualifier.

* lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use it.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-cl-defmethod-qualifier): New unit test.

4 years agoFix last change in alloc.c.
Eli Zaretskii [Sun, 2 Aug 2020 14:05:00 +0000 (17:05 +0300)]
Fix last change in alloc.c.

* src/alloc.c (mark_maybe_object) [WIDE_EMACS_INT]: Avoid compiler
warning about 'overflow' being unused.

4 years agoMake the "All" setting for large-newsgroup-initial in Gnus work
Lars Ingebrigtsen [Sun, 2 Aug 2020 12:32:19 +0000 (14:32 +0200)]
Make the "All" setting for large-newsgroup-initial in Gnus work

* lisp/gnus/gnus-sum.el (gnus-articles-to-read): Use it.
(gnus-summary-insert-old-articles): Ditto.

* lisp/gnus/gnus.el (large-newsgroup-initial): Make the "All"
setting work by using a special symbol, instead of nil which is
indistinguishable from not being present (bug#38466).

4 years agoFix Tramp portability issues
Michael Albinus [Sun, 2 Aug 2020 11:26:00 +0000 (13:26 +0200)]
Fix Tramp portability issues

* lisp/net/tramp-sh.el (tramp-set-remote-path): Replace "echo -n" by
"printf", it isn't portable.

* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables)
(tramp-test33-environment-variables-and-port-numbers): Do not use
"echo -n", it isn't portable.
(tramp--test-utf8): Filter out not displayable characters.

4 years ago* src/alloc.c (mark_memory): Avoid signed integer overflow
Philipp Stephani [Sun, 2 Aug 2020 10:58:44 +0000 (12:58 +0200)]
* src/alloc.c (mark_memory): Avoid signed integer overflow

4 years agoSignal an error in the user clicks "cancel" when signing in epg
Lars Ingebrigtsen [Sun, 2 Aug 2020 09:32:35 +0000 (11:32 +0200)]
Signal an error in the user clicks "cancel" when signing in epg

* lisp/epg.el (epg-sign-string): If the user clicks "cancel" on
the pinentry, then we don't have an error from gpg(sm), but
instead nothing (bug#39058).  Signal an error in that case.

4 years agoFix erc bug when there's two channels with the same name
Lars Ingebrigtsen [Sun, 2 Aug 2020 07:43:41 +0000 (09:43 +0200)]
Fix erc bug when there's two channels with the same name

* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix logic when
there's two channels with the same name from two different servers
(bug#40121).

4 years agoTry to fix mailcap parsing again to respect Emacs defaults
Lars Ingebrigtsen [Sun, 2 Aug 2020 07:04:31 +0000 (09:04 +0200)]
Try to fix mailcap parsing again to respect Emacs defaults

* lisp/net/mailcap.el (mailcap--computed-mime-data): New variable.
(mailcap-parse-mailcaps): Don't delete Emacs-distributed fallback
values (bug#40247).
(mailcap-add-mailcap-entry): Extend to allow working on different
variables.
(mailcap-add): Store data in mailcap-user-mime-data, since it
should be heeded first.

4 years agoMake some erc function aliases obsolete
Lars Ingebrigtsen [Sun, 2 Aug 2020 05:55:02 +0000 (07:55 +0200)]
Make some erc function aliases obsolete

* lisp/erc/erc-networks.el (erc-current-network):
* lisp/erc/erc-join.el (erc-autojoin-channels-delayed):
* lisp/erc/erc-backend.el (erc-server-setup-periodical-ping)
(erc-server-send-ping, erc-server-send-queue):
* lisp/erc/erc-autoaway.el (erc-autoaway-reestablish-idletimer)
(autoaway): Adjust callers.

* lisp/erc/erc-compat.el (erc-with-selected-window)
(erc-cancel-timer, erc-make-obsolete)
(erc-make-obsolete-variable): Make these aliases obsolete.

4 years agoFix race condition in erc-server-send-queue vs quitting erc
Lars Ingebrigtsen [Sun, 2 Aug 2020 05:48:30 +0000 (07:48 +0200)]
Fix race condition in erc-server-send-queue vs quitting erc

* lisp/erc/erc-backend.el (erc-server-send-queue): Check that the
buffer is live before using it (bug#40418).  This fixes a rare
problem when the queue is non-empty when `erc-quit-server' is run.

4 years ago* src/alloc.c (mark_maybe_object): Make overflow check conditional.
Philipp Stephani [Sat, 1 Aug 2020 19:34:46 +0000 (21:34 +0200)]
* src/alloc.c (mark_maybe_object): Make overflow check conditional.

4 years agoImprove offset calculation in wide int builds
Philipp Stephani [Sat, 1 Aug 2020 19:01:24 +0000 (21:01 +0200)]
Improve offset calculation in wide int builds

* src/alloc.c (mark_maybe_object): Make sure that OFFSET isn’t widened
during subtraction.

4 years ago* src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)
Philipp Stephani [Sat, 1 Aug 2020 18:59:09 +0000 (20:59 +0200)]
* src/alloc.c (resize_string_data): Adjust string bytes (Bug#42540)

4 years agoRecreate macOS color list if it is corrupt
Alan Third [Wed, 20 May 2020 20:28:25 +0000 (21:28 +0100)]
Recreate macOS color list if it is corrupt

* src/nsterm.m (ns_term_init): Generate the color list if there are
less colors in the existing file than in rgb.txt.

4 years agoImplement alternative for Tramp's signal return string
Michael Albinus [Sat, 1 Aug 2020 18:08:44 +0000 (20:08 +0200)]
Implement alternative for Tramp's signal return string

* lisp/net/tramp-adb.el (process-file-return-signal-string): Declare.
(tramp-adb-get-signal-strings): New defun.
(tramp-adb-handle-process-file): Use it.

* lisp/net/tramp-sh.el (process-file-return-signal-string): Declare.
(tramp-sh-get-signal-strings): New defun.
(tramp-sh-handle-process-file): Use it.

* lisp/net/tramp.el (tramp-get-signal-strings): Remove function.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file):
Accept alternative signal return string.

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sat, 1 Aug 2020 16:42:44 +0000 (09:42 -0700)]
; Auto-commit of loaddefs files.

4 years agoUse a more precise check for '__lsan_ignore_object'
Philipp Stephani [Sat, 1 Aug 2020 15:12:30 +0000 (17:12 +0200)]
Use a more precise check for '__lsan_ignore_object'

* configure.ac: Add check for __lsan_ignore_object.

* src/buffer.c (enlarge_buffer_text):
* src/data.c (make_blv):
* src/emacs-module.c (Fmodule_load, initialize_environment):
* src/regex-emacs.c (regex_compile):
* src/search.c (newline_cache_on_off): Use new configuration macro.

4 years agoSuppress sanitizer errors about pointer arithmetic in a few places
Philipp Stephani [Sat, 1 Aug 2020 14:58:06 +0000 (16:58 +0200)]
Suppress sanitizer errors about pointer arithmetic in a few places

We perform weird pointer arithmetic due to the layout of Lisp_Objects
holding symbols.  ASan/UBSan warns about that (Bug#42530).  Suppress
the warnings by performing the arithmetic on integer types and casting
back to pointers.

* src/alloc.c (mark_maybe_object, mark_memory): Temporarily cast
pointer to 'intptr_t'.

4 years agoSuppress leak sanitizer in a few more places
Philipp Stephani [Sat, 1 Aug 2020 14:55:45 +0000 (16:55 +0200)]
Suppress leak sanitizer in a few more places

* src/regex-emacs.c (regex_compile):
src/search.c (newline_cache_on_off): Suppress leak sanitizer.

4 years agoFix last change
Eli Zaretskii [Sat, 1 Aug 2020 12:55:01 +0000 (15:55 +0300)]
Fix last change

* src/emacs-module.c (initialize_environment): Call
__lsan_ignore_object only if HAVE_SANITIZER_LSAN_INTERFACE_H is
undefined.  This fixes compilation on systems that don't have
__lsan_* functions.

4 years agoSuppress leak detector in some cases
Philipp Stephani [Sat, 1 Aug 2020 12:13:55 +0000 (14:13 +0200)]
Suppress leak detector in some cases

We intentionally leak some objects.  Prevent the ASan leak detector
from raising false alarms in these cases.

* configure.ac: Search for lsan_interface.h header.

* src/data.c (make_blv): Allow leaking of buffer-local values.

* src/buffer.c (enlarge_buffer_text): Allow leaking of buffer text.

* src/emacs-module.c (Fmodule_load, initialize_environment): Allow
intentional leak of runtime and environment objects if module
assertions are enabled.

4 years ago* test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak
Philipp Stephani [Sat, 1 Aug 2020 12:10:33 +0000 (14:10 +0200)]
* test/data/emacs-module/mod-test.c (Fmod_test_string_a_to_b): Fix leak

4 years ago; * test/lisp/emacs-lisp/generator-tests.el: Style fixes.
Philipp Stephani [Fri, 31 Jul 2020 21:50:04 +0000 (23:50 +0200)]
; * test/lisp/emacs-lisp/generator-tests.el: Style fixes.

4 years agoBackport: Make checking for liveness of global values more precise.
Philipp Stephani [Sat, 25 Jul 2020 21:23:19 +0000 (23:23 +0200)]
Backport: Make checking for liveness of global values more precise.

We can't just use a hash lookup because a global and a local reference
might refer to the same Lisp object.

* src/emacs-module.c (module_free_global_ref): More precise check for
global liveness.

(cherry picked from commit 9f01ce6327af886f26399924a9aadf16cdd4fd9f)

4 years agoBackport: Fix subtle bug when checking liveness of module values.
Philipp Stephani [Sat, 25 Jul 2020 21:04:05 +0000 (23:04 +0200)]
Backport: Fix subtle bug when checking liveness of module values.

We can't simply look up the Lisp object in the global reference table
because an invalid local and a valid global reference might refer to
the same object.  Instead, we have to test the address of the global
reference against the stored references.

* src/emacs-module.c (module_global_reference_p): New helper function.
(value_to_lisp): Use it.

(cherry picked from commit 6355a3ec62f43c9b99d483982ff851d32dd78891)

4 years ago; Maintainer header updates
Glenn Morris [Fri, 31 Jul 2020 16:09:39 +0000 (09:09 -0700)]
; Maintainer header updates

4 years agoBackport: Fix memory leak for global module objects (Bug#42482).
Philipp Stephani [Thu, 23 Jul 2020 11:48:43 +0000 (13:48 +0200)]
Backport: Fix memory leak for global module objects (Bug#42482).

Instead of storing the global values in a global 'emacs_value_storage'
object, store them as hash values alongside the reference counts.
That way the garbage collector takes care of cleaning them up.

* src/emacs-module.c (global_storage): Remove.
(struct module_global_reference): New pseudovector type.
(XMODULE_GLOBAL_REFERENCE): New helper function.
(module_make_global_ref, module_free_global_ref): Use
'module_global_reference' struct for global reference values.
(value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of
'global_storage'.

(cherry picked from commit 5c5eb9790898e4ab10bcbbdb6871947ed3018569)

4 years ago* lisp/emacs-lisp/byte-opt.el: Minor simplifications
Stefan Monnier [Fri, 31 Jul 2020 15:58:13 +0000 (11:58 -0400)]
* lisp/emacs-lisp/byte-opt.el: Minor simplifications

(byte-optimize-form-code-walker): Use `byte-optimize-form` after
inlining, so optimizations are also applied to the top level call.
Simplify the code for `pure` functions using `byte-optimize-constant-args`.
(byte-optimize-all-constp): Remove, not used any more.
(byte-optimize-1+, byte-optimize-1-): Remove, they are redundant
with the `pure` annotation.

4 years agoDeclare some ancient compat aliases obsolete (Bug#41328)
Stefan Kangas [Fri, 31 Jul 2020 04:02:30 +0000 (06:02 +0200)]
Declare some ancient compat aliases obsolete (Bug#41328)

* lisp/comint.el (comint-read-noecho):
* lisp/emacs-lisp/edebug.el (edebug-all-defuns):
* lisp/man.el (manual-entry):
* lisp/vc/log-edit.el (vc-log-mode-map, vc-log-entry-mode): Declare
ancient backwards-compatibility aliases and functions obsolete.  The
oldest in this list was added in 1992, and the most recent in 2004.

* lisp/net/telnet.el (telnet-initial-filter): Don't use
`comint-read-noecho'.

4 years agoMinor dns.el clean up
Lars Ingebrigtsen [Fri, 31 Jul 2020 02:24:49 +0000 (04:24 +0200)]
Minor dns.el clean up

* lisp/net/dns.el (dns-query-asynchronous, dns-query): Adjust some
parameter names to not end with "p", as these are not predicates.

4 years agoMake gravatar-build-url respect dynamically bound variables again
Lars Ingebrigtsen [Fri, 31 Jul 2020 02:19:03 +0000 (04:19 +0200)]
Make gravatar-build-url respect dynamically bound variables again

* lisp/image/gravatar.el (gravatar-build-url): Compute
query-string first, so that dynamically bound values of
`gravatar-rating' (etc.) are respected, instead of computing it
when the callback happens.

4 years ago; Remove */localtime-buffer.* (omitted from previous commit by accident).
Paul Eggert [Thu, 30 Jul 2020 21:30:56 +0000 (14:30 -0700)]
; Remove */localtime-buffer.* (omitted from previous commit by accident).

4 years agoUpdate from Gnulib
Paul Eggert [Thu, 30 Jul 2020 20:58:58 +0000 (13:58 -0700)]
Update from Gnulib

This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.

4 years ago; ChangeLog.3 and etc/AUTHORS fixes
Nicolas Petton [Wed, 29 Jul 2020 20:50:01 +0000 (22:50 +0200)]
; ChangeLog.3 and etc/AUTHORS fixes

4 years ago* admin/authors.el (authors-aliases): Remove a faulty regexp.
Nicolas Petton [Wed, 29 Jul 2020 20:48:14 +0000 (22:48 +0200)]
* admin/authors.el (authors-aliases): Remove a faulty regexp.

4 years agoPort to Oracle Studio 12.6 (sparc)
Paul Eggert [Thu, 30 Jul 2020 16:22:01 +0000 (09:22 -0700)]
Port to Oracle Studio 12.6 (sparc)

* src/alloc.c (__builtin_unwind_init) [!HAVE___BUILTIN_UNWIND_INIT]:
Move from here ...
* src/lisp.h: ... to here, since flush_stack_call_func uses it.
* src/pdumper.c (dump_off_from_lisp): Avoid ‘return n;;’ to pacify
Oracle Studio.