]> git.eshelyaron.com Git - emacs.git/log
emacs.git
16 months agoFix debug spec of cl-flet (bug#65344)
Gerd Möllmann [Mon, 21 Aug 2023 07:16:17 +0000 (09:16 +0200)]
Fix debug spec of cl-flet (bug#65344)

* lisp/emacs-lisp/cl-macs.el (cl-flet): Fix debug spec.
(cl-defun): Allow only symbols as function names in debug spec.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-flet/edebug): New test
case.

16 months ago; * doc/lispref/os.texi (Desktop Notifications): Fix typo.
Po Lu [Mon, 21 Aug 2023 06:49:02 +0000 (14:49 +0800)]
; * doc/lispref/os.texi (Desktop Notifications): Fix typo.

16 months agoMake the Emacs icon ``adaptive''
Po Lu [Mon, 21 Aug 2023 06:35:45 +0000 (14:35 +0800)]
Make the Emacs icon ``adaptive''

* java/AndroidManifest.xml.in (EmacsApplication): Set icon to
@mipmap/emacs_icon.

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Pick a
better name for the persistent notification channel.

* java/res/drawable/emacs_background.xml:

* java/res/drawable/emacs_foreground.xml:

* java/res/mipmap/emacs_icon.png:

* java/res/mipmap-v26/emacs_icon.xml: New files, comprising an
``adaptive icon'' required by some Android launchers.

16 months agoEnable providing icons for Android desktop notifications
Po Lu [Mon, 21 Aug 2023 01:36:52 +0000 (09:36 +0800)]
Enable providing icons for Android desktop notifications

* doc/lispref/os.texi (Desktop Notifications)
<android-notifications-notify>: Mention the :icon parameter.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification) <icon>: New field.
(<init>): New argument ICON.  Set this.icon to its value.
(display1): Use provided icon and always supply a pending intent
to open Emacs once the notification is clicked.

* java/res/layout/sdk8_notifications_view.xml
(sdk8_notifications_title, sdk8_notifications_content): Set
foreground color to #000000.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update signature of <init>.
(android_locate_icon): New function.
(android_notifications_notify_1): New arg ICON.
(Fandroid_notifications_notify): New parameter icon.
(syms_of_androidselect): <QCicon>: New symbol.

16 months ago* Introduce `help-display-function-type' customizable var (bug#65288).
Andrea Corallo [Sun, 20 Aug 2023 20:34:43 +0000 (22:34 +0200)]
* Introduce `help-display-function-type' customizable var (bug#65288).

* lisp/help-fns.el (help-display-function-type): New
customizable var.
(help-fns--signature): Make use of.

16 months ago* lisp/isearch.el (isearch-resume): Add isearch-push-state (bug#65379).
Jens Schmidt [Sun, 20 Aug 2023 17:36:49 +0000 (20:36 +0300)]
* lisp/isearch.el (isearch-resume): Add isearch-push-state (bug#65379).

16 months agoDelete some Emacs 19/21 compat code
Stefan Kangas [Sun, 20 Aug 2023 12:29:27 +0000 (14:29 +0200)]
Delete some Emacs 19/21 compat code

* lisp/erc/erc-goodies.el (erc-occur):
* lisp/net/newst-plainview.el (newsticker--buffer-redraw): Delete
Emacs 21 compat code.
* lisp/progmodes/sql.el (sql-accumulate-and-indent): Delete Emacs
19 compat code.

16 months ago* lisp/term.el (term--update-term-menu): Simplify.
Stefan Kangas [Sat, 19 Aug 2023 11:23:24 +0000 (13:23 +0200)]
* lisp/term.el (term--update-term-menu): Simplify.

16 months agoRepair desktop notification display on Android 2.3 and 2.2
Po Lu [Sun, 20 Aug 2023 13:40:08 +0000 (21:40 +0800)]
Repair desktop notification display on Android 2.3 and 2.2

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Create a pending intent and set it as the contentIntent when
building a notification by hand.

16 months ago; * ChangeLog.android: Complete cleanup.
Po Lu [Sun, 20 Aug 2023 12:53:13 +0000 (20:53 +0800)]
; * ChangeLog.android: Complete cleanup.

16 months agoSupport desktop notifications on Android
Po Lu [Sun, 20 Aug 2023 12:23:56 +0000 (20:23 +0800)]
Support desktop notifications on Android

* doc/emacs/android.texi (Android Environment): Correct list of
permissions granted by default.

* doc/lispref/os.texi (Desktop Notifications): Document the new
function `android-notifications-notify' and its limitations.

* java/AndroidManifest.xml.in: Request notification permissions.

* java/org/gnu/emacs/EmacsDesktopNotification.java: New file.

* java/res/layout/sdk8_notifications_view.xml: New file holding
substitute notification widget definitions for Android versions
prior to 3.0.

* java/res/values/strings.xml: Remove inadvertently introduced
tag attribute.

* lisp/org/org-clock.el (haiku-notifications-notify): Correct
file name in function declaration.
(android-notifications-notify): New declaration.
(org-show-notification): Use `android-notifications-notify'.

* src/androidselect.c (android_init_emacs_desktop_notification)
(android_notifications_notify_1, Fandroid_notifications_notify):
New functions.
(init_androidselect, syms_of_androidselect): Initialize new
class and define new subr.

16 months ago; Fix documentation of last change
Eli Zaretskii [Sun, 20 Aug 2023 08:48:03 +0000 (11:48 +0300)]
; Fix documentation of last change

* lisp/net/eww.el (eww--open-url-in-new-buffer)
(eww-open-in-new-buffer):
* etc/NEWS:
* doc/misc/eww.texi (Basics): Improve the documentation of this
new feature.  (Bug#65346)

16 months agoAllow fetching URL at point without switching to it
Lin Sun [Wed, 16 Aug 2023 01:00:07 +0000 (01:00 +0000)]
Allow fetching URL at point without switching to it

* lisp/net/eww.el (eww-open-in-new-buffer):  Stay on current
buffer when invoked with prefix argument.  (Bug#65346)

16 months ago; Fix last change
Michael Albinus [Sun, 20 Aug 2023 07:47:00 +0000 (09:47 +0200)]
; Fix last change

16 months agoNew user option pcomplete-remote-file-ignore
Michael Albinus [Sun, 20 Aug 2023 07:41:07 +0000 (09:41 +0200)]
New user option pcomplete-remote-file-ignore

* etc/NEWS: Mention pcomplete-remote-file-ignore.

* lisp/pcomplete.el (pcomplete-remote-file-ignore):
New user option.
(pcomplete--entries): Use it.

* lisp/shell.el (shell-completion-vars):
Set 'pcomplete-remote-file-ignore'.

16 months agoFix libselinux object leaks
Po Lu [Sun, 20 Aug 2023 04:46:33 +0000 (12:46 +0800)]
Fix libselinux object leaks

* src/fileio.c (Fcopy_file, Fset_file_selinux_context): Call
freecon prior to signaling file errors.

16 months agoUpdate Android port
Po Lu [Sun, 20 Aug 2023 04:44:38 +0000 (12:44 +0800)]
Update Android port

* src/sfnt.c (sfnt_decompose_compound_glyph): New argument
GET_METRICS.  Call this function to retrieve glyph metrics used
to compute phantom points when a component glyph's anchor point
is one.
(sfnt_decompose_glyph, sfnt_build_glyph_outline): Plumb
GET_METRICS these two functions.
(sfnt_interpret_shc): Don't shift the provided reference point.
(sfnt_transform_f26dot6): Eschew looping through X and Y if no
offsets are provided.
(sfnt_interpret_compound_glyph_2): Discontinue initializing
phantom points here.
(sfnt_interpret_compound_glyph_1): Do not incorporate phantom
points into the ultimately produced glyph outline.  Correctly
provide for phantom childanchor points.
(sfnt_test_get_metrics, main): Update tests.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (struct sfntfont_get_glyph_outline_dcontext):
New fields `hmtx', `hhea' and `maxp'.
(sfntfont_get_metrics): New function.
(sfntfont_get_glyph_outline): Provide new tables and the new
callback function.

16 months agoSkip hanging tests on Cygwin (bug#65325)
Ken Brown [Sat, 19 Aug 2023 18:18:57 +0000 (14:18 -0400)]
Skip hanging tests on Cygwin (bug#65325)

* test/lisp/server-tests.el (server-tests/can-create-frames-p):
Define to be nil on Cygwin unless Emacs has at least one of the
features gfilenotify, dbus, or threads.  This causes three tests
to be skipped.

* test/src/keyboard-tests.el (keyboard-unread-command-events):
Skip on Cygwin unless Emacs has at least one of the features
gfilenotify, dbus, or threads.

16 months agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 19 Aug 2023 17:32:29 +0000 (19:32 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

16 months agoExtend T
Michael Albinus [Sat, 19 Aug 2023 17:32:09 +0000 (19:32 +0200)]
Extend T

* lisp/net/tramp.el (tramp-completion-file-name-handler-alist):
Add `file-directory-p'.
(tramp-completion-handle-file-directory-p): New defun.

16 months agoAdd "lexical" LSP server for Elixir to Eglot
dalu [Thu, 17 Aug 2023 10:34:42 +0000 (18:34 +0800)]
Add "lexical" LSP server for Elixir to Eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add lexical.
It does not support MS-Windows currently.  (Bug#65359)

Copyright-paperwork-exempt: yes

16 months ago; * src/androidterm.c (android_text_to_string): Fix commentary.
Eli Zaretskii [Sat, 19 Aug 2023 11:29:25 +0000 (14:29 +0300)]
; * src/androidterm.c (android_text_to_string): Fix commentary.

16 months agoSimplify dictionary-close even more
Stefan Kangas [Sat, 19 Aug 2023 11:03:46 +0000 (13:03 +0200)]
Simplify dictionary-close even more

* lisp/net/dictionary.el (dictionary-close): Simplify.
Suggested by Philip Kaludercic <philipk@posteo.net>.

16 months agoRemove Emacs 24 compat code from reftex
Stefan Kangas [Sat, 19 Aug 2023 10:25:25 +0000 (12:25 +0200)]
Remove Emacs 24 compat code from reftex

* lisp/textmodes/reftex-index.el (reftex-display-index):
* lisp/textmodes/reftex-toc.el (reftex-toc): Assume that we have
'cursor-intangible-mode', which was added in Emacs 25.

16 months ago; Cleanup comments and doc strings in textconv.c
Eli Zaretskii [Sat, 19 Aug 2023 10:32:48 +0000 (13:32 +0300)]
; Cleanup comments and doc strings in textconv.c

* src/textconv.c (copy_buffer_text): Rename from 'copy_buffer'.
All callers changed.
(textconv_query, complete_edit_check, commit_text)
(finish_composing_text, set_composing_region)
(textconv_set_point_and_mark, delete_surrounding_text)
(request_point_update, textconv_barrier, get_extracted_text)
(get_surrounding_text, report_point_change)
(report_selected_window_change): Fix commentary.
(Fset_text_conversion_style, text-conversion-edits)
(overriding-text-conversion-style, text-conversion-face): Doc fix.

16 months agoRemove XEmacs compat code from reftex
Stefan Kangas [Sat, 19 Aug 2023 10:21:57 +0000 (12:21 +0200)]
Remove XEmacs compat code from reftex

* lisp/textmodes/reftex-toc.el (reftex-toc, reftex-toc-dframe-p)
(reftex-toc-revert, reftex-toc-toggle-dedicated-frame): Delete
XEmacs compat code.
* lisp/textmodes/reftex.el (reftex-window-height): Make into
obsolete function alias of 'window-height'.  Update all callers.
(reftex-create-customize-menu): Assume recent version of cus-edit.el.

16 months agoAdd command to start Emacs with specific packages
Philip Kaludercic [Tue, 15 Aug 2023 16:39:14 +0000 (18:39 +0200)]
Add command to start Emacs with specific packages

* lisp/emacs-lisp/package.el (package--dependencies): Extend function
to handle and return package descriptors.
(package-isolate): Add new command.
* etc/NEWS: Announce new command.

16 months agoSpecialize default-get for alist widgets (Bug#63290)
Mauro Aranda [Tue, 15 Aug 2023 22:35:39 +0000 (19:35 -0300)]
Specialize default-get for alist widgets (Bug#63290)

* lisp/wid-edit.el (widget-list-default-get)
(widget-alist-default-get): New functions.
(list, alist): Use it.
* test/lisp/cus-edit-tests.el (cus-edit-test-bug63290-option)
(cus-edit-test-bug63290-option-2): New test options.
(cus-edit-test-bug63290): New test.
* test/lisp/wid-edit-tests.el (widget-test-alist-default-value-1)
(widget-test-alist-default-value-2)
(widget-test-alist-default-value-3)
(widget-test-alist-default-value-4): New tests.

16 months agoAdapt test in minibuffer-tests.el
Michael Albinus [Sat, 19 Aug 2023 08:11:32 +0000 (10:11 +0200)]
Adapt test in minibuffer-tests.el

* test/lisp/minibuffer-tests.el (test-completion-all-sorted-completions):
Simplify function declaration.

16 months agoAdapt Tramp test
Michael Albinus [Sat, 19 Aug 2023 08:08:35 +0000 (10:08 +0200)]
Adapt Tramp test

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test44-user-group-ids): Extend test.

16 months agoSimplify use of Tramp messages
Michael Albinus [Sat, 19 Aug 2023 08:08:05 +0000 (10:08 +0200)]
Simplify use of Tramp messages

* doc/misc/tramp.texi (Traces and Profiles): Don't require a
minimum `tramp-verbose' level when `tramp-debug-command-messages'
is non-nil.

* lisp/net/tramp-message.el (tramp-debug-command-messages):
Adapt docstring.
(tramp-message, with-tramp-debug-message): Don't require a minimum
`tramp-verbose' level when `tramp-debug-command-messages' is non-nil.

16 months agoFix behavior of client frames when 'find-alternate-file' is used
Eli Zaretskii [Sat, 19 Aug 2023 07:34:07 +0000 (10:34 +0300)]
Fix behavior of client frames when 'find-alternate-file' is used

* lisp/files.el (find-alternate-file-dont-kill-client): New var.
(find-alternate-file): Bind it to a special value when invoking
kill-buffer-hook.
* lisp/server.el (server-delete-client): If NOFRAME is
'dont-kill-client', don't kill the client and its terminals.
(server-buffer-done): Pass 'find-alternate-file-dont-kill-client'
to 'server-delete-client'.  (Bug#65277)

16 months ago; * src/fileio.c (Fset_file_acl): Don't leak memory.
Eli Zaretskii [Sat, 19 Aug 2023 07:28:47 +0000 (10:28 +0300)]
; * src/fileio.c (Fset_file_acl): Don't leak memory.

16 months ago; * src/textconv.c (Fset_text_conversion_style): Fix typo.
Po Lu [Sat, 19 Aug 2023 05:37:55 +0000 (13:37 +0800)]
; * src/textconv.c (Fset_text_conversion_style): Fix typo.

16 months agoMake some file I/O operations more robust on Android
Po Lu [Sat, 19 Aug 2023 05:25:42 +0000 (13:25 +0800)]
Make some file I/O operations more robust on Android

* src/android.h (android_readlinkat): New prototype.
* src/androidvfs.c (struct android_vops): New function pointer
`readlink'.
(unix_vfs_ops, android_unix_readlink, afs_vfs_ops)
(android_afs_readlink, content_vfs_ops, android_content_mkdir)
(android_content_chmod, authority_vfs_ops)
(android_authority_readlink, saf_root_vfs_ops)
(android_saf_root_readlink, saf_tree_vfs_ops)
(android_saf_tree_readlink, saf_file_vfs_ops, saf_new_vfs_ops)
(android_saf_new_readlink, root_vfs_ops): Implement new
`readlink' vops for each vnode type.
(android_readlinkat): New function.

* src/fileio.c (Fcopy_file): Be more flexible about SELinux
errors under Android.
(emacs_readlinkat): Use `android_readlink' when built as
libemacs.so.

16 months ago; Remove set but unused variable
Po Lu [Sat, 19 Aug 2023 01:08:47 +0000 (09:08 +0800)]
; Remove set but unused variable

* src/androidvfs.c (android_check_content_access): Delete
`length'.

16 months agoDisable text conversion inside read-char-exclusive
Po Lu [Sat, 19 Aug 2023 00:51:44 +0000 (08:51 +0800)]
Disable text conversion inside read-char-exclusive

* src/lread.c (read_filtered_event): Disable text conversion if
merely ascii_required.  (bug#65370)

16 months agoDisable text conversion within read-char-from-minibuffer
Po Lu [Sat, 19 Aug 2023 00:48:20 +0000 (08:48 +0800)]
Disable text conversion within read-char-from-minibuffer

* lisp/subr.el (read-char-from-minibuffer): Disable text
conversion.  (bug#65370)
(y-or-n-p): Remove redundant binding of
`override-text-conversion-style', given that read-key already
disables text conversion.

* src/textconv.c (Fset_text_conversion_style): Always reset text
conversion for the selected frame in addition to any displaying
current_buffer.

16 months ago(Fmake_local_variable): Fix bug#65209
Stefan Monnier [Fri, 18 Aug 2023 23:22:17 +0000 (19:22 -0400)]
(Fmake_local_variable): Fix bug#65209

* src/data.c (Fmake_local_variable): Don't delegate to `Fset` since
they have to obey `let_shadows_buffer_binding_p` whereas we don't.

* test/src/data-tests.el (data-tests--bug65209): New var.
(data-tests-make-local-bug65209): New test.

16 months agoShow duration of compilation when it stops (bug#65251)
Mattias Engdegård [Fri, 18 Aug 2023 11:23:39 +0000 (13:23 +0200)]
Show duration of compilation when it stops (bug#65251)

Patch by Helmut Eller, lightly edited.

* lisp/progmodes/compile.el (compilation--start-time): New variable.
(compilation-start): Set it.
(compilation-handle-exit): Display duration.

16 months agoDon't disable terminfo on non-GUI Android builds
Po Lu [Fri, 18 Aug 2023 00:20:30 +0000 (08:20 +0800)]
Don't disable terminfo on non-GUI Android builds

* configure.ac (TERMINFO, LIBS_TERMCAP): Clear only if
REALLY_ANDROID.  (bug#65340)

16 months agoFix invocation with --debug-init and changes to debug-ignored-errors
Eli Zaretskii [Thu, 17 Aug 2023 18:35:20 +0000 (21:35 +0300)]
Fix invocation with --debug-init and changes to debug-ignored-errors

* src/eval.c (syms_of_eval) <debug-ignored-errors>: Mention in the
doc string the caveat with removing errors from the standard value
while invoking Emacs with --debug-init.

* lisp/startup.el (startup--load-user-init-file): If the user's
init files add to the value of 'debug-ignored-errors', make sure
the additions are preserved after restoring the value we reset
during loading the init file, if Emacs was invoked with
"--debug-init".  (Bug#65267)

16 months agoEscape braces in regexp in make-info-dir
Robert Pluim [Thu, 17 Aug 2023 10:15:44 +0000 (12:15 +0200)]
Escape braces in regexp in make-info-dir

This fixes a build failure on Alpine Linux.

* build-aux/make-info-dir (detexinfo): Escape the braces, since some
awk variants (such as BusyBox's) don't like regexp interval
specifications that aren't numbers.  Bug#65323

16 months agoIntroduce support for Desktop Notifications on Haiku
Po Lu [Thu, 17 Aug 2023 08:34:32 +0000 (08:34 +0000)]
Introduce support for Desktop Notifications on Haiku

* doc/lispref/os.texi (Desktop Notifications): Document Haiku
desktop notifications.

* etc/NEWS: Announce this change.

* lisp/org/org-clock.el (haiku-notifications-notify): New
declaration.
(org-show-notification): Employ that function.

* src/haiku_io.c (haiku_len) <NOTIFICATION_CLICK_EVENT>: Return
the length for this type of event.

* src/haiku_select.cc (my_team_id, be_display_notification): New
functions.

* src/haiku_support.cc (my_team_id, ArgvReceived): New
functions.

* src/haiku_support.h (enum haiku_event_type): New event type
NOTIFICATION_CLICK_EVENT.
(struct haiku_notification_click_event): New structure.

* src/haikuselect.c (haiku_notifications_notify_1)
(Fhaiku_notifications_notify): New functions.
(syms_of_haikuselect): Register new defsubr.

* src/haikuterm.c (haiku_read_socket):
* src/haikuselect.h:
* src/termhooks.h: Add new events for notification clicks on
Haiku.

16 months agoFix earlier change in subr.el
Po Lu [Thu, 17 Aug 2023 07:27:14 +0000 (07:27 +0000)]
Fix earlier change in subr.el

* lisp/subr.el (event-start, event-end): Don't take the car of
EVENT if it's not an event with parameters.

16 months ago; Add tasks for the Android port
Po Lu [Thu, 17 Aug 2023 02:03:49 +0000 (10:03 +0800)]
; Add tasks for the Android port

* etc/PROBLEMS: Improve descriptions of issues with Droid Sans
Mono and Anonymous Pro.  Then, bring up the subject of CFF fonts
and how they relate to CJK text.

* etc/TODO: Detail that CFF support is desired.

16 months ago(project-find-file): Allow current file name "other project"'s future history
Spencer Baugh [Thu, 17 Aug 2023 01:14:03 +0000 (04:14 +0300)]
(project-find-file): Allow current file name "other project"'s future history

* lisp/progmodes/project.el (project-find-file):
Allow using the relative file name of the current buffer in "other
project" as well (bug#63829).

16 months ago* src/fileio.c (Ffile_name_concat): Improve docstring.
Dmitry Gutov [Thu, 17 Aug 2023 01:08:03 +0000 (04:08 +0300)]
* src/fileio.c (Ffile_name_concat): Improve docstring.

16 months ago; * lisp/progmodes/project.el (project-find-file-in): Update docstring.
Dmitry Gutov [Wed, 16 Aug 2023 01:43:55 +0000 (04:43 +0300)]
; * lisp/progmodes/project.el (project-find-file-in): Update docstring.

16 months agoUpdate Android port
Po Lu [Thu, 17 Aug 2023 00:45:57 +0000 (08:45 +0800)]
Update Android port

* configure.ac (emacs_cv_tputs_lib): Only circumvent termcap if
Android windowing support is enabled.  (bug#65340)

* etc/PROBLEMS: Fix typo in section recouting problems with the
Anonymous Pro font.

* lisp/subr.el (event-start, event-end): Return the mouse
position list tied to touchscreen-begin and end events.
Reported by Stefan Monnier <monnier@iro.umontreal.ca>.

* lisp/version.el (emacs-build-system, emacs-build-time)
(emacs-repository-get-version, emacs-repository-get-branch):
Bypass Android specific code on non-GUI builds running on
Android.  (bug#65340)

* lisp/wid-edit.el (widget-event-point): Remove now redundant
code.

16 months agoFix potential NULL pointer dereference
Po Lu [Thu, 17 Aug 2023 00:25:40 +0000 (08:25 +0800)]
Fix potential NULL pointer dereference

* java/org/gnu/emacs/EmacsDialog.java (display): Initialize
rc.thing to false.

16 months agotibetan.el: compute constants at compile time, optimise regexps
Mattias Engdegård [Wed, 16 Aug 2023 15:49:22 +0000 (17:49 +0200)]
tibetan.el: compute constants at compile time, optimise regexps

* lisp/language/tibetan.el (tibetan-subjoined-transcription-alist)
(tibetan-regexp, tibetan-precomposed-regexp)
(tibetan-precomposition-rule-regexp):
Evaluate at compile time.  Use regexp-opt.

16 months ago; Silence byte-compiler
Stefan Kangas [Wed, 16 Aug 2023 19:34:11 +0000 (21:34 +0200)]
; Silence byte-compiler

* test/src/comp-tests.el (native-comp-eln-load-path): Declare.

16 months agoSpeed up dictionary--count-mode-buffers
Stefan Kangas [Wed, 16 Aug 2023 19:25:49 +0000 (21:25 +0200)]
Speed up dictionary--count-mode-buffers

* lisp/net/dictionary.el (dictionary--count-mode-buffers): Make
faster.  Patch by Visuwesh <visuweshm@gmail.com>.

16 months agoAdd test for `calculator-exp`
Stefan Kangas [Wed, 16 Aug 2023 07:14:49 +0000 (09:14 +0200)]
Add test for `calculator-exp`

* test/lisp/calculator-tests.el (calculator-expt): New test.

16 months agoMake `term-mode` non-interactive
Stefan Kangas [Wed, 16 Aug 2023 07:14:02 +0000 (09:14 +0200)]
Make `term-mode` non-interactive

* lisp/term.el (term-mode): Mark as non-interactive.

16 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 16 Aug 2023 18:12:42 +0000 (20:12 +0200)]
; * etc/NEWS: Fix typos.

16 months agoImprove 'emake --quieter'
Gregory Heytings [Wed, 16 Aug 2023 17:46:16 +0000 (17:46 +0000)]
Improve 'emake --quieter'

* admin/emake: Improve the output when the --quieter option is
used.

16 months ago; Fix last change
Michael Albinus [Wed, 16 Aug 2023 17:31:05 +0000 (19:31 +0200)]
; Fix last change

* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Replace "echo -n"
by "printf", it isn't portable.  (Bug#65321)

16 months agoShow how to call an Elisp function of the same name as an Eshell built-in
Jim Porter [Sun, 13 Aug 2023 19:33:17 +0000 (12:33 -0700)]
Show how to call an Elisp function of the same name as an Eshell built-in

* doc/misc/eshell.texi (Built-ins): Expand documentation.

16 months agoAdd 'compile' builtin command for Eshell
Jim Porter [Sun, 13 Aug 2023 19:07:39 +0000 (12:07 -0700)]
Add 'compile' builtin command for Eshell

* lisp/eshell/em-unix.el (eshell-compile, eshell/compile): New
functions.
(eshell/make, eshell-grep): Use 'eshell-compile'.
(eshell/glimpse): It's no longer necessary to let-bind 'null-device';
'eshell-grep' no longer calls 'grep' (the Lisp function), which needed
'null-device' to be nil for this case.

* test/lisp/eshell/em-unix-tests.el: New file.

* doc/misc/eshell.texi (Built-ins): Document the 'compile' builtin.

* etc/NEWS: Announce this change (bug#65273).

16 months agoVarious improvements to 'emake'
Gregory Heytings [Wed, 16 Aug 2023 15:58:56 +0000 (15:58 +0000)]
Various improvements to 'emake'

* admin/emake: Highlight the result of 'check-maybe' in red.
Reindent a few lines.  Add a line in the filters.  Clarify the
documentation.

16 months agoAdd a target to byte-compile all tests without running them
Gregory Heytings [Wed, 16 Aug 2023 15:58:48 +0000 (15:58 +0000)]
Add a target to byte-compile all tests without running them

* test/Makefile.in: Add a check-byte-compile target.
* Makefile.in: Add the check-byte-compile target to CHECK_TARGETS.

16 months agoSimplify 'with-restriction' and 'without-restriction'
Gregory Heytings [Wed, 16 Aug 2023 15:58:39 +0000 (15:58 +0000)]
Simplify 'with-restriction' and 'without-restriction'

* lisp/subr.el (with-restriction, without-restriction): Merge the
bodies of the 'internal--with-restriction' and
'internal--without-restriction' function into the macros.  The
result is more efficient than a funcall.
(internal--with-restriction, internal--without-restriction):
Remove.
Suggested by Mattias Engdegård.

16 months agoSimplify 'without-restriction'
Gregory Heytings [Wed, 16 Aug 2023 15:58:29 +0000 (15:58 +0000)]
Simplify 'without-restriction'

This simplification is symmetrical to 01fb898420.

* src/editfns.c: (Finternal__labeled_widen): Add a call to
'Fwiden', and rename from 'internal--unlabel-restriction'.
(unwind_labeled_narrow_to_region): Use the renamed function, and
remove the call to 'Fwiden'.
(syms_of_editfns): Rename the symbol.

* lisp/subr.el (internal--without-restriction): Use the renamed
function.

16 months agoFix combine-change-call
Gregory Heytings [Wed, 16 Aug 2023 15:58:25 +0000 (15:58 +0000)]
Fix combine-change-call

* lisp/subr.el (combine-change-calls-1): Rewrite and document
the part which creates the undo-list element.  Fixes bug#60467
and bug#64989.

16 months agoob-tangle.el: fix unintended range in regexp
Mattias Engdegård [Wed, 16 Aug 2023 12:57:48 +0000 (14:57 +0200)]
ob-tangle.el: fix unintended range in regexp

* lisp/org/ob-tangle.el (org-babel-interpret-file-mode):
Repair parts of regexp that should only match +, - and =.
* lisp/files.el (file-modes-symbolic-to-number):
Fix the same error in a doc string; this seems to be where
the mistake originated.

16 months agoFix Info parser regexp mistake
Mattias Engdegård [Wed, 16 Aug 2023 11:53:33 +0000 (13:53 +0200)]
Fix Info parser regexp mistake

* lisp/info.el (Info-split-parameter-string):
The `\sX` syntax construct isn't valid inside character alternatives;
follow the obvious intention.

16 months agoRemedy wrong-looking \(:?...\) regexp constructs
Mattias Engdegård [Wed, 16 Aug 2023 11:33:48 +0000 (13:33 +0200)]
Remedy wrong-looking \(:?...\) regexp constructs

When we see \(:?...\) in a regexp it very much looks like a typo
for a \(?:...\) construct and often is, so do something about
all of these (one of which being another mistake).
Doing so silences an optional relint check.

* lisp/comint.el (comint-replace-by-expanded-history-before-point):
* lisp/term.el (term-replace-by-expanded-history-before-point):
Move :? out from capturing group where it does not need to be,
to avoid confusion.
* lisp/emacs-lisp/cl-indent.el (common-lisp-loop-part-indentation):
A capturing group isn't needed here; turn it into simple bracketing.
* lisp/progmodes/sql.el (sql--completion-table):
Change :? into ?: which was clearly meant here.

16 months ago* etc/PROBLEMS: Document a problem with the Anonymous Pro font.
Po Lu [Wed, 16 Aug 2023 14:05:47 +0000 (22:05 +0800)]
* etc/PROBLEMS: Document a problem with the Anonymous Pro font.

16 months ago; Fix byte-compiler warnings in comp.el
Eli Zaretskii [Wed, 16 Aug 2023 13:10:55 +0000 (16:10 +0300)]
; Fix byte-compiler warnings in comp.el

* lisp/emacs-lisp/comp.el: Declare functions and variables defined
in comp.c, to avoid byte-compiler warnings.  (Bug#65250)

16 months agoRevert "Fix slow "C-h f" in Emacs built without native compilation"
Eli Zaretskii [Wed, 16 Aug 2023 13:06:20 +0000 (16:06 +0300)]
Revert "Fix slow "C-h f" in Emacs built without native compilation"

This reverts commit 545f95d1a3213318389ecadc7cfff3f48b555b03.
It is no longer needed, as comp.el and comp-cstr.el are now
byte-compiled even if native-compilation is not built-in.

16 months ago; * etc/MACHINES (Android): Clarify a minor point.
Po Lu [Wed, 16 Aug 2023 12:35:08 +0000 (20:35 +0800)]
; * etc/MACHINES (Android): Clarify a minor point.

16 months agoUpdate Android port
Po Lu [Wed, 16 Aug 2023 12:32:04 +0000 (20:32 +0800)]
Update Android port

* configure.ac: Test for getpwent using gl_CHECK_FUNCS_ANDROID.
(bug#65319)

* etc/MACHINES (Android): Mention that a non-GUI build is also
possible on Android.

* lisp/loadup.el: Provide for regular builds on Android.
(bug#65339)

* lisp/wid-edit.el (widget-event-start): Remove function, since
event-start now does the same thing.
(widget-button--check-and-call-button, widget-button-click):
Adjust correspondingly.  Reported by Stefan Monnier
<monnier@iro.umontreal.ca>.

* src/sysdep.c (close_output_streams): Apply workarounds for the
file descriptor sanitizer on all builds where __ANDROID__ is
defined, not just Android port builds.  (bug#65340)

16 months agoFix infloop error in Tramp
Michael Albinus [Wed, 16 Aug 2023 09:48:28 +0000 (11:48 +0200)]
Fix infloop error in Tramp

* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Do not
call `tramp-get-ls-command'.  (Bug#65321)

16 months ago* lisp/Makefile.in (compile-targets): Always byte compile native comp.
Andrea Corallo [Wed, 16 Aug 2023 08:18:20 +0000 (10:18 +0200)]
* lisp/Makefile.in (compile-targets): Always byte compile native comp.

16 months agoImprove java/DEBUG
Po Lu [Wed, 16 Aug 2023 08:12:54 +0000 (16:12 +0800)]
Improve java/DEBUG

* etc/DEBUG: Significantly reword and expand section.
(bug#65268)

16 months ago; ChangeLog.android: Clean up more entries.
Po Lu [Wed, 16 Aug 2023 06:33:47 +0000 (14:33 +0800)]
; ChangeLog.android: Clean up more entries.

16 months agoRemove get_boot_time from msdos.c
Po Lu [Wed, 16 Aug 2023 03:12:44 +0000 (11:12 +0800)]
Remove get_boot_time from msdos.c

* src/msdos.c (get_boot_time): That all of the actual locking in
filelock.c is under #ifndef MSDOS escaped my notice.  Remove
this unused function.

16 months agoFix display of compound glyphs that employ simple transforms
Po Lu [Wed, 16 Aug 2023 03:02:55 +0000 (11:02 +0800)]
Fix display of compound glyphs that employ simple transforms

* src/sfnt.c (sfnt_transform_coordinates): Always compute an
affine transform matrix except if no scale is provided at all.
Unconditionally apply x_off and y_off.
(sfnt_decompose_compound_glyph): Delete arguments OF_X and
OFF_Y.  Apply component offsets after writing simple glyph
contours.
(sfnt_decompose_glyph): Modify for new calling convention.
(sfnt_transform_f26dot6): Modify analogously to
sfnt_decompose_compound_glyph.  Also correct anchor offset
computation to scale the unscaled component anchor coordinates
by the interpreter scale.
(sfnt_interpret_compound_glyph_1): Also modify for new calling
convention.
* src/sfnt.h (struct sfnt_compound_glyph_component): <u>: Make
scale fields signed.

16 months agoDon't use the too-new command 'git get-url'
Bob Rogers [Wed, 16 Aug 2023 01:19:50 +0000 (04:19 +0300)]
Don't use the too-new command 'git get-url'

* lisp/vc/vc-git.el (vc-git-repository-url):
Don't use the too-new command 'git get-url' (bug#65315).

16 months agoAdd line-wise movement commands for erc-fill-wrap
F. Jason Park [Mon, 7 Aug 2023 05:05:26 +0000 (22:05 -0700)]
Add line-wise movement commands for erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill-line-spacing): Revise doc string.
(erc-fill--wrap-escape-hidden-speaker): New helper function to move
point to beginning of visible text.
(erc-fill--wrap-beginning-of-line): Factor out adjustment for hidden
speakers.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Add commands
for moving to previous and next line in a manner consistent with the
value of `erc-fill--wrap-visual-keys'.
(erc-fill-wrap-mode-map): Add remap bindings for `next-line' and
`previous-line'.
(erc-fill-wrap-mode): Revise doc string.
(erc-fill-wrap-nudge): Fix vertical anchoring so that point's line
remains steadier throughout the adjustment.  (Bug#60936)

16 months agoDeprecate erc-button-nickname-callback-function
F. Jason Park [Mon, 7 Aug 2023 10:35:56 +0000 (03:35 -0700)]
Deprecate erc-button-nickname-callback-function

* lisp/erc/erc-button.el (erc-button-nickname-callback-function):
Deprecate this function-valued variable, first introduced in ERC 5.6
and Emacs 30, to dissuade consumers of the old `erc-button-alist'
nickname interface from meddling with the on-click callback of
buttonized nicks.  If necessary, third parties can instead add their
own propertizing logic in something like `erc-insert-modify-hook'.
Also change default callback to a wrapper that discards all but the
first arg.  This effectively declares that `erc-data' values for
nicknames may contain more than one element in the near future.
(erc-button--perform-nick-popup): New default nick-button callback
function wrapping `erc-nick-popup' in order to adapt it to the
`erc-button-nickname-callback-function' interface.  (Bug#60933)

16 months ago; Relax timeouts on some ERC tests
F. Jason Park [Tue, 1 Aug 2023 05:20:01 +0000 (22:20 -0700)]
; Relax timeouts on some ERC tests

There have been three failures (all on native-comp-speed2-master) over
the last three weeks pointing to these tests, which haven't changed in
the year-plus they've existed in tree.  No test appears in multiple
failures, and all continue to pass daily on commercial GitLab (GCP)
runners using the same EMBA container image.  They also pass locally
with "make check" and "make -j -C test SELECTOR=t check-lisp-erc".  If
these tweaks don't fix the problem, they can be branded :unstable.

* test/lisp/erc/erc-scenarios-base-renick.el: Extend timeouts.
* test/lisp/erc/resources/base/netid/bouncer/barnet.eld: Extend
timeouts.
* test/lisp/erc/resources/base/netid/bouncer/foonet.eld: Extend
timeouts.
* test/lisp/erc/resources/base/reconnect/options.eld: Extend timeouts.
* test/lisp/erc/resources/base/renick/queries/bouncer-barnet.eld:
Extend timeouts.
* test/lisp/erc/resources/base/renick/queries/bouncer-foonet.eld:
Extend timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el: Extend timeout.
* test/lisp/erc/resources/services/auth-source/libera.eld: Extend
timeouts.

16 months agoSimplify get_boot_sec
Paul Eggert [Tue, 15 Aug 2023 22:55:08 +0000 (15:55 -0700)]
Simplify get_boot_sec

* src/filelock.c (get_boot_sec):
Simplify by removing a special case for MS-DOS.
* src/msdos.c (get_boot_time): New dummy that always fails.

16 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Tue, 15 Aug 2023 22:46:11 +0000 (15:46 -0700)]
Update from Gnulib by running admin/merge-gnulib

16 months agoFix typo in pcomplete/sha512sum alias
Stefan Kangas [Tue, 15 Aug 2023 19:29:13 +0000 (21:29 +0200)]
Fix typo in pcomplete/sha512sum alias

* lisp/pcmpl-unix.el (pcomplete/sha512sum): Rename from
'pcomplete/sha521sum'.

16 months agoFix test in python-tests.el added by bug #62092
kobarity [Tue, 15 Aug 2023 13:27:45 +0000 (22:27 +0900)]
Fix test in python-tests.el added by bug #62092

* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-6): Fix indentation.
(python-info-dedenter-opening-block-positions-7): Add calling
`should'.  Add RESTORE-POINT argument when calling
`python-tests-look-at'.

16 months agolisp/help-fns.el: Revert commit c12838c73ef161850a081f9ccea6e375b7c2f93b
Stefan Monnier [Tue, 15 Aug 2023 14:21:51 +0000 (10:21 -0400)]
lisp/help-fns.el: Revert commit c12838c73ef161850a081f9ccea6e375b7c2f93b

* lisp/help-fns.el (help-fns--describe-function-or-command-prompt):
Don't allow specifying a non-existing function.

16 months agoSome Tramp optimizations
Michael Albinus [Tue, 15 Aug 2023 13:23:20 +0000 (15:23 +0200)]
Some Tramp optimizations

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Extend.  It shall return also some basic file attributes.
(tramp-bundle-read-file-names): Simplify data to be transferred.
(tramp-sh-handle-file-name-all-completions): Read additional attributes.
(tramp-sh-handle-expand-file-name): Check also "doas".
(tramp-bundle-read-file-names): Handle changed data layout.
(tramp-find-file-exists-command): Set "file-exists-p" file property.

16 months agoFix test in files-tests.el
Michael Albinus [Tue, 15 Aug 2023 10:02:03 +0000 (12:02 +0200)]
Fix test in files-tests.el

* test/lisp/files-tests.el
(files-tests-file-name-non-special-unhandled-file-name-directory):
Fix test.

16 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Tue, 15 Aug 2023 06:21:42 +0000 (14:21 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

16 months agoDon't use // substitution in `ndk_resolve_import_module'
Po Lu [Tue, 15 Aug 2023 06:19:56 +0000 (14:19 +0800)]
Don't use // substitution in `ndk_resolve_import_module'

* m4/ndk-build.m4 (ndk_resolve_import_module): Stop testing if
ndk_commands is empty; just eval it.  (bug#65292)

16 months ago* lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159
Stefan Monnier [Tue, 15 Aug 2023 03:01:12 +0000 (23:01 -0400)]
* lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159

16 months ago; * admin/MAINTAINERS: Add myself as Eshell maintainer.
Jim Porter [Tue, 15 Aug 2023 02:58:40 +0000 (19:58 -0700)]
; * admin/MAINTAINERS: Add myself as Eshell maintainer.

16 months ago* doc/lispref/commands.texi (Adjusting Point): Document the adjustment
Stefan Monnier [Tue, 15 Aug 2023 02:48:57 +0000 (22:48 -0400)]
* doc/lispref/commands.texi (Adjusting Point): Document the adjustment

16 months agocl-generic.el: Fix docstring for methods with `cl-call-next-method`
Stefan Monnier [Tue, 15 Aug 2023 02:37:51 +0000 (22:37 -0400)]
cl-generic.el: Fix docstring for methods with `cl-call-next-method`

* lisp/emacs-lisp/cl-generic.el (cl--generic-method-info):
Fix docstring extraction for "curried" methods (bug#65270).

16 months agoMicro-optimize GXAXIS
Po Lu [Tue, 15 Aug 2023 00:59:03 +0000 (08:59 +0800)]
Micro-optimize GXAXIS

* src/sfnt.c (GXAXIS): Check for the availability of naxis slot
elements in a single operation.

16 months ago; * lib/readutmp.h: Merge from Gnulib.
Po Lu [Tue, 15 Aug 2023 00:50:43 +0000 (08:50 +0800)]
; * lib/readutmp.h: Merge from Gnulib.

16 months agoAdd native WebP support on macOS (Bug#59242)
Stefan Kangas [Mon, 14 Aug 2023 19:34:34 +0000 (21:34 +0200)]
Add native WebP support on macOS (Bug#59242)

* src/image.c (syms_of_image)
[HAVE_NATIVE_IMAGE_API && HAVE_NS && NS_IMPL_COCOA]:
Add webp as an image type.
* src/nsimage.m (ns_can_use_native_image_api)
[NS_IMPL_COCOA && !HAVE_WEBP]: Add webp to list of possible image
types in the native image support lookup.