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.
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.
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.
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)).
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.
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.
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.
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.
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.
Dmitry Gutov [Mon, 25 May 2020 19:29:47 +0000 (22:29 +0300)]
Bump project.el version
* project.el: Bump the version
Dmitry Gutov [Mon, 25 May 2020 19:29:06 +0000 (22:29 +0300)]
; More the note about reporting problems further up
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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.
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
Stefan Monnier [Sat, 23 May 2020 13:33:41 +0000 (09:33 -0400)]
* lisp/subr.el (save-match-data): Clarify use in docstring
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.
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.
Eli Zaretskii [Sat, 23 May 2020 08:19:54 +0000 (11:19 +0300)]
; * etc/NEWS: Mention new customization options for package.el.
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)
Eli Zaretskii [Sat, 23 May 2020 08:01:09 +0000 (11:01 +0300)]
; * 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.
Eli Zaretskii [Sat, 23 May 2020 07:33:35 +0000 (10:33 +0300)]
* doc/emacs/killing.texi (Rectangles): Improve indexing.
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)
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.
Stefan Monnier [Sat, 23 May 2020 03:36:57 +0000 (23:36 -0400)]
* lisp/doc-view.el (doc-view-presentation): Fix thinko
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.
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.
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.
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.
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 "{}".
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.
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)
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.
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.
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).
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.
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.
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.
Eric Abrahamsen [Thu, 30 Apr 2020 01:10:35 +0000 (18:10 -0700)]
Prevent gnus-registry-handle-action from creating spurious entries
Thanks to Bob Newell for finding this.
* lisp/gnus/gnus-registry.el (gnus-registry-handle-action): If a
message entry ends up with no groups in its 'group key, that means the
entry should be deleted.
Alan Mackenzie [Wed, 20 May 2020 18:02:13 +0000 (18:02 +0000)]
which-function-mode: put hook function on after-change-major-mode-hook
, rather than find-file-hook. This keeps which-function-mode active should
the major mode be reinitialized. Also accept a null result from
add-log-current-defun as definitive, should that function have run. This
fixes bug #40714.
* lisp/progmodes/which-func.el (which-func-ff-hook): Put on
after-change-major-mode-hook.
(which-function): Enhance the logic to accept a null result from
add-log-current-defun.
Michael Albinus [Wed, 20 May 2020 16:01:06 +0000 (18:01 +0200)]
; Fix comment in tramp-archive.el
Andrea Corallo [Tue, 19 May 2020 21:33:38 +0000 (22:33 +0100)]
; src/alloc.c: Add a GC reg spill mechanism and Bug#41357 related commentary.
Michael Albinus [Wed, 20 May 2020 09:09:44 +0000 (11:09 +0200)]
Fix minor Tramp oddities
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Increase `max-specpdl-size' temporarily.
* lisp/net/tramp-rclone.el (tramp-rclone-flush-directory-cache):
Fix a problem with older Emacsen.
Paul Eggert [Wed, 20 May 2020 06:22:40 +0000 (23:22 -0700)]
Hoist some byte-code checking out of eval
Check Lisp_Compiled objects better as they’re created,
so that the byte-code interpreter needn’t do the checks
each time it executes them. This improved performance
of ‘make compile-always’ by 1.5% on my platform. Also,
improve the quality of the (still-incomplete) checks, as
this is more practical now that they’re done less often.
* src/alloc.c (make_byte_code): Remove. All uses removed.
(Fmake_byte_code): Put a better (though still incomplete)
check here instead. Simplify by using Fvector instead
of make_uninit_vector followed by memcpy, and by using
XSETPVECTYPE instead of make_byte_code followed by XSETCOMPILED.
* src/bytecode.c (Fbyte_code): Do sanity check and conditional
translation to unibyte here instead of each time the function is
executed.
(exec_byte_code): Omit no-longer-necessary sanity and
unibyte checking. Use SCHARS instead of SBYTES where
either will do, as SCHARS is faster.
* src/eval.c (fetch_and_exec_byte_code): New function.
(funcall_lambda): Use it.
(funcall_lambda, lambda_arity, Ffetch_bytecode):
Omit no-longer-necessary sanity checks.
(Ffetch_bytecode): Add sanity check if actually fetching.
* src/lisp.h (XSETCOMPILED): Remove. All uses removed.
* src/lread.c (read1): Check byte-code objects more thoroughly,
albeit still incompletely, and do translation to unibyte here
instead of each time the function is executed.
(read1): Use XSETPVECYPE instead of make_byte_code.
(read_vector): Omit no-longer-necessary sanity check.
Kévin Le Gouguec [Tue, 19 May 2020 21:17:04 +0000 (23:17 +0200)]
Add test for bug#39680
* test/lisp/electric-tests.el (electric-pair-undo-unrelated-state):
New test.
Philip K [Tue, 19 May 2020 17:30:14 +0000 (19:30 +0200)]
Add project-compile command
* lisp/progmodes/project.el (project-compile):
New function.
Dmitry Gutov [Tue, 19 May 2020 22:54:33 +0000 (01:54 +0300)]
project--vc-list-files: Don't list conflicted files thrice
* lisp/progmodes/project.el (project--vc-list-files):
Use delete-consecutive-dups.
Tassilo Horn [Sat, 16 May 2020 08:05:12 +0000 (10:05 +0200)]
Allow back-references in syntax-propertize-rules.
* lisp/emacs-lisp/syntax.el (syntax-propertize--shift-groups-and-backrefs):
Renamed from syntax-propertize--shift-groups, and also shift
back-references.
(syntax-propertize-rules): Adapt docstring and use renamed function.
* test/lisp/emacs-lisp/syntax-tests.el: New test.
(syntax-propertize--shift-groups-and-backrefs): New ERT test.
Eli Zaretskii [Tue, 19 May 2020 15:46:27 +0000 (18:46 +0300)]
; Update TODO item about ligature support
* etc/TODO: Add the todo item for moving cursor "inside" a
ligature.
Tassilo Horn [Tue, 19 May 2020 13:17:57 +0000 (15:17 +0200)]
Indicate not downloaded parts in MIME buttons.
Via nnimap-fetch-partial-articles one can tell Gnus to omit fetching
certain parts by default. Now the MIME buttons in the article buffer
indicate how to fetch the complete message in order to act on those
missing parts.
* lisp/gnus/gnus-art.el (gnus-insert-mime-button): Indicate not
downloaded parts in MIME buttons.
Stefan Kangas [Tue, 19 May 2020 00:33:57 +0000 (02:33 +0200)]
* doc/lispref/control.texi (Processing of Errors): Improve indexing.
Paul Eggert [Tue, 19 May 2020 00:17:46 +0000 (17:17 -0700)]
Reject attempts to clear pure strings
* src/fns.c (Ffillarray, Fclear_string):
Add CHECK_IMPURE here, to be consistent with Faset etc.
(Ffillarray): Prefer memset when the fill is a single byte.
Stefan Kangas [Tue, 19 May 2020 00:22:02 +0000 (02:22 +0200)]
Clarify wording in my last commit
* lisp/mouse.el (mouse-drag-and-drop-region-show-tooltip): Clarify
wording of integer option. Suggested by Eli Zaretskii.
Paul Eggert [Mon, 18 May 2020 22:42:18 +0000 (15:42 -0700)]
Improve password-cache-add example in comment
* lisp/password-cache.el: Improve comment. See Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg02422.html
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'.
Dmitry Gutov [Mon, 18 May 2020 21:55:27 +0000 (00:55 +0300)]
; Update NEWS
Glenn Morris [Mon, 18 May 2020 20:08:27 +0000 (13:08 -0700)]
Add test for recent buffer-local-variables change
* test/src/buffer-tests.el (buffer-tests-buffer-local-variables-undo):
New.
Alan Mackenzie [Mon, 18 May 2020 18:20:05 +0000 (18:20 +0000)]
CC Mode: Allow "static" etc. to be placed after a declaration's type name
Fixes bug #41284.
* lisp/progmodes/cc-langs.el (c-type-decl-prefix-key): include additionally
c-modifier-kwds in the set of keywords at the base of this lang-const.
Glenn Morris [Mon, 18 May 2020 17:54:14 +0000 (10:54 -0700)]
Restore buffer-undo-list to buffer-local-variables
It has been missing since 2012-07-03 (Emacs 24.3)
"Cleanup basic buffer management", when undo_list was moved to
the end of struct buffer. (Bug#33492)
* src/buffer.c (buffer_local_variables_1): New function.
(Fbuffer_local_variables): Explicitly add buffer-undo-list.
Simen Heggestøyl [Mon, 18 May 2020 15:54:05 +0000 (17:54 +0200)]
Use lexical-binding in webjump.el and add tests
* lisp/net/webjump.el: Use lexical-binding.
(webjump-read-url-choice): Remove redundant 'function' around lambda.
* test/lisp/net/webjump-tests.el: New file with tests for webjump.el.
Mattias Engdegård [Sun, 17 May 2020 16:11:27 +0000 (18:11 +0200)]
Fix calculator entry of numbers with negative exponents (bug#41347)
* lisp/calculator.el (calculator-string-to-number):
Remove obsolete string transformations preventing entry of 1e-3 etc.
Keep one transformation to allow entry of "1.e3".
Reported by Chris Zheng.
Dmitry Gutov [Mon, 18 May 2020 00:44:26 +0000 (03:44 +0300)]
Update the package version
* lisp/progmodes/project.el: Update the package version.
(project-vc-merge-submodules): Update the docstring.
(project-try-vc): Add a FIXME.
Dmitry Gutov [Mon, 18 May 2020 00:36:43 +0000 (03:36 +0300)]
Add user option project-vc-merge-submodules
* lisp/progmodes/project.el (project-vc): Update the docstring.
(project-vc-merge-submodules): New user option.
(project-try-vc): Use it.
(project--submodule-p): Extract from project-try-vc.
Dmitry Gutov [Sun, 17 May 2020 23:46:06 +0000 (02:46 +0300)]
vc-working-revision: Bind default-directory
* lisp/vc/vc-hooks.el (vc-working-revision):
Bind default-directory to be on the safe side.
Suggested by Ilya Ostapyshyn
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02301.html).
Paul Eggert [Sun, 17 May 2020 23:50:49 +0000 (16:50 -0700)]
Don’t attempt to modify constant strings
These attempts were found by ‘make compile-always’.
* lisp/language/tibet-util.el (tibetan-obsolete-glyphs):
* lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
Don’t try to modify string constants.
Andrea Corallo [Sun, 17 May 2020 12:23:59 +0000 (13:23 +0100)]
* Fix Garbage Collector for missing calle-saved regs content (Bug#41357)
* src/alloc.c (SET_STACK_TOP_ADDRESS): Do not call
__builtin_unwind_init.
(flush_stack_call_func1): Rename from 'flush_stack_call_func'.
(flush_stack_call_func): New function to spill all registers
before calling 'flush_stack_call_func1'. This to make sure the
top of the stack identified includes those registers.
Richard Stallman [Sun, 17 May 2020 19:54:59 +0000 (15:54 -0400)]
Don't mention non-GNU package archives.
Stefan Kangas [Sun, 17 May 2020 12:59:10 +0000 (14:59 +0200)]
Fix minor issues with mouse-drag-and-drop-region-show-tooltip
* lisp/mouse.el (mouse-drag-and-drop-region-show-tooltip): Fix
defcustom type to allow all valid values. Suggested by David
Ponce. (Bug#41351)
(mouse-drag-and-drop-region): Fix bug where setting
`drag-and-drop-region-show-tooltip' to 0 would still show a
tooltip.
Paul Eggert [Sun, 17 May 2020 05:23:28 +0000 (22:23 -0700)]
Don’t attempt to modify constant strings
* lisp/bookmark.el (bookmark-bmenu-set-header):
Use copy-sequence instead of concat, for clarity.
Also, the byte-compiler optimizes (concat "a" "b") into "ab".
* lisp/button.el (make-text-button):
* test/lisp/erc/erc-track-tests.el (erc-track--erc-faces-in):
* test/lisp/password-cache-tests.el:
(password-cache-tests-add-and-remove)
(password-cache-tests-read-from-cache)
(password-cache-tests-in-cache-p, password-cache-tests-read)
(password-cache-tests-reset)
(password-cache-tests-add/expires-key)
(password-cache-tests-no-password-cache):
Don’t attempt to modify constant strings.
* lisp/progmodes/elisp-mode.el (elisp--xref-format)
(elisp--xref-format-extra):
Don’t attempt to modify constant strings via put-text-property.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-across-ref):
Don’t attempt to modify constant vectors or strings.
Dmitry Gutov [Sun, 17 May 2020 02:00:46 +0000 (05:00 +0300)]
; Bump the project.el version to trigger a new release
Paul Eggert [Sun, 17 May 2020 01:16:23 +0000 (18:16 -0700)]
Minor fixups for mutability doc
* doc/lispref/objects.texi (Mutability): Minor fixups in
response to a comment by Dmitry Gutov (Bug#40671#477).
Paul Eggert [Sun, 17 May 2020 00:17:00 +0000 (17:17 -0700)]
Don’t use “constant” for values you shouldn’t change
Inspired by patch proposed by Dmitry Gutov (Bug#40671#393)
and by further comments by him and by Michael Heerdegen
in the same bug report.
* doc/lispintro/emacs-lisp-intro.texi (setcar):
Don’t push mutability here.
* doc/lispref/eval.texi (Self-Evaluating Forms, Quoting)
(Backquote):
* doc/lispref/lists.texi (Modifying Lists):
* doc/lispref/objects.texi (Lisp Data Types, Mutability):
* doc/lispref/sequences.texi (Array Functions, Vectors):
* doc/lispref/strings.texi (String Basics, Modifying Strings):
Don’t use the word “constant” to describe all values that
a program should not change.
* doc/lispref/objects.texi (Mutability):
Rename from “Constants and Mutability”. All uses changed.
In a footnote, contrast the Emacs behavior with that of Common
Lisp, Python, etc. for clarity, and say the goal is to be nicer.
Paul Eggert [Sun, 17 May 2020 00:04:15 +0000 (17:04 -0700)]
Don’t attempt to modify constant conses
From a patch privately suggested by Mattias Engdegård on 2020-05-11
in a followup to Bug#40671.
* admin/charsets/cp51932.awk:
* admin/charsets/eucjp-ms.awk:
Generate code that does not modify constant conses.
* doc/misc/emacs-mime.texi (Encoding Customization):
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops):
* lisp/frameset.el (frameset-persistent-filter-alist):
* lisp/gnus/gnus-sum.el (gnus-article-mode-line-format-alist):
Use append instead of nconc.
* lisp/language/japanese.el (japanese-ucs-cp932-to-jis-map)
(jisx0213-to-unicode):
Use mapcar instead of mapc.
* lisp/language/lao-util.el (lao-transcription-consonant-alist)
(lao-transcription-vowel-alist):
* lisp/language/tibetan.el (tibetan-subjoined-transcription-alist):
Use copy-sequence.
* test/src/fns-tests.el (fns-tests-nreverse):
(fns-tests-sort, fns-tests-collate-sort)
(fns-tests-string-version-lessp, fns-tests-mapcan):
Use copy-sequence, vector, and list.
John Wiegley [Sat, 16 May 2020 18:30:50 +0000 (11:30 -0700)]
Add a note to eshell.texi that I, too, was a contributor
Glenn Morris [Sat, 16 May 2020 17:29:14 +0000 (10:29 -0700)]
Merge from origin/emacs-27
b4937f64cd (origin/emacs-27) Improve documentation of manually instal...
efd4e973a4 Reflect the emacs-devel ELPA/MELPA dispute in FAQ
28541674cd Consider face inheritance when checking region face backgr...
e75f6be6cc Fix dired default file operation (bug#41261)
406fb0746c Fix documentation related to 'command-switch-alist'.
747e0a2523 Improve ediff readability in misterioso theme (Bug#41221)
48830c73e7 Fix a crash in handle_display_spec
a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only ...
3d81995692 Fix docstring of flymake-make-diagnostic (bug#40351)
632aa9d57a Go back to “Bahá’í”
e2406ff60f * lisp/dired.el (dired-toggle-marks): Doc fix. (Bug#41097)
# Conflicts:
# doc/emacs/building.texi
Stefan Kangas [Sat, 16 May 2020 15:48:36 +0000 (17:48 +0200)]
Remove stale comments
* lisp/printing.el (pr-create-interface):
* lisp/progmodes/ebnf2ps.el (ebnf-eps-filename, ebnf-trim-right):
Remove old comments about Emacs 21/22 compatibility.
Stefan Kangas [Sat, 16 May 2020 15:27:58 +0000 (17:27 +0200)]
Remove some compat code from CEDET
* lisp/cedet/data-debug.el (data-debug-overlay-properties)
(data-debug-overlay-p, dd-propertize):
Redefine as obsolete function aliases.
(data-debug-insert-overlay-props, data-debug-insert-hash-table)
(data-debug-insert-hash-table-button)
(data-debug-insert-widget-properties, data-debug-insert-widget)
(data-debug-insert-symbol-from-point)
(data-debug-insert-symbol-button, data-debug-insert-string)
(data-debug-insert-number, data-debug-thing-alist):
Don't use obsolete names.
Stefan Kangas [Sat, 16 May 2020 15:02:18 +0000 (17:02 +0200)]
Remove Emacs 22 compat code from abbrev.el
* lisp/abbrev.el (write-abbrev-file): Remove Emacs 22
compatibility code.
Stefan Kangas [Sat, 16 May 2020 14:27:20 +0000 (16:27 +0200)]
; * lisp/htmlfontify.el: Minor fix in file headers.
Stefan Kangas [Sat, 16 May 2020 13:34:47 +0000 (15:34 +0200)]
Remove Emacs 22 compat code from ediff-vers.el
* lisp/vc/ediff-vers.el (ediff-vc-revision-other-window)
(ediff-vc-working-revision): Redefine Emacs 22 compatibility
aliases as obsolete function aliases.
(ediff-vc-internal, ediff-vc-merge-internal): Don't use the now
obsolete aliases.
Stefan Kangas [Sat, 16 May 2020 13:22:54 +0000 (15:22 +0200)]
Remove some XEmacs compat code from semantic
* lisp/cedet/semantic/wisent/comp.el (wisent-ISVALID-TOKEN)
(wisent-parse-nonterminals):
* lisp/cedet/semantic/wisent/wisent.el
(wisent-item-to-string): Remove XEmacs compatibility code.
(wisent-char-p): Redefine as obsolete function alias for
'characterp'.
Stefan Monnier [Sat, 16 May 2020 13:08:14 +0000 (09:08 -0400)]
* lisp/textmodes/bibtex.el: Fix bug#41285 (paren typo)
Michael Albinus [Sat, 16 May 2020 12:04:07 +0000 (14:04 +0200)]
Introduce process-file-return-signal-string
* doc/lispref/processes.texi (Synchronous Processes):
Describe `process-file-return-signal-string'.
* doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers.
(Remote processes): Describe `process-file-return-signal-string'
and $INSIDE_EMACS.
* etc/NEWS: Describe `process-file-return-signal-string'. Fix typos.
* lisp/simple.el (process-file-return-signal-string): New user option.
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Use it.
* lisp/net/tramp.el (tramp-get-signal-strings): New defun.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
Eli Zaretskii [Sat, 16 May 2020 08:54:37 +0000 (11:54 +0300)]
Improve documentation of manually installing Lisp packages
* doc/emacs/building.texi (Lisp Libraries): Describe how to
manually load packages in the init file. Mention the 'site-lisp'
subdirectory of the default 'load-path'.
* doc/emacs/package.texi (Packages): Describe manual installation
of ELisp packages. Suggested by Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org>.
Eli Zaretskii [Sat, 16 May 2020 07:30:43 +0000 (10:30 +0300)]
Reflect the emacs-devel ELPA/MELPA dispute in FAQ
* doc/misc/efaq.texi (Packages that do not come with Emacs): Warn
that some MELPA packages may require non-free software.
Stefan Monnier [Fri, 15 May 2020 21:30:47 +0000 (17:30 -0400)]
* lisp/progmodes/project.el (project-try-vc): Fix regexp typo.
Dmitry Gutov [Fri, 15 May 2020 21:06:39 +0000 (00:06 +0300)]
Fix submodules, second try
* lisp/progmodes/project.el (project-try-vc):
Call the backend directly instead of binding default-directory.
Tassilo Horn [Fri, 15 May 2020 20:24:29 +0000 (22:24 +0200)]
Consider face inheritance when checking region face background.
Some themes (like dracula) make the region face inherit from some
other face. If the background color of the region was inherited,
`indicate-copied-region' did the switch-point-and-mark-twice dance
which is not visible in case the region is highlighted. It just
looked like Emacs would hang for a second after M-w.
* lisp/simple.el (indicate-copied-region): Consider face inheritance
when checking region face background.