]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 months agoImprove performance of `file-truename' (bug#70036)
Ihor Radchenko [Tue, 30 Apr 2024 11:27:04 +0000 (14:27 +0300)]
Improve performance of `file-truename' (bug#70036)

* lisp/files.el (file-truename): Avoid repetitive calls to
`file-name-nondirectory'.  These calls contribute
significantly to CPU time.  See the benchmarks in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70036#47

(cherry picked from commit bf00762745c07816e7a9c64e0fce037039852971)

11 months agoAdd ExceptionGroup as a Python keyword
kobarity [Tue, 30 Apr 2024 05:10:57 +0000 (14:10 +0900)]
Add ExceptionGroup as a Python keyword

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration)
(python--treesit-exceptions): Add ExceptionGroup.  (Bug#70653)

(cherry picked from commit d15efe965d8317bb5413a8aa8caabcb9f5382206)

11 months agoFix display of stipples on NS with respect to cursor highlight
Po Lu [Thu, 2 May 2024 08:56:26 +0000 (16:56 +0800)]
Fix display of stipples on NS with respect to cursor highlight

* src/nsfont.m (nsfont_draw): Delete redundant code.

* src/nsterm.m (ns_maybe_dumpglyphs_background): Conform logic
to X version by always displaying the background if s->stipple_p
should be set.
(ns_draw_stretch_glyph_string): Set stipple background as
appropriate.
(ns_set_glyph_string_gc): New function.
(ns_draw_glyph_string): Call it, as on X.  Reported by Arash
Esbati <arash@gnu.org>.

(cherry picked from commit ef6ffbdc79645e719d3b5ef23c9200405c58c61e)

11 months ago; * doc/lispref/commands.texi (Event Mod): Add motivation (bug#70596).
Eli Zaretskii [Thu, 2 May 2024 09:20:09 +0000 (12:20 +0300)]
; * doc/lispref/commands.texi (Event Mod): Add motivation (bug#70596).

(cherry picked from commit b392169e541a29178d7ae20f329d48b3d2bd78cf)

11 months ago; Fix python test case for testing completion with ipython
Lin Sun [Thu, 25 Apr 2024 06:54:27 +0000 (06:54 +0000)]
; Fix python test case for testing completion with ipython

* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-ipython): Fix value of
'python-test-shell-interpreter'.  (Bug#70578)

(cherry picked from commit 0e0fe20040413d682f8078a2ddfb8f502cb89fb8)

11 months agoEglot: Add 'command-modes' property to all suitable commands
Augusto Stoffel [Sun, 21 Apr 2024 09:21:58 +0000 (11:21 +0200)]
Eglot: Add 'command-modes' property to all suitable commands

Those are the commands that call 'eglot--current-server-or-lose'.
* lisp/progmodes/eglot.el (eglot--managed-mode),
(eglot-list-connections-mode): Make non-interactive.  (Bug#70554)

(cherry picked from commit b98a6af8ca086ddbf891e54e50d0cb3f578f42b5)

11 months ago* lisp/emacs-lisp/warnings.el: Fix 'warning-display-at-bottom'.
Juri Linkov [Thu, 2 May 2024 06:53:06 +0000 (09:53 +0300)]
* lisp/emacs-lisp/warnings.el: Fix 'warning-display-at-bottom'.

(display-warning): Move point to the beginning of the last line
instead of its end for 'warning-display-at-bottom' (bug#69983).

(cherry picked from commit 592873a52d00fa46bcf63b0dd38073f038ecb935)

11 months ago; Improve commentary in intervals.h
Eli Zaretskii [Thu, 2 May 2024 06:50:37 +0000 (09:50 +0300)]
; Improve commentary in intervals.h

* src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P)
(INTERVAL_EXPRESSLY_WRITABLE_P): Clarify commentary.

(cherry picked from commit 7d15d17353c02b0ded3671ecfaf2f4a8c19d43c1)

11 months agoSupport hints in the :repeat keyword of defvar-keymap for repeat-mode
Juri Linkov [Thu, 2 May 2024 06:46:48 +0000 (09:46 +0300)]
Support hints in the :repeat keyword of defvar-keymap for repeat-mode

* lisp/keymap.el (defvar-keymap): Add :hints to the :repeat keyword.
Put the property 'repeat-hint' on the command symbol.

* lisp/repeat.el (repeat-echo-message-string): Show hint strings
defined with the property 'repeat-hint' on the command symbol (bug#70576).

(cherry picked from commit 0023891e84285c2ea2a8029f479135f792c9d1e9)

11 months ago* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036).
Juri Linkov [Thu, 2 May 2024 06:28:53 +0000 (09:28 +0300)]
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036).

Add 'text' lambda to 'treesit-thing-settings' that should fall back
to the default functions for sentence/sexp navigation.

(cherry picked from commit a1613505e24e8d5eae79b130809d217b1db23065)

11 months agoTighten regexp for rust-ts-mode keyword workaround
Yuan Fu [Thu, 2 May 2024 04:50:21 +0000 (21:50 -0700)]
Tighten regexp for rust-ts-mode keyword workaround

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add bos and eos.

(cherry picked from commit bf026b8e55626b35144f93056744f3fd50bc126b)

11 months agoFix fontification for else in macro body in rust-ts-mode
Yuan Fu [Thu, 2 May 2024 04:21:00 +0000 (21:21 -0700)]
Fix fontification for else in macro body in rust-ts-mode

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add a rule for else in macro body.  Also added the same rule for "in"
and "move" keyword, as they seems to have the same problem.

(cherry picked from commit 07c47ea002b4702285bbf467ec09c9b281eb19b7)

11 months agoAdd font-locking for typed parameters in python-ts-mode (bug#70665)
Noah Peart [Tue, 30 Apr 2024 09:55:18 +0000 (02:55 -0700)]
Add font-locking for typed parameters in python-ts-mode (bug#70665)

* lisp/progmodes/python.el (python--treesit-settings): Add
tree-sitter font-locking rule for typed parameters.
* test/lisp/progmodes/python-tests.el
(python-ts-mode-types-face-1): Test for
font-lock-variable-name-face in typed parameter.

(cherry picked from commit 0f92d433d2b806eb58a9a4c0197344b08ea5ae65)

11 months agoPort visible bell to Android
Po Lu [Thu, 2 May 2024 03:31:37 +0000 (11:31 +0800)]
Port visible bell to Android

* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Ignore
GC_INVERT.

* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle) <invertFilter>: New variable.
(perform): If the transfer mode is invert, copy the source
to itself with invertFilter as the color filter.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <xorAlu, srcInAlu>:
Delete now-redundant ALUs.
(markDirty): Cease updating the paint's transfermode.

* java/org/gnu/emacs/EmacsSafThread.java (openDocument1): Fix
typo in documentation.

* src/android.c (android_blit_xor): Delete unused function.
(android_copy_area): Remove calls to unused blit functions.

* src/androidgui.h (enum android_gc_function): Rename XOR to
INVERT.

* src/androidterm.c (android_flash): Replace with GXinvert.

(cherry picked from commit b84fa71f8985284560bacda7d407e3559583844f)

11 months agoSwitch to GXinvert in XTflash
Po Lu [Thu, 2 May 2024 02:23:09 +0000 (10:23 +0800)]
Switch to GXinvert in XTflash

* src/xterm.c (XTflash): Move to inverting the regions of the
display being flashed.  Suggested by Manuel Giraud
<manuel@ledu-giraud.fr>.

(cherry picked from commit d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5)

11 months ago; * doc/emacs/android.texi (Android Startup): Correct wording.
Po Lu [Thu, 2 May 2024 01:54:16 +0000 (09:54 +0800)]
; * doc/emacs/android.texi (Android Startup): Correct wording.

(cherry picked from commit bcaf946cb143f9d2e5c17c89012c4f9f7541379a)

11 months ago; Update commentary in intervals.h
Po Lu [Thu, 2 May 2024 01:51:31 +0000 (09:51 +0800)]
; Update commentary in intervals.h

* src/intervals.h (INTERVAL_GENERALLY_WRITABLE_P)
(INTERVAL_EXPRESSLY_WRITABLE_P): Mention significance of RO.

(cherry picked from commit 08a38d6e7aad1c918b95801402de189aeaf64da5)

11 months ago* etc/NEWS (Function type declaration): Add entry.
Andrea Corallo [Wed, 1 May 2024 20:49:01 +0000 (22:49 +0200)]
* etc/NEWS (Function type declaration): Add entry.

(cherry picked from commit 8e1e8099aad0fbb2bc375b45379913b8ca55e926)

11 months ago(disassemble): Fix case of `(byte-code ...)` argument
Andrea Corallo [Wed, 1 May 2024 18:14:01 +0000 (14:14 -0400)]
(disassemble): Fix case of `(byte-code ...)` argument

* lisp/emacs-lisp/disass.el (disassemble): Handle (byte-code ...) here..
(disassemble-internal): ...instead of here.
(disassemble-1): Adjust text to reflect the existence of other
compiled functions.

(cherry picked from commit 468f3f1cb44b8807c49add4235af3fe20ea7a73b)

11 months ago* doc/lispref/functions.texi (Declare Form): Improve declare type.
Andrea Corallo [Wed, 1 May 2024 18:03:02 +0000 (20:03 +0200)]
* doc/lispref/functions.texi (Declare Form): Improve declare type.

(cherry picked from commit fccd35f2c89a50675ed8c14d4814b603fd4fa166)

11 months agoAdd Compat as an Eglot dependency
Philip Kaludercic [Sat, 9 Mar 2024 07:11:03 +0000 (08:11 +0100)]
Add Compat as an Eglot dependency

* lisp/progmodes/eglot.el (eglot--format-markup): Remove fboundp
check for 'text-property-search-forward'.
(eglot-alternatives): Use Compat's 'executable-find'
(eglot--executable-find): Remove function.

Additionally this should make 'package-get-version' available
for releases of Emacs previous to 27.1.  (bug#62198)

(cherry picked from commit f68e9172735963950428eafc466fd10473fca7c1)

11 months agoFix minor typos in haikuterm.c
Po Lu [Wed, 1 May 2024 13:34:50 +0000 (21:34 +0800)]
Fix minor typos in haikuterm.c

* src/haikuterm.c (haiku_fill_underline)
(haiku_draw_text_decoration): Don't pass view to unused frame
parameter.

(cherry picked from commit 83bdeee92b0c8bf27ff18f99f3414c725308d2ed)

11 months agoImplement dots and dashes on Nextstep
Po Lu [Wed, 1 May 2024 14:02:15 +0000 (22:02 +0800)]
Implement dots and dashes on Nextstep

* src/Makefile.in (NON_OBJC_CFLAGS): Add -Wstrict-flex-arrays.

* src/nsterm.m (ns_draw_dash, ns_fill_underline): New functions.
(ns_draw_text_decoration): Port dash and dot display from X.

(cherry picked from commit a5f57a86347eb950d201875cb8bba92d424611db)

11 months ago; Silence obsoletion warning in mwheel-tests.
Basil L. Contovounesios [Wed, 1 May 2024 11:08:30 +0000 (13:08 +0200)]
; Silence obsoletion warning in mwheel-tests.

(cherry picked from commit 04635f399b01925b8ed6bcf555e2f528cba2e401)

11 months ago; Update pvec_type hash for CHECK_STRUCTS
Basil L. Contovounesios [Wed, 1 May 2024 11:07:17 +0000 (13:07 +0200)]
; Update pvec_type hash for CHECK_STRUCTS

This follows commit 2fa839c1886 of 2024-04-28
"(COMPILED): Rename to CLOSURE".

(cherry picked from commit f804a492bf890b53d704809bd8cf6306f9c17d76)

11 months agoAssume match before calling help-xref-button
Basil L. Contovounesios [Tue, 30 Apr 2024 06:31:58 +0000 (08:31 +0200)]
Assume match before calling help-xref-button

help-xref-button fails if not preceded by a valid match, so a
preceding unconditional search should not be allowed to fail
silently.

* lisp/emacs-lisp/ert.el (ert-describe-test):
* lisp/help-fns.el (help-fns--compiler-macro)
(help-fns-function-description-header, describe-variable)
(help-fns--customize-variable, describe-face)
(help-fns--face-attributes, describe-keymap): Let unconditional
re-search-backward before help-xref-button fail early, as that would
indicate a logic bug, and the backtrace would more accurately point
to the actual source of the mistake.

(cherry picked from commit 65fa47e3fa15c5553974a6d99080f21b4117245b)

11 months agoDisable on-screen keyboard outside fields in Custom buffers
Po Lu [Wed, 1 May 2024 07:57:29 +0000 (15:57 +0800)]
Disable on-screen keyboard outside fields in Custom buffers

* lisp/cus-edit.el (Custom-display-on-screen-keyboard-p): New
function.
(Custom-mode): Install it as the touch-screen-keyboard-function.

* lisp/touch-screen.el (touch-screen-keyboard-function): New
variable.
(touch-screen-handle-point-up): Don't special-case the splash
screen with respect to touch-screen-display-keyboard in keeping
with user feedback.

(cherry picked from commit 54dbd8b4fa2253682d044cc53bd658e361bff8a0)

11 months ago; * src/androidselect.c (extract_fd_offsets): Fix typos.
Po Lu [Wed, 1 May 2024 04:03:26 +0000 (12:03 +0800)]
; * src/androidselect.c (extract_fd_offsets): Fix typos.

(cherry picked from commit c00105626ace43919706819da4057a358e62bafe)

11 months agoFix compatibility issues with Android clipboards
Po Lu [Wed, 1 May 2024 03:45:53 +0000 (11:45 +0800)]
Fix compatibility issues with Android clipboards

* java/org/gnu/emacs/EmacsClipboard.java (getClipboardData):
Return an AssetFileDescriptor.

* java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick):
Typo corrections in commentary.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Raise
minimum version on which to read file descriptors from
ParcelFileDescriptor objects to Honeycomb.

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(getClipboardData): Return the asset file descriptor.

* java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardData):
Adjust return type to match.

* src/android.h (struct android_parcel_file_descriptor_class):
Move from androidselect.c.

* src/androidselect.c (fd_class): Export function.
(android_init_emacs_clipboard): Adjust signature of
getClipboardData.
(android_init_asset_file_descriptor, close_asset_fd)
(extract_fd_offsets): New functions.
(Fandroid_get_clipboard_data): Extract file descriptor and
offset from the AssetFileDescriptor here, rather than in
getClipboardData.
(init_androidselect): Call android_init_asset_file_descriptor.

* src/androidvfs.c (android_init_fd_class): Export and enable
calling this function more than once.

(cherry picked from commit 2451456695d0e03b89365cbbe64effb2f99af2d5)

11 months ago; Fix widget button press cancellation
Po Lu [Wed, 1 May 2024 00:56:23 +0000 (08:56 +0800)]
; Fix widget button press cancellation

* lisp/wid-edit.el (widget-button--check-and-call-button): Throw
nil if a mouse-button-derived press is canceled.  Reported by
David Ponce <da_vid@orange.fr>.

(cherry picked from commit 294335b2304028cc97aca036bd37adf2f8e1c508)

11 months agoFix first appearance records for some misdated functions
Mattias Engdegård [Tue, 30 Apr 2024 16:01:52 +0000 (18:01 +0200)]
Fix first appearance records for some misdated functions

* etc/NEWS.unknown: Add approximate version records for
defsubst, mark, nreverse, let*, rassq, >=,
transpose-sexps, buffer-modified-p, current-column, downcase,
previous-line, catch, throw, and count-lines,
which all were given much more recent introduction versions
by describe-function.

(cherry picked from commit b094b2b9dc31c4dc03450b5905472a8e6dd531aa)

11 months ago* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Simplify.
Mattias Engdegård [Tue, 30 Apr 2024 13:20:34 +0000 (15:20 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Simplify.

(cherry picked from commit c15d67ecfc8f586165674c289880618caf7f270e)

11 months ago* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Simplify.
Mattias Engdegård [Tue, 30 Apr 2024 12:51:07 +0000 (14:51 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Simplify.

Remove the add-lambda argument.  All callers adapted.

(cherry picked from commit c3c2e3b4d3e9eac09293fca23e93f644e00e9431)

11 months ago; Update description of 'mail-mode'
Eli Zaretskii [Tue, 30 Apr 2024 13:04:26 +0000 (16:04 +0300)]
; Update description of 'mail-mode'

* doc/emacs/sending.texi (Mail Methods): More accurate description
of mail-mode's deficiencies.

(cherry picked from commit e272fd3da9286d4b87e687b291bdf1fd5489af96)

11 months agoFix deletion of text holding `inhibit-read-only' properties
Po Lu [Tue, 30 Apr 2024 10:26:39 +0000 (18:26 +0800)]
Fix deletion of text holding `inhibit-read-only' properties

* src/intervals.h (INTERVAL_VISIBLE_P): Split into ...
(INTERVAL_GENERALLY_WRITABLE_P, INTERVAL_EXPRESSLY_WRITABLE_P):
... two new macros.

* src/textprop.c (verify_interval_modification): If the buffer
is read only, verify not that there is only a single exempting
interval spanning the area of a multiple-character operation,
but that every intervening interval in such an operation exempts
it from write restrictions, either by providing a read-only
property that appears in Vinhibit_read_only, or by providing an
inhibit-read-only property.

* test/src/textprop-tests.el (textprop-interval-immutability):
New test.

(cherry picked from commit b36fd07560fd12c5e819e808a6f0eb9579f77c25)

11 months agoWork around bad GCC diagnostic in select_window
Paul Eggert [Tue, 30 Apr 2024 08:20:13 +0000 (01:20 -0700)]
Work around bad GCC diagnostic in select_window

* src/textconv.c (select_window): Add an eassume to work
around GCC bug 114893.

(cherry picked from commit aad80e1934f09b643b93aeb3bf9c1d583af6e2ec)

11 months agoPacify GCC 14 -Wanalyzer-out-of-bounds in hbfont.c
Paul Eggert [Tue, 30 Apr 2024 08:20:13 +0000 (01:20 -0700)]
Pacify GCC 14 -Wanalyzer-out-of-bounds in hbfont.c

* src/hbfont.c (hbfont_shape): Add an eassume.

(cherry picked from commit c57a03c75e91a42c49a293a9466b087a1e1592da)

11 months agoPacify GCC 14 -Wstring-operflow in ftfont.c
Paul Eggert [Tue, 30 Apr 2024 08:20:13 +0000 (01:20 -0700)]
Pacify GCC 14 -Wstring-operflow in ftfont.c

* src/ftfont.c (ftfont_drive_otf): Do not crash if
spec->features[i] is nonnull but is empty.
Use gfeatures local to pacify GCC 14.

(cherry picked from commit 59a11116e013fb123ba074da9bca373c1aa03367)

11 months agoPacify GCC 14 -Wnull-dereference in intervals.c
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Pacify GCC 14 -Wnull-dereference in intervals.c

* src/intervals.c (set_intervals_multibyte_1):
Add an eassume to pacify GCC.  Deparenthesisze.

(cherry picked from commit 750dbccc12415fe525111cd11811d809fc830610)

11 months agoPacify GCC 14 -Wnull-dereference in tim_sort
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Pacify GCC 14 -Wnull-dereference in tim_sort

* src/lisp.h (tim_sort): Require array arg to be nonnull.
* src/sort.c (reverse_slice): Omit no-longer-needed eassert.
(tim_sort): Avoid undefined behavior when length == 0,
since reverse_slice would then compute &seq[-1].

(cherry picked from commit c2b2a38f70f6c4639903a014db5b835b37669ea7)

11 months agoPacify GCC 14 -Wclobbered in eval.c
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Pacify GCC 14 -Wclobbered in eval.c

* src/eval.c: Ignore -Wclobbered.

(cherry picked from commit 009a6ba71ea6741371e4799bdb475235a5b6da90)

11 months agoPacify GCC 14 -Wnull-dereference
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Pacify GCC 14 -Wnull-dereference

* src/xterm.c (x_dpyinfo): New function, which acts like
x_display_info_for_display except it always returns nonnull.
This simplifies callers and pacifies GCC 14.  All callers changed.

(cherry picked from commit 62c2afe84107de96b850c1da7a2b80bcab6e588a)

11 months agoPacify GCC 14 -Walloc-size
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Pacify GCC 14 -Walloc-size

* src/xfns.c (xic_string_conversion_callback): Allocate size 1, not 0.

(cherry picked from commit 98d0fc989a00dda19412ec5cd3ebe9fb4f276521)

11 months agoetags: work around GCC bug 114882
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
etags: work around GCC bug 114882

* lib-src/etags.c: Ignore -Wanalyzer-use-of-uninitialized-value.
This applies to the whole source file, not just to areas where GCC
has bugs, as it was too tricky to ignore more selectively.

(cherry picked from commit ca4f0705be544986f11971bd8ee7dc30a8d444f1)

11 months agoetags: fix #line parsing (\\", long lines)
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
etags: fix #line parsing (\\", long lines)

* lib-src/etags.c (readline): Don’t mishandle lines like
‘#line 1 "a//"’, which has an escaped backslash before ‘"’.
Don’t mishandle lines so long that sscanf overflows %n.

(cherry picked from commit 7e2309c6fc67b8149cc4c75f8d7f5f93e60b86c7)

11 months agoSimplify etags.c by omitting a macro
Paul Eggert [Tue, 30 Apr 2024 08:20:12 +0000 (01:20 -0700)]
Simplify etags.c by omitting a macro

* lib-src/etags.c (xnew): Remove.  All uses removed.
xnew was confusing, as sometimes it was used with n=1,
sometimes with Type=char, and it’s easier just to use xmalloc
or xnmalloc.

(cherry picked from commit de59c02c685189413c7c5a136224d10152dc8a61)

11 months ago* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix type declaration.
Andrea Corallo [Tue, 30 Apr 2024 07:19:31 +0000 (09:19 +0200)]
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix type declaration.

(cherry picked from commit 1087d55d2710f610edc5195175e2260aebaa4589)

11 months agoRename property 'declared-type' to 'function-type'
Andrea Corallo [Mon, 29 Apr 2024 18:31:05 +0000 (20:31 +0200)]
Rename property 'declared-type' to 'function-type'

* lisp/emacs-lisp/byte-run.el (byte-run--set-function-type): Rename.
(defun-declarations-alist): Update.
* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Likewise.

(cherry picked from commit 0757ea98654bef58d19a46ce2f7ce1a715ec65ca)

11 months ago* Document function type declarations
Andrea Corallo [Mon, 29 Apr 2024 16:08:57 +0000 (18:08 +0200)]
* Document function type declarations

* doc/lispref/functions.texi (Declare Form): Document function type
declaration.

(cherry picked from commit 15016288ecaefbfb2822c1fcef7146a5d8663650)

11 months agoMove lisp function arg type declarations to the functions itself
Andrea Corallo [Wed, 10 Apr 2024 20:07:16 +0000 (22:07 +0200)]
Move  lisp function arg type declarations to the functions itself

* lisp/emacs-lisp/comp-common.el (comp-primitive-type-specifiers):
Remove type declaration of lisp functions.
* lisp/window.el (get-lru-window, get-largest-window)
(one-window-p): Declare type.
* lisp/subr.el (ignore, error, zerop, fixnump, bignump, lsh)
(last, eventp, mouse-movement-p, log10, memory-limit)
(interactive-p): Likewise.
* lisp/simple.el (count-lines, mark, lax-plist-get): Likewise.
* lisp/files.el (parse-colon-path): Likewise.
* lisp/env.el (getenv): Likewise.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Likewise.
* lisp/emacs-lisp/lisp.el (buffer-end): Likewise.
* lisp/emacs-lisp/comp.el (comp-hint-fixnum, comp-hint-cons): Likewise.
* lisp/custom.el (custom-variable-p): Likewise.

(cherry picked from commit fa0bf96837ad267e5259e531e3d592dd40fdc445)

11 months agoMake use of Lisp function declarations
Andrea Corallo [Fri, 23 Feb 2024 14:56:47 +0000 (15:56 +0100)]
Make use of Lisp function declarations

* lisp/emacs-lisp/comp.el (comp-primitive-func-cstr-h): Rename.
(comp--get-function-cstr): Define new function.
(comp--add-call-cstr, comp--fwprop-call): Update.
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec): Update.
* lisp/help-fns.el (help-fns--signature): Mention when a type is
declared.
* lisp/emacs-lisp/comp.el (comp-primitive-func-cstr-h): Rename.

(cherry picked from commit d8c941df7d8167fdec8cad562c095e27203f7818)

11 months ago* Add function type declarations for Lisp functions
Andrea Corallo [Fri, 23 Feb 2024 09:17:27 +0000 (10:17 +0100)]
* Add function type declarations for Lisp functions

* lisp/emacs-lisp/byte-run.el (byte-run--set-declared-type): Add alias.
(defun-declarations-alist): Use it for 'type' declaration.

(cherry picked from commit 1c7b8099839f62ddfaa5a0f87c29bcd905095dee)

11 months ago(minibuffer-completing-file-name): Simplify, move to lisp
Eshel Yaron [Mon, 6 May 2024 02:41:48 +0000 (22:41 -0400)]
(minibuffer-completing-file-name): Simplify, move to lisp

11 months ago; Exclude a few more modes in 'global-completion-preview-mode'
Eshel Yaron [Wed, 1 May 2024 16:59:45 +0000 (18:59 +0200)]
; Exclude a few more modes in 'global-completion-preview-mode'

11 months agoDrop 'ebrowse', 'electric-command-history', and 'Helper'
Eshel Yaron [Wed, 1 May 2024 16:54:07 +0000 (18:54 +0200)]
Drop 'ebrowse', 'electric-command-history', and 'Helper'

12 months ago; etc/NEWS.unknown: Quote command invocation.
Michael Albinus [Tue, 30 Apr 2024 07:28:07 +0000 (09:28 +0200)]
; etc/NEWS.unknown: Quote command invocation.

(cherry picked from commit d24981d27ceae404a1dbdc9dc8b0c0e94e63ed1a)

12 months agoImprove treesitter tests on EMBA
Michael Albinus [Tue, 30 Apr 2024 07:25:53 +0000 (09:25 +0200)]
Improve treesitter tests on EMBA

* test/infra/Makefile.in (subdir_template):
* test/infra/gitlab-ci.yml (.tree-sitter-template): Check also
textmodes subdirectory for treesitter files.

* test/infra/test-jobs.yml: Regenerate.

(cherry picked from commit d844521abd586f7a42bf6f4f913d39e575f7a750)

12 months ago* test/README (EMACS_EXTRAOPT): Add environment variable.
Michael Albinus [Tue, 30 Apr 2024 07:25:07 +0000 (09:25 +0200)]
* test/README (EMACS_EXTRAOPT): Add environment variable.

(cherry picked from commit c4eecbf68410a7e7c301cc25291890d33a22be14)

12 months agoMinor adjustments to eww text field change handlers
Po Lu [Tue, 30 Apr 2024 05:21:59 +0000 (13:21 +0800)]
Minor adjustments to eww text field change handlers

* lisp/net/eww.el (eww-check-text-conversion): Fix doc string.
(eww-mode): Specify face, eww-form and field as nonsticky
properties by default.
(eww-tag-textarea, eww-form-text): Render properties
front-sticky.
(eww-process-text-input): Use field functions to compute field
bounds.

(cherry picked from commit 3555447b7e9b16ddf3b52091a23be1b91155854c)

12 months agoUse the nthcdr byte-op for drop, and raise open-code limit
Mattias Engdegård [Mon, 29 Apr 2024 18:24:07 +0000 (20:24 +0200)]
Use the nthcdr byte-op for drop, and raise open-code limit

* lisp/emacs-lisp/byte-opt.el (byte-optimize-nthcdr):
Open-code for any integral N<5.  Always use the byte-op otherwise.

(cherry picked from commit 3000edc6179dfe0b5f24ae2e472826530809dfd1)

12 months agoAdd (semi-redundant) fix to nnatom backend declaration
Eric Abrahamsen [Mon, 29 Apr 2024 20:13:38 +0000 (13:13 -0700)]
Add (semi-redundant) fix to nnatom backend declaration

* lisp/gnus/gnus.el (gnus-valid-select-methods): We need a value for
post/mail/none in order to conform to the option type.
* lisp/gnus/nnatom.el: This call to gnus-declare-backend does the exact
same thing as above, and needs to be adjusted accordingly.

(cherry picked from commit 97a2710554fbd10a0c866e890f507e391620e769)

12 months ago(disassemble-internal): Handle new function values
Stefan Monnier [Mon, 29 Apr 2024 17:47:15 +0000 (13:47 -0400)]
(disassemble-internal): Handle new function values

* lisp/emacs-lisp/disass.el (disassemble-internal): Fix the
`interpreted-function` case.

(cherry picked from commit ccb49acd2afb8cec9cec1afba16e16420b9f9261)

12 months agooclosure-tests.el: Adjust to new `interpreted-function` type
Stefan Monnier [Mon, 29 Apr 2024 17:34:23 +0000 (13:34 -0400)]
oclosure-tests.el: Adjust to new `interpreted-function` type

* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test-gen): Adjust to
new `interpreted-function` type.
(oclosure-test): Tweak accordingly.

(cherry picked from commit 7c835291dde79b39323a4a2623a14cc7564164cb)

12 months ago(byte-compile): Fix interaction with old `advice.el`
Stefan Monnier [Mon, 29 Apr 2024 17:14:31 +0000 (13:14 -0400)]
(byte-compile): Fix interaction with old `advice.el`

* lisp/emacs-lisp/bytecomp.el (byte-compile): Handle symbols whose
function "value" is a bare lambda expression (bug#70368).

(cherry picked from commit 7cf767ef54f2cf1d2873fe4dd07664b401d8044b)

12 months ago; Fix documentation of recent commits.
Eli Zaretskii [Mon, 29 Apr 2024 12:32:12 +0000 (15:32 +0300)]
; Fix documentation of recent commits.

* lisp/touch-screen.el (touch-screen-handle-point-up): Fix
comments.

* lisp/net/eww.el (eww-check-text-conversion, eww-select-file)
(eww-toggle-checkbox, eww-submit): Doc fixes.

* doc/emacs/input.texi (On-Screen Keyboards): Fix punctuation and
wording.

(cherry picked from commit f6ae5939b950bdec86471b02e81d1b3827546a2d)

12 months agoDeclare the variable `rx-constituents` obsolete.
Mattias Engdegård [Mon, 29 Apr 2024 10:35:55 +0000 (12:35 +0200)]
Declare the variable `rx-constituents` obsolete.

It has been effectively obsolete since Emacs 27, when the modern
extension mechanism was introduced.

* lisp/emacs-lisp/rx.el (rx-constituents): Make obsolete.
* test/lisp/emacs-lisp/rx-tests.el (rx-constituents): Suppress warning.
* etc/NEWS: Announce.

(cherry picked from commit 3be382311fa03b9ec9c571b5e5737ff2d51bc2d3)

12 months ago; * doc/lispref/objects.texi (Type Predicates): fix xrefs
Mattias Engdegård [Mon, 29 Apr 2024 09:44:48 +0000 (11:44 +0200)]
; * doc/lispref/objects.texi (Type Predicates): fix xrefs

(cherry picked from commit f906ce5543818f2cba08dd2c7b94e4ba566ce64c)

12 months agoAdd NEWS.unknown file to correct versions of introduction
Mattias Engdegård [Sun, 28 Apr 2024 17:42:44 +0000 (19:42 +0200)]
Add NEWS.unknown file to correct versions of introduction

It is not intended for the human reader, but to give less wrong versions
of first appearance displayed by `describe-function` or
`describe-variable` that would otherwise be derived from a notice in a
more recent NEWS* file.

It is better to add items to this file than changing historical NEWS*
files when the actual version of introduction is not known.

* etc/NEWS.unknown: New file.  Add entry for `nthcdr`.

(cherry picked from commit 495bf22727a0e980c4677ad4acd229e125d69d03)

12 months agoAdd `drop` as alias for `nthcdr`
Mattias Engdegård [Sun, 28 Apr 2024 16:38:44 +0000 (18:38 +0200)]
Add `drop` as alias for `nthcdr`

It's a common name for this function and symmetric with respect to
`take`.  It's also a lot less awkward to type and say.

* lisp/subr.el (drop): New alias.
* doc/lispref/lists.texi (List Elements): Document.  Mention the
equation tying `take` and `drop` together.
* etc/NEWS: Announce.

(cherry picked from commit 8718a7c7062eb562e2fda0dee5f7bfddb0861f1d)

12 months agoFix value< string comparison ungoodthink
Mattias Engdegård [Sun, 28 Apr 2024 21:17:48 +0000 (23:17 +0200)]
Fix value< string comparison ungoodthink

* src/fns.c (string_cmp): Fix bad comparisons for certain strings.
This only affected `value<` for aggregates, not `string<`.
* test/src/fns-tests.el (fns-value<-ordered): Add test cases.

(cherry picked from commit 9b1e44c7fb5281688488ec077c048e268b716ad2)

12 months agoFix errors in 'shr-correct-dom-case'
Visuwesh [Sun, 28 Apr 2024 11:15:40 +0000 (16:45 +0530)]
Fix errors in 'shr-correct-dom-case'

* lisp/net/shr.el (shr-correct-dom-case): Don't assume each CHILD is
a cons cell.  (Bug#70626)

(cherry picked from commit 05215177a61437e864ef771afc99b130866fbcb5)

12 months agoAdapt eww to touch screens, mice and text conversion
Po Lu [Mon, 29 Apr 2024 12:01:59 +0000 (20:01 +0800)]
Adapt eww to touch screens, mice and text conversion

* doc/emacs/input.texi (On-Screen Keyboards): Update conditions
for displaying the virtual keyboard when t-s-d-k is enabled.

* etc/NEWS (Announce): Document changes.

* lisp/net/eww.el (eww-check-text-conversion): New function.
(eww-mode): Install it as a local post-command-hook.
(eww-submit-map, eww-submit-file, eww-checkbox-map): Bind
suitable commands to mouse-2.
(eww-form-submit, eww-form-checkbox, eww-form-file)
(eww-tag-select): Disguise inserted forms as buttons, that touch
event translation may prefer their bindings to mouse-2 over
mouse-1.
(eww-form-text, eww-tag-textarea): Insert field properties as
well.
(eww-select-file, eww-toggle-checkbox, eww-submit): New argument
EVENT, to whose position point is set.

* lisp/touch-screen.el (touch-screen-handle-point-up): Trivial
adjustments to the criteria for selecting mouse commands and
displaying the on screen keyboard.

(cherry picked from commit 4c46066cb6b3a9c87fb29be8cbdd4d90312f7020)

12 months agoTake fields into account during text conversion
Po Lu [Sun, 21 Apr 2024 13:51:09 +0000 (21:51 +0800)]
Take fields into account during text conversion

* lisp/cus-edit.el (Custom-mode): Enable text conversion, now
that fields are correctly treated.

* src/alloc.c (mark_frame): Mark f->conversion.field.

* src/androidterm.c (android_update_selection): Adjust
conversion region and selection position by the field start and
end.

* src/editfns.c (find_field): Export function.

* src/frame.c (make_frame): Clear f->conversion.field.

* src/frame.h (struct text_conversion_state) <field>: New field.

* src/lisp.h (find_fields, reset_frame_conversion): Export
functions.

* src/minibuf.c (Fread_from_minibuffer): Reset frame conversion
if Voverriding_text_conversion_style is set.

* src/textconv.c (textconv_query): Narrow to field.
(reset_frame_conversion): New function.
(reset_frame_state): Clear conversion field.
(really_delete_surrounding_text): Narrow to field.
(locate_and_save_position_in_field): New function.
(really_request_point_update, really_set_point_and_mark)
(complete_edit_check, handle_pending_conversion_events_1)
(handle_pending_conversion_events, get_conversion_field)
(set_composing_region, textconv_set_point_and_mark, replace_text)
(get_extracted_text, get_surrounding_text, report_point_change):
Compute, narrow to and offset by the currently active field
whenever point is updated or a command is received.
(syms_of_textconv): Revise doc strings.

* src/textconv.h (get_conversion_field): Export function.

(cherry picked from commit 430088c9ccec5fe9be57d267f45acdc87aa3b28e)

12 months ago; Delete obsolete commentary
Po Lu [Mon, 29 Apr 2024 01:21:02 +0000 (09:21 +0800)]
; Delete obsolete commentary

* java/org/gnu/emacs/EmacsDrawLine.java (perform): Delete
obsolete commentary.

(cherry picked from commit ee2e0031d8cc32bb7837ea97ce07ef3b25463223)

12 months agoFix NEWS entries and documentation for underline styles
Po Lu [Mon, 29 Apr 2024 00:49:28 +0000 (08:49 +0800)]
Fix NEWS entries and documentation for underline styles

* doc/lispref/display.texi (Face Attributes):

* etc/NEWS: Revise to not mislead users as to where these
attributes are available.

(cherry picked from commit 8cd9ca22362f8646e7717d2a18bcdb86780f423a)

12 months agoUse a dedicated type to represent interpreted-function values
Stefan Monnier [Mon, 11 Mar 2024 20:12:26 +0000 (16:12 -0400)]
Use a dedicated type to represent interpreted-function values

Change `function` so that when evaluating #'(lambda ...)
we return an object of type `interpreted-function` rather than
a list starting with one of `lambda` or `closure`.
The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED)
tag and tries to align the corresponding elements:

- the arglist, the docstring, and the interactive-form go in the
  same slots as for byte-code functions.
- the body of the function goes in the slot used for the bytecode string.
- the lexical context goes in the slot used for the constants of
  bytecoded functions.

The first point above means that `help-function-arglist`,
`documentation`, and `interactive-form`s don't need to
distinguish interpreted and bytecode functions any more.

Main benefits of the change:

- We can now reliably distinguish a list from a function value.
- `cl-defmethod` can dispatch on `interactive-function` and `closure`.
  Dispatch on `function` also works now for interpreted functions but still
  won't work for functions represented as lists or as symbols, of course.
- Function values are now self-evaluating.  That was alrready the case
  when byte-compiled, but not when interpreted since
  (eval '(closure ...)) signals a void-function error.
  That also avoids false-positive warnings about "don't quote your lambdas"
  when doing things like `(mapcar ',func ...)`.

* src/eval.c (Fmake_interpreted_closure): New function.
(Ffunction): Use it and change calling convention of
`Vinternal_make_interpreted_closure_function`.
(FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda)
(Ffunc_arity, lambda_arity): Simplify.
(funcall_lambda): Adjust to new representation.
(syms_of_eval): `defsubr` the new function.  Remove definition of `Qclosure`.

* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
Change calling convention and use `make-interpreted-closure`.

* src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from
`interpreted-function`s.
(Fclosurep, finterpreted_function_p): New functions.
(Fbyte_code_function_p): Don't be confused by `interpreted-function`s.
(Finteractive_form, Fcommand_modes): Simplify.
(syms_of_data): Define new type symbols and `defsubr` the two
new functions.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>:
New method.

* lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent
to be `closure`.
(oclosure--fix-type, oclosure-type): Simplify.
(oclosure--copy, oclosure--get, oclosure--set): Adjust to
new representation.

* src/callint.c (Fcall_interactively): Adjust to new representation.

* src/lread.c (bytecode_from_rev_list):

* lisp/simple.el (function-documentation):
* lisp/help.el (help-function-arglist): Remove the old `closure` case
and adjust the byte-code case so it handles `interpreted-function`s.

* lisp/emacs-lisp/cl-preloaded.el (closure): New type.
(byte-code-function): Add it as a parent.
(interpreted-function): Adjust parent (the type itself was already
added earlier by accident).

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to
new representation.
(byte-compile): Use `interpreted-function-p`.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to
new representation.
(side-effect-free-fns): Add `interpreted-function-p` and `closurep`.

* src/profiler.c (trace_hash, ffunction_equal): Simplify.
* lisp/profiler.el (profiler-function-equal): Simplify.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1):
Use `interpreted-function-p`; adjust to new representation; and take
advantage of the fact that function values are now self-evaluating.

* lisp/emacs-lisp/lisp-mode.el (closure):
Remove `lisp-indent-function` property.

* lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to
new representation.
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
Use `interpreted-function-p`.
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
Add `closurep` and `interpreted-function-p`.

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to
more precise type info in `describe-function`.
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries):
Use `interpreted-function-p`.
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5):
Don't hardcode function values.

* doc/lispref/functions.texi (Anonymous Functions): Don't suggest that
function values are lists.  Reword "self-quoting" to reflect the
fact that #' doesn't return the exact same object.  Update examples
with the new shape of the return value.

* doc/lispref/variables.texi (Lexical Binding):
* doc/lispref/lists.texi (Rearrangement):
* doc/lispref/control.texi (Handling Errors): Update examples to reflect
new representation of function values.

(cherry picked from commit f2bccae22bd47a2e7e0937b78ea06131711b935a)

12 months ago(COMPILED): Rename to CLOSURE
Stefan Monnier [Sun, 24 Mar 2024 22:32:25 +0000 (18:32 -0400)]
(COMPILED): Rename to CLOSURE

In preparation for the use of `PVEC_COMPILED` objects for
interpreted functions, rename them to use a more neutral name.

* src/lisp.h (enum pvec_type): Rename `PVEC_COMPILED` to `PVEC_CLOSURE`.
(enum Lisp_Compiled): Use `CLOSURE_` prefix i.s.o `COMPILED_`.
Also use `CODE` rather than `BYTECODE`.
(CLOSUREP): Rename from `COMPILEDP`.
(enum Lisp_Closure): Rename from `Lisp_Compiled`.

* src/alloc.c, src/bytecode.c, src/comp.c, src/data.c, src/eval.c,
* src/fns.c, src/lisp.h, src/lread.c, src/pdumper.c, src/print.c,
* src/profiler.c: Rename all uses accordingly.
* src/.gdbinit (xclosure): Rename from `xcompiled`.
(xcompiled): New obsolete alias.
(xpr): Adjust accordingly.  Also adjust to new PVEC_CLOSURE tag name.

(cherry picked from commit 2fa839c1886acd4a7b6c25c50877534fe1d669bb)

12 months agoMake completion preview cleanup more robust
Eshel Yaron [Mon, 29 Apr 2024 19:45:25 +0000 (21:45 +0200)]
Make completion preview cleanup more robust

12 months ago* src/comp.c (comp_hash_string): Count bytes, not chars.
Mattias Engdegård [Sun, 28 Apr 2024 13:24:46 +0000 (15:24 +0200)]
* src/comp.c (comp_hash_string): Count bytes, not chars.

(cherry picked from commit 1e931f1c3db1588ba402d0eab60f03cc036f814a)

12 months agoImplement dots and dashes on PGTK
Po Lu [Sun, 28 Apr 2024 13:30:52 +0000 (21:30 +0800)]
Implement dots and dashes on PGTK

* src/image.c (image_create_bitmap_from_file) [HAVE_PGTK]:
Remove unused variable.

* src/pgtkterm.c (pgtk_draw_dash, pgtk_fill_underline)
(pgtk_draw_glyph_string): New functions, ported from X.

(cherry picked from commit 7341e600b7bc554df44784b6aa135bed8fcb61f1)

12 months agoImplement dots and dashes on Haiku
Po Lu [Sun, 28 Apr 2024 12:57:33 +0000 (12:57 +0000)]
Implement dots and dashes on Haiku

* src/doc.c (store_function_docstring): Re-enable loading doc
strings of compiled functions from etc/DOC, which haiku-win,
ns-win, and the like require.

* src/haikuterm.c (haiku_draw_dash, haiku_fill_underline)
(haiku_draw_text_decoration): Port underline code from X.

(cherry picked from commit 9d9881aceaefef56687baeb75eef94be1c7b22af)

12 months agoFix the Haiku build
Po Lu [Sun, 28 Apr 2024 11:52:27 +0000 (11:52 +0000)]
Fix the Haiku build

* src/haikuterm.c (haiku_draw_text_decoration): Remove stray
closing parenthesis.

(cherry picked from commit 94a9e41a9d333f946b74b175a8a7133595498805)

12 months agoImplement dots and dashes on Android
Po Lu [Sun, 28 Apr 2024 08:58:58 +0000 (16:58 +0800)]
Implement dots and dashes on Android

* java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine)
(measureLine, polyDashPattern): New function.
(perform): Delegate to polyDashPattern if the line style is not
LineSolid.  Also simplify now that anti-aliasing need no longer
be taken into account.

* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Mention
omission in commentary.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC): Disable
anti-aliasing in default paint object.
<line_style, line>: New fields.
(markDirty): Apply stroke width.

* src/android.c (android_init_emacs_gc_class): Initialize new
fields.
(android_create_gc, android_free_gc, android_change_gc)
(android_set_dashes, android_get_gc_values):

* src/androidgui.h (enum android_line_style)
(enum android_gc_value_mask, struct android_gc): Introduce line
style, width, dash offset and dash GC attributes.

* src/androidterm.c (android_draw_dash, android_fill_underline)
(android_draw_glyph_string): Port from X.

* src/xterm.c (x_draw_dash): Delete redundant code.

(cherry picked from commit e658a6938e3b7a8a7c0be8b74fbd885787c26df6)

12 months agoFix the MS-Windows build broken by a recent commit
Eli Zaretskii [Sun, 28 Apr 2024 08:52:09 +0000 (11:52 +0300)]
Fix the MS-Windows build broken by a recent commit

* src/w32term.c (w32_draw_glyph_string): Move 'foreground'
declaration to where it belongs.

(cherry picked from commit b329358334712671de38f919c99d1434026aa8f2)

12 months agoFix Android build
Po Lu [Sun, 28 Apr 2024 04:03:07 +0000 (12:03 +0800)]
Fix Android build

* src/androidterm.c (android_draw_glyph_string): Omit extraneous
argument to android_fill_rectangle.

(cherry picked from commit ae9c76e588e5f64bfe1517a910d2cd6f54e9975a)

12 months agoImplement dots and dashes on X
Po Lu [Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)]
Implement dots and dashes on X

* src/dispextern.h (enum face_underline_type): Indent and expand
commentary as to the new dependency on the order of its
enumerals.

* src/xfaces.c (realize_gui_face): Enable dots and dashes on
window systems.

* src/xterm.c (x_draw_underwave): Don't define unused variable
on Cairo builds.
(x_draw_dash): New function; implement for X and Cairo.
(x_fill_underline): New function.  Delegate to x_fill_rectangle
or x_draw_dash as appropriate.
(x_draw_glyph_string): Call x_fill_underline rather than
x_fill_rectangle.

(cherry picked from commit e844b81c56d74aa2b2efa0ce98ed3de71647e656)

12 months agoPort double-line underlines to GUI systems
Po Lu [Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)]
Port double-line underlines to GUI systems

* src/xterm.c (x_get_scale_factor): Replace display in first
argument with a pointer to dpyinfo.
(x_draw_underwave): Adjust to match.
(x_draw_glyph_string): Implement double-line underlines.

* src/androidterm.c (android_get_scale_factor)
(android_draw_glyph_string):

* src/haikuterm.c (haiku_draw_text_decoration):

* src/nsterm.m (ns_draw_text_decoration):

* src/pgtkterm.c (pgtk_draw_glyph_string):

* src/w32term.c (w32_draw_glyph_string): Synchronize with X.

* src/xfaces.c (realize_gui_face): Enable `double-line' on
window systems.

(cherry picked from commit 77a170a175dfeb17dab23e41668b8497b8b3b9d7)

12 months ago; * src/term.c (turn_on_face): Fix coding style.
Po Lu [Sun, 28 Apr 2024 01:27:59 +0000 (09:27 +0800)]
; * src/term.c (turn_on_face): Fix coding style.

(cherry picked from commit 4992df159157806bcbad87569f34dc5136c96601)

12 months agoFix last change
Eli Zaretskii [Sat, 27 Apr 2024 19:12:14 +0000 (22:12 +0300)]
Fix last change

* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): If need to skip the tree-sitter
test, do so silently.  (Bug#70345)

(cherry picked from commit cf839129ce097c2116292cb69217be265f6b35e8)

12 months ago; Skip 'csharp-ts-mode' test if grammar is missing
john muhl [Sat, 27 Apr 2024 14:55:42 +0000 (09:55 -0500)]
; Skip 'csharp-ts-mode' test if grammar is missing

* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): Skip test instead of
failing.  (Bug#70345)

(cherry picked from commit 3e68d413c1c177e03ff60ba0faf09fc4b8af8e2e)

12 months ago; Skip commit f5439a929106d1482b185dce5369d4748658946f
Eshel Yaron [Mon, 29 Apr 2024 15:05:15 +0000 (17:05 +0200)]
; Skip commit f5439a929106d1482b185dce5369d4748658946f

12 months agoFix ommissions in window scrolling commands that ought to clear vscroll
Po Lu [Sat, 27 Apr 2024 11:48:45 +0000 (19:48 +0800)]
Fix ommissions in window scrolling commands that ought to clear vscroll

* src/window.c (Fdelete_other_windows_internal)
(window_scroll_for_long_lines, Frecenter, Fmove_to_window_line):
Reset window vscroll, or, if force_start be set, just
preserve_vscroll_p, after moving window start to a position
computed from iterators for the window in question, so that
vscroll may be reliably reset again after the conditions for
redisplay's doing the same were corrected.  (bug#70386)

(cherry picked from commit 01e0b783bcd1b48ec856c8960e9da571a289a1b2)

12 months agoFix a typo in Introduction to Emacs Lisp (bug#70571).
Brad Howes [Thu, 25 Apr 2024 16:39:02 +0000 (18:39 +0200)]
Fix a typo in Introduction to Emacs Lisp (bug#70571).

Copyright-paperwork-exempt: yes
(cherry picked from commit f37f01b5046b510656d0f2ace22168a222f6481a)

12 months agoFix `find-grep-dired' with default OpenBSD's Grep
Manuel Giraud [Wed, 24 Apr 2024 14:10:43 +0000 (16:10 +0200)]
Fix `find-grep-dired' with default OpenBSD's Grep

* lisp/find-dired.el (find-grep-options): Use '-q' on
OpenBSD as well.  (Bug#70550)

(cherry picked from commit b761a381066ca2fdeb510c0d5a88be58b524685d)

12 months ago; * test/lisp/jsonrpc-tests.el: Skip all tests on MS-Windows.
Eli Zaretskii [Sat, 27 Apr 2024 09:28:42 +0000 (12:28 +0300)]
; * test/lisp/jsonrpc-tests.el: Skip all tests on MS-Windows.

(cherry picked from commit 4e8e877c377e41d72705235922f97b69d81d0267)

12 months ago; * lisp/jsonrpc.el (jsonrpc-shutdown): Doc fix.
Eli Zaretskii [Sat, 27 Apr 2024 09:19:28 +0000 (12:19 +0300)]
; * lisp/jsonrpc.el (jsonrpc-shutdown): Doc fix.

(cherry picked from commit 990d615cabbeae62366e35bc74fdb27767bb8848)

12 months agoShut down jsonrpc server more gracefully
Daniel Pettersson [Tue, 23 Apr 2024 16:58:06 +0000 (18:58 +0200)]
Shut down jsonrpc server more gracefully

* lisp/jsonrpc.el (jsonrpc-running-p): Avoid unnecessarily killing
the server process.  Suggested by Aaron Zeng <azeng@janestreet.com>.
(Bug#70522)

(cherry picked from commit 3aed4400257a6762de96be37fa95357b5836363c)

12 months agoFollowup changes for styled underline support
Eli Zaretskii [Sat, 27 Apr 2024 09:07:53 +0000 (12:07 +0300)]
Followup changes for styled underline support

* src/nsterm.m (ns_draw_text_decoration):
* src/pgtkterm.c (pgtk_draw_glyph_string):
* src/haikuterm.c (haiku_draw_text_decoration):
* src/androidterm.c (android_draw_glyph_string):
* src/w32term.c (w32_draw_glyph_string): Use new FACE_UNDER*
constants.  (Bug#62994)

(cherry picked from commit 4e17e0b84ae1a52a6032c83592bf958a1e26dea5)

12 months agoAdd support for colored and styled underlines on tty frames
Mohsin Kaleem [Thu, 20 Apr 2023 21:30:12 +0000 (22:30 +0100)]
Add support for colored and styled underlines on tty frames

* src/dispextern.h (face, face_underline_type, syms_of_xfacse)
(internal-set-lisp-face-attribute)
(gui_supports_face_attributes_p): Add definitions for new
underline styles of Double-line, Dots and Dashes.  Rename
FACE_UNDER_LINE and FACE_UNDER_WAVE to make definitions
consistent.  Delete tty_underline_p from the face struct and use
just underline going forward.  Add a flag to check whether styled
underlines are available.
* lisp/cus-face.el (custom-face-attributes): Add entries for
Double-line, Dots and Dashes so they can be set through
`customize'.
* src/termchar.c (tty_display_info): Add an entry for the escape
sequence to set the underline style and color on terminal frames.
* src/term.c (init_tty, tty_capable_p, turn_on_face): Read and
save the underline style escape sequence from the Smulx termcap
(alternatively if the Su flag is set use a default sequence).
Allow checking for support of styled underlines in the current
terminal frame.  Output the necessary escape sequences to activate
a styled underline on turn_on_face; this is currently only used
for the new special underline styles, a default straight underline
will still use the "us" termcap.  Output escape sequence to set
underline color when set in the face and supported by the tty.
Save a default value for this sequence on init_tty when styled
underlines are supported.
* src/xfaces.c (tty_supports_face_attributes_p, realize_tty_face)
(map_tty_color): Assert whether styled underlines are supported by
the current terminal on display-supports-face-attributes-p checks.
Populate the correct underline style and color in the face spec
when realizing a face.  Allow map_tty_color to map underline
colors alongside foreground and background.  The interface of
map_tty_color was amended to allow the caller to supply the
underline color instead of accessing it through the face
attributes.  (bug#62994)
* src/xterm.c (x_draw_glyph_string): Updated to use renamed
FACE_UNDERLINE_SINGLE and FACE_UNDERLINE_WAVE face_underline_type
enumerations.

(cherry picked from commit 9f589eb924085a4612f46728e8850073128a2e43)

12 months agoImprove documentation of 'package-enable-at-startup'
Eli Zaretskii [Sat, 27 Apr 2024 08:52:30 +0000 (11:52 +0300)]
Improve documentation of 'package-enable-at-startup'

* doc/emacs/package.texi (Package Installation): Clarify how to
customize 'package-enable-at-startup'.

* lisp/emacs-lisp/package.el (package-enable-at-startup): Add note
about customization.  (Bug#70402)

(cherry picked from commit a7d51085cf0a6e6d01fa265001d7d6a4bd728ed2)