]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoAdd new commands to describe buttons and widgets
Mauro Aranda [Fri, 7 Aug 2020 11:14:41 +0000 (13:14 +0200)]
Add new commands to describe buttons and widgets

* lisp/help-fns.el (describe-widget-functions): New variable, used by
describe-widget.
(describe-widget): New command, to display information about a widget.
* lisp/button.el (button-describe): New command, for describing a button.
(button--describe): Helper function for button-describe.
* lisp/wid-edit.el (widget-describe): New command, for describing a
widget.
(widget--resolve-parent-action): Helper function, to allow
widget-describe to display more useful information (bug#139).

4 years agoFix documentation of 'missing-newline-at-eof'
Eli Zaretskii [Fri, 7 Aug 2020 11:03:24 +0000 (14:03 +0300)]
Fix documentation of 'missing-newline-at-eof'

* doc/emacs/display.texi (Useless Whitespace):
* etc/NEWS (missing-newline-at-eof): Improve wording and
punctuation.

4 years agoBuffer-menu-select doc string clarification
Lars Ingebrigtsen [Fri, 7 Aug 2020 10:56:13 +0000 (12:56 +0200)]
Buffer-menu-select doc string clarification

* lisp/buff-menu.el (Buffer-menu-select): Document that it removed
the marks (bug#6491).

4 years ago; * lisp/arc-mode.el (archive-copy-file): Doc fix.
Eli Zaretskii [Fri, 7 Aug 2020 10:54:39 +0000 (13:54 +0300)]
; * lisp/arc-mode.el (archive-copy-file): Doc fix.

4 years ago* lisp/play/snake.el (snake-null-map): Quit on `q'. (Bug#42731)
Peder O. Klingenberg [Thu, 6 Aug 2020 12:32:52 +0000 (14:32 +0200)]
* lisp/play/snake.el (snake-null-map): Quit on `q'. (Bug#42731)

4 years agoAdd a new command to copy a file from zip files
Lars Ingebrigtsen [Fri, 7 Aug 2020 09:59:25 +0000 (11:59 +0200)]
Add a new command to copy a file from zip files

* lisp/arc-mode.el (archive-copy-file): New command, keystroke and
menu bar entry (bug#26192).
(archive-extract): Refactored out code from here...
(archive--extract-file): ... to here for use in archive-copy-file.

4 years agoAllow ffap to do the right thing with 'https://gnu.org'
Lars Ingebrigtsen [Fri, 7 Aug 2020 09:30:55 +0000 (11:30 +0200)]
Allow ffap to do the right thing with 'https://gnu.org'

* lisp/thingatpt.el (thing-at-point-bounds-of-url-at-point): Don't
include trailing ' in the URL, because it's more likely to be a
punctuation character (bug#29410).

4 years agoClean up and improve compilation of arithmetic (bug#42597)
Mattias Engdegård [Mon, 3 Aug 2020 14:29:06 +0000 (16:29 +0200)]
Clean up and improve compilation of arithmetic (bug#42597)

* lisp/emacs-lisp/byte-opt.el (byte-optimize-associative-math)
(byte-optimize-min-max): Transform 3-arg min/max call into two 2-arg
calls, which is faster.
* lisp/emacs-lisp/bytecomp.el (byte-compile-associative): Rename to...
(byte-compile-variadic-numeric): ...this function and simplify,
fixing incorrect comments.  The 3-arg strength reduction is now
always done in the optimisers and is no longer needed here.
(byte-compile-min-max): New function.
(byte-compile-minus): Simplify, remove incorrect comment, and use
byte-compile-variadic-numeric.
(byte-compile-quo): Simplify and fix comment.

4 years agoFix byte-compilation of (+ -0.0) (bug#42597)
Mattias Engdegård [Mon, 3 Aug 2020 13:29:41 +0000 (15:29 +0200)]
Fix byte-compilation of (+ -0.0) (bug#42597)

* lisp/emacs-lisp/bytecomp.el (byte-compile-associative):
Translate numerical identity expressions, such as (+ x) and (* x),
into (* x 1) since the previous translation (+ x 0) gets it wrong
for x = -0.0.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.

4 years agoAdd missing "this is documented" marker to previous checkin
Lars Ingebrigtsen [Fri, 7 Aug 2020 07:30:07 +0000 (09:30 +0200)]
Add missing "this is documented" marker to previous checkin

4 years agoMake whitespace-mode highlight missing newlines at the end of buffers
Lars Ingebrigtsen [Fri, 7 Aug 2020 07:28:14 +0000 (09:28 +0200)]
Make whitespace-mode highlight missing newlines at the end of buffers

* lisp/whitespace.el (whitespace-missing-newline-at-eof): New face
(bug#34952).
(whitespace-report-region): Add a test for
end-of-buffer-without-newline.
(whitespace-color-on): Ditto.

* doc/emacs/display.texi (Useless Whitespace): Document it.

4 years agoPacify gcc -Wunused-variable
Paul Eggert [Fri, 7 Aug 2020 02:11:58 +0000 (19:11 -0700)]
Pacify gcc -Wunused-variable

* src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
(Fset_frame_position): Always use xval, yval.  Simplify #if nesting.

4 years ago* lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609)
Juri Linkov [Thu, 6 Aug 2020 23:55:00 +0000 (02:55 +0300)]
* lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609)

4 years ago* lisp/skeleton.el: Use lexical-binding
Stefan Monnier [Thu, 6 Aug 2020 22:45:33 +0000 (18:45 -0400)]
* lisp/skeleton.el: Use lexical-binding

(skeleton-proxy-new): Use `use-region`.

4 years agoUpdate from Gnulib
Paul Eggert [Thu, 6 Aug 2020 22:24:47 +0000 (15:24 -0700)]
Update from Gnulib

This incorporates:
2020-08-06 libgmp: add <gmp/gmp.h> support
2020-08-06 Consider that clang defines __OPTIMIZE__ like GCC does
2020-08-06 Use __builtin_expect with clang everywhere
2020-08-05 Use __builtin_clz{,l,ll} with clang, also on Windows
2020-08-05 Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang
2020-07-31 _GL_CMP: Improve documentation
2020-07-30 alloca, largefile: sync with Autoconf master
* lib/c++defs.h, lib/cdefs.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, m4/alloca.m4, m4/gnulib-common.m4:
* m4/largefile.m4, m4/libgmp.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

4 years agoShow A C hint only if partial fetches are enabled.
Tassilo Horn [Thu, 6 Aug 2020 19:52:18 +0000 (21:52 +0200)]
Show A C hint only if partial fetches are enabled.

* lisp/gnus/gnus-art.el (gnus-insert-mime-button): Show A C hint for
downloading the complete message only if partial fetches are enabled.

4 years agoShow A C hint for loading complete message only in nnimap groups.
Tassilo Horn [Thu, 6 Aug 2020 19:47:48 +0000 (21:47 +0200)]
Show A C hint for loading complete message only in nnimap groups.

* lisp/gnus/gnus-art.el (gnus-insert-mime-button): Show A C hint for
loading complete message only in nnimap groups.

4 years agoFix the mailto: examples in the manual and in NEWS
Kévin Le Gouguec [Thu, 6 Aug 2020 16:33:54 +0000 (18:33 +0200)]
Fix the mailto: examples in the manual and in NEWS

* doc/misc/message.texi (System Mailer Setup): Fix mailto: examples.

4 years agoFix broken desktop file
Lars Ingebrigtsen [Thu, 6 Aug 2020 15:45:09 +0000 (17:45 +0200)]
Fix broken desktop file

Looks like I pasted in the data twice...

4 years agoRemove usages of assoc-delete-all in project.el
Philip K [Wed, 5 Aug 2020 20:57:01 +0000 (22:57 +0200)]
Remove usages of assoc-delete-all in project.el

assoc-delete-all is not available for users who have installed
project.el via ELPA on older Emacs versions (bug#42668).

* lisp/progmodes/project.el
(project-remember-project, project--remove-from-project-list):
Replace assoc-delete-all with equivalent alternatives.

4 years agoTweat how MML specifies the encoding of binary data
Lars Ingebrigtsen [Thu, 6 Aug 2020 14:47:21 +0000 (16:47 +0200)]
Tweat how MML specifies the encoding of binary data

* lisp/gnus/mml.el (mml-parse-1): Use `data-encoding' to be
slightly less confusing than `content-transfer-encoding'.

* doc/misc/emacs-mime.texi (MML Definition): Document it.

* lisp/gnus/message.el (message-insert-screenshot): Adjust usage.

4 years agoChange how Mail-Copies-To: never is handled in Message
Lars Ingebrigtsen [Thu, 6 Aug 2020 13:53:24 +0000 (15:53 +0200)]
Change how Mail-Copies-To: never is handled in Message

* lisp/gnus/message.el (message-get-reply-headers): Change how
Mail-Copies-To: never is handled (bug#37591). When that header is
present, put all the remaining recipients in the To header,
instead of picking an arbitrary recipient to have in the To
header, and the rest in the Cc header.

4 years agoAdd a new HTML skeleton for relative (file) URLs
Lars Ingebrigtsen [Thu, 6 Aug 2020 13:11:48 +0000 (15:11 +0200)]
Add a new HTML skeleton for relative (file) URLs

* lisp/textmodes/sgml-mode.el (html-href-anchor-file): New
skeleton and keystroke (bug#37644).

4 years agoMake it possible to use Message as a mailto: desktop handler
Lars Ingebrigtsen [Thu, 6 Aug 2020 12:50:40 +0000 (14:50 +0200)]
Make it possible to use Message as a mailto: desktop handler

* doc/misc/message.texi (System Mailer Setup): Document the usage.

* lisp/gnus/gnus-art.el (gnus-url-mailto): Move most of the code
here to 'message-mailto-1' (bug#38314).

* lisp/gnus/message.el (message-parse-mailto-url): Mark as obsolete.
(message-parse-mailto-url): Rewritten slightly from the above.
(message-mailto): New command.
(message-mailto-1): New function.

4 years agoSignal an error in dired when moving to a directory that doesn't exist
Nick Helm [Thu, 6 Aug 2020 10:11:57 +0000 (12:11 +0200)]
Signal an error in dired when moving to a directory that doesn't exist

* lisp/dired-aux.el (dired-do-create-files): Give an error when
apparently moving to a directory name, and that directory doesn't
exist (bug#38707).

4 years agoMake 'n'/'p' in image mode buffers respect dired sorting
Lars Ingebrigtsen [Thu, 6 Aug 2020 09:51:22 +0000 (11:51 +0200)]
Make 'n'/'p' in image mode buffers respect dired sorting

The commands now also now work on archive and tar mode parent buffers.

* doc/emacs/files.texi (Image Mode): Document it.

* lisp/arc-mode.el (archive-goto-file): New function (bug#38647).
(archive-next-file-displayer): Ditto.

* lisp/image-mode.el (image-next-file): Reimplement to work on
displayed dired buffers and the like.  This means that `n' and `p'
now works on the displayed ordering in the dired buffer, so if
you've reversed the sorting, `n' picks the right "next" file.
(image-mode--directory-buffers): New function.
(image-mode--next-file): Ditto.

* lisp/tar-mode.el (tar-goto-file): New function.
(tar-next-file-displayer): Ditto.

4 years agoMark two cconv tests as :unstable
Lars Ingebrigtsen [Thu, 6 Aug 2020 07:09:57 +0000 (09:09 +0200)]
Mark two cconv tests as :unstable

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-cl-iter-defun-:documentation): Mark as unstable
(bug#42723).
(cconv-tests-iter-defun-:documentation): Ditto.

4 years agoTweak the autoloads scrape output slightly
Lars Ingebrigtsen [Thu, 6 Aug 2020 06:24:56 +0000 (08:24 +0200)]
Tweak the autoloads scrape output slightly

* lisp/emacs-lisp/autoload.el (batch-update-autoloads--summary):
Output " ..." at the end of the non-concluding lines to signify
that the output continues.

4 years agoMake the loaddefs scraping compilation output look more regular
Lars Ingebrigtsen [Thu, 6 Aug 2020 06:20:09 +0000 (08:20 +0200)]
Make the loaddefs scraping compilation output look more regular

* lisp/Makefile.in ($(lisp)/loaddefs.el): Don't output the
directories here.

* lisp/emacs-lisp/autoload.el (batch-update-autoloads--summary):
New function.
(batch-update-autoloads): Use it to output the directories we're
scraping.

This changes the compilation output from:

Directories for loaddefs: . ./calc ./calendar ./cedet ./cedet/ede
./cedet/semantic ./cedet/semantic/analyze ./cedet/semantic/bovine
./cedet/semantic/decorate ./cedet/semantic/symref ./cedet/semantic/wisent
./cedet/srecode ./emacs-lisp ./emulation ./erc ./eshell ./gnus ./image
./international ./language ./leim ./leim/ja-dic ./leim/quail ./mail ./mh-e
./net ./nxml ./org ./play ./progmodes ./textmodes ./url ./vc

(but all on one long line)

To:

  SCRAPE   . ./calc ./calendar ./cedet ./cedet/ede ./cedet/semantic
  SCRAPE   ./cedet/semantic/analyze ./cedet/semantic/bovine
  SCRAPE   ./cedet/semantic/decorate ./cedet/semantic/symref
  SCRAPE   ./cedet/semantic/wisent ./cedet/srecode ./emacs-lisp ./emulation
  SCRAPE   ./erc ./eshell ./gnus ./image ./international ./language ./leim
  SCRAPE   ./leim/ja-dic ./leim/quail ./mail ./mh-e ./net ./nxml ./org ./play
  SCRAPE   ./progmodes ./textmodes ./url ./vc

Compilation output with very long lines can be mistaken for errors
when they scroll by fast in the compilation output.  Making it look
more like normal informational output avoids this confusion.

4 years agoMake 'byte-compile-info*' functions more logical
Lars Ingebrigtsen [Thu, 6 Aug 2020 06:12:31 +0000 (08:12 +0200)]
Make 'byte-compile-info*' functions more logical

* lisp/emacs-lisp/byte-run.el (byte-compile-info): New function
that's more flexible that replaces 'byte-compile-info-string' and
'byte-compile-info-message'.
(byte-compile-info-string): Make obsolete.
(byte-compile-info-message): Ditto.

* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-ari)
(skkdic-convert-postfix, skkdic-convert-prefix)
(skkdic-collect-okuri-nasi, skkdic-set-okuri-nasi):
* lisp/finder.el (finder-compile-keywords):
* lisp/cus-dep.el (custom-make-dependencies): Adjust callers to
use the new function.

4 years agoSimplify Solaris port
Paul Eggert [Thu, 6 Aug 2020 00:36:50 +0000 (17:36 -0700)]
Simplify Solaris port

This should avoid some configuration confusion as exemplified
by Jeffrey Walton’s recent bug report (Bug#42675).
* configure.ac (opsys): Simplify Solaris configuration by
not worrying about Solaris 9 and earlier, as they are no
longer supported by the Solaris developers.  This should
support Walton’s ‘./configure --build=x86_64-sun-solaris’.
Instead of bothering with ‘opsys=sol2-6’ and ‘opsys=sol2-10’,
just use ‘opsys=solaris’.  All uses changed.
(emacs_check_sunpro_c): Remove unused var.
* doc/misc/tramp.texi (Remote programs):
* etc/MACHINES, etc/PROBLEMS:
Modernize PATH for Oracle Developer Studio.
* etc/PROBLEMS: Move Solaris-related problems to legacy area,
except those that are still relevant.

4 years agoSkip epg tests if gpg isn't installed
Lars Ingebrigtsen [Wed, 5 Aug 2020 19:30:12 +0000 (21:30 +0200)]
Skip epg tests if gpg isn't installed

4 years agoSplit sometimes-failing test into three tests to ease debugging
Lars Ingebrigtsen [Wed, 5 Aug 2020 19:17:55 +0000 (21:17 +0200)]
Split sometimes-failing test into three tests to ease debugging

4 years agoEnable replying to an ical event even when not an attendee
Christophe Troestler [Wed, 5 Aug 2020 16:01:27 +0000 (18:01 +0200)]
Enable replying to an ical event even when not an attendee

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event--build-reply-event-body): Display a warning
instead of barfing when user is missing from attendee list.

When the user identity is not present in the attendee list, an error
is triggered making replying to such an event impossible (the reply
message not being even composed).  This replaces it with a warning.
This is necessary because one may receive events that the organizer
did not set up well and it is up to the user to decide whether or not
to reply to them (bug#41723).
Copyright-paperwork-exempt: yes

4 years agocperl-mode.el: Correctly terminate HERE-docs
Harald Jörg [Wed, 5 Aug 2020 15:19:06 +0000 (17:19 +0200)]
cperl-mode.el: Correctly terminate HERE-docs

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): cperl-mode
in the master branch wrongly uses the first occurrence of "HERE"
to terminate the string, resulting in badly fontified / indented
code which follows (bug#42251).

4 years agoWrap skeleton logic in atomic-change-group
Philip K [Wed, 5 Aug 2020 14:07:41 +0000 (16:07 +0200)]
Wrap skeleton logic in atomic-change-group

* lisp/skeleton.el (define-skeleton): Use an atomic change group
so that if the user `C-g's in the middle of it, we're not left
with half a skeleton in the buffer (bug#42311).

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