Jens Schmidt [Tue, 29 Aug 2023 20:14:48 +0000 (22:14 +0200)]
Improve documentation of EPG
* lisp/epg.el (epg-context-set-passphrase-callback): Update
GnuPG-version-dependent information in docstring and refer to
Info node `(epa)' for details.
(epg-start-edit-key): Replace description of arguments by a
reference to `epg-edit-key'.
(epg-edit-key): More precisely describe callback operation and
arguments and provide an example of how to edit a key. (Bug#65603)
* lisp/textmodes/tex-mode.el (tex-recenter-output-buffer): Check
that 'display-buffer' returned a window, rather than nil, before
selecting it. (Bug#65762)
* doc/misc/widget.texi (Widgets Basics, Working with Widgets)
(Widgets and the Buffer, Widget Gallery, Customization): New chapters.
(Basic Types, Sexp Types): Demote to subsections.
(Widget Browser): Rename to Inspecting Widgets.
(Widget Properties): Remove.
(Top): Adapt menu to changes.
(Introduction): Rearrange text. Move warnings to a better place, and
user options to the Customization chapter.
(User Interface): Don't fully describe commands and customization
options here.
(Setting Up the Buffer): Expand on widget creation process and add
documentation for useful functions which deal with
creation/conversion.
(Defining New Widgets): Expand the documentation on define-widget.
All relevant properties moved to the description of the default
widget, in Widget Gallery.
(Utilities): Add some more useful functions not previously documented.
(Wishlist): Remove out-of-date items.
Jens Schmidt [Wed, 16 Aug 2023 21:31:30 +0000 (23:31 +0200)]
Add documentation to plstore.el
* lisp/plstore.el: Add link to epa manual. Describe more
restrictions. Fix a typo in the examples. Fix terminology. Mark
FIXMEs as such.
* lisp/plstore.el (plstore-save): Describe edge case when no recipient
matches and mark as FIXME. (Bug#63627)
Eli Zaretskii [Fri, 1 Sep 2023 13:33:40 +0000 (16:33 +0300)]
; Improve documentation of 'char-table-range'
* doc/lispref/sequences.texi (Char-Tables):
* src/chartab.c (Fchar_table_range): Clarify what
'char-table-range' returns for an argument that is a cons cell.
Eli Zaretskii [Fri, 1 Sep 2023 13:08:36 +0000 (16:08 +0300)]
Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-tests
* lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a
different message on MS-Windows; support that.
* lisp/vc/vc-git.el (vc-git-checkin): Make sure
'default-directory' is not nil when calling
'make-nearby-temp-file' on MS-Windows.
* test/lisp/vc/vc-tests.el (vc-test--version-diff): Run
'default-directory' through 'file-truename', otherwise the
'vc-test-cvs06-version-diff' test might fail on MS-Windows.
Yuan Fu [Thu, 31 Aug 2023 03:53:03 +0000 (20:53 -0700)]
Improve performance of treesit_cursor_helper_1
* src/treesit.c: (treesit_cursor_helper_1): Use
ts_tree_cursor_goto_first_child_for_byte to speed up traversing among
siblings. The "while (ts_node_end_byte (cursor_node) < end_pos)" can
be removed with the check added in the loop below.
Jim Porter [Sun, 27 Aug 2023 19:49:25 +0000 (12:49 -0700)]
Don't add an extraneous slash in remote PATH list in Eshell
Previously, in a remote directory, '(eshell-get-path)' would return a
list of strings like "/ssh:localhost://usr/bin". While that shouldn't
break most things, it's not strictly correct either. See bug#65551.
* lisp/eshell/esh-util.el (eshell-get-path): Use 'concat' instead of
'file-name-concat'.
* test/lisp/eshell/esh-util-tests.el: Require 'tramp' and
'eshell-tests-helpers'.
(esh-util-test/path/get, eshell-util-test/path/get-remote): New tests.
Eli Zaretskii [Sun, 27 Aug 2023 05:24:39 +0000 (08:24 +0300)]
Fix applying patches with Git on MS-Windows
* lisp/vc/vc.el (vc-diff-internal): For Git, always suppress EOL
conversion when reading the diffs into a buffer. Doc fix.
* lisp/vc/vc-git.el (vc-git-checkin): Make sure to suppress EOL
conversion when the patch file is written. (Bug#65049)
James Thomas [Thu, 24 Aug 2023 07:05:51 +0000 (12:35 +0530)]
Account for string names in active file
Account also for strings when reading in group names from an active
file (bug#62812).
* lisp/gnus/nnmail.el (nnmail-parse-active): Make it similar to
gnus-active-to-gnus-format
Yuan Fu [Thu, 10 Aug 2023 21:27:29 +0000 (14:27 -0700)]
Support defun navigation for DEFUN in c-ts-mode (bug#64442)
Before this change, beginning/end-of-defun just ignores DEFUN in
c-ts-mode. After this change, beginning/end-of-defun can recognize
DEFUN, but a DEFUN definition is considered two defuns. Eg,
beginning/end-of-defun will stop at (1) (2) and (3) in the following
snippet:
(1)DEFUN ("treesit-node-parser",
Ftreesit_node_parser, Streesit_node_parser,
1, 1, 0,
doc: /* Return the parser to which NODE belongs. */)
(Lisp_Object node)
(2){
CHECK_TS_NODE (node);
return XTS_NODE (node)->parser;
}
(3)
Ideally we want point to only stop at (1) and (3), but that'll be a
lot harder to do.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--defun-valid-p): Refactor to take in account of DEFUN body.
(c-ts-mode--emacs-defun-body-p): New function.
(c-ts-base-mode): Add DEFUN and DEFUN body to recognized types.
(c-ts-mode--emacs-defun-at-point): Now that we recognize both parts of
a DEFUN as defun, c-ts-mode--emacs-defun-at-point needs to be updated
to adapt to it.
Eli Zaretskii [Sat, 19 Aug 2023 14:01:18 +0000 (17:01 +0300)]
Fix touchpad scrolling on MS-Windows
* src/w32term.c (w32_construct_mouse_wheel): The number of lines
to scroll should always be positive in wheel-scroll events.
Whether to scroll up or down is encoded in the modifiers, which
produce either wheel-up or wheel-down event. (Bug#65070)
* doc/lispref/commands.texi (Misc Events): Clarify the
documentation of 'wheel-up' and 'wheel-down' events.
Joseph Turner [Sat, 12 Aug 2023 08:40:07 +0000 (01:40 -0700)]
Fix building of VC package manuals with relative org links/includes
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Ensure that default-default is the docs-directory around
org-export-to-file to ensure that links to relative files work
correctly. (Bug#65243)
dannyfreeman [Fri, 11 Aug 2023 20:43:58 +0000 (16:43 -0400)]
Fix jsx font-lock in older tree-sitter-js grammars
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Use
queries that are backwards compatible with
tree-sitter-javascript bb1f97b.
* list/progmodes/js.el
(-jsx--treesit-font-lock-compatibility-bb1f97b): Delete unused
function. (Bug#65234)
Eli Zaretskii [Thu, 17 Aug 2023 07:51:36 +0000 (10:51 +0300)]
Fix cloning 'face-remapping-alist' for indirect buffers
* lisp/face-remap.el (face-remap--copy-face): Remove.
(face-attrs--make-indirect-safe): Use 'copy-tree'. Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.
Eli Zaretskii [Thu, 17 Aug 2023 07:07:48 +0000 (10:07 +0300)]
Improve documentation of case transfer in replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches):
* src/search.c (Freplace_match):
* lisp/replace.el (query-replace, query-replace-regexp): Clarify
in the doc string and the manual how letter-case is transferred
from the replaced text to the replacement text. (Bug#65347)
Eli Zaretskii [Wed, 16 Aug 2023 17:42:16 +0000 (20:42 +0300)]
Fix horizontal scrolling of images with C-f
* lisp/image-mode.el (image-forward-hscroll): Calculate the
window-width more accurately, as the number of full columns that
fits in the window's text-area. (Bug#65187)
J M [Thu, 10 Aug 2023 22:23:20 +0000 (23:23 +0100)]
Update csharp tree-sitter support due to upstream changes
A change in tree-sitter-c-sharp grammar for csharp (commit
18a531), has removed the keyword void_keyword and advised
we should use predefined_type.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Support both old and new style of keywords in tree-sitter-c-sharp
grammar. (Bug#65113)
Matthew Tromp [Thu, 10 Aug 2023 14:41:24 +0000 (10:41 -0400)]
Substitute command keys in 'ielm-header' at use time
Before, command keys were substituted into the ielm-header when
ielm.el was loaded, which resulted in the substitutions depending on
the user's current buffer instead of the ielm buffer.
For example, if the user was in an info-mode buffer, the key would
appear as 'H' instead of 'C-h m'.
Now, the command key is substituted after the ielm buffer has been
created.
* lisp/ielm.el (ielm-header): Remove substitute-command-keys.
(inferior-emacs-lisp-mode): Add substitute-command-keys. (Bug#65213)
Eli Zaretskii [Sat, 12 Aug 2023 06:38:28 +0000 (09:38 +0300)]
Fix rare crashes in redisplay due to problems with fontsets
* src/xdisp.c (get_next_display_element): If we have no usable
face to display a character/composition, treat that as glyphless.
(produce_glyphless_glyph): If neither it->face nor its ASCII face
are usable, fall back to the frame's default font. (Bug#65198)
dannyfreeman [Mon, 7 Aug 2023 19:55:27 +0000 (15:55 -0400)]
Properly expand the JSX indentation rules in 'js-ts-mode'
* lisp/progmodes/js.el (js--treesit-indent-rules): Fix
'js-ts-mode' indent bug in JSX expressions. Before this
change, treesit indent mechanisms were trying to call this
compatibility function like a matching or anchor rule.
This resulted in an error when running `indent-for-tab-command`
while the cursor was in a JSX expression:
treesit--simple-indent-eval: Wrong number of
arguments: ((cl-struct-js--pitem-tags ido-cur-list t) nil "Indent rules
helper, to handle different releases of tree-sitter-javascript."