Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-04-26 08:48:12 +08:00
commit 5f389f4b63
26 changed files with 1540 additions and 192 deletions

View file

@ -182,7 +182,7 @@ files.")
("Philip Kaludercic" "Philip K\\." "Philip K")
("Philipp Stephani" "Philipp .*phst@google")
("Piotr Zieliński" "Piotr Zielinski")
("Po Lu" "Po Lu Via") ; looks like a mistake
("Po Lu" "Po Lu Via" "Your Name") ; looks like a mistake
("Przemysław Wojnowski" "Przemyslaw Wojnowski")
("R. Bernstein" "rb@dustyfeet.com")
("Rainer Schöpf" "Rainer Schoepf")

View file

@ -1599,7 +1599,7 @@ AC_ARG_ENABLE([gcc-warnings],
# however, if there is also a .tarball-version file it is probably
# just a release imported into Git for patch management.
gl_gcc_warnings=no
if test -e "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then
if test -d "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then
# Clang typically identifies itself as GCC 4.2 or something similar
# even if it is recent enough to accept the warnings we enable.
AS_IF([test "$emacs_cv_clang" = yes],
@ -2734,31 +2734,23 @@ if test "${with_ns}" != no; then
ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=Cocoa/Emacs.base
ns_fontfile=macfont.o
elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then
elif flags=`(gnustep-config --objc-flags) 2>/dev/null`; then
NS_IMPL_GNUSTEP=yes
NS_GNUSTEP_CONFIG=yes
GNU_OBJC_CFLAGS="$flags"
LIBS_GNUSTEP=$(gnustep-config --gui-libs) || exit
LIBS_GNUSTEP=`gnustep-config --gui-libs || exit`
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
dnl FIXME sourcing this several times in subshells seems inefficient.
GNUSTEP_SYSTEM_HEADERS=$(
. $GNUSTEP_CONFIG_FILE
AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])
)
GNUSTEP_SYSTEM_LIBRARIES=$(
. $GNUSTEP_CONFIG_FILE
AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])
)
GNUSTEP_SYSTEM_HEADERS=`. $GNUSTEP_CONFIG_FILE \
&& AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])`
GNUSTEP_SYSTEM_LIBRARIES=` . $GNUSTEP_CONFIG_FILE \
&& AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])`
dnl I seemed to need these as well with GNUstep-startup 0.25.
GNUSTEP_LOCAL_HEADERS=$(
. $GNUSTEP_CONFIG_FILE
AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])
)
GNUSTEP_LOCAL_LIBRARIES=$(
. $GNUSTEP_CONFIG_FILE
AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])
)
GNUSTEP_LOCAL_HEADERS=`. $GNUSTEP_CONFIG_FILE \
&& AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])`
GNUSTEP_LOCAL_LIBRARIES=`. $GNUSTEP_CONFIG_FILE \
&& AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])`
test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
@ -4523,7 +4515,7 @@ if test "${HAVE_X11}" = "yes"; then
AC_DEFINE([HAVE_OTF_GET_VARIATION_GLYPHS], [1],
[Define to 1 if libotf has OTF_get_variation_glyphs.])
fi
if ! $PKG_CONFIG --atleast-version=0.9.16 libotf; then
if $PKG_CONFIG --atleast-version=0.9.16 libotf; then :; else
AC_DEFINE([HAVE_OTF_KANNADA_BUG], [1],
[Define to 1 if libotf is affected by https://debbugs.gnu.org/28110.])
fi
@ -4637,7 +4629,7 @@ if test "${HAVE_BE_APP}" = "yes"; then
AC_DEFINE([HAVE_OTF_GET_VARIATION_GLYPHS], [1],
[Define to 1 if libotf has OTF_get_variation_glyphs.])
fi
if ! $PKG_CONFIG --atleast-version=0.9.16 libotf; then
if $PKG_CONFIG --atleast-version=0.9.16 libotf; then :; else
AC_DEFINE([HAVE_OTF_KANNADA_BUG], [1],
[Define to 1 if libotf is affected by https://debbugs.gnu.org/28110.])
fi
@ -4963,7 +4955,7 @@ module_env_snippet_27="$srcdir/src/module-env-27.h"
module_env_snippet_28="$srcdir/src/module-env-28.h"
module_env_snippet_29="$srcdir/src/module-env-29.h"
module_env_snippet_30="$srcdir/src/module-env-30.h"
emacs_major_version="${PACKAGE_VERSION%%.*}"
emacs_major_version=`AS_ECHO([$PACKAGE_VERSION]) | sed 's/[[.]].*//'`
AC_SUBST([emacs_major_version])
### Emacs Lisp native compiler support
@ -5073,14 +5065,16 @@ if test "${with_native_compilation}" != "no"; then
# available. (We filter out the gcc4 packages, because they
# don't support jit, and they have names like "gcc49" that
# sort later than "gcc11".)
PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
PORT_PACKAGE=`port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
awk '{ print $1; }' | grep -v 'gcc4@<:@0-9@:>@' | \
sort -V | tail -n 1)
sort -V | tail -n 1`
if test -n "$PORT_PACKAGE"; then
MAC_CFLAGS="-I$(dirname $(port contents $PORT_PACKAGE | \
grep libgccjit.h))"
MAC_LIBS="-L$(dirname $(port contents $PORT_PACKAGE | \
grep libgccjit.dylib))"
emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.h`
emacs_val=`dirname $emacs_val`
MAC_CFLAGS="-I$emacs_val"
emacs_val=`port contents $PORT_PACKAGE | grep libgccjit.dylib`
emacs_val=`dirname $emacs_val`
MAC_LIBS="-L$emacs_val"
fi
fi

View file

@ -2504,6 +2504,17 @@ as @code{set-language-environment}), use the
;; Get the full localized name of the language
(w32-get-locale-info language-id t)
@end smallexample
@cindex @code{end-session} event
@item end-session
This event is generated on MS-Windows when the operating system
informs Emacs that the user terminated the interactive session, or
that the system is shutting down. The standard definition of this
event is to invoke the @code{kill-emacs} command (@pxref{Killing
Emacs}) so as to shut down Emacs in an orderly fashion; if there are
unsaved changes, this will produce auto-save files
(@pxref{Auto-Saving}) that the user can use after restarting the
session to restore the unsaved edits.
@end table
If one of these events arrives in the middle of a key sequence---that

View file

@ -89,7 +89,9 @@ Mathematics ∀ p ∈ world • hello p □
Meetei Mayek (ꯃꯤꯇꯩ ꯃꯌꯦꯛ) ꯈꯨꯔꯨꯝꯖꯔꯤ
Mende Kikakui (𞠀𞠁𞠂) 𞠛𞠉
Modi (𑘦𑘻𑘚𑘲) 𑘡𑘦𑘭𑘿𑘎𑘰𑘨
Mongolian (монгол хэл) Сайн байна уу?
Mongolian Cyrillic (монгол хэл) Сайн байна уу?
Mongolian Traditional (ᠮᠣᠩᠭᠣᠯ ᠪᠢᠴᠢᠭ᠋) ᠰᠠᠶᠢᠨ ᠪᠠᠶᠢᠨ᠎ᠠ ᠤᠤ?
Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ) ᩈ᩠ᩅᩢᩔ᩠ᨯᩦᨣᩕᩢ᩠ᨸ
Norwegian (norsk) Hei / God dag
Odia (ଓଡ଼ିଆ) ନମସ୍କାର

View file

@ -249,6 +249,17 @@ the new argument NEW-BUFFER non-nil, it will use a new buffer instead.
Interactively, invoke 'eww-open-file' with a prefix argument to
activate this behavior.
---
*** 'eww' URL or keyword prompt now has tab completion.
The interactive minibuffer prompt when invoking 'eww' now has support
for tab completion.
+++
*** 'eww' URL and keyword prompt now completes suggested URIs and bookmarks.
The interactive minibuffer prompt when invoking 'eww' now provides
completions from 'eww-suggest-uris'. 'eww-suggest-uris' now includes
bookmark URIs.
** go-ts-mode
+++

View file

@ -857,17 +857,17 @@ This value stands for the value of the corresponding attribute of the
inheriting from other faces.
+++
** New X resource: "borderThickness".
** New X resource "borderThickness".
This controls the thickness of the external borders of the menu bars
and pop-up menus.
+++
** New X resource: "inputStyle".
** New X resource "inputStyle".
This controls the style of the pre-edit and status areas of X input
methods.
+++
** New X resources: "highlightForeground" and "highlightBackground".
** New X resources "highlightForeground" and "highlightBackground".
Only in the Lucid build, this controls colors used for highlighted
menu item widgets.
@ -1546,6 +1546,10 @@ environments are:
Coptic script and language environment
Mongolian-traditional script and language environment
Mongolian-cyrillic language environment
---
*** The "Oriya" language environment was renamed to "Odia".
This is to follow the change in the official name of the script. The
@ -1559,7 +1563,10 @@ Type 'C-u C-h t' to select it in case your language setup does not do
so automatically.
---
*** New Ukrainian translation of the Emacs Tutorial.
*** New Ukrainian translation of the Emacs tutorial.
---
*** New Farsi/Persian translation of the Emacs tutorial.
---
*** New default phonetic input method for the Tamil language environment.
@ -1587,7 +1594,8 @@ script.
---
*** New input method 'cyrillic-mongolian'.
This input method is for typing in the Mongolian language using the
Cyrillic script.
Cyrillic script. It is the default input method for the new
Mongolian-cyrillic language environment, see above.
* Changes in Specialized Modes and Packages in Emacs 29.1
@ -2664,7 +2672,7 @@ The old name was confusing, and is now an obsolete function alias.
** Images
+++
** New commands 'image-crop' and 'image-cut'.
*** New commands 'image-crop' and 'image-cut'.
These commands allow interactively cropping/cutting the image at
point. The commands are bound to keys 'i c' and 'i x' (respectively)
in the local keymap over images. They rely on external programs, by
@ -2672,7 +2680,7 @@ default "convert" from ImageMagick, to do the actual cropping/eliding
of the image file.
+++
*** New commands: 'image-flip-horizontally' and 'image-flip-vertically'.
*** New commands 'image-flip-horizontally' and 'image-flip-vertically'.
These commands horizontally and vertically flip the image under point,
and are bound to 'i h' and 'i v', respectively.

View file

@ -4,7 +4,7 @@ Emacs commands generally involve the CONTROL key (often labeled CTRL)
or the META key (usually labeled ALT). Rather than writing that
in full each time, we'll use the following abbreviations:
C-<chr> means hold the CONTROL key while typing the character <chr>
C-<chr> means hold the CONTROL key while typing the character <chr>.
Thus, C-f would be: hold the CONTROL key and type f.
M-<chr> means hold the META or ALT key down while typing <chr>.
If there is no META or ALT key, instead press and release the

1169
etc/tutorials/TUTORIAL.fa Normal file

File diff suppressed because it is too large Load diff

View file

@ -30,6 +30,10 @@ Maintainer: Rafael Sepúlveda <drs@gnulinux.org.mx>
Author: Protesilaos Stavrou <info@protesilaos.com>
Maintainer: Protesilaos Stavrou <info@protesilaos.com>
* TUTORIAL.fa:
Author: Mohsen BANAN <emacs@mohsen.1.banan.byname.net>
Maintainer: Mohsen BANAN <emacs@mohsen.1.banan.byname.net>
* TUTORIAL.fr:
Author: Éric Jacoboni <jaco@teaser.fr>
Maintainer: Éric Jacoboni <jaco@teaser.fr>

View file

@ -197,7 +197,7 @@
GAN 近緊跟根巾筋斤僅謹靳堇哏艮
GANG 梗更庚羹館耿粳哽
GAP 鴿蛤急
GAT <20><><EFBFBD>
GAT <20><><EFBFBD>
GAU 究舊九夠苟狗垢玖韭久灸廄救咎疚摳鼽
GEI 幾記機基既紀技箕肌飢譏姬己伎寄忌妓剞嘰杞畿麂
GENG 鏡頸
@ -231,7 +231,7 @@
GWAI 櫃季瑰圭硅歸龜閨軌鬼詭桂跪貴悸巋饋匭匱劌皈
GWAN 君軍均滾棍鈞郡袞筠
GWANG 轟
GWAT 癌备竇浑
GWAT 癌备竇浑
GWING 炯
GWOH 過果戈裹棵顆錁
GWOK 郭國廓

View file

@ -695,6 +695,16 @@ with L, LRE, or LRO Unicode bidi character type.")
(set-case-syntax c "_" tbl)
(setq c (1+ c)))
;; Traditional Mongolian
(setq c #x1800)
(while (<= c #x180A)
(set-case-syntax c "." tbl)
(setq c (1+ c)))
(setq c #x11660)
(while (<= c #x1166C)
(set-case-syntax c "." tbl)
(setq c (1+ c)))
;; Coptic
;; There's no Coptic category. However, Coptic letters that are
;; part of the Greek block above get the Greek category, and those

View file

@ -651,6 +651,8 @@
(nil . "MuleArabic-1")
(nil . "MuleArabic-2")
(nil . "ISO8859-6"))
(mongolian ,(font-spec :registry "iso10646-1"
:otf '(mong nil (init medi fina isol))))
(hebrew ,(font-spec :registry "iso10646-1" :script 'hebrew)
(nil . "ISO8859-8"))

View file

@ -256,6 +256,16 @@ Support for Russian using koi8-r and the russian-computer input method.")
\(The name Belarusian replaced Byelorussian in the early 1990s.)"))
'("Cyrillic"))
;; The Mongolian-traditional language environment is in misc-lang.el.
(set-language-info-alist
"Mongolian-cyrillic" '((coding-system utf-8)
(coding-priority utf-8)
(input-method . "cyrillic-mongolian")
(sample-text . "Mongolian (монгол хэл) Сайн байна уу?")
(documentation
. "Support for Mongolian language with Cyrillic alphabet."))
'("Cyrillic"))
(provide 'cyrillic)
;;; cyrillic.el ends here

View file

@ -74,10 +74,11 @@ and Italian.")))
(coding-priority utf-8 iso-8859-6 windows-1256)
(input-method . "farsi-transliterate-banan")
(sample-text . "Persian فارسی")
(documentation . "Bidirectional editing is supported.")))
(documentation . "Bidirectional editing is supported.")
(tutorial . "TUTORIAL.fa")))
(defcustom arabic-shaper-ZWNJ-handling nil
"How to handle ZWMJ in Arabic text rendering.
"How to handle ZWNJ (Zero-width Non-Joiner) in Arabic text rendering.
This variable controls the way to handle a glyph for ZWNJ
returned by the underling shaping engine.
@ -339,6 +340,30 @@ Coptic language using the Coptic script is supported in this
language environment."))
'("Misc"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Traditional Mongolian
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The Mongolian-cyrillic language environment is in cyrillic.el.
(set-language-info-alist
"Mongolian-traditional" '((coding-system utf-8)
(coding-priority utf-8)
; (input-method . "FIXME")
(sample-text . "Mongolian Traditional (ᠮᠣᠩᠭᠣᠯ ᠪᠢᠴᠢᠭ᠋) ᠰᠠᠶᠢᠨ ᠪᠠᠶᠢᠨ᠎ᠠ ᠤᠤ?")
(documentation
. "Support for Mongolian language with traditional script."))
'("Misc"))
;; Composition rules for Mongolian Traditional script.
(set-char-table-range
composition-function-table
'(#x1820 . #x18AF)
(list (vector "[\u200C\u200D][\u1820-\u18AF][\u200C\u200D]?"
1 'font-shape-gstring)
(vector "[\u1820-\u18AF][\u200C\u200D]" 0 'font-shape-gstring)
(vector "[\u1820-\u18AF\u202F\u180B-\u180F\u1807]+"
0 'font-shape-gstring)))
(provide 'misc-lang)
;;; misc-lang.el ends here

View file

@ -2918,11 +2918,6 @@ and corresponding effects.
(register-definition-prefixes "semantic/bovine/c" '("semantic"))
;;; Generated autoloads from progmodes/c-ts-common.el
(register-definition-prefixes "c-ts-common" '("c-ts-common-"))
;;; Generated autoloads from progmodes/c-ts-mode.el
@ -2965,6 +2960,10 @@ To use tree-sitter C/C++ modes by default, evaluate
in your configuration.
Since this mode uses a parser, unbalanced brackets might cause
some breakage in indentation/fontification. Therefore, it's
recommended to enable `electric-pair-mode' with this mode.
(fn)" t)
(autoload 'c-or-c++-ts-mode "c-ts-mode" "\
Analyze buffer and enable either C or C++ mode.
@ -5129,8 +5128,6 @@ evaluate `compilation-shell-minor-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\\{compilation-shell-minor-mode-map}
(fn &optional ARG)" t)
(autoload 'compilation-minor-mode "compile" "\
Toggle Compilation minor mode.
@ -5154,8 +5151,6 @@ evaluate `compilation-minor-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\\{compilation-minor-mode-map}
(fn &optional ARG)" t)
(autoload 'compilation-next-error-function "compile" "\
Advance to the next error message and visit the file where the error was.
@ -8618,7 +8613,7 @@ A second call of this function without changing point inserts the next match.
A call with prefix PREFIX reads the symbol to insert from the minibuffer with
completion.
(fn PREFIX)" t)
(fn PREFIX)" '("P"))
(autoload 'ebrowse-tags-loop-continue "ebrowse" "\
Repeat last operation on files in tree.
FIRST-TIME non-nil means this is not a repetition, but the first time.
@ -9230,24 +9225,25 @@ Turn on EDT Emulation." t)
;;; Generated autoloads from progmodes/eglot.el
(push (purecopy '(eglot 1 13)) package--builtin-versions)
(push (purecopy '(eglot 1 14)) package--builtin-versions)
(autoload 'eglot "eglot" "\
Start LSP server in support of PROJECT's buffers under MANAGED-MAJOR-MODE.
Start LSP server for PROJECT's buffers under MANAGED-MAJOR-MODES.
This starts a Language Server Protocol (LSP) server suitable for the
buffers of PROJECT whose `major-mode' is MANAGED-MAJOR-MODE.
CLASS is the class of the LSP server to start and CONTACT specifies
how to connect to the server.
This starts a Language Server Protocol (LSP) server suitable for
the buffers of PROJECT whose `major-mode' is among
MANAGED-MAJOR-MODES. CLASS is the class of the LSP server to
start and CONTACT specifies how to connect to the server.
Interactively, the command attempts to guess MANAGED-MAJOR-MODE
from the current buffer's `major-mode', CLASS and CONTACT from
`eglot-server-programs' looked up by the major mode, and PROJECT from
`project-find-functions'. The search for active projects in this
context binds `eglot-lsp-context' (which see).
Interactively, the command attempts to guess MANAGED-MAJOR-MODES,
CLASS, CONTACT, and LANGUAGE-IDS from `eglot-server-programs',
according to the current buffer's `major-mode'. PROJECT is
guessed from `project-find-functions'. The search for active
projects in this context binds `eglot-lsp-context' (which see).
If it can't guess, it prompts the user for the mode and the server.
With a single \\[universal-argument] prefix arg, it always prompts for COMMAND.
With two \\[universal-argument], it also always prompts for MANAGED-MAJOR-MODE.
If it can't guess, it prompts the user for the mode and the
server. With a single \\[universal-argument] prefix arg, it
always prompts for COMMAND. With two \\[universal-argument], it
also always prompts for MANAGED-MAJOR-MODE.
The LSP server of CLASS is started (or contacted) via CONTACT.
If this operation is successful, current *and future* file
@ -9265,12 +9261,12 @@ CONTACT specifies how to contact the server. It is a
keyword-value plist used to initialize CLASS or a plain list as
described in `eglot-server-programs', which see.
LANGUAGE-ID is the language ID string to send to the server for
MANAGED-MAJOR-MODE, which matters to a minority of servers.
LANGUAGE-IDS is a list of language ID string to send to the
server for each element in MANAGED-MAJOR-MODES.
INTERACTIVE is ignored and provided for backward compatibility.
(fn MANAGED-MAJOR-MODE PROJECT CLASS CONTACT LANGUAGE-ID &optional INTERACTIVE)" t)
(fn MANAGED-MAJOR-MODES PROJECT CLASS CONTACT LANGUAGE-IDS &optional INTERACTIVE)" t)
(autoload 'eglot-ensure "eglot" "\
Start Eglot session for current buffer if there isn't one.")
(put 'eglot-workspace-configuration 'safe-local-variable 'listp)
@ -9400,7 +9396,7 @@ Describe CTR if it is a class constructor.
;;; Generated autoloads from emacs-lisp/eldoc.el
(push (purecopy '(eldoc 1 13 0)) package--builtin-versions)
(push (purecopy '(eldoc 1 14 0)) package--builtin-versions)
;;; Generated autoloads from elec-pair.el
@ -9526,15 +9522,6 @@ optional prefix argument REINIT is non-nil.
(fn &optional REINIT)" t)
(register-definition-prefixes "elint" '("elint-"))
;;; Generated autoloads from progmodes/elixir-ts-mode.el
(autoload 'elixir-ts-mode "elixir-ts-mode" "\
Major mode for editing Elixir, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "elixir-ts-mode" '("elixir-ts-"))
;;; Generated autoloads from emacs-lisp/elp.el
@ -9830,6 +9817,8 @@ FACTOR is the multiplication factor for the size.
(fn &optional FACTOR)" t)
(autoload 'emoji-zoom-decrease "emoji" "\
Decrease the size of the character under point." t)
(autoload 'emoji-zoom-reset "emoji" "\
Reset the size of the character under point." t)
(register-definition-prefixes "emoji" '("emoji-"))
@ -10207,9 +10196,10 @@ Look at CONFIG and try to expand GROUP.
;;; Generated autoloads from erc/erc.el
(push (purecopy '(erc 5 5)) package--builtin-versions)
(push (purecopy '(erc 5 6 -4)) package--builtin-versions)
(autoload 'erc-select-read-args "erc" "\
Prompt the user for values of nick, server, port, and password.")
Prompt the user for values of nick, server, port, and password.
With prefix arg, also prompt for user and full name.")
(autoload 'erc "erc" "\
ERC is a powerful, modular, and extensible IRC client.
This function is the main entry point for ERC.
@ -10235,7 +10225,7 @@ for the values of the other parameters.
See `erc-tls' for the meaning of ID.
(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" t)
(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME ID)" '((erc-select-read-args)))
(defalias 'erc-select #'erc)
(autoload 'erc-tls "erc" "\
ERC is a powerful, modular, and extensible IRC client.
@ -10279,11 +10269,11 @@ Example usage:
When present, ID should be a symbol or a string to use for naming
the server buffer and identifying the connection unequivocally.
See Info node `(erc) Network Identifier' for details. Like USER
and CLIENT-CERTIFICATE, this parameter cannot be specified
See Info node `(erc) Network Identifier' for details. Like
CLIENT-CERTIFICATE, this parameter cannot be specified
interactively.
(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port \\='ircs-u)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" t)
(fn &key SERVER PORT NICK USER PASSWORD FULL-NAME CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls)) (erc-select-read-args))))
(autoload 'erc-handle-irc-url "erc" "\
Use ERC to IRC on HOST:PORT in CHANNEL.
If ERC is already connected to HOST:PORT, simply /join CHANNEL.
@ -10363,7 +10353,7 @@ Customize `erc-url-connect-function' to override this.
;;; Generated autoloads from erc/erc-imenu.el
(register-definition-prefixes "erc-imenu" '("erc-unfill-notice"))
(register-definition-prefixes "erc-imenu" '("erc-"))
;;; Generated autoloads from erc/erc-join.el
@ -10512,9 +10502,7 @@ it has to be wrapped in `(eval (quote ...))'.
If NAME is already defined as a test and Emacs is running
in batch mode, an error is signaled.
(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t)
(function-put 'ert-deftest 'doc-string-elt 3)
(function-put 'ert-deftest 'lisp-indent-function 2)
(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro)
(autoload 'ert-run-tests-batch "ert" "\
Run the tests specified by SELECTOR, printing results to the terminal.
@ -10649,9 +10637,10 @@ information on Eshell, see Info node `(eshell)Top'.
(fn &optional ARG)" t)
(autoload 'eshell-command "eshell" "\
Execute the Eshell command string COMMAND.
With prefix ARG, insert output into the current buffer at point.
If TO-CURRENT-BUFFER is non-nil (interactively, with the prefix
argument), then insert output into the current buffer at point.
(fn &optional COMMAND ARG)" t)
(fn COMMAND &optional TO-CURRENT-BUFFER)" t)
(autoload 'eshell-command-result "eshell" "\
Execute the given Eshell COMMAND, and return the result.
The result might be any Lisp object.
@ -12352,7 +12341,7 @@ Variables of interest include:
If non-nil, always attempt to create the other file if it was not found.
- `ff-quiet-mode'
If non-nil, traces which directories are being searched.
If non-nil, does not trace which directories are being searched.
- `ff-special-constructs'
A list of regular expressions specifying how to recognize special
@ -12620,7 +12609,7 @@ lines.
;;; Generated autoloads from progmodes/flymake.el
(push (purecopy '(flymake 1 2 2)) package--builtin-versions)
(push (purecopy '(flymake 1 3 4)) package--builtin-versions)
(autoload 'flymake-log "flymake" "\
Log, at level LEVEL, the message MSG formatted with ARGS.
LEVEL is passed to `display-warning', which is used to display
@ -12719,8 +12708,6 @@ evaluate `flymake-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\\{flymake-mode-map}
(fn &optional ARG)" t)
(autoload 'flymake-mode-on "flymake" "\
Turn Flymake mode on.")
@ -15127,15 +15114,6 @@ Prefix arg sets default accept amount temporarily.
(fn &optional ARG)" t)
(register-definition-prefixes "hashcash" '("hashcash-"))
;;; Generated autoloads from progmodes/heex-ts-mode.el
(autoload 'heex-ts-mode "heex-ts-mode" "\
Major mode for editing HEEx, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "heex-ts-mode" '("heex-ts-"))
;;; Generated autoloads from help-at-pt.el
@ -16306,15 +16284,6 @@ values.
(register-definition-prefixes "semantic/html" '("semantic-"))
;;; Generated autoloads from textmodes/html-ts-mode.el
(autoload 'html-ts-mode "html-ts-mode" "\
Major mode for editing Html, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "html-ts-mode" '("html-ts-mode-"))
;;; Generated autoloads from htmlfontify.el
@ -16388,8 +16357,7 @@ inlined into the compiled format versions. This means that if you
change its definition, you should explicitly call
`ibuffer-recompile-formats'.
(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t)
(function-put 'define-ibuffer-column 'lisp-indent-function 'defun)
(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro)
(autoload 'define-ibuffer-sorter "ibuf-macs" "\
Define a method of sorting named NAME.
DOCUMENTATION is the documentation of the function, which will be called
@ -16400,9 +16368,7 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one
buffer object, and `b' bound to another. BODY should return a non-nil
value if and only if `a' is \"less than\" `b'.
(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t)
(function-put 'define-ibuffer-sorter 'lisp-indent-function 1)
(function-put 'define-ibuffer-sorter 'doc-string-elt 2)
(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro)
(autoload 'define-ibuffer-op "ibuf-macs" "\
Generate a function which operates on a buffer.
OP becomes the name of the function; if it doesn't begin with
@ -16441,9 +16407,7 @@ BODY define the operation; they are forms to evaluate per each
marked buffer. BODY is evaluated with `buf' bound to the
buffer object.
(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t)
(function-put 'define-ibuffer-op 'lisp-indent-function 2)
(function-put 'define-ibuffer-op 'doc-string-elt 3)
(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro)
(autoload 'define-ibuffer-filter "ibuf-macs" "\
Define a filter named NAME.
DOCUMENTATION is the documentation of the function.
@ -16458,9 +16422,7 @@ not a particular buffer should be displayed or not. The forms in BODY
will be evaluated with BUF bound to the buffer object, and QUALIFIER
bound to the current value of the filter.
(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t)
(function-put 'define-ibuffer-filter 'lisp-indent-function 2)
(function-put 'define-ibuffer-filter 'doc-string-elt 2)
(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro)
(register-definition-prefixes "ibuf-macs" '("ibuffer-"))
@ -17271,8 +17233,8 @@ Put image IMAGE in front of POS in the current buffer.
IMAGE must be an image created with `create-image' or `defimage'.
IMAGE is displayed by putting an overlay into the current buffer with a
`before-string' STRING that has a `display' property whose value is the
image. STRING is defaulted if you omit it.
The overlay created will have the `put-image' property set to t.
image. STRING defaults to \"x\" if it's nil or omitted.
The overlay created by this function has the `put-image' property set to t.
POS may be an integer or marker.
AREA is where to display the image. AREA nil or omitted means
display it in the text area, a value of `left-margin' means
@ -17406,14 +17368,12 @@ Cut a rectangle from the image under point, filling it with COLOR.
COLOR defaults to the value of `image-cut-color'.
Interactively, with prefix argument, prompt for COLOR to use.
(fn &optional COLOR)" t)
(autoload 'image-crop "image-crop" "\
Crop the image under point.
If CUT is non-nil, remove a rectangle from the image instead of
cropping the image. In that case CUT should be the name of a
color to fill the rectangle.
This command presents the image with a rectangular area superimposed
on it, and allows moving and resizing the area to define which
part of it to cut.
While cropping the image, the following key bindings are available:
While moving/resizing the cutting area, the following key bindings
are available:
`q': Exit without changing anything.
`RET': Crop/cut the image.
@ -17421,9 +17381,32 @@ While cropping the image, the following key bindings are available:
rectangle shape.
`s': Same as `m', but make the rectangle into a square first.
After cropping an image, you can save it by `M-x image-save' or
After cutting the image, you can save it by `M-x image-save' or
\\<image-map>\\[image-save] when point is over the image.
(fn &optional COLOR)" t)
(autoload 'image-crop "image-crop" "\
Crop the image under point.
This command presents the image with a rectangular area superimposed
on it, and allows moving and resizing the area to define which
part of it to crop.
While moving/resizing the cropping area, the following key bindings
are available:
`q': Exit without changing anything.
`RET': Crop/cut the image.
`m': Make mouse movements move the rectangle instead of altering the
rectangle shape.
`s': Same as `m', but make the rectangle into a square first.
After cropping the image, you can save it by `M-x image-save' or
\\<image-map>\\[image-save] when point is over the image.
When called from Lisp, if CUT is non-nil, remove a rectangle from
the image instead of cropping the image. In that case, CUT should
be the name of a color to fill the rectangle.
(fn &optional CUT)" t)
(register-definition-prefixes "image-crop" '("image-c"))
@ -18534,6 +18517,11 @@ sequence inside of a word.
Standard ispell choices are then available.
This command uses a word-list file specified
by `ispell-alternate-dictionary' or by `ispell-complete-word-dict';
if none of those name an existing word-list file, this command
signals an error.
(fn &optional INTERIOR-FRAG)" t)
(autoload 'ispell-complete-word-interior-frag "ispell" "\
Completes word matching character sequence inside a word." t)
@ -22466,7 +22454,7 @@ Coloring:
;;; Generated autoloads from org/org.el
(push (purecopy '(org 9 6 2)) package--builtin-versions)
(push (purecopy '(org 9 6 4)) package--builtin-versions)
(autoload 'org-babel-do-load-languages "org" "\
Load the languages defined in `org-babel-load-languages'.
@ -23458,8 +23446,7 @@ If PACKAGE is a `package-desc' object, MIN-VERSION is ignored.
(autoload 'package-install "package" "\
Install the package PKG.
PKG can be a `package-desc' or a symbol naming one of the
available packages in an archive in `package-archives'. When
called interactively, prompt for the package name.
available packages in an archive in `package-archives'.
Mark the installed package as selected by adding it to
`package-selected-packages'.
@ -23471,6 +23458,10 @@ non-nil, install the package but do not add it to
If PKG is a `package-desc' and it is already installed, don't try
to install it but still mark it as selected.
If the command is invoked with a prefix argument, it will allow
upgrading of built-in packages, as if `package-install-upgrade-built-in'
had been enabled.
(fn PKG &optional DONT-SELECT)" t)
(autoload 'package-update "package" "\
Update package NAME if a newer version exists.
@ -24433,6 +24424,11 @@ they are not by default assigned to keys." t)
(defalias 'edit-picture 'picture-mode)
(register-definition-prefixes "picture" '("picture-"))
;;; Generated autoloads from language/pinyin.el
(register-definition-prefixes "pinyin" '("pinyin-character-map"))
;;; Generated autoloads from textmodes/pixel-fill.el
@ -26280,8 +26276,6 @@ evaluate `rectangle-mark-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
\\{rectangle-mark-mode-map}
(fn &optional ARG)" t)
(register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-"))
@ -27439,16 +27433,6 @@ Major mode for editing Ruby code.
(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
(register-definition-prefixes "ruby-mode" '("ruby-"))
;;; Generated autoloads from progmodes/ruby-ts-mode.el
(push (purecopy '(ruby-ts-mode 0 2)) package--builtin-versions)
(autoload 'ruby-ts-mode "ruby-ts-mode" "\
Major mode for editing Ruby, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "ruby-ts-mode" '("ruby-ts-"))
;;; Generated autoloads from ruler-mode.el
@ -32922,7 +32906,8 @@ Build and install the tree-sitter language grammar library for LANG.
Interactively, if `treesit-language-source-alist' doesn't already
have data for building the grammar for LANG, prompt for its
repository URL and the C/C++ compiler to use.
repository URL and the C/C++ compiler to use. Non-interactively,
signal an error when there's no recipe for LANG.
This command requires Git, a C compiler and (sometimes) a C++ compiler,
and the linker to be installed and on PATH. It also requires that the
@ -32931,7 +32916,12 @@ recipe for LANG exists in `treesit-language-source-alist'.
See `exec-path' for the current path where Emacs looks for
executable programs, such as the C/C++ compiler and linker.
(fn LANG)" t)
Interactively, prompt for the directory in which to install the
compiled grammar files. Non-interactively, use OUT-DIR; if it's
nil, the grammar is installed to the standard location, the
\"tree-sitter\" directory under `user-emacs-directory'.
(fn LANG &optional OUT-DIR)" t)
(register-definition-prefixes "treesit" '("treesit-"))
@ -33157,7 +33147,15 @@ Major mode for editing TypeScript.
(fn)" t)
(autoload 'tsx-ts-mode "typescript-ts-mode" "\
Major mode for editing TypeScript.
Major mode for editing TSX and JSX documents.
This major mode defines two additional JSX-specific faces:
`typescript-ts-jsx-attribute-face' and
`typescript-ts-jsx-attribute-face' that are used for HTML tags
and attributes, respectively.
The JSX-specific faces are used when `treesit-font-lock-level' is
at least 3 (which is the default value).
(fn)" t)
(register-definition-prefixes "typescript-ts-mode" '("typescript-ts-mode-"))
@ -37163,6 +37161,48 @@ run a specific program. The program must be a member of
(fn &optional PGM)" t)
(register-definition-prefixes "zone" '("zone-"))
;;; Generated autoloads from progmodes/ruby-ts-mode.el
(push (purecopy '(ruby-ts-mode 0 2)) package--builtin-versions)
(autoload 'ruby-ts-mode "ruby-ts-mode" "\
Major mode for editing Ruby, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "ruby-ts-mode" '("ruby-ts-"))
;;; Generated autoloads from textmodes/html-ts-mode.el
(autoload 'html-ts-mode "html-ts-mode" "\
Major mode for editing Html, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "html-ts-mode" '("html-ts-mode-"))
;;; Generated autoloads from progmodes/c-ts-common.el
(register-definition-prefixes "c-ts-common" '("c-ts-common-"))
;;; Generated autoloads from progmodes/elixir-ts-mode.el
(autoload 'elixir-ts-mode "elixir-ts-mode" "\
Major mode for editing Elixir, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "elixir-ts-mode" '("elixir-ts-"))
;;; Generated autoloads from progmodes/heex-ts-mode.el
(autoload 'heex-ts-mode "heex-ts-mode" "\
Major mode for editing HEEx, powered by tree-sitter.
(fn)" t)
(register-definition-prefixes "heex-ts-mode" '("heex-ts-"))
;;; End of scraped data

View file

@ -94,7 +94,8 @@ no parameters) that returns a directory name."
(defcustom eww-suggest-uris
'(eww-links-at-point
thing-at-point-url-at-point
eww-current-url)
eww-current-url
eww-bookmark-urls)
"List of functions called to form the list of default URIs for `eww'.
Each of the elements is a function returning either a string or a list
of strings. The results will be joined into a single list with
@ -104,7 +105,8 @@ duplicate entries (if any) removed."
:type 'hook
:options '(eww-links-at-point
thing-at-point-url-at-point
eww-current-url))
eww-current-url
eww-bookmark-urls))
(defcustom eww-bookmarks-directory user-emacs-directory
"Directory where bookmark files will be stored."
@ -329,6 +331,12 @@ parameter, and should return the (possibly) transformed URL."
:parent shr-image-map
"RET" #'eww-follow-link)
(defvar-keymap eww-minibuffer-url-keymap
:doc "Keymap used in the minibuffer prompt for URLs or keywords."
:parent minibuffer-local-completion-map
"SPC" #'self-insert-command
"?" #'self-insert-command)
(defun eww-suggested-uris nil
"Return the list of URIs to suggest at the `eww' prompt.
This list can be customized via `eww-suggest-uris'."
@ -377,10 +385,12 @@ killed after rendering.
For more information, see Info node `(eww) Top'."
(interactive
(let ((uris (eww-suggested-uris)))
(list (read-string (format-prompt "Enter URL or keywords"
(and uris (car uris)))
nil 'eww-prompt-history uris)
(let ((uris (eww-suggested-uris))
(minibuffer-local-completion-map eww-minibuffer-url-keymap))
(list (completing-read (format-prompt "Enter URL or keywords"
(and uris (car uris)))
(seq-uniq (append eww-prompt-history uris))
nil nil nil 'eww-prompt-history uris)
current-prefix-arg)))
(setq url (eww--dwim-expand-url url))
(pop-to-buffer-same-window
@ -2227,6 +2237,12 @@ If ERROR-OUT, signal user-error if there are no bookmarks."
'eww-bookmark)))
(eww-browse-url (plist-get bookmark :url))))
(defun eww-bookmark-urls ()
"Get the URLs from the current list of bookmarks."
(interactive nil eww-boomark-mode)
(eww-read-bookmarks)
(mapcar (lambda (x) (plist-get x :url)) eww-bookmarks))
(defvar-keymap eww-bookmark-mode-map
"C-k" #'eww-bookmark-kill
"C-y" #'eww-bookmark-yank

View file

@ -36,7 +36,7 @@
(require 'ob)
(declare-function orgtbl-to-tsv "org-table" (table params))
(declare-function R "ext:essd-r" (&optional start-args))
(declare-function run-ess-r "ext:ess-r-mode" (&optional start-args))
(declare-function inferior-ess-send-input "ext:ess-inf" ())
(declare-function ess-make-buffer-current "ext:ess-inf" ())
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
@ -276,7 +276,8 @@ This function is called by `org-babel-execute-src-block'."
(when (get-buffer session)
;; Session buffer exists, but with dead process
(set-buffer session))
(require 'ess) (R)
(require 'ess-r-mode)
(set-buffer (run-ess-r))
(let ((R-proc (get-process (or ess-local-process-name
ess-current-process-name))))
(while (process-get R-proc 'callbacks)

View file

@ -69,7 +69,10 @@
:safe #'stringp)
(defvar org-babel-js-function-wrapper
"require('process').stdout.write(require('util').inspect(function(){%s}()));"
;; Note that newline after %s - it makes sure that closing
;; parenthesis are not shadowed if the last line of the body is a
;; line comment.
"require('process').stdout.write(require('util').inspect(function(){%s\n}()));"
"Javascript code to print value of body.")
(defun org-babel-execute:js (body params)

View file

@ -1232,7 +1232,9 @@ from the processor set in `org-cite-activate-processor'."
(let ((cite (org-with-point-at (match-beginning 0)
(org-element-citation-parser))))
(when cite
(funcall activate cite)
;; Do not alter match data as font-lock expects us to set it
;; appropriately.
(save-match-data (funcall activate cite))
;; Move after cite object and make sure to return
;; a non-nil value.
(goto-char (org-element-property :end cite)))))))

View file

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.6.4-2-g0f6ae7"))
(let ((org-git-version "release_9.6.4-9-g8eb209"))
org-git-version))
(provide 'org-version)

View file

@ -3483,13 +3483,17 @@ Make sure that you only list packages here which:
:group 'org-export-latex
:set 'org-set-packages-alist
:get 'org-get-packages-alist
:type '(repeat
(choice
(list :tag "options/package pair"
(string :tag "options")
(string :tag "package")
(boolean :tag "Snippet"))
(string :tag "A line of LaTeX"))))
:type
'(repeat
(choice
(list :tag "options/package pair"
(string :tag "options")
(string :tag "package")
(boolean :tag "snippet")
(choice
(const :tag "All compilers include this package" nil)
(repeat :tag "Only include from these compilers" string)))
(string :tag "A line of LaTeX"))))
(defgroup org-appearance nil
"Settings for Org mode appearance."
@ -8440,7 +8444,10 @@ a link."
(dolist (link (if (stringp links) (list links) links))
(search-forward link nil links-end)
(goto-char (match-beginning 0))
(org-open-at-point arg)))))))
;; When opening file link, current buffer may be
;; altered.
(save-current-buffer
(org-open-at-point arg))))))))
;; On a footnote reference or at definition's label.
((or (eq type 'footnote-reference)
(and (eq type 'footnote-definition)

View file

@ -1820,9 +1820,11 @@ INFO is a plist used as a communication channel. See
"Protect special chars, then wrap TEXT in \"\\texttt{}\"."
(format "\\texttt{%s}"
(replace-regexp-in-string
"--\\|[\\{}$%&_#~^]"
"--\\|<<\\|>>\\|[\\{}$%&_#~^]"
(lambda (m)
(cond ((equal m "--") "-{}-{}")
((equal m "<<") "<{}<{}")
((equal m ">>") ">{}>{}")
((equal m "\\") "\\textbackslash{}")
((equal m "~") "\\textasciitilde{}")
((equal m "^") "\\textasciicircum{}")

View file

@ -1571,15 +1571,14 @@ After the tab is created, the hooks in
;; Handle the case when it's called in the active minibuffer.
(when (minibuffer-selected-window)
(select-window (minibuffer-selected-window)))
;; Remove window parameters that can cause problems
;; with `delete-other-windows' and `split-window'.
(unless (eq tab-bar-new-tab-choice 'clone)
(set-window-parameter nil 'window-atom nil)
(set-window-parameter nil 'window-side nil))
(let ((ignore-window-parameters t))
(let ((ignore-window-parameters t)
(window--sides-inhibit-check t))
(if (eq tab-bar-new-tab-choice 'clone)
;; Create new unique windows with the same layout
(window-state-put (window-state-get))
;; Remove window parameters that can cause problems
;; with `delete-other-windows' and `split-window'.
(set-window-parameter nil 'window-atom nil)
(delete-other-windows)
(if (eq tab-bar-new-tab-choice 'window)
;; Create new unique window from remaining window

View file

@ -650,6 +650,7 @@ with some explanatory links."
(delete-region prop-start prop-end))))))
(defvar tutorial--starting-point)
(put 'tutorial--starting-point 'permanent-local t)
(defun tutorial--save-on-kill ()
"Query the user about saving the tutorial when killing Emacs."
(when (buffer-live-p tutorial--buffer)

View file

@ -6145,29 +6145,40 @@ second optional argument ABSOLUTE is non-nil, the value counts the lines
from the absolute start of the buffer, disregarding the narrowing. */)
(register Lisp_Object position, Lisp_Object absolute)
{
ptrdiff_t pos, start = BEGV_BYTE;
ptrdiff_t pos_byte, start_byte = BEGV_BYTE;
if (MARKERP (position))
pos = marker_position (position);
{
/* We don't trust the byte position if the marker's buffer is
not the current buffer. */
if (XMARKER (position)->buffer != current_buffer)
pos_byte = CHAR_TO_BYTE (marker_position (position));
else
pos_byte = marker_byte_position (position);
}
else if (NILP (position))
pos = PT;
pos_byte = PT_BYTE;
else
{
CHECK_FIXNUM (position);
pos = XFIXNUM (position);
ptrdiff_t pos = XFIXNUM (position);
/* Check that POSITION is valid. */
if (pos < BEG || pos > Z)
args_out_of_range_3 (position, make_int (BEG), make_int (Z));
pos_byte = CHAR_TO_BYTE (pos);
}
if (!NILP (absolute))
start = BEG_BYTE;
start_byte = BEG_BYTE;
else if (NILP (absolute))
pos_byte = clip_to_bounds (BEGV_BYTE, pos_byte, ZV_BYTE);
/* Check that POSITION is in the accessible range of the buffer, or,
if we're reporting absolute positions, in the buffer. */
if (NILP (absolute) && (pos < BEGV || pos > ZV))
args_out_of_range_3 (make_int (pos), make_int (BEGV), make_int (ZV));
else if (!NILP (absolute) && (pos < 1 || pos > Z))
args_out_of_range_3 (make_int (pos), make_int (1), make_int (Z));
/* Check that POSITION is valid. */
if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE)
args_out_of_range_3 (make_int (BYTE_TO_CHAR (pos_byte)),
make_int (BEG), make_int (Z));
return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1);
return make_int (count_lines (start_byte, pos_byte) + 1);
}

View file

@ -404,6 +404,9 @@ init_treesit_functions (void)
static Lisp_Object Vtreesit_str_libtree_sitter;
static Lisp_Object Vtreesit_str_tree_sitter;
#ifndef WINDOWSNT
static Lisp_Object Vtreesit_str_dot_0;
#endif
static Lisp_Object Vtreesit_str_dot;
static Lisp_Object Vtreesit_str_question_mark;
static Lisp_Object Vtreesit_str_star;
@ -543,8 +546,21 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name,
suffixes = Vdynamic_library_suffixes;
FOR_EACH_TAIL (suffixes)
*path_candidates = Fcons (concat2 (lib_base_name, XCAR (suffixes)),
*path_candidates);
{
Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes));
#ifndef WINDOWSNT
/* On Posix hosts, support libraries named with ABI version
numbers. In the foreseeable future we only need to support
version 0.0. For more details, see
https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00386.html. */
Lisp_Object candidate2 = concat2 (candidate1, Vtreesit_str_dot_0);
Lisp_Object candidate3 = concat2 (candidate2, Vtreesit_str_dot_0);
*path_candidates = Fcons (candidate3, *path_candidates);
*path_candidates = Fcons (candidate2, *path_candidates);
#endif
*path_candidates = Fcons (candidate1, *path_candidates);
}
}
/* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer
@ -3948,6 +3964,10 @@ the symbol of that THING. For example, (or block sexp). */);
Vtreesit_str_libtree_sitter = build_pure_c_string ("libtree-sitter-");
staticpro (&Vtreesit_str_tree_sitter);
Vtreesit_str_tree_sitter = build_pure_c_string ("tree-sitter-");
#ifndef WINDOWSNT
staticpro (&Vtreesit_str_dot_0);
Vtreesit_str_dot_0 = build_pure_c_string (".0");
#endif
staticpro (&Vtreesit_str_dot);
Vtreesit_str_dot = build_pure_c_string (".");
staticpro (&Vtreesit_str_question_mark);