]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoRemove private prototype for 'execve' and its uses in MinGW build
Eli Zaretskii [Sat, 30 May 2020 10:56:20 +0000 (13:56 +0300)]
Remove private prototype for 'execve' and its uses in MinGW build

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Copyright-paperwork-exempt: yes

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

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

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

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

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

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

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

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

Suggested by Stefan Monnier (see bug#41445).

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

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

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

The following commit was skipped:

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

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

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

4 years ago; * doc/emacs/maintaining.texi: Fix typo.
Simen Heggestøyl [Thu, 28 May 2020 14:40:30 +0000 (16:40 +0200)]
; * doc/emacs/maintaining.texi: Fix typo.

4 years agoTiny texinfo markup fixes
Glenn Morris [Wed, 27 May 2020 23:29:19 +0000 (16:29 -0700)]
Tiny texinfo markup fixes

* doc/lispref/edebug.texi (Edebug Views):
* doc/lispref/loading.texi (Library Search):
* doc/lispref/os.texi (User Identification): Markup fixes.

4 years ago; Fix more @var/@code mixups in Elisp manual
Basil L. Contovounesios [Wed, 27 May 2020 23:12:54 +0000 (00:12 +0100)]
; Fix more @var/@code mixups in Elisp manual

* doc/lispref/text.texi (Replacing): Fix markup for function
arguments.

4 years ago; Fix another format-spec typo in the Elisp manual
Basil L. Contovounesios [Wed, 27 May 2020 22:43:14 +0000 (23:43 +0100)]
; Fix another format-spec typo in the Elisp manual

* doc/lispref/text.texi (Interpolated Strings): Correct markup for
function argument.

4 years agoMake next-error behavior a bit more flexible
Dmitry Gutov [Wed, 27 May 2020 19:15:41 +0000 (22:15 +0300)]
Make next-error behavior a bit more flexible

* lisp/simple.el (next-error-no-navigation-try-current):
Extract from the case #2 in next-error-find-buffer (bug#40919).
(next-error-find-buffer-function): Use it as the default.

4 years ago* etc/NEWS.25: Belatedly announce upcase-dwim and downcase-dwim.
Noam Postavsky [Wed, 27 May 2020 18:04:46 +0000 (14:04 -0400)]
* etc/NEWS.25: Belatedly announce upcase-dwim and downcase-dwim.

4 years agoAdjust NEWS for revert of eshell fix on emacs-27 (Bug#41370)
Noam Postavsky [Wed, 27 May 2020 16:49:35 +0000 (12:49 -0400)]
Adjust NEWS for revert of eshell fix on emacs-27 (Bug#41370)

* etc/NEWS.27: Move "Eshell no longer re-initializes its keymap every
call" to...
* etc/NEWS: ... here.

4 years agoFix customizing of ido-mode (Bug#41557)
Noam Postavsky [Wed, 27 May 2020 15:44:18 +0000 (11:44 -0400)]
Fix customizing of ido-mode (Bug#41557)

lisp/ido.el (ido-mode): When setting the user option to nil, pass 0 to
the function, so that it will be disabled as intended.

4 years agoFix crash with invalid bytecode vectors
Paul Eggert [Wed, 27 May 2020 16:50:07 +0000 (09:50 -0700)]
Fix crash with invalid bytecode vectors

* src/lread.c (read_vector): If the vector is to short to be for
bytecodes don’t do bytecode processing for it, as the processing
might run past the end of the vector.

4 years ago--with-wide-int is a no-op on 64-bit hosts
Paul Eggert [Wed, 27 May 2020 16:45:49 +0000 (09:45 -0700)]
--with-wide-int is a no-op on 64-bit hosts

* configure.ac: Clarify wording for --with-wide-int help.
* src/pdumper.c (dump_vectorlike_generic):
Do the eassert even if --with-wide-int was specified unnecessarily.

4 years agoOmit unnecessary USE_LAB_TAG #if
Paul Eggert [Wed, 27 May 2020 16:05:12 +0000 (09:05 -0700)]
Omit unnecessary USE_LAB_TAG #if

* src/lisp.h: Omit unnecessary #if; the condition is always false now.

4 years agoSimplify the previous commit
Simen Heggestøyl [Wed, 27 May 2020 15:17:15 +0000 (17:17 +0200)]
Simplify the previous commit

* lisp/progmodes/project.el (project--read-project-list): Simplify the
previous commit by utilizing the optional OMIT-NULLS argument to
'split-string'.

4 years agoDon't clobber match data in utf-8-hfs conversion (bug#41445)
Mattias Engdegård [Fri, 22 May 2020 10:21:28 +0000 (12:21 +0200)]
Don't clobber match data in utf-8-hfs conversion (bug#41445)

Reported by Ture Pålsson.

* lisp/international/ucs-normalize.el
(ucs-normalize-hfs-nfd-post-read-conversion)
(ucs-normalize-hfs-nfd-pre-write-conversion):
Use save-match-data to avoid match data clobber in normalisation.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-save-match-data): New test.

4 years agoTweak GC performance if !USE_LSB_TAG
Paul Eggert [Tue, 26 May 2020 22:47:59 +0000 (15:47 -0700)]
Tweak GC performance if !USE_LSB_TAG

Performance issue reported by Eli Zaretskii (Bug#41321#149).
* src/alloc.c (GC_OBJECT_ALIGNMENT_MINIMUM): New constant.
(maybe_lisp_pointer): Use it instead of GCALIGNMENT.

4 years agoIntroduce some Objective-C 2.0 keywords. This fixes bug #5953
Alan Mackenzie [Tue, 26 May 2020 20:08:15 +0000 (20:08 +0000)]
Introduce some Objective-C 2.0 keywords.  This fixes bug #5953

* lisp/progmodes/cc-langs.el (c-other-decl-kwds): New keywords @property,
@dynamic, @synthesize, @compatibility_alias.
(c-protection-kwds): New keywords @package, @required, @optional.
(c-block-stmt-1-kwds): New keyword @autoreleasepool.
(c-constant-kwds): New keywords IBAction, IBOutlet.

4 years agoAvoid adding the empty string to the project list
Simen Heggestøyl [Mon, 25 May 2020 19:29:02 +0000 (21:29 +0200)]
Avoid adding the empty string to the project list

* lisp/progmodes/project.el (project--read-project-list): Avoid adding
the empty string to the project list.

4 years agoAdapt project functions to the new 'project-root'
Simen Heggestøyl [Mon, 25 May 2020 19:10:03 +0000 (21:10 +0200)]
Adapt project functions to the new 'project-root'

* lisp/progmodes/project.el (project-dired, project-eshell)
(project--read-project-list, project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list): Adapt to the new 'project-root'.

4 years agoSome copy edits
Dmitry Gutov [Mon, 18 May 2020 22:27:37 +0000 (01:27 +0300)]
Some copy edits

* doc/emacs/maintaining.texi (Switching Projects)
(Project File Commands): Copy edits.

* etc/NEWS: Same.

4 years agoTeach project-current to inhibit the prompt
Dmitry Gutov [Mon, 18 May 2020 22:00:43 +0000 (01:00 +0300)]
Teach project-current to inhibit the prompt

* lisp/progmodes/project.el:
(project-current-inhibit-prompt): New variable.
(project-current, project-switch-project): Use it.

4 years agoUpdate the Emacs manual with recent project.el changes
Simen Heggestøyl [Mon, 18 May 2020 16:17:10 +0000 (18:17 +0200)]
Update the Emacs manual with recent project.el changes

* doc/emacs/maintaining.texi (Projects): Add a menu.
(Project File Commands): New subsection describing project file
commands (moved here from 'Working with Projects').  Describe the new
commands 'project-dired' and 'project-eshell'.
(Switching Projects): New subsection.

* etc/NEWS: Mention project.el changes.

4 years agoRename 'project-switch-menu' to 'project-switch-commands'
Simen Heggestøyl [Sun, 17 May 2020 11:54:32 +0000 (13:54 +0200)]
Rename 'project-switch-menu' to 'project-switch-commands'

* lisp/progmodes/project.el (project-switch-commands): Rename from
'project-switch-menu'.
(project--keymap-prompt, project-switch-project): Update after the
renaming.

4 years agoSimplify 'project--keymap-prompt' a bit
Simen Heggestøyl [Sun, 17 May 2020 06:49:08 +0000 (08:49 +0200)]
Simplify 'project--keymap-prompt' a bit

* lisp/progmodes/project.el: Remove seq requirement.
(project--keymap-prompt): Simplify with 'mapconcat'.

4 years agoTurn project switch menu var into a public alist
Simen Heggestøyl [Sat, 16 May 2020 07:53:43 +0000 (09:53 +0200)]
Turn project switch menu var into a public alist

* lisp/progmodes/project.el: Require seq.
(project--switch-alist): Remove in favor of the public
'project-switch-menu'.
(project-add-switch-command): Remove; not needed now that
'project-switch-menu' is a public alist.
(project-switch-menu): New variable mapping keys to project switching
menu entries.
(project--keymap-prompt, project-switch-project): Adjust to the new
'project-switch-menu' format.

4 years agoChange dispatch binding of 'project-find-regexp'
Simen Heggestøyl [Sat, 16 May 2020 07:00:49 +0000 (09:00 +0200)]
Change dispatch binding of 'project-find-regexp'

* lisp/progmodes/project.el: Change default dispatch binding of
'project-find-regexp' to 's'.

4 years agoIntegrate project-switch-project with project-find-regexp
Dmitry Gutov [Tue, 12 May 2020 01:20:26 +0000 (04:20 +0300)]
Integrate project-switch-project with project-find-regexp

* lisp/progmodes/project.el:
(project-find-regexp): Add to the list of 'switch' commands.
(project-switch-project): Use call-interactively so that the
former can read its arguments.

4 years agoMove project-dired and project-eshell higher
Dmitry Gutov [Tue, 12 May 2020 01:17:23 +0000 (04:17 +0300)]
Move project-dired and project-eshell higher

* lisp/progmodes/project.el:
(project-dired, project-eshell): Move higher in the file,
according to their universal utility.

4 years agoUse an alist instead of a keymap
Dmitry Gutov [Tue, 12 May 2020 01:13:48 +0000 (04:13 +0300)]
Use an alist instead of a keymap

* lisp/progmodes/project.el:
(project--switch-alist): New variable to use instead of
project-switch-keymap, which remove.  Update all references.

4 years agoImprove project name completion
Dmitry Gutov [Tue, 12 May 2020 00:32:05 +0000 (03:32 +0300)]
Improve project name completion

* lisp/progmodes/project.el:
(project-prompt-project-dir): Use REQUIRE-MATCH=t.  Make sure the
'substring' completion style is used by default.

4 years agoSimplify a little, and avoid duplicate commands
Dmitry Gutov [Tue, 12 May 2020 00:22:30 +0000 (03:22 +0300)]
Simplify a little, and avoid duplicate commands

* lisp/progmodes/project.el:
(project--transient-p) Remove, not needed.
(project-current): Move project-find based on the directory here.
(project--remove-from-project-list): Only write if the list changed.
(project-find-project): Rename to project-prompt-project-dir.
Simply return the directory selected by the user.
(project-switch-project-find-file): Remove.
(project-switch-project-dired): Rename to project-dired and make
it follow the convention of existing projec tcommands.
(project-switch-project-eshell): Ditto.
(project-switch-project): Instead of passing the project instance
to the command, just bind default-directory.

4 years agoAdd project switching functionality
Simen Heggestøyl [Sat, 9 May 2020 15:27:06 +0000 (17:27 +0200)]
Add project switching functionality

* lisp/progmodes/project.el: Require subr-x.
(project--transient-p, project--ensure-file-exists)
(project--read-project-list, project--ensure-read-project-list)
(project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list, project-find-project)
(project-switch-project-find-file, project-switch-project-dired)
(project-switch-project-eshell, project-add-switch-command)
(project--keymap-prompt, project-switch-project): New functions.
(project--list, project-switch-keymap): New variables.
(project-current): Call 'project-find-project' when no project is
current.

4 years agoPort struct Lisp_FLoat to oddball platforms
Paul Eggert [Tue, 26 May 2020 07:47:24 +0000 (00:47 -0700)]
Port struct Lisp_FLoat to oddball platforms

* src/lisp.h (struct Lisp_Float): Declare via
GCALIGNED_UNION_MEMBER, not via GCALIGNED_STRUCT, since alloc.c
creates these in arrays and GCALIGNED_STRUCT does not necessarily
suffice to align struct Lisp_Float when it’s used in an array.
This avoids undefined behavior on oddball machines where
sizeof (struct Lisp_Float) is not a multiple of 8 and the compiler
does not support __attribute__ ((aligned 8)).

4 years agoMove union emacs_align_type to alloc.c
Paul Eggert [Tue, 26 May 2020 06:24:47 +0000 (23:24 -0700)]
Move union emacs_align_type to alloc.c

* src/alloc.c (union emacs_align_type): Move to here ...
* src/lisp.h: ... from here, and uncomment out some of the
types that alloc.c can see but lisp.h cannot.

4 years agoFurther fix for aborts due to GC losing pseudovectors
Paul Eggert [Tue, 26 May 2020 06:06:07 +0000 (23:06 -0700)]
Further fix for aborts due to GC losing pseudovectors

* src/alloc.c (MALLOC_ALIGNMENT_BOUND): Remove.
(LISP_ALIGNMENT): Go back to yesterday’s version, except use
union emacs_align_type instead of max_align_t.
(MALLOC_IS_LISP_ALIGNED): Go back to yesterday’s version.
(maybe_lisp_pointer): Check against GCALIGNMENT, not LISP_ALIGNMENT.
* src/lisp.h (union emacs_align_type): Bring back.

4 years agoRefix aborts due to GC losing pseudovectors
Paul Eggert [Tue, 26 May 2020 05:06:25 +0000 (22:06 -0700)]
Refix aborts due to GC losing pseudovectors

This is simpler, and fixes a bug in the previous fix.
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): Simplify by
using max_align_t, since the buggy implementations won’t
break this simpler implementation.
(LISP_ALIGNMENT): Simplify by just using GCALIGNMENT, since the
fancier implementation wasn’t correct anyway, and fixing it
isn’t worth the trouble on practical platforms.
* src/lisp.h (union emacs_align_type): Remove.

4 years agoFix aborts due to GC losing pseudovectors
Paul Eggert [Tue, 26 May 2020 03:26:14 +0000 (20:26 -0700)]
Fix aborts due to GC losing pseudovectors

Problem reported by Eli Zaretskii (Bug#41321).
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): New constant.
(LISP_ALIGNMENT): Lower it to avoid crashes on MinGW and similarly
buggy platforms where malloc returns pointers not aligned to
alignof (max_align_t).  But keep it higher on platforms where this
is known to work, as it helps GC performance.
(MALLOC_IS_LISP_ALIGNED): Define in terms of the other two.
* src/alloc.c (stacktop_sentry):
* src/thread.c (run_thread):
Don’t overalign or oversize stack sentries; they need to be
aligned only for pointers and Lisp_Object, not for arbitrary
pseudovector contents.
* src/lisp.h (union emacs_align_type): New type, used for
LISP_ALIGNMENT.

4 years agoMark metamail.el as obsolete (Bug#41388)
Stefan Kangas [Tue, 26 May 2020 02:56:56 +0000 (04:56 +0200)]
Mark metamail.el as obsolete (Bug#41388)

The metamail package was last released in 1994, and has been removed
from most GNU/Linux distributions due to being buggy and unmaintained.

* lisp/mail/metamail.el: Move from here...
* lisp/obsolete/metamail.el: ...to here.
* etc/NEWS: Mention its obsoletion.

4 years agoBump project.el version
Dmitry Gutov [Mon, 25 May 2020 19:29:47 +0000 (22:29 +0300)]
Bump project.el version

* project.el: Bump the version

4 years ago; More the note about reporting problems further up
Dmitry Gutov [Mon, 25 May 2020 19:29:06 +0000 (22:29 +0300)]
; More the note about reporting problems further up

4 years ago; * lisp/files.el (auto-save-visited-mode): Fix typo in last commit.
Philipp Stephani [Mon, 25 May 2020 19:21:31 +0000 (21:21 +0200)]
; * lisp/files.el (auto-save-visited-mode): Fix typo in last commit.

4 years agoAllow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Philipp Stephani [Wed, 1 Apr 2020 17:54:01 +0000 (19:54 +0200)]
Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.

At least for me, 'auto-save-visited-mode' is very slow and blocks user
interaction for files visited over TRAMP.  Therefore, I'd like a
mechanism to disable it for some buffers (namely, those visiting
remote files).

* (auto-save-visited-mode): Document that 'auto-save-visited-mode' can
be set to nil buffer-locally.

* etc/NEWS: Document new behavior.

4 years agoFix access to single-byte characters in buffer text
Eli Zaretskii [Mon, 25 May 2020 14:07:22 +0000 (17:07 +0300)]
Fix access to single-byte characters in buffer text

* src/xdisp.c (get_visually_first_element)
(Fbidi_find_overridden_directionality):
* src/cmds.c (Fend_of_line): Use FETCH_BYTE instead of FETCH_CHAR,
and byte position instead of character position, to access
individual bytes of buffer text.  This avoids producing invalid
characters and accessing wrong buffer positions.  (Bug#41520)

4 years agoDon't bug out in xml-escape-string if invalid characters aren't present
Lars Ingebrigtsen [Mon, 25 May 2020 13:03:37 +0000 (15:03 +0200)]
Don't bug out in xml-escape-string if invalid characters aren't present

* lisp/xml.el (xml-escape-string): Don't bug out if invalid
characters aren't present.

4 years agoAdd command ffap-other-tab (Bug#41410)
ej32u@protonmail.com [Tue, 19 May 2020 21:43:13 +0000 (21:43 +0000)]
Add command ffap-other-tab (Bug#41410)

* lisp/ffap.el (ffap-other-tab): New command, opens files at point in
another tab.
(ffap-bindings): Bind it to find-file-other-tab's binding.

4 years agoMake dedicated keymap and mode for eshell-command (Bug#41370)
Noam Postavsky [Mon, 25 May 2020 00:17:40 +0000 (20:17 -0400)]
Make dedicated keymap and mode for eshell-command (Bug#41370)

Otherwise, we end up permanently modifying eshell-mode-map when
running eshell-command.
* lisp/eshell/eshell.el (eshell-command-mode): New mode, with map to
contain the bindings previously set by eshell-return-exits-minibuffer.
(eshell-return-exits-minibuffer): Make into obsolete alias for
eshell-command-mode.
(eshell-command): Use eshell-command-mode instead of
eshell-return-exits-minibuffer.

4 years agoFix segfault on closing frame with tooltip (Bug#41239)
Noam Postavsky [Mon, 25 May 2020 00:14:48 +0000 (20:14 -0400)]
Fix segfault on closing frame with tooltip (Bug#41239)

* src/gtkutil.c (xg_free_frame_widgets): Empty and unreference the
tooltip widget before destroying its label.

4 years agoRevert "Fix eshell-mode-map initialization"
Noam Postavsky [Mon, 25 May 2020 00:12:30 +0000 (20:12 -0400)]
Revert "Fix eshell-mode-map initialization"

It makes eshell-return-exits-minibuffer permanently affect the
eshell-mode-map (Bug#41370).

Do not merge to master, we will fix it properly there.

4 years agoFix tab-bar-tab-name-ellipsis initialization
Matthias Meulien [Sun, 17 May 2020 22:32:47 +0000 (00:32 +0200)]
Fix tab-bar-tab-name-ellipsis initialization

* lisp/tab-bar.el (tab-bar-tab-name-truncated): Evaluate displayable
character when generating tab name.

4 years agoFix Elisp manual entry for format-spec
Basil L. Contovounesios [Sun, 24 May 2020 21:10:54 +0000 (22:10 +0100)]
Fix Elisp manual entry for format-spec

* doc/lispref/text.texi (Interpolated Strings): Fix typos.  Don't
document modifier for default space padding as it's redundant and
inconsistent with the docstring and implementation of format-spec.

4 years agoMark browse-url-conkeror as obsolete
Stefan Kangas [Sun, 24 May 2020 16:48:16 +0000 (18:48 +0200)]
Mark browse-url-conkeror as obsolete

* lisp/net/browse-url.el:
(browse-url--browser-defcustom-type)
(browse-url-conkeror-new-window-is-buffer)
(browse-url-conkeror-program, browse-url-conkeror-arguments)
(browse-url-default-browser, browse-url-conkeror): Mark the
conkeror browser as obsolete.

* etc/NEWS: Mention this.

4 years agoFix rare assertion violations in 'etags'
Eli Zaretskii [Sun, 24 May 2020 15:01:45 +0000 (18:01 +0300)]
Fix rare assertion violations in 'etags'

* lib-src/etags.c (pfnote): Instead of raising an assertion when
we get an empty tag name, return immediately.  (Bug#41465)

* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to latest changes in
etags.

4 years ago; * lisp/format-spec.el (format-spec): Fix typo.
Basil L. Contovounesios [Sun, 24 May 2020 13:00:12 +0000 (14:00 +0100)]
; * lisp/format-spec.el (format-spec): Fix typo.

4 years agoAdd three C++20 coroutine keywords, co_await, co_yield, and co_return
Carl Lei [Sun, 24 May 2020 11:52:24 +0000 (11:52 +0000)]
Add three C++20 coroutine keywords, co_await, co_yield, and co_return

* lisp/progmodes/cc-langs.el (c-operators): Add co_await and co_yield to the
C++ value of "Exception" keywords.
(c-return-kwds): Create a C++ value containing co_return.
(c-simple-stmt-kwds): Add co_return to the C++ value.

Copyright-paperwork-exempt: yes.

4 years agoPort etags FALLTHROUGH to C2X
Paul Eggert [Sat, 23 May 2020 19:55:13 +0000 (12:55 -0700)]
Port etags FALLTHROUGH to C2X

Problem reported by Ashish SHUKLA in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg03013.html
* lib-src/etags.c (C_entries): Move label so that FALLTHROUGH
precedes a case label, as draft C2X specifies.

4 years agoRestore check for Emacs 20.2 bytecodes
Paul Eggert [Sat, 23 May 2020 17:38:53 +0000 (10:38 -0700)]
Restore check for Emacs 20.2 bytecodes

* src/eval.c (Ffetch_bytecode): Check for multibyte bytecodes
here too.  Problem reported by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg02876.html

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

d6a0b66a0c (origin/emacs-27) * lisp/subr.el (save-match-data): Clarif...
1a6d59eeba Improve the documentation of setting up fontsets
c7737d40f2 ; * etc/TODO (Ligatures): Update the entry based on recent...
fb2e34cd21 ; * etc/TODO (Ligatures): Update the entry based on recent...
13b6dfd4f7 * doc/emacs/killing.texi (Rectangles): Improve indexing.
a10254dd46 Fix accessing files on networked drives on MS-Windows

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

The following commits were skipped:

c0aa2f2abf CC Mode: Fix bug #39972, by fixing c-display-defun-name fo...
62a5e890d7 Redo RCS Id for pdumper

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

8cc453d788 Second attempt at improving indexing in control.texi

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

The following commit was skipped:

0eeeedf195 ; * etc/PROBLEMS: Add note about color list issues on macOS.

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

4b9fbdb5a7 ; Update TODO item about ligature support
03d44acfdd * doc/lispref/control.texi (Processing of Errors): Improve...
b48ab743a8 Minor fixups for mutability doc
6ac2326e5b Don’t use “constant” for values you shouldn’t change

4 years ago* lisp/subr.el (save-match-data): Clarify use in docstring
Stefan Monnier [Sat, 23 May 2020 13:33:41 +0000 (09:33 -0400)]
* lisp/subr.el (save-match-data): Clarify use in docstring

4 years agoImprove the documentation of setting up fontsets
Eli Zaretskii [Sat, 23 May 2020 12:14:27 +0000 (15:14 +0300)]
Improve the documentation of setting up fontsets

* doc/lispref/display.texi (Fontsets): Improve the accuracy of a
cross-reference to "Character Properties".

* doc/emacs/mule.texi (Fontsets, Modifying Fontsets): Improve the
documentation of fontsets and how to modify them.

4 years agoReject invalid characters in XML strings (Bug#41094).
Philipp Stephani [Sat, 23 May 2020 11:56:09 +0000 (13:56 +0200)]
Reject invalid characters in XML strings (Bug#41094).

* lisp/xml.el (xml-escape-string): Search for invalid characters.
(xml-invalid-character): New error symbol.

* test/lisp/xml-tests.el (xml-print-invalid-cdata): New unit test.

* etc/NEWS: Document new behavior.

4 years ago; * etc/NEWS: Mention new customization options for package.el.
Eli Zaretskii [Sat, 23 May 2020 08:19:54 +0000 (11:19 +0300)]
; * etc/NEWS: Mention new customization options for package.el.

4 years agoLet user adjust the column widths of the package menu.
Chris McMahan [Tue, 5 May 2020 18:15:01 +0000 (14:15 -0400)]
Let user adjust the column widths of the package menu.

* lisp/emacs-lisp/package.el (package-name-column-width)
(package-version-column-width, package-status-column-width)
(package-archive-column-width): New defcustoms.
(package-menu-mode):
Use the values of defcustoms instead of hardcoded
values.  (Bug#41086)

4 years ago; * etc/TODO (Ligatures): Update the entry based on recent discussions.
Eli Zaretskii [Sat, 23 May 2020 08:01:09 +0000 (11:01 +0300)]
; * etc/TODO (Ligatures): Update the entry based on recent discussions.

4 years ago; * etc/TODO (Ligatures): Update the entry based on recent discussions.
Eli Zaretskii [Sat, 23 May 2020 07:59:39 +0000 (10:59 +0300)]
; * etc/TODO (Ligatures): Update the entry based on recent discussions.

4 years ago* doc/emacs/killing.texi (Rectangles): Improve indexing.
Eli Zaretskii [Sat, 23 May 2020 07:33:35 +0000 (10:33 +0300)]
* doc/emacs/killing.texi (Rectangles): Improve indexing.

4 years agoFix accessing files on networked drives on MS-Windows
Eli Zaretskii [Sat, 23 May 2020 05:50:22 +0000 (08:50 +0300)]
Fix accessing files on networked drives on MS-Windows

* src/w32.c (acl_get_file): Set errno to ENOTSUP if
get_file_security returns ERROR_NOT_SUPPORTED.  (Bug#41463)

4 years agoDelete another library obsolete since 23.2
Stefan Kangas [Sat, 23 May 2020 05:32:10 +0000 (07:32 +0200)]
Delete another library obsolete since 23.2

This was missed in a previous commit to remove obsolete libraries.
Its deletion was already announced in NEWS.

* lisp/obsolete/levents.el: Delete file.  This library has been
obsolete since 23.2.

4 years ago* lisp/doc-view.el (doc-view-presentation): Fix thinko
Stefan Monnier [Sat, 23 May 2020 03:36:57 +0000 (23:36 -0400)]
* lisp/doc-view.el (doc-view-presentation): Fix thinko

4 years agoImplement 'mark-resolved' for the Git backend
Dmitry Gutov [Sat, 23 May 2020 02:08:06 +0000 (05:08 +0300)]
Implement 'mark-resolved' for the Git backend

* lisp/vc/vc-git.el (vc-git-mark-resolved): New function.

4 years agoproject.el: A project has only one main root now
Dmitry Gutov [Sat, 23 May 2020 01:38:27 +0000 (04:38 +0300)]
project.el: A project has only one main root now

Practice shows that the vast majority of projects only use one main
root.  The users of this API very often make this assumption as well.
The rest of the "roots" should be possible to express through
project-external-roots.

* lisp/progmodes/project.el: Update the commentary.
Only 4 non-obsolete generics now.
(project-root): Replacement for `project-roots'.
All callers updated.  Implementations too.
(project-roots): Declare obsolete.
(project-external-roots): Simplify the docstring.
(project-ignores): Update the docstring.
(project-find-regexp): Omit the second arg to project-files.
(project--dir-ignores): Simplify.
(project-compile): Simplify, remove outdated comment.

* lisp/cedet/ede.el: Add a FIXME.

4 years agoDisable ido-everywhere when ido-mode is off
Dmitry Gutov [Fri, 22 May 2020 00:37:56 +0000 (03:37 +0300)]
Disable ido-everywhere when ido-mode is off

* lisp/ido.el (ido-mode): Disable the effects of 'ido-everywhere'
when ido-mode is turned off.

4 years agoImprove shr/eww handling of mailto URLs
Basil L. Contovounesios [Wed, 6 May 2020 17:02:32 +0000 (18:02 +0100)]
Improve shr/eww handling of mailto URLs

* lisp/net/eww.el (eww): Use function-put in place of put, as
recommended in "(elisp) Symbol Plists".
(eww-follow-link):
* lisp/net/shr.el (shr-browse-url): Rather than call browse-url-mail
directly, call browse-url which respects the user options
browse-url-handlers and browse-url-mailto-function.  (Bug#41133)
(shr--current-link-region): Return nil if there is no link at point.
(shr--blink-link): Adapt accordingly.
(shr-fill-line, shr-indent, shr-table-body): Refactor to avoid some
unnecessary allocations.
* etc/NEWS: Announce that eww-follow-link and shr-browse-url support
custom URL handlers.

4 years agoVarious json.el improvements
Basil L. Contovounesios [Sat, 16 May 2020 12:23:48 +0000 (13:23 +0100)]
Various json.el improvements

* etc/NEWS: Announce that json-read-number is now stricter.

* json.el: Bump package version.
(json-encoding-lisp-style-closings, json-pre-element-read-function)
(json-post-element-read-function, json-advance, json-peek)
(json--path): Clarify and improve style of doc strings.
(json-join): Define as an obsolete alias of string-join.
(json-alist-p, json-plist-p): Refactor for speed and declare as
pure, side-effect-free, and error-free.
(json--plist-reverse): Rename function...
(json--plist-nreverse): ...to this, making it destructive for speed.
All callers changed.
(json--plist-to-alist): Remove, replacing single use with map-pairs.
(json--with-indentation): Accept multiple forms as arguments, fix
their indentation, and allow them to be instrumented for debugging.
Add docstring.
(json-pop, json-read-keyword, json-add-to-object)
(json-encode-array): Simplify for speed.
(json-skip-whitespace): Put newline before carriage return for
likely frequency of occurrence, and so that the characters appear in
increasing order.
(json--check-position): Use 1+.
(json-path-to-position): Open code apply-partially.
(json-keywords): Turn into a defconst and mark as obsolete now that
it is no longer used.
(json--post-value, json--number, json--escape): New rx definitions.
(json-encode-keyword): Declare as side-effect-free.
(json-read-number): Reject leading zeros and plus signs, and make
integer part mandatory in accordance with JSON standards and for
consistency with native JSON parsing functions.  Eagerly signal
json-number-format when garbage follows a valid number, e.g., when
reading "1.1.1", instead of leaving that up to the caller.  Remove
optional internal argument from advertised calling convention now
that the function is no longer recursive.
(json-encode-number): Define as an alias of number-to-string.
(json-special-chars): Turn into a defconst.
(json-read-escaped-char, json-new-object, json-read-file)
(json-pretty-print): Simplify.
(json-read-string): For consistency with other json.el error
reporting, remove check for leading '"', and use the integer value
rather than the printed representation of characters in error data.
At EOB signal json-end-of-file instead of json-string-format.
(json--long-string-threshold, json--string-buffer): New variables.
(json-encode-string): Reimplement in terms of buffer manipulation
for speed (bug#20154).
(json-read-object): Escape ?\} properly.
(json--encode-alist): New function extracted from json-encode-alist.
(json-encode-hash-table, json-encode-alist, json-encode-plist): Use
it to avoid destructively modifying the argument when
json-encoding-object-sort-predicate is non-nil without incurring
unnecessary copying (bug#40693).  Encode empty object as "{}" even
when pretty-printing.  Simplify for speed.
(json-read-array): Avoid recomputing list length on each iteration
when json-pre-element-read-function is non-nil.  Make first element
of json-array-format error data a string for consistency with
json-object-format and to make the displayed error message clearer.
(json-readtable-dispatch): Accept any kind of argument, not just
symbols.  Generate the table in a simpler manner so the dispatch
order is clearer.  Remove dispatch on ?+ and ?. now that
json-read-number is stricter and for consistency with native JSON
parsing functions.  Signal json-end-of-file if argument is nil.
(json-read): Simplify accordingly.
(json-encode): Avoid allocating a list on each invocation.

* lisp/jsonrpc.el (jsonrpc--json-read, jsonrpc--json-encode): Check
whether native JSON functions are fboundp only once, at load time.

* lisp/progmodes/python.el (python--parse-json-array): New function.
(python-shell-prompt-detect): Use it to parse JSON directly as a
list rather than converting from a vector.

* test/lisp/json-tests.el (json-tests--with-temp-buffer): Allow
instrumenting for debugging.
(test-json-join, test-json-plist-to-alist): Remove tests.

(test-json-alist-p, test-json-plist-p, test-json-advance)
(test-json-peek, test-json-pop, test-json-skip-whitespace)
(test-json-read-keyword, test-json-encode-keyword)
(test-json-encode-number, test-json-read-escaped-char)
(test-json-read-string, test-json-encode-string)
(test-json-encode-key, test-json-new-object)
(test-json-encode-hash-table, test-json-encode-plist)
(test-json-encode-list, test-json-read-array)
(test-json-encode-array, test-json-read)
(test-json-read-from-string, test-json-encode): Extend tests.

(test-json-plist-reverse): Rename test...
(test-json-plist-nreverse): ...to this and avoid modifying literal
lists.
(test-json-read-number): Rename test...
(test-json-read-integer): ...to this, focusing on integers.
(test-json-add-to-object): Rename test...
(test-json-add-to-alist): ...to this, focusing on alists.
(json-encode-simple-alist): Rename test...
(test-json-encode-alist): ...to this, extending it.
(test-json-encode-alist-with-sort-predicate): Rename test...
(test-json-encode-alist-sort): ...to this, extending it.
(test-json-encode-plist-with-sort-predicate): Rename test...
(test-json-encode-plist-sort): ...to this, extending it.

(test-json-read-keyword-invalid, test-json-read-fraction)
(test-json-read-exponent, test-json-read-fraction-exponent)
(test-json-read-number-invalid)
(test-json-read-escaped-char-invalid, test-json-add-to-plist)
(test-json-add-to-hash-table, test-json-read-object-empty)
(test-json-read-object-invalid, test-json-read-object-function)
(test-json-encode-hash-table-pretty)
(test-json-encode-hash-table-lisp-style)
(test-json-encode-hash-table-sort, test-json-encode-alist-pretty)
(test-json-encode-alist-lisp-style, test-json-encode-plist-pretty)
(test-json-encode-plist-lisp-style, test-json-read-array-function)
(test-json-encode-array-pretty, test-json-encode-array-lisp-style)
(test-json-read-invalid): New tests.

(test-json-path-to-position-no-match): Use should-not.
(test-json-read-object): Move error check to new test
test-json-read-object-invalid.
(test-json-pretty-print-object): Adapt test now that empty objects
are pretty-printed as "{}".

4 years agoCC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns
Alan Mackenzie [Wed, 20 May 2020 19:02:26 +0000 (19:02 +0000)]
CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns

* lisp/progmodes/cc-mode.el (c-common-init): Build
add-log-current-defun-function out of c-defun-name-and-limits instead of the
former c-defun-name.

4 years agoRedo RCS Id for pdumper
Paul Eggert [Mon, 18 May 2020 22:19:49 +0000 (15:19 -0700)]
Redo RCS Id for pdumper

* lisp/version.el: Don’t put an RCS Id style string into the
executable via purecopy, as this does not work with the pdumper.
* src/emacs.c (RCS_Id): New constant, for 'ident'.

(cherry picked from commit 3d1bcfba5e21b29be8669aa2a8f27b344c9e02fd)

4 years ago; Bump defcustom :version in last change
Basil L. Contovounesios [Thu, 21 May 2020 11:23:19 +0000 (12:23 +0100)]
; Bump defcustom :version in last change

* lisp/ido.el (ido-cannot-complete-command): Bump defcustom :version
after default value was changed.

4 years agoSecond attempt at improving indexing in control.texi
Stefan Kangas [Tue, 19 May 2020 22:43:40 +0000 (00:43 +0200)]
Second attempt at improving indexing in control.texi

* doc/lispref/control.texi (Processing of Errors): Improve indexing by
adding the word form "handle" in addition to "handling".  With thanks
to Eli Zaretskii.

4 years agolisp/ido.el: Respect completion-auto-help setting
Ryan C. Thompson [Wed, 20 May 2020 23:21:12 +0000 (02:21 +0300)]
lisp/ido.el: Respect completion-auto-help setting

This commit makes ido completion respect the user's setting for
`completion-auto-help' by default.  It does this by defining a wrapper
function `ido-completion-auto-help', which calls `ido-completion-help'
only when `completion-auto-help' is non-nil.

* lisp/ido.el (ido-completion-auto-help): New function.
(ido-cannot-complete-command):
Use it as the new default (bug#41340).

4 years agoBookmark locations can refer to VC directory buffers (bug#39722)
Matthias Meulien [Wed, 20 May 2020 22:37:30 +0000 (01:37 +0300)]
Bookmark locations can refer to VC directory buffers (bug#39722)

* etc/NEWS: Document feature.
* lisp/vc/vc-dir.el (vc-dir-mode): Set local bookmark-make-record-function.
(bookmark-make-record-default, bookmark-prop-get, bookmark-default-handler)
(bookmark-get-bookmark-record): Declarations.
(vc-dir-bookmark-make-record): Make record used to bookmark a `vc-dir' buffer.
(vc-dir-bookmark-jump): Provides bookmark-jump behavior for a `vc-dir' buffer.

4 years ago; * etc/PROBLEMS: Add note about color list issues on macOS.
Alan Third [Wed, 20 May 2020 20:23:01 +0000 (21:23 +0100)]
; * etc/PROBLEMS: Add note about color list issues on macOS.

; Do not merge to master.

4 years agoCC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns
Alan Mackenzie [Wed, 20 May 2020 19:02:26 +0000 (19:02 +0000)]
CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns

* lisp/progmodes/cc-mode.el (c-common-init): Build
add-log-current-defun-function out of c-defun-name-and-limits instead of the
former c-defun-name.