1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-02 13:41:30 -08:00
Commit graph

168320 commits

Author SHA1 Message Date
Eli Zaretskii
e3207b13ce 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)
2023-08-19 10:34:07 +03:00
Eli Zaretskii
b12ce748d1 ; * src/fileio.c (Fset_file_acl): Don't leak memory. 2023-08-19 10:28:47 +03:00
Po Lu
b57a648648 ; * src/textconv.c (Fset_text_conversion_style): Fix typo. 2023-08-19 13:37:55 +08:00
Po Lu
2effd18c97 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.
2023-08-19 13:25:42 +08:00
Po Lu
ec8f330df6 ; Remove set but unused variable
* src/androidvfs.c (android_check_content_access): Delete
`length'.
2023-08-19 09:08:47 +08:00
Po Lu
449008a60f Disable text conversion inside read-char-exclusive
* src/lread.c (read_filtered_event): Disable text conversion if
merely ascii_required.  (bug#65370)
2023-08-19 08:51:44 +08:00
Po Lu
6a4b6c3e83 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.
2023-08-19 08:48:20 +08:00
Stefan Monnier
4f1ce5db12 (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.
2023-08-18 19:22:17 -04:00
Mattias Engdegård
cc533f2338 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.
2023-08-18 13:23:39 +02:00
Po Lu
02d96e39b2 Don't disable terminfo on non-GUI Android builds
* configure.ac (TERMINFO, LIBS_TERMCAP): Clear only if
REALLY_ANDROID.  (bug#65340)
2023-08-18 08:20:53 +08:00
Eli Zaretskii
3685387e60 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)
2023-08-17 21:35:20 +03:00
Robert Pluim
39e0121354 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
2023-08-17 12:21:46 +02:00
Po Lu
5856ea5e4e 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.
2023-08-17 08:34:32 +00:00
Po Lu
c1a45041d6 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.
2023-08-17 07:27:14 +00:00
Po Lu
ab8bc93cd4 ; 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.
2023-08-17 10:04:47 +08:00
Spencer Baugh
f38bcf37dc (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).
2023-08-17 04:16:09 +03:00
Dmitry Gutov
9dff654432 * src/fileio.c (Ffile_name_concat): Improve docstring. 2023-08-17 04:16:09 +03:00
Dmitry Gutov
155154f6f1 ; * lisp/progmodes/project.el (project-find-file-in): Update docstring. 2023-08-17 04:16:09 +03:00
Po Lu
4509cda5c9 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.
2023-08-17 08:45:57 +08:00
Po Lu
cbe6b48b36 Fix potential NULL pointer dereference
* java/org/gnu/emacs/EmacsDialog.java (display): Initialize
rc.thing to false.
2023-08-17 08:25:40 +08:00
Mattias Engdegård
898edb1816 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.
2023-08-16 21:54:50 +02:00
Stefan Kangas
508d24c8b9 ; Silence byte-compiler
* test/src/comp-tests.el (native-comp-eln-load-path): Declare.
2023-08-16 21:34:11 +02:00
Stefan Kangas
d96dd127e3 Speed up dictionary--count-mode-buffers
* lisp/net/dictionary.el (dictionary--count-mode-buffers): Make
faster.  Patch by Visuwesh <visuweshm@gmail.com>.
2023-08-16 21:27:50 +02:00
Stefan Kangas
cf5ae0507e Add test for calculator-exp
* test/lisp/calculator-tests.el (calculator-expt): New test.
2023-08-16 21:27:50 +02:00
Stefan Kangas
33d3e5c545 Make term-mode non-interactive
* lisp/term.el (term-mode): Mark as non-interactive.
2023-08-16 21:27:49 +02:00
Michael Albinus
ebe8871794 ; * etc/NEWS: Fix typos. 2023-08-16 20:12:42 +02:00
Gregory Heytings
f09126bd90 Improve 'emake --quieter'
* admin/emake: Improve the output when the --quieter option is
used.
2023-08-16 17:47:34 +00:00
Michael Albinus
19513a654e ; Fix last change
* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Replace "echo -n"
by "printf", it isn't portable.  (Bug#65321)
2023-08-16 19:31:05 +02:00
Jim Porter
647bcec4f5 Show how to call an Elisp function of the same name as an Eshell built-in
* doc/misc/eshell.texi (Built-ins): Expand documentation.
2023-08-16 10:02:17 -07:00
Jim Porter
c4915678f3 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).
2023-08-16 10:01:49 -07:00
Gregory Heytings
b73ab54ae6 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.
2023-08-16 16:06:45 +00:00
Gregory Heytings
1e2d077515 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.
2023-08-16 16:06:40 +00:00
Gregory Heytings
c287a0fdc7 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.
2023-08-16 16:06:38 +00:00
Gregory Heytings
9e9e11648d 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.
2023-08-16 16:06:34 +00:00
Gregory Heytings
d622602452 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.
2023-08-16 16:06:31 +00:00
Mattias Engdegård
1ad318cf2a 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.
2023-08-16 16:55:38 +02:00
Mattias Engdegård
ca68783929 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.
2023-08-16 16:55:38 +02:00
Mattias Engdegård
5b87950133 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.
2023-08-16 16:55:38 +02:00
Po Lu
d6c473a91d * etc/PROBLEMS: Document a problem with the Anonymous Pro font. 2023-08-16 22:06:10 +08:00
Eli Zaretskii
dfe68f2a42 ; 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)
2023-08-16 16:10:55 +03:00
Eli Zaretskii
3d7041834f Revert "Fix slow "C-h f" in Emacs built without native compilation"
This reverts commit 545f95d1a3.
It is no longer needed, as comp.el and comp-cstr.el are now
byte-compiled even if native-compilation is not built-in.
2023-08-16 16:06:20 +03:00
Po Lu
5e9711fe58 ; * etc/MACHINES (Android): Clarify a minor point. 2023-08-16 20:35:08 +08:00
Po Lu
f2f2e6a082 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)
2023-08-16 20:32:38 +08:00
Michael Albinus
22d031f644 Fix infloop error in Tramp
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Do not
call `tramp-get-ls-command'.  (Bug#65321)
2023-08-16 11:48:28 +02:00
Andrea Corallo
2eaf1e3efc * lisp/Makefile.in (compile-targets): Always byte compile native comp. 2023-08-16 10:22:57 +02:00
Po Lu
3e51847801 Improve java/DEBUG
* etc/DEBUG: Significantly reword and expand section.
(bug#65268)
2023-08-16 16:13:19 +08:00
Po Lu
5e12f4c89c ; ChangeLog.android: Clean up more entries. 2023-08-16 14:33:47 +08:00
Po Lu
24886a2cc4 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.
2023-08-16 11:12:44 +08:00
Po Lu
6dacf5bce4 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.
2023-08-16 11:02:55 +08:00
Bob Rogers
612f25c24f 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).
2023-08-16 04:20:26 +03:00