]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agodired: Show broken/circular links w/ different face
Tino Calancha [Thu, 27 Aug 2020 09:51:30 +0000 (11:51 +0200)]
dired: Show broken/circular links w/ different face

* lisp/dired.el (dired-broken-symlink): New face.
(dired-font-lock-keywords):
Use it for broken/circular links (Bug#39145).

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

4 years agoOnly show flyspell welcome message interactively
Stefan Kangas [Thu, 27 Aug 2020 09:38:00 +0000 (11:38 +0200)]
Only show flyspell welcome message interactively

* lisp/textmodes/flyspell.el (flyspell-mode): Only show welcome
message when called interactively.  (Bug#43065)

4 years agoAdd ASTEC-X issue to PROBLEMS
Stefan Kangas [Thu, 27 Aug 2020 05:58:17 +0000 (07:58 +0200)]
Add ASTEC-X issue to PROBLEMS

* etc/PROBLEMS: Mention problem with multiple monitors on proprietary
X Server ASTEC-X.  (Bug#36779)

4 years agoFix flyspell welcome message
Stefan Kangas [Thu, 27 Aug 2020 05:07:39 +0000 (07:07 +0200)]
Fix flyspell welcome message

* lisp/textmodes/flyspell.el (flyspell-mode, flyspell-mode-on):
Fix showing welcome message when `flyspell-issue-welcome-flag' and
`flyspell-issue-message-flag' are both non-nil.  (Bug#43065)

4 years ago; Add the necessary argument (bug#42967)
Dmitry Gutov [Thu, 27 Aug 2020 08:32:50 +0000 (11:32 +0300)]
; Add the necessary argument (bug#42967)

4 years agoAllow a function for the :secret in a plstore
Andrew G Cohen [Thu, 27 Aug 2020 05:14:26 +0000 (13:14 +0800)]
Allow a function for the :secret in a plstore

* lisp/auth-source.el (auth-source-plstore-search): If the :secret
value is a function, call it on plist to obtain the real password.

4 years ago; * lisp/textmodes/flyspell.el (flyspell-mode-on): Fix typo.
Stefan Kangas [Thu, 27 Aug 2020 04:57:52 +0000 (06:57 +0200)]
; * lisp/textmodes/flyspell.el (flyspell-mode-on): Fix typo.

4 years agoRefer to correct mouse button in flyspell message
Stefan Kangas [Thu, 27 Aug 2020 04:48:39 +0000 (06:48 +0200)]
Refer to correct mouse button in flyspell message

* lisp/textmodes/flyspell.el (make-flyspell-overlay)
(flyspell-mode-on): Refer to mouse-3 in help messages when the
variable 'flyspell-use-mouse-3-for-menu' is non-nil.  (Bug#11680)

4 years agoSignal error on Hunspell installation problem
Stefan Kangas [Wed, 26 Aug 2020 19:53:17 +0000 (21:53 +0200)]
Signal error on Hunspell installation problem

* lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries):
Signal user-error when Hunspell warns that it "Can't open affix or
dictionary files", and propagate this message.  (Bug#25825)

4 years ago; Fix license statements.
Stefan Kangas [Thu, 27 Aug 2020 00:42:36 +0000 (02:42 +0200)]
; Fix license statements.

4 years ago; * lisp/info.el (Info-complete-menu-item): Fix wording of comment.
Stefan Kangas [Thu, 27 Aug 2020 00:35:53 +0000 (02:35 +0200)]
; * lisp/info.el (Info-complete-menu-item): Fix wording of comment.

4 years agoAdd themes modus-operandi and modus-vivendi
Protesilaos Stavrou [Wed, 26 Aug 2020 23:29:35 +0000 (01:29 +0200)]
Add themes modus-operandi and modus-vivendi

* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: New themes.  (Bug#43019)

4 years agoSort Info index completions alphabetically
Stefan Kangas [Wed, 26 Aug 2020 22:50:59 +0000 (00:50 +0200)]
Sort Info index completions alphabetically

* lisp/info.el (Info-complete-menu-item): Sort the list of completions
alphabetically using 'nreverse'.  This makes no difference for Emacs
but helps third-party completion frameworks such as Ivy.  (Bug#38614)

Suggested by Howard Melman <hmelman@gmail.com>.

4 years ago; Bump xref version
Dmitry Gutov [Wed, 26 Aug 2020 21:54:42 +0000 (00:54 +0300)]
; Bump xref version

4 years agoUnbreak dired-do-find-regexp in Emacs 26
Dmitry Gutov [Wed, 26 Aug 2020 21:54:28 +0000 (00:54 +0300)]
Unbreak dired-do-find-regexp in Emacs 26

* lisp/progmodes/xref.el (xref--show-xrefs):
Support the old convention (bug#42967).

4 years agoUnbreak xref-goto-xref in Emacs 26
Dmitry Gutov [Wed, 26 Aug 2020 21:47:18 +0000 (00:47 +0300)]
Unbreak xref-goto-xref in Emacs 26

* lisp/progmodes/xref.el (xref-goto-xref):
Call next-error-found only if it's defined (bug#42981).

4 years agoFix expand-file-name symlink-to-dir bug
Paul Eggert [Wed, 26 Aug 2020 20:25:35 +0000 (13:25 -0700)]
Fix expand-file-name symlink-to-dir bug

Problem reported by Yegor Timoshenko (Bug#26911),
and I ran into it myself recently in normal-top-level.
* doc/lispref/files.texi (File Name Expansion), etc/NEWS: Mention this.
* src/fileio.c (Fexpand_file_name): Expand "/a/b/." to "/a/b/" not
"/a/b", to avoid misinterpreting a symlink "/a/b".  Similarly,
expand "/a/b/c/.." to "/a/b/" not "/a/b".
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
Adjust to match new behavior.
(tramp-test05-expand-file-name-relative): This test now succeeds,
at least on Fedora 31.
* test/src/fileio-tests.el:
(fileio-tests--expand-file-name-trailing-slash) New test.

4 years agoFix PWD startup checking with symlinks
Paul Eggert [Wed, 26 Aug 2020 17:53:32 +0000 (10:53 -0700)]
Fix PWD startup checking with symlinks

* lisp/startup.el (normal-top-level): Do not put "." after "/";
it’s not needed and with current file-name-as-directory it does
the wrong thing if PWD is a symlink.

4 years ago* lisp/files.el (insert-directory): Simplify (if ... X X) to X.
Paul Eggert [Wed, 26 Aug 2020 17:51:48 +0000 (10:51 -0700)]
* lisp/files.el (insert-directory): Simplify (if ... X X) to X.

4 years agoSync latest SKK-JISYO.L
Stefan Kangas [Wed, 26 Aug 2020 15:25:53 +0000 (17:25 +0200)]
Sync latest SKK-JISYO.L

* leim/SKK-DIC/SKK-JISYO.L: Sync to current upstream version.

4 years agoAllow disabling double buffering at build time
leo [Wed, 26 Aug 2020 13:03:08 +0000 (15:03 +0200)]
Allow disabling double buffering at build time

* configure.ac: Allow disabling double buffering (bug#32032).

Copyright-paperwork-exempt: yes

4 years agoAllow directories to be called .el in -add-subdirs-to-load-path
Robert Pluim [Wed, 26 Aug 2020 12:47:22 +0000 (14:47 +0200)]
Allow directories to be called .el in -add-subdirs-to-load-path

* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
Allow the directories to be called "<foo>.el" (bug#32266).

4 years agoFix doc-view problem with file names with spaces in them
Glenn Morris [Wed, 26 Aug 2020 12:37:13 +0000 (14:37 +0200)]
Fix doc-view problem with file names with spaces in them

* lisp/doc-view.el (doc-view-get-bounding-box): Don't bug out on
file names with spaces in them (bug#33344).

4 years agoUse format-prompt a couple of places
Lars Ingebrigtsen [Wed, 26 Aug 2020 12:08:21 +0000 (14:08 +0200)]
Use format-prompt a couple of places

* lisp/ps-print.el (ps-print-preprint):
* lisp/help-fns.el (describe-function): Use `format-prompt'
(bug#12443).

4 years agoImplement a way to customize "default" values
Lars Ingebrigtsen [Wed, 26 Aug 2020 12:07:25 +0000 (14:07 +0200)]
Implement a way to customize "default" values

* doc/lispref/minibuf.texi (Text from Minibuffer): Document them.

* lisp/minibuffer.el (format-prompt): New function (bug#12443).
(minibuffer-default-prompt-format): New variable.

4 years agoMake the epa key display slightly more informative
Lars Ingebrigtsen [Wed, 26 Aug 2020 11:22:55 +0000 (13:22 +0200)]
Make the epa key display slightly more informative

* lisp/epa.el (epa--button-key-text): Say what the validity
characters output by GPG mean (bug#34726).

4 years agoDocument ispell comment/string checking commands in the user manual
Štěpán Němec [Thu, 9 Apr 2020 14:17:57 +0000 (16:17 +0200)]
Document ispell comment/string checking commands in the user manual

* doc/emacs/fixit.texi (Spelling): Mention
'ispell-comments-and-strings' and 'ispell-comment-or-string-at-point'.
(bug#6411)

4 years agoispell: Commands to check comments or strings at point or in region
Štěpán Němec [Wed, 8 Apr 2020 18:32:51 +0000 (20:32 +0200)]
ispell: Commands to check comments or strings at point or in region

* lisp/textmodes/ispell.el (ispell-comments-and-strings): Accept START
and END arguments, defaulting to active region in interactive calls.
(ispell-comment-or-string-at-point): New command. (bug#6411)

4 years ago; * doc/lispref/backups.texi (Auto-Saving): Fix wording of last change.
Eli Zaretskii [Wed, 26 Aug 2020 10:46:56 +0000 (13:46 +0300)]
; * doc/lispref/backups.texi (Auto-Saving): Fix wording of last change.

4 years agoDon't recommend redefining auto-save filename functions
Noam Postavsky [Wed, 26 Aug 2020 10:37:24 +0000 (12:37 +0200)]
Don't recommend redefining auto-save filename functions

* doc/lispref/backups.texi (Auto-Saving): Document
auto-save-file-name-transforms.
* lisp/files.el (make-auto-save-file-name)
(auto-save-file-name-p): Remove suggestion to redefine for
customization (bug#34911).

4 years agoterm.el: Use correct exit status in suggested dir-tracking functions
Phil Sainty [Wed, 26 Aug 2020 10:03:32 +0000 (12:03 +0200)]
term.el: Use correct exit status in suggested dir-tracking functions

* lisp/term.el: Make some of the examples better (bug#43055).

4 years agoeshell: Remove unnecessary check in em-hist
Brian Leung [Wed, 26 Aug 2020 10:01:14 +0000 (12:01 +0200)]
eshell: Remove unnecessary check in em-hist

* lisp/eshell/em-hist.el
(eshell-previous-matching-input-string-position): Both before and
within the while loop, n is always smaller than n (bug#43056).

Copyright-paperwork-exempt: yes

4 years agoRemove side-effect-free markup for assoc-default
Lars Ingebrigtsen [Wed, 26 Aug 2020 09:28:18 +0000 (11:28 +0200)]
Remove side-effect-free markup for assoc-default

* lisp/subr.el (assoc-default): assoc-default isn't
side-effect-free, because it takes a :test parameter that can do
anything (bug#37943).

4 years agoFix lexical misunderstandings in gnus-icalendar-tests.el (bug#39782)
Mattias Engdegård [Wed, 26 Aug 2020 08:34:29 +0000 (10:34 +0200)]
Fix lexical misunderstandings in gnus-icalendar-tests.el (bug#39782)

* test/lisp/gnus/gnus-icalendar-tests.el:
(icalendar-tests--get-ical-event): Remove unused function accidentally
copy-pasted from icalendar-tests.el.
(gnus-icalendar-parse, gnus-icalendary-byday):
Remove unintended initial newlines.
Duplicate comma-escaping backslashes so that they have intended
effects, conforming to RFC 5545.
Remove ineffective comma-escaping backslashes where not intended.

4 years agoregex-emacs: copy less when reallocating
Paul Eggert [Wed, 26 Aug 2020 07:07:09 +0000 (00:07 -0700)]
regex-emacs: copy less when reallocating

* src/regex-emacs.c (GROW_FAIL_STACK): Copy just the
occupied stack slots, as the rest are garbage.

4 years agoregex-emacs: fix leak on memory allocation failure
Paul Eggert [Wed, 26 Aug 2020 07:07:08 +0000 (00:07 -0700)]
regex-emacs: fix leak on memory allocation failure

* src/regex-emacs.c (ENSURE_FAIL_STACK): If the failure
stack cannot be grown, free locally-allocated storage
before returning.

4 years agoregex-emacs: subscript-check register numbers
Paul Eggert [Wed, 26 Aug 2020 07:07:08 +0000 (00:07 -0700)]
regex-emacs: subscript-check register numbers

* src/regex-emacs.c (PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT)
(re_match_2_internal): Add some easserts for subscript checking.

4 years agoregex-emacs: omit regstart tests and regend set
Paul Eggert [Wed, 26 Aug 2020 07:07:08 +0000 (00:07 -0700)]
regex-emacs: omit regstart tests and regend set

* src/regex-emacs.c (PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT)
(re_match_2_internal): Add some assertions that regstart
is set whenever regend is.
(re_match_2_internal): Omit two unnecessary REG_UNSET (regstart ...)s
and one unnecessary assignment to regend.

4 years agoregex-emacs omit allocation of 3 slots
Paul Eggert [Wed, 26 Aug 2020 07:07:08 +0000 (00:07 -0700)]
regex-emacs omit allocation of 3 slots

* src/regex-emacs.c (re_match_2_internal): Avoid
unnecessary allocation of REGEND[0], BEST_REGSTART[0],
BEST_REGEND[0].

4 years agoregex-emacs omit POS runtime check
Paul Eggert [Wed, 26 Aug 2020 07:07:08 +0000 (00:07 -0700)]
regex-emacs omit POS runtime check

* src/regex-emacs.c (re_match_2_internal): Replace unnecessary
runtime check of POS with some eassumes.

4 years agoFix gpg2-related test failures on RHEL 7.8
Paul Eggert [Wed, 26 Aug 2020 01:33:22 +0000 (18:33 -0700)]
Fix gpg2-related test failures on RHEL 7.8

* test/lisp/gnus/mml-sec-tests.el (test-conf)
(mml-secure-en-decrypt-passphrase-no-cache-openpgp-todo)
(mml-secure-run-tests-with-gpg2):
Use epg-find-configuration instead of the obsolescent
epg-configuration.  This fixes test failures on RHEL 7.8,
where ‘gpg’ and ‘gpg2’ are both 2.0.22.

4 years agomml-secure-en-decrypt-sign-1-2-double is unstable
Paul Eggert [Wed, 26 Aug 2020 01:02:58 +0000 (18:02 -0700)]
mml-secure-en-decrypt-sign-1-2-double is unstable

* test/lisp/gnus/mml-sec-tests.el:
(mml-secure-en-decrypt-sign-1-2-double): Mark this as unstable.

4 years agoUpdate from Gnulib
Paul Eggert [Wed, 26 Aug 2020 00:56:57 +0000 (17:56 -0700)]
Update from Gnulib

This incorporates:
2020-08-25 verify: Avoid warnings when assume(0) is used
* lib/verify.h: Copy from Gnulib.

4 years agoAdd package prefix to jsonrpc defconst
Stefan Kangas [Tue, 25 Aug 2020 22:37:40 +0000 (00:37 +0200)]
Add package prefix to jsonrpc defconst

* lisp/jsonrpc.el (jsonrpc-default-request-timeout): Rename from
'jrpc-default-request-timeout'.
(jrpc-default-request-timeout): Make into obsolete variable alias
for 'jsonrpc-default-request-timeout'.  (Bug#40054)

4 years agoOmit "V" at the start of DEFVAR_BOOL vars
Paul Eggert [Tue, 25 Aug 2020 21:27:17 +0000 (14:27 -0700)]
Omit "V" at the start of DEFVAR_BOOL vars

Problem noted by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00846.html
* src/font.c (xft_ignore_color_fonts):
* src/syntax.c (comment_end_can_be_escaped):
* src/xdisp.c (word_wrap_by_category, display_fill_column_indicator):
Rename these DEFVAR_BOOL variables to avoid the initial "V"
that wrongly suggests that they are Lisp_Object variables.
All uses changed.

4 years agoAdd undefine keyword to make-mode
Daniel Colascione [Tue, 25 Aug 2020 17:53:53 +0000 (10:53 -0700)]
Add undefine keyword to make-mode

* lisp/progmodes/make-mode.el (makefile-gmake-statements): Add
"undefine" to the list of gmake keywords

4 years agoAdd "Delete" submenu to Dired "Operate" menu
Stefan Kangas [Mon, 24 Aug 2020 00:17:52 +0000 (02:17 +0200)]
Add "Delete" submenu to Dired "Operate" menu

* lisp/dired.el (dired-mode-map): Add "Delete" submenu to "Operate"
menu with an entry for 'dired-do-flagged-delete'.  (Bug#41524)

4 years agoAdd basic D-Bus integration to Gnus
Eric Abrahamsen [Fri, 21 Aug 2020 20:36:58 +0000 (13:36 -0700)]
Add basic D-Bus integration to Gnus

* lisp/gnus/gnus-dbus.el: New library, registering a signal that
closes all Gnus servers when the system is going to sleep.
* lisp/gnus/gnus-start.el: Check new option
`gnus-dbus-close-on-sleep', and register the appropriate D-Bus signal
if it is non-nil.
* lisp/gnus/gnus.el: New gnus-dbus customization group.
* doc/misc/gnus.texi: Document.

4 years agoPreserve setf semantics in 'substring', 'cons', 'logand' expanders
Štěpán Němec [Sat, 11 Apr 2020 22:27:51 +0000 (00:27 +0200)]
Preserve setf semantics in 'substring', 'cons', 'logand' expanders

* doc/lispref/variables.texi (Adding Generalized Variables): Fix example.
* lisp/emacs-lisp/cl-lib.el (substring)
* lisp/emacs-lisp/gv.el (cons, logand): Return the value being
assigned, as specified for 'setf'.  (bug#35546)

4 years agoTweak the file/buffer comparison from previous save-some-buffers change
Lars Ingebrigtsen [Tue, 25 Aug 2020 15:07:39 +0000 (17:07 +0200)]
Tweak the file/buffer comparison from previous save-some-buffers change

* lisp/files.el (save-some-buffers): Relax the "similarity" regexp
from the previous regexp: Don't show both file and buffer names if
the file is /tmp/foo and the buffer name is foo<zot>.

4 years agoFix problem with folded Gcc headers in Gnus
Lars Ingebrigtsen [Tue, 25 Aug 2020 14:57:53 +0000 (16:57 +0200)]
Fix problem with folded Gcc headers in Gnus

* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Tokenize the gcc
header properly (there may be newlines and tabs in the separators)
(bug#43036).

4 years agoPossibly mention both file and buffer names in save-some-buffers
Lars Ingebrigtsen [Tue, 25 Aug 2020 14:47:10 +0000 (16:47 +0200)]
Possibly mention both file and buffer names in save-some-buffers

* lisp/files.el (save-some-buffers): If the file and buffer names
are dissimilar, mention both their names (bug#8399).

4 years agoDon't bug out in gnus-icalendar when there no recurring event
Lars Ingebrigtsen [Tue, 25 Aug 2020 14:36:15 +0000 (16:36 +0200)]
Don't bug out in gnus-icalendar when there no recurring event

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-days): Fix previous patch
(bug#43038) -- don't bug out when there's no recurring event.

4 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 25 Aug 2020 14:27:09 +0000 (16:27 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

4 years ago* admin/admin.el (reminder-for-release-blocking-bugs): New command.
Michael Albinus [Tue, 25 Aug 2020 13:19:11 +0000 (15:19 +0200)]
* admin/admin.el (reminder-for-release-blocking-bugs): New command.

4 years agoremove-overlays doc clarification
Lars Ingebrigtsen [Tue, 25 Aug 2020 14:22:07 +0000 (16:22 +0200)]
remove-overlays doc clarification

* lisp/subr.el (remove-overlays): Doc fix (bug#13648).

4 years agoDoc fix for copy-directory
Lars Ingebrigtsen [Tue, 25 Aug 2020 12:42:22 +0000 (14:42 +0200)]
Doc fix for copy-directory

* lisp/files.el (copy-directory): PARENTS is no longer the last
argument.

4 years agoMerge from origin/emacs-27
Michael Albinus [Tue, 25 Aug 2020 13:29:38 +0000 (15:29 +0200)]
Merge from origin/emacs-27

44104a607a Fix error in GMP test
e26e63444d Add Feature testing for Windows binaries
4e2caef384 ; * src/character.c (str_as_multibyte): Fix the commentary.
d3a4ce8420 Revert "; * etc/NEWS: Remove temporary note on documentati...
16f00e36dc * admin/admin.el (set-version): Trap yet another NEWS error.
121be3e118 ; * etc/NEWS: Remove temporary note on documentation.  (Bu...
5fcb97dabd Fix cond jump table compilation (bug#42919)

4 years ago; * lisp/info.el (Info-up): Fix a typo in a comment.
Eli Zaretskii [Tue, 25 Aug 2020 13:03:51 +0000 (16:03 +0300)]
; * lisp/info.el (Info-up): Fix a typo in a comment.

4 years agoExtend background colours in shr
Lars Ingebrigtsen [Tue, 25 Aug 2020 11:57:00 +0000 (13:57 +0200)]
Extend background colours in shr

* lisp/net/shr.el (shr-colorize-region): Extend backgrounds to the
end (bug#43031).  This avoid ragged edges to the right when, for
instance, the <body> has a bgcolor.
(shr-face-background): Ditto.

4 years agoTweak how "u" works in Info buffers when scroll-conservatively is set
Stephen Berman [Tue, 25 Aug 2020 11:30:58 +0000 (13:30 +0200)]
Tweak how "u" works in Info buffers when scroll-conservatively is set

* info.el (Info-up): If scroll-conservatively is non-zero and
less than 101, display as much of the superior node above the
target line as possible (Bug#13690).

4 years agoMake shadowing warning in describe_map less confusing
Lars Ingebrigtsen [Tue, 25 Aug 2020 11:14:00 +0000 (13:14 +0200)]
Make shadowing warning in describe_map less confusing

* src/keymap.c (describe_map): A binding may be shadowed by
something else than a mode (bug#14086) (just a `define-key'
works), so don't say that it's a mode that shadows it.

4 years agoRevert previous hideshow commit
Lars Ingebrigtsen [Tue, 25 Aug 2020 08:07:08 +0000 (10:07 +0200)]
Revert previous hideshow commit

Hideshow has defaults that are overridden if we look for derived modes
in hs-special-modes-alist.  For instance, in lisp-interaction-mode
we'll choose a lookup based on parent modes, and that overrides the
default (bug#43032).

This reverts a415179b56f022f50138f55d231070e3d1b00697.

4 years agoUpdate from Gnulib
Paul Eggert [Mon, 24 Aug 2020 23:18:48 +0000 (16:18 -0700)]
Update from Gnulib

This incorporates:
* lib/diffseq.h, m4/inttypes.m4: Copy from Gnulib.
* m4/gnulib-comp.m4: Regenerate.

4 years agoFix error in GMP test
Phillip Lord [Mon, 24 Aug 2020 21:44:21 +0000 (22:44 +0100)]
Fix error in GMP test

* etc/w32-feature.el: Update to use system-configuration-features for
  GMP test.

4 years agoAdd Feature testing for Windows binaries
Phillip Lord [Mon, 24 Aug 2020 21:14:01 +0000 (22:14 +0100)]
Add Feature testing for Windows binaries

* etc/w32-feature.el: New file

4 years agoreplace-buffer-contents cleanups
Paul Eggert [Mon, 24 Aug 2020 20:12:51 +0000 (13:12 -0700)]
replace-buffer-contents cleanups

* src/editfns.c (NOTE_DELETE, NOTE_INSERT): Avoid unnecessary parens.
(Freplace_buffer_contents): Check args before returning results.
Avoid integer overflow when computing too_expensive, and work even
if MAX-COSTS is bignum.  Call alloca and/or malloc just once, not
three times.
(set_bit, bit_is_set): Simplify micro-optimization by using eassume.

4 years agoFix replace-region-contents performance bug
Paul Eggert [Mon, 24 Aug 2020 20:12:51 +0000 (13:12 -0700)]
Fix replace-region-contents performance bug

* src/editfns.c (rbc_quitcounter): Remove; the quitcounter
is now part of the context.
(EXTRA_CONTEXT_FIELDS): Remove unused member early_abort_tests.
Add jmp, quitcounter.
(Freplace_buffer_contents): Use setjmp/longjmp to recover from
a compareseq that runs too long.  Omit unnecessary rarely_quit
call.
(buffer_chars_equal): Occasionally check for early abort and
longjmp out if so (Bug#43016).

4 years agoClarify sorting order by file-backup-file-names
Lars Ingebrigtsen [Mon, 24 Aug 2020 20:04:28 +0000 (22:04 +0200)]
Clarify sorting order by file-backup-file-names

* doc/lispref/backups.texi (Backup Names): Ditto.

* lisp/files.el (file-backup-file-names): Clarify sorting order.

4 years agoRewrite the epa key interface to use buttons instead of widgets
Lars Ingebrigtsen [Mon, 24 Aug 2020 19:54:56 +0000 (21:54 +0200)]
Rewrite the epa key interface to use buttons instead of widgets

* lisp/epa.el (epa-font-lock-keywords): Removed.
(epa-key-list-mode-map): Bind tab/backtab to button navigation.
(epa-key): Remove widget.
(epa--button-key-text): Return the propertized text instead of
return a widget text.
(epa-key-list-mode): Don't use font locking; everything is output
as it should be.
(epa--insert-keys): Rewrite to just output the data instead of
widgetising.
(epa--select-keys): Insert buttons instead of widgets.

4 years agoFix error when loading a new, non-existent foo.gpg file
Lars Ingebrigtsen [Mon, 24 Aug 2020 18:50:08 +0000 (20:50 +0200)]
Fix error when loading a new, non-existent foo.gpg file

* lisp/epa-file.el (epa-file-insert-file-contents): Propagate the
correct error upwards (bug introduced by fixing bug#3829, and
messing up where the `when' form ended).
Reported by "Herbert J. Skuhra" <herbert@gojira.at>.

4 years agoDocument file-backup-file-names
Lars Ingebrigtsen [Mon, 24 Aug 2020 18:11:19 +0000 (20:11 +0200)]
Document file-backup-file-names

* doc/lispref/backups.texi (Backup Names): Document
file-backup-file-names.

4 years ago; * etc/NEWS: Fix wording of recently-added entries.
Eli Zaretskii [Mon, 24 Aug 2020 18:06:37 +0000 (21:06 +0300)]
; * etc/NEWS: Fix wording of recently-added entries.

4 years agoExtend the default value in dired-diff to all the backup files
Lars Ingebrigtsen [Mon, 24 Aug 2020 17:15:27 +0000 (19:15 +0200)]
Extend the default value in dired-diff to all the backup files

* lisp/dired-aux.el (dired-diff): When diffing files with backup
files, put all the backup files into the defaults so that they can
be reached with `M-n' from `read-file-name' (bug#24089).

4 years agoAdd a new function 'file-backup-file-names'
Lars Ingebrigtsen [Mon, 24 Aug 2020 16:26:05 +0000 (18:26 +0200)]
Add a new function 'file-backup-file-names'

* lisp/files.el (file-backup-file-names): New function (bug#24089).
(file-newest-backup): Use it.

4 years agoFix inferior octave single-quote font lock
Noam Postavsky [Mon, 24 Aug 2020 15:33:49 +0000 (17:33 +0200)]
Fix inferior octave single-quote font lock

* lisp/progmodes/octave.el (octave-mode-syntax-table): Fix
fontification of single quotes in inferior octave mode (bug#25517).

It looks like the problem is that octave-mode-syntax-table sets single
quotes as punctuation even though GNU Octave's manual says single quotes
are string syntax [1].

[1]:
https://www.gnu.org/software/octave/doc/interpreter/String-Objects.html

4 years agoHave gnutls_symmetric cache the results from Fgnutls_ciphers
Lars Ingebrigtsen [Mon, 24 Aug 2020 14:44:24 +0000 (16:44 +0200)]
Have gnutls_symmetric cache the results from Fgnutls_ciphers

* src/gnutls.c (gnutls_symmetric): Cache the results from
Fgnutls_ciphers, since that function isn't very fast (bug#42998).
(syms_of_gnutls): Initialize cache variable.

4 years agoExplain what C-h t means in the preface
Lars Ingebrigtsen [Mon, 24 Aug 2020 13:08:55 +0000 (15:08 +0200)]
Explain what C-h t means in the preface

* doc/emacs/emacs.texi (Top): Explain what C-h t means (since this
section is for people who haven't even used the tutorial) (bug#42982).

4 years agoChange how #:uninterned symbols are font-locked in Lisp mode
Lars Ingebrigtsen [Mon, 24 Aug 2020 12:34:42 +0000 (14:34 +0200)]
Change how #:uninterned symbols are font-locked in Lisp mode

* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Font-lock
#:uninterned symbols as a single entity instead of #: and
uninterned separately (bug#43001).

4 years agoAdd sanity check in tramp-sh-get-signal-strings
Michael Albinus [Mon, 24 Aug 2020 10:11:48 +0000 (12:11 +0200)]
Add sanity check in tramp-sh-get-signal-strings

* lisp/net/tramp-sh.el (tramp-sh-get-signal-strings): Add sanity check.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file):
Remove instrumentation.
(tramp--test--deftest-direct-async-process): Adapt docstring.
(tramp--test-windows-nt-p, tramp--test-windows-nt-and-batch-p):
Rename from `tramp--test-windows-nt', `tramp--test-windows-nt-and-batch'.

4 years agoAvoid some uses of obsolete function interactive-p
Stefan Kangas [Sat, 8 Aug 2020 03:32:37 +0000 (05:32 +0200)]
Avoid some uses of obsolete function interactive-p

* doc/lispref/help.texi (Accessing Documentation):
* lisp/cedet/data-debug.el:
* lisp/emacs-lisp/edebug.el (edebug-wrap-def-body):
* lisp/simple.el (append-next-kill):
* test/manual/cedet/cedet-utests.el (cedet-utest, pulse-test):
* test/manual/cedet/semantic-tests.el (semantic-lex-spp-write-utest)
(semantic-symref-test-count-hits-in-tag): Use 'called-interactively-p'
instead of obsolete function 'interactive-p'.

4 years agoRemove many items obsolete since Emacs 23.2 and 23.3
Stefan Kangas [Mon, 24 Aug 2020 01:28:48 +0000 (03:28 +0200)]
Remove many items obsolete since Emacs 23.2 and 23.3

* lisp/allout.el (allout-init):
* lisp/emacs-lisp/shadow.el (shadows-compare-text-p):
* lisp/ffap.el (ffap-version):
* lisp/filecache.el (file-cache-choose-completion):
* lisp/help.el (print-help-return-message):
* lisp/image-mode.el (image-mode-maybe):
* lisp/imenu.el (imenu-example--name-and-position):
* lisp/international/mule-cmds.el (princ-list):
* lisp/mail/rmail.el (rmail-highlight-face):
* lisp/minibuffer.el (read-file-name-predicate):
* lisp/mouse.el (mouse-choose-completion):
* lisp/progmodes/cc-cmds.el (c-forward-into-nomenclature):
* lisp/progmodes/xscheme.el
(advertised-xscheme-send-previous-expression):
* lisp/simple.el (completion-base-size)
(choose-completion-delete-max-match, exchange-dot-and-mark):
* lisp/subr.el (eval-next-after-load):
* lisp/term.el (term-dynamic-simple-complete):
Remove items, obsolete since Emacs 23.2 and 23.3.
* doc/misc/cc-mode.texi (Movement Commands): Doc fix.
* doc/lispref/help.texi (Accessing Documentation):
* lisp/emacs-lisp/edebug.el (edebug-wrap-def-body):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/progmodes/idlwave.el (idlwave-make-modified-completion-map-xemacs)
(idlwave-make-modified-completion-map-emacs)
(idlwave-choose-completion):
* lisp/progmodes/vhdl-mode.el:
* lisp/term.el (term-dynamic-list-completions):
Remove references to 'mouse-choose-completion'.
* lisp/image-mode.el (image-mode-to-text):
Remove reference to 'image-mode-maybe'.
* lisp/mail/rmail.el (rmail-highlight-headers):
Use 'rmail-highlight' face instead of 'rmail-highlight-face'.
* lisp/progmodes/antlr-mode.el (antlr-mode-map, antlr-mode-menu):
Remove reference to 'c-forward-into-nomenclature'.
* lisp/simple.el (choose-completion, choose-completion-string)
(completion-list-mode, completion-setup-function): Don't use
'completion-base-size'.
; * etc/NEWS: List removed items.

This was discussed in
https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00400.html

4 years agoQuote other suspicious characters in mml-insert-tag.
Asher Gordon [Mon, 24 Aug 2020 01:37:10 +0000 (03:37 +0200)]
Quote other suspicious characters in mml-insert-tag.

* lisp/gnus/mml.el (mml-insert-tag): Ensure that the characters
"[]<>=" are quoted correctly (bug#43009).
Copyright-paperwork-exempt: yes

4 years agoSimplify by using Gnulib sigdescr_np module
Paul Eggert [Sun, 23 Aug 2020 21:59:15 +0000 (14:59 -0700)]
Simplify by using Gnulib sigdescr_np module

Inspired by a straightforward patch by Bruno Haible.
* admin/merge-gnulib (GNULIB_MODULES): Add sigdescr_np.
* configure.ac: Do not check for sys_siglist or __sys_siglist.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/sigdescr_np.c, m4/sigdescr_np.m4: New files, copied from Gnulib.
* src/sysdep.c (sys_siglist, sys_siglist_entries): Remove.
(init_signals): Do not initialize sys_siglist.
(safe_strsignal): Use sigdescr_np instead of sys_siglist.

4 years agoUpdate from Gnulib
Paul Eggert [Sun, 23 Aug 2020 21:09:48 +0000 (14:09 -0700)]
Update from Gnulib

This incorporates:
2020-08-23 intprops: be consistent about +X vs X+0
2020-08-23 intprops: fix INT_MULTIPLY_WRAPV bit-field bug
2020-08-23 verify: Make assume work on bit field expressions
2020-08-23 libc-config: Improve comments
2020-08-22 verify: Do use __builtin_assume on clang
2020-08-22 sig2str: Add more signals
2020-08-21 sigdescr_np: New module
* lib/cdefs.h, lib/intprops.h, lib/sig2str.c, lib/string.in.h:
* lib/verify.h, m4/string_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

4 years agoFix more compilation warnings in xdisp.c
Eli Zaretskii [Sun, 23 Aug 2020 19:09:39 +0000 (22:09 +0300)]
Fix more compilation warnings in xdisp.c

* src/xdisp.c (display_mode_element, decode_mode_spec_coding):
Avoid compilation warnings.

4 years agoFix a compilation warning in xdisp.c
Eli Zaretskii [Sun, 23 Aug 2020 18:52:06 +0000 (21:52 +0300)]
Fix a compilation warning in xdisp.c

* src/xdisp.c (gui_consider_frame_title): Fix compilation warning.
Reported by Lars Ingebrigtsen <larsi@gnus.org>.

4 years agoImprove handling of coding-system mnemonic indicators
Eli Zaretskii [Sun, 23 Aug 2020 18:23:45 +0000 (21:23 +0300)]
Improve handling of coding-system mnemonic indicators

This fixes assertion violations when the mnemonic is
given as a string, and allows non-ASCII characters be
used as mode-line mnemonic of a coding-system.
* src/xdisp.c (decode_mode_spec_coding): Handle multibyte
characters as coding-system's mnemonic.
(display_mode_element): If decode_mode_spec returns a multibyte
string, display it as multibyte.
* src/coding.c (Fdefine_coding_system_internal)
(Fcoding_system_put): If :mnemonic is a string, use its first
character.  This avoids assertion violations if someone uses a
string as the mnemonic of a coding-system.

4 years agoAlways make a multibyte string for the frame title (bug#42904)
Mattias Engdegård [Fri, 21 Aug 2020 14:09:04 +0000 (16:09 +0200)]
Always make a multibyte string for the frame title (bug#42904)

* src/xdisp.c (gui_consider_frame_title): Multibyte-encode any raw
bytes in the title, and then pass a multibyte string to the back-end
for use as a frame title.  This cuts down a little on the rubbish
shown when raw bytes sneak in by mistake (as part of the buffer name,
for instance).

4 years agoFix image display on w32 as followup to recent changes
Eli Zaretskii [Sun, 23 Aug 2020 16:25:58 +0000 (19:25 +0300)]
Fix image display on w32 as followup to recent changes

The new code calls 'malloc' and 'free', so we can no longer
* src/image.c (struct image_type): Rename 'load' to 'load_img' and
'free' to 'free_img'.  All callers changed.
(free_image) [WINDOWSNT]: Don't #undef 'free'.

4 years agoSilence compiler warning (bug#40845)
Alan Third [Sun, 23 Aug 2020 16:06:02 +0000 (17:06 +0100)]
Silence compiler warning (bug#40845)

* src/image.c (lookup_image): Don't allow face to be NULL.

4 years agoSet basic SVG attributes (bug#40845)
Alan Third [Sun, 23 Aug 2020 15:28:17 +0000 (16:28 +0100)]
Set basic SVG attributes (bug#40845)

* test/manual/image-transforms-tests.el: Replace hard-coded colors
with defaults.
* src/dispextern.h (struct image):
* src/image.c (search_image_cache):
(xbm_load_image):
(xbm_load):
(pbm_load): Rename from frame to face where relevant.
(svg_load_image): Parse the image to find out the size, then wrap it
in another SVG to set a new size and colors, etc.
(lookup_image): Use the face colors instead of the frame colors.
(search_image_cache): Add ability to ignore the face colors.
(uncache_image): Uncache all copies of the image that share the spec,
even if the face colors don't match.
* etc/NEWS: Describe the changes.

4 years agoRework direct async processes in Tramp
Michael Albinus [Sun, 23 Aug 2020 11:30:43 +0000 (13:30 +0200)]
Rework direct async processes in Tramp

* doc/misc/tramp.texi (Remote processes): Precise restrictions for direct
async processes.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-direct-async-process-p): Make it more precise.
(tramp-handle-make-process): Rewrite, based on `make-process'.

* test/lisp/net/tramp-tests.el (tramp-test-temporary-file-directory):
Add `tramp-direct-async-args` for mock method.
(tramp-test29-start-file-process, tramp-test30-make-process):
Use weaker regexp checking "foo".
(tramp-test30-make-process): Do not check stderr for direct async processes.
(tramp--test--deftest-direct-async-process): New defmacro.
(tramp-test29-start-file-process-direct-async)
(tramp-test30-make-process-direct-async): New tests.

4 years ago; * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Instrument test.
Michael Albinus [Sun, 23 Aug 2020 11:19:02 +0000 (13:19 +0200)]
; * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Instrument test.

4 years agoMinor fixes for last change
Eli Zaretskii [Sun, 23 Aug 2020 07:10:47 +0000 (10:10 +0300)]
Minor fixes for last change

* lisp/international/kinsoku.el (kinsoku): Provide 'kinsoku'.
* lisp/cus-start.el (standard): Use 'require' instead of 'load.

* etc/NEWS:
* doc/emacs/display.texi (Visual Line Mode): Improve wording and
markup of last change.

4 years agoImprove word wrapping for CJK characters
Yuan Fu [Wed, 27 May 2020 02:47:27 +0000 (22:47 -0400)]
Improve word wrapping for CJK characters

Note about the change around line 9257 and 23372:

Before, the test for whitespace checks for can_wrap_before and
can_wrap_after simutaniously.  Now we separate these two checks, and
the logic needs to change a little bit.  However, when we don't enable
the new wrapping feature, 'can_wrap_after' is equivalent to
'IT_DISPLAYING_WHITESPACE' and 'can_wrap_before' is equivalent to
'!IT_DISPLAYING_WHITESPACE'.  And the new logic is equivalent with the
old one in that case.

Old logic:

    if (whitespace) /* Which means can wrap after && can't wrap
                       before.  */
      may_wrap = true;

    else if (may_wrap) /* aka (!whitespace && may_wrap)
      (set wrap point)  * aka (can't wrap after && can wrap before
      may_wrap = false  *      && may_wrap)
                        */

New logic:

    if (can_wrap_after)
      next_may_wrap = true
    else
      next_may_wrap = false;

    if (may_wrap && can_wrap_before)
      (set wrap point)

    /* Update may_wrap.  */
    may_wrap = next_may_wrap;

* src/xdisp.c (it_char_has_category, char_can_wrap_before)
(char_can_wrap_after): New functions.
(move_it_in_display_line_to, display_line): Replace calls to
'IT_DISPLAYING_WHITESPACE' with either 'char_can_wrap_before' or
'char_can_wrap_after'.
(word-wrap-by-category): New variable.

* lisp/cus-start.el (minibuffer-prompt-properties--setter): Add
'word-wrap-by-category' as a customizable variable.

* doc/emacs/display.texi (Visual Line Mode): Add a paragraph about the
new 'word-wrap-by-category' feature.
* etc/NEWS: Announce the change.

4 years agoBind the time zone so that the tests work everywhere
Lars Ingebrigtsen [Sat, 22 Aug 2020 21:34:54 +0000 (14:34 -0700)]
Bind the time zone so that the tests work everywhere

4 years agoUse lexical-binding and remove compat code
Lars Ingebrigtsen [Sat, 22 Aug 2020 20:47:31 +0000 (22:47 +0200)]
Use lexical-binding and remove compat code

4 years agoFix documentation of a recent change in Dired
Eli Zaretskii [Sat, 22 Aug 2020 16:14:35 +0000 (19:14 +0300)]
Fix documentation of a recent change in Dired

* etc/NEWS:
* doc/emacs/dired.texi (Dired Enter): Fix the text describing
'dired-maybe-use-globstar'.

* lisp/dired.el (dired-maybe-use-globstar): Add :version.

4 years ago; Copyright fix
Glenn Morris [Sat, 22 Aug 2020 15:58:27 +0000 (16:58 +0100)]
; Copyright fix

Author has assignment