Dmitry Gutov [Sat, 6 May 2023 00:32:08 +0000 (03:32 +0300)]
(package-upgrade): Don't remove the package from 'package-selected-packages'
* lisp/emacs-lisp/package.el (package-upgrade):
Don't remove the package from 'package-selected-packages', fixing
the problem described in https://debbugs.gnu.org/62720#718.
Eli Zaretskii [Fri, 5 May 2023 07:08:59 +0000 (10:08 +0300)]
Fix arguments of xml.c functions as displayed in Help buffers
* lisp/subr.el (libxml-parse-xml-region)
(libxml-parse-html-region): Adjust advertised-calling-convention
to the changes in commit cc33c6cf3a. (Bug#63291)
Cyril Arnould [Wed, 3 May 2023 19:40:18 +0000 (19:40 +0000)]
Improve VHDL mode highlighting
* lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist): Differentiate
between ModelSim errors, warnings, and notes when highlighting
them. Add a new entry for Xilinx Vivado. (Bug#63251)
* lisp/net/rcirc.el (rcirc): Pass SERVER-ALIAS before CLIENT-CERT.
(rcirc-connect): Take SERVER-ALIAS before CLIENT-CERT.
This is necessary for the 'rcirc-reconnect' trick to work that applies
the contents of 'rcirc-connection-info' to 'rcirc-connect', otherwise
the server alias gets lost as certfp information.
Thuna [Wed, 23 Nov 2022 03:14:36 +0000 (04:14 +0100)]
Fix rcirc messages printing in the wrong place
* lisp/net/rcirc.el (rcirc-send-message): Print the message before
sending it to the server.
(rcirc-print): Get the time with subsecond precision.
* lisp/calendar/parse-time.el (parse-time-string
parse-iso8601-time-string): Accept optional second FORM arguments,
with the same meaning as in `decode-time'. Mention as such in the
docstring. (Bug#59501)
Prevent unnecessary modifications of 'package-vc-selected-packages'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Handle the
structure of correctly, not as an alist but a list of alists.
(package-vc--archive-spec-alist, package-vc--archive-spec-alists,
package-vc--desc->spec, package-vc--read-archive-data,
package-vc--download-and-read-archives, package-vc--unpack): Rename
'package-vc--archive-spec-alist' to 'package-vc--archive-spec-alists'.
Randy Taylor [Wed, 26 Apr 2023 15:15:45 +0000 (11:15 -0400)]
go-ts-mode: Use iota query only if supported (Bug#63086)
iota query support was added on January 5, 2022. To support older
versions of the tree-sitter-go grammar (like the latest tagged version,
v0.19.1, which was released on March 3, 2021), check if the query is
supported before trying to use it.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--iota-query-supported-p): New
function.
(go-ts-mode--font-lock-settings): Use it.
Dmitry Gutov [Wed, 3 May 2023 20:58:27 +0000 (23:58 +0300)]
(rng-complete-tag): Add the (ignored) argument to the :company-kind function
* lisp/nxml/rng-nxml.el (rng-complete-tag): Add the (ignored)
argument to the :company-kind function. Fixes the "Wrong number
of arguments" error reported at
https://github.com/company-mode/company-mode/issues/1386.
Recognize defstruct slot names in various eieio functions
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Set
each slot's name's 'slot-name' property so that
'eieio--known-slot-name-p' can recognize them. (Bug#62959)
Handle point not at EOB in minibuffer-choose-completion
Without this change, only the minibuffer contents before point
are cleared when a completion is chosen, which results in stray
text when point is in the middle of the minibuffer.
After this change, we heuristically decide either to clear the
whole buffer or only part of it, taking into account the
location of point.
This is a backport for the Emacs 29 release branch of a simpler
fix in minibuffer-completion-help.
* lisp/minibuffer.el (minibuffer-next-completion):
(minibuffer-choose-completion):
Recalculate completion-base-affixes with point. (Bug#62700)
Eli Zaretskii [Mon, 1 May 2023 12:27:21 +0000 (15:27 +0300)]
Fix vertical-motion when tab-line is displayed in a window
* src/xdisp.c (try_window, try_window_id): Account for tab-line,
if present, when converting scroll-margin at the top of the window
to vertical pixel coordinate. (Bug#63201)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Remove
optimisation that would mistakenly discard old loaddefs in case a file
was not modified by EXTRA-DATA is non-nil. (Bug#62734)
Eli Zaretskii [Sun, 30 Apr 2023 13:24:05 +0000 (16:24 +0300)]
Fix redisplay of mode line after its format changes from nil
* src/dispnew.c (update_window): Make sure a mode-line's row of
the current glyph matrix is disabled when the mode line is not
being displayed. (Bug#63186)
Yuan Fu [Sat, 29 Apr 2023 22:39:54 +0000 (15:39 -0700)]
Fix FOR_EACH_TAIL fontification (bug#62951)
Fix the fontification inconsistency between different FOR_EACH_TAIL's.
See the comment for more explanation. Also enable the emacs-devel
feature automatically when c-ts-mode-emacs-sources-support is on.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--for-each-tail-regexp): Move up.
(c-ts-mode--font-lock-settings): New font-lock rule for FOR_EACH_TAIL.
(c-ts-mode--fontify-for-each-tail): New function.
(c-ts-mode): Automatically enable emacs-devel feature.
Eli Zaretskii [Sat, 29 Apr 2023 06:39:15 +0000 (09:39 +0300)]
Fix documentation of libxml-parse-* functions
* doc/lispref/text.texi (Parsing HTML/XML):
* src/xml.c (Flibxml_parse_html_region, Flibxml_parse_xml_region):
Update the documentation regarding the use of BASE-URL argument.
(Bug#63125)
* etc/tutorials/TUTORIAL.cn (INTRO): Additions from English
version; say "interrupt" not "quit" a partially-entered command;
fixed minor inconsistency (English says partially-entered command,
Chinese used to say partially-executed command -- they are
different); converted half-width square brackets containing
translators' notes into full-width ones for consistency.
(BASIC CURSOR CONTROL): mention that a word boundary for Chinese
can also be space; fixed incorrect terminology (keyboard vs
terminal); retain English term "terminal"; retain English term
"prefix argument"; "most commands _interpret_ prefix args as
repeat-count", not "explain"; ensure space is added on both ends
of an English word.
(WINDOWS): Clarify it is the digit 1 in C-x 1.
(INSERTING AND DELETING): Mention the term "continuation line" and
retain its English term, because this term is mentioned again
later in the tutorial; avoid saying the name of "\\"; add
description for "electric" and a rough translation; sync English
for prefix argument for DEL and C-d; ensure that translators'
notes are marked explicitly so; add indentation to the instruction
about continuation lines; additional translations such as
mentioning C--, etc.
(FILES): Re-pluralize the heading; space around English words;
describe what C-g cancels (the command) when entering file name;
replace "search for" with "find"; minor rephrasing; explicit
translator notes; fixed the write-file message to no longer
contain ellipses (see src/fileio.c:5541).
(BUFFERS): Re-pluralize the heading; mention that C-x C-b also
shows buffer name; C-x s only looks for file-visiting buffers.
(EXTENDING THE COMMAND SET): Include C-x s and C-x b in list of
learned commands.
(MODE LINE): Remove the dashes in description on the point
location.
(MULTIPLE WINDOWS): Mention the difference between frame
and window; also add translator notes pointing to end of
tutorial which contains a terminology list.
(MULTIPLE FRAMES): Change the M-x commands to keybinds C-x 5 2 and
C-x 5 0 to sync with English.
(GETTING MORE HELP): Change C-h f to C-h x, to sync with English.
(INSTALLING PACKAGES): Rephrase "available packages", used to say
lit., "existing", now says lit., "installable"; consistently
translate the term "package", and retain its English name.
(TRANSLATION): Add my name as co-maintainer of this file.
* etc/tutorials/TUTORIAL.translators (TUTORIAL.cn): Add my name
as co-maintainer for TUTORIAL.cn.
Po Lu [Fri, 28 Apr 2023 03:47:46 +0000 (11:47 +0800)]
Fix two crashes upon startup
* src/image.c (image_create_bitmap_from_data)
(image_create_bitmap_from_file): Specify a Window or a Pixmap
describing the screen, not a back buffer drawable which may not exist.
Otherwise, Emacs crashes on startup when a bitmap icon is in use.
João Távora [Thu, 27 Apr 2023 19:51:07 +0000 (20:51 +0100)]
Eglot: fix edge case when deleting inlay hint overlays
When asked to update hints in a region (FROM TO),
eglot--update-hints-1 first deletes the existing hints. It must
however take care to delete all overlays that logically belong to the
region, even if they don't physically belong to it, e.g. inlay
overlays spanning (FROM-1 FROM) and having a 'after-string' property.
Rename all functions called package-*-update-* to package-*-upgrade-*
* lisp/emacs-lisp/package-vc.el (package-vc-upgrade-all):
Rename from 'package-vc-update-all'.
(package-vc-upgrade): Rename from 'package-vc-update'.
* lisp/emacs-lisp/package.el (package-upgrade):
Rename from 'package-update' (bug#62750).
(package--upgradeable-packages):
Rename from 'package--updateable-packages'.
(package-upgrade-all): Rename from 'package-update-all'.
Yuan Fu [Thu, 27 Apr 2023 03:09:42 +0000 (20:09 -0700)]
Fix FOR_EACH_TAIL in c-ts-mode (bug#62951)
* lisp/progmodes/c-ts-mode.el
(c-ts-mode--indent-styles): New indent rule.
(c-ts-mode--for-each-tail-regexp)
(c-ts-mode--for-each-tail-body-matcher)
(c-ts-mode--emacs-c-range-query)
(c-ts-mode--for-each-tail-ranges)
(c-ts-mode--reverse-ranges)
(c-ts-mode--emacs-set-ranges): New functions and variables.
(c-ts-mode): Create a emacs-c parser. More setup for Emacs source
support.
F. Jason Park [Fri, 21 Apr 2023 14:39:05 +0000 (07:39 -0700)]
Explain ERC 5.5 regressions in new version 5.5.0.29.1
* doc/misc/erc.texi: Bump version to 5.5.0.29.1.
* etc/ERC-NEWS: Don't hype bugged option `erc-reconnect-display'.
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command): Add comment explaining
parsing bug in ERC 5.5 (bug#62444).
* lisp/erc/erc-networks.el (erc-networks-on-MOTD-end): Mention known
/MOTD bug in error notice so people don't waste energy reporting
it (bug#62151).
* lisp/erc/erc.el: Change Version header to 5.5.0.29.1. Don't bother
updating the `customize-package-emacs-version-alist' entry
because no option defaults are affected.
(erc-version): Change version to 5.5.0.29.1.
(erc-reconnect-display, erc-query-on-unjoined-chan-privmsg): Add
warning to doc strings and `custom-set' functions. It's believed that
these bugs degrade the user experience significantly enough to warrant
such mentions (bug#62833).
(erc-query): Fix erroneous redirect string in deprecation spec.
Do not merge to master.
Yuan Fu [Mon, 24 Apr 2023 06:55:22 +0000 (23:55 -0700)]
Accept versioned tree-sitter language grammar files
By discussion on emacs-devel, titled "Versioned Tree-sitter parser
libraries".
* src/treesit.c (Vtreesit_str_dot_0): New variable.
(treesit_load_language_push_for_each_suffix): Additionally look for
lib_base_name.0 and lib_base_name.0.0.
(syms_of_treesit): Initialize Vtreesit_str_dot_0.
Benson Chu [Fri, 24 Mar 2023 20:38:03 +0000 (15:38 -0500)]
tab-bar-new-tab: inhibit side-window checks
Previously, calling 'tab-bar-new-tab-to' only removed the
'window-side' property on the currently selected window,
and then a call to 'delete-other-windows' was made to
ensure that the selected window was the only window.
We can skip this check by shadowing 'window--sides-inhibit-check'
to t.
* lisp/tab-bar.el (tab-bar-new-tab-to): Inhibit side-window checks.
(Bug#62427)
Eli Zaretskii [Sun, 23 Apr 2023 14:04:56 +0000 (17:04 +0300)]
Fix rendering of Traditional Mongolian script
* lisp/international/characters.el: Set punctuation syntax for Po
characters from the Mongolian block
* lisp/international/fontset.el (setup-default-fontset): Add
fontset setting for Traditional Mongolic.
* lisp/language/misc-lang.el (composition-function-table): Add
rules for Traditional Mongolic. (Bug#63028)
Eli Zaretskii [Sat, 22 Apr 2023 16:27:16 +0000 (19:27 +0300)]
Fix line-number-at-pos when POSITION is out of narrowing
* src/fns.c (Fline_number_at_pos): Don't signal an error when
ABSOLUTE is nil and POSITION is outside of the narrowing, like the
original Lisp implementation did. Minor speedup by using the byte
position where it is available from the get-go. (Bug#62857)
Eli Zaretskii [Sat, 22 Apr 2023 10:35:36 +0000 (13:35 +0300)]
Fix exiting Emacs after saving a tutorial
* lisp/tutorial.el (tutorial--starting-point): Make it
permanent-local, so that saving the tutorial to some file doesn't
kill this buffer-local variable. Otherwise, trying to exit Emacs
after saving the tutorial will signal an error, because
'tutorial--starting-point' is void. (Bug#37326)
Eli Zaretskii [Wed, 19 Apr 2023 17:46:40 +0000 (20:46 +0300)]
Fix display of menu-bar bindings of commands in *Help* buffers
* lisp/help-fns.el (help-fns--insert-menu-bindings): Propertize
with 'help-key-binding' face only the menu items, not the arrows
between successive items. This is because 'char-displayable-p' is
unreliable when we propertize the character with an arbitrary
face: that face could specify a font which doesn't support the
character after all, while 'char-displayable-p' assumes there are
no restrictions on fonts that can be used for displaying the
character. Also, make the code more efficient by avoiding the
call to 'char-displayable-p' inside the loop.
Improve Completion Example section in the Emacs manual
This can be a useful substitute for full-on fuzzy completion, as
provided by other completion styles and completion packages.
* doc/emacs/mini.texi (Completion Example): Give an example of
completion with point not at end of minibuffer. Also, use
@kbd{@key{TAB}} when telling the user to hit TAB. (Bug#62836)
xref-search-program-alist: Fix searching larger file lists on MS Windows
* lisp/progmodes/xref.el (xref-search-program-alist):
Add '-s 10000' to xargs' options when on Windows or DOS.
Apparently the xargs port doesn't currently know how to obey the
system-wide limits (https://debbugs.gnu.org/bug=61667#521).
Fix typo and inaccuracy in the ELisp Reference manual
* doc/lispref/loading.texi (Dynamic Modules): Fix a typo.
* doc/lispref/customize.texi (Group Definitions): Faces are also
in the 'custom-group' property of a customization group.
(Bug#62887)
Allow upgrading built-in packages with 'package-install'
* etc/NEWS: Mention the change
* lisp/emacs-lisp/package.el (package--upgradable-built-in-p): Add new
predicate.
(package-install-upgrade-built-in): Add new user option to enable
feature.
(package-install): Respect new user option.
Eli Zaretskii [Sun, 16 Apr 2023 08:12:39 +0000 (11:12 +0300)]
Minor changes in c-ts-mode.el's support of DEFUNs
* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-DEFUN): Renamed
from 'c-ts-mode--fontify-defun'; all callers changed.
(c-ts-mode-emacs-sources-support): Renamed from
'c-ts-mode-emacs-devel' and made into a defcustom; all users
changed.
(c-ts-mode--emacs-defun-p, c-ts-mode--emacs-defun-at-point)
(c-ts-mode--emacs-current-defun-name): Doc fixes. (Bug#62825)
Add to Eglot support for additional language-servers.
* lisp/progmodes/eglot.el (eglot-server-programs): Add
'vscode-markdown-language-server' for Markdown and
'dot-language-server' for GraphViz. (Bug#62844)