]> git.eshelyaron.com Git - emacs.git/log
emacs.git
23 months agoUpdate Android port
Po Lu [Sat, 28 Jan 2023 08:29:22 +0000 (16:29 +0800)]
Update Android port

* doc/emacs/android.texi (Android File System): Describe an
easier way to disable scoped storage.
* java/AndroidManifest.xml.in: Add new permission to allow that.
* java/README: Add more text describing Java.
* java/org/gnu/emacs/EmacsContextMenu.java (Item): New fields
`isCheckable' and `isChecked'.
(EmacsContextMenu, addItem): New arguments.
(inflateMenuItems): Set checked status as appropriate.

* java/org/gnu/emacs/EmacsCopyArea.java (perform): Disallow
operations where width and height are less than or equal to
zero.
* lisp/menu-bar.el (menu-bar-edit-menu): Make
execute-extended-command available as a menu item.
* src/androidmenu.c (android_init_emacs_context_menu)
(android_menu_show):
* src/menu.c (have_boxes): Implement menu check boxes.

23 months agoSet up fontset stuff on Android
Po Lu [Sat, 28 Jan 2023 07:25:50 +0000 (15:25 +0800)]
Set up fontset stuff on Android

* lisp/term/android-win.el (window-system-initialization):
Create default fontset.

23 months agoFix file descriptor leaks
Po Lu [Sat, 28 Jan 2023 07:25:29 +0000 (15:25 +0800)]
Fix file descriptor leaks

* src/sfntfont.c (sfntfont_read_cmap):
(sfntfont_open): Fix leaks of file descriptors.

23 months agoUpdate from gnulib
Po Lu [Sat, 28 Jan 2023 06:33:58 +0000 (14:33 +0800)]
Update from gnulib

* cross/lib/stdalign.in.h (_GL_STDALIGN_H):
(_):
(__alignof_is_defined):
* cross/lib/vasnprintf.c:
* lib/gnulib.mk.in (ANDROID_MIN_SDK):
(HAVE_SPAWN_H):
(LIBGCCJIT_LIBS):
(NATIVE_COMPILATION_AOT):
(NEXT_AS_FIRST_DIRECTIVE_LIMITS_H):
(NEXT_LIMITS_H):
(SIZEOF_LONG):
(stdalign.h):
* ../../../../dev/null:
* lib/stdalign.in.h (_GL_STDALIGN_H):
(_):
(__alignof_is_defined):
* lib/vasnprintf.c:
* m4/gnulib-common.m4 (gl_COMMON_BODY):
* m4/stdalign.m4 (gl_ALIGNASOF):
* m4/stddef_h.m4: Update from gnulib.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 28 Jan 2023 06:30:27 +0000 (14:30 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Sat, 28 Jan 2023 06:29:51 +0000 (14:29 +0800)]
Update Android port

* INSTALL.android: Document support for gnutls and libgmp.
* build-aux/ndk-build-helper-1.mk (NDK_SO_NAMES, NDK_INCLUDES)
(SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk: Recursively resolve and add
shared library dependencies; even those of static libraries.
* build-aux/ndk-module-extract.awk: Fix makefile_imports code.
* configure.ac (ANDROID_SDK_18_OR_EARLIER, XCONFIGURE)
(LIBGMP_CFLAGS): Enable GMP and gnutls on Android.

* cross/ndk-build/Makefile.in (LOCAL_EXPORT_C_INCLUDES):
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::($(LOCAL_MODULE_FILENAME)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
(NDK_LOCAL_EXPORT_C_INCLUDES_$(LOCAL_MODULE)):
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)):
Implement ``LOCAL_ASM_RULE'' and ``LOCAL_C_ADDITIONAL_FLAGS''
extensions for libgmp.

* doc/emacs/input.texi (Touchscreens): Document how to
horizontally scroll.
* java/org/gnu/emacs/EmacsActivity.java (attachWindow): Give the
view focus again if necessary.
(onPause): Call right super function.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onClick):
Clear dumpFileName lest Emacs try to load a nonexistent dump
file.
* java/org/gnu/emacs/EmacsView.java (onDetachedFromWindow)
(onAttachedToWindow): Call super functions.
(onCreateInputConnection): Make sure the IME never obscures
Emacs.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, onKeyDown)
(onKeyUp): Improve tracking of quit keys.

* lisp/isearch.el (isearch-mode): Bring up the onscreen
keyboard.
* lisp/touch-screen.el (touch-screen-current-tool): Add three
fields.
(touch-screen-handle-scroll): Allow hscrolling as well.
(touch-screen-handle-touch): Add additional fields to
`touch-screen-current-tool'.
* src/Makefile.in (LIBGMP_CFLAGS, EMACS_CFLAGS): Add new
variable.
* src/android.c (android_run_select_thread):
(android_write_event): Use pthread_cond_broadcast because
pthread_cond_signal does nothing on some Android
versions/devices?

23 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 28 Jan 2023 05:30:25 +0000 (06:30 +0100)]
Merge from origin/emacs-29

128a999bfe7 Make project-current not error out inside non-existent dirs
194bc97879d Improve documentation of 'shell-command-dont-erase-buffer'
00629c03964 Fix errors in fontification of JavaScript import-statemen...
fd145499bbd Fix fontification TypeScript of import-statements (bug#61...
752c526585f ; Fix typos

23 months agoMake 'eshell-number-regexp' into a regular defvar
Jim Porter [Thu, 26 Jan 2023 21:11:15 +0000 (13:11 -0800)]
Make 'eshell-number-regexp' into a regular defvar

This isn't a very useful thing to customize, since it needs to detect
numbers that can successfully be parsed by 'string-to-number'.
Changes to this variable would therefore likely requiring adjusting
'eshell-convert-to-number' as well.

* lisp/eshell/esh-util.el (eshell-number-regexp): Make into a defvar
and improve the regexp to support more numbers (including infinity and
NaN).

* test/lisp/eshell/esh-util-tests.el
(esh-util-test/eshell-convert-to-number/floating-point)
(esh-util-test/eshell-convert-to-number/floating-point-exponent)
(esh-util-test/eshell-convert-to-number/non-numeric)
(esh-util-test/eshell-convert-to-number/no-convert): New tests.

23 months agoAdd support for negative indices and index ranges in Eshell
Jim Porter [Fri, 20 Jan 2023 21:54:20 +0000 (13:54 -0800)]
Add support for negative indices and index ranges in Eshell

* lisp/eshell/esh-util.el (eshell-integer-regexp): New defvar.

* lisp/eshell/esh-var.el (eshell-parse-indices): Expand docstring.
(eshell-parse-index): New function.
(eshell-apply-indices): Use 'eshell-parse-index' to determine whether
to treat the first index as a regexp.  Simplify the implementation a
bit.
(eshell-index-range): New pcase macro...
(eshell-index-value): ... use it, and restructure the implementation.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-indices):
New function...
(esh-var-test/interp-var-indices/list)
(esh-var-test/interp-var-indices/vector)
(esh-var-test/interp-var-indices/ring)
(esh-var-test/interp-var-indices/split): ... use it.
(esh-var-test/interp-var-string-split-indices)
(esh-var-test/interp-var-regexp-split-indices)
(esh-var-test/interp-var-assoc): Expand tests to cover things that
look like numbers or ranges, but aren't.

* doc/misc/eshell.texi (Variables): Describe how to get all arguments
of the last command.
(Dollars Expansion): Explain negative indices and index ranges.
(Bugs and ideas): Remove now-implemented ideas.

* etc/NEWS: Announce this change.

23 months agoMake project-current not error out inside non-existent dirs
Dmitry Gutov [Sat, 28 Jan 2023 01:17:39 +0000 (03:17 +0200)]
Make project-current not error out inside non-existent dirs

* lisp/progmodes/project.el (project-try-vc):
Use condition-case to catch 'file-missing' (bug#61107).

* test/lisp/progmodes/project-tests.el
(project-vc-nonexistent-directory-no-error): New test.

23 months agoImprove documentation of 'shell-command-dont-erase-buffer'
Eli Zaretskii [Fri, 27 Jan 2023 17:01:49 +0000 (19:01 +0200)]
Improve documentation of 'shell-command-dont-erase-buffer'

* doc/emacs/misc.texi (Single Shell):
* lisp/simple.el (shell-command, shell-command-on-region):
Document that non-nil value of 'shell-command-dont-erase-buffer'
affects what is displayed in the echo area after the command.
(Bug#61100)

23 months agoRepair hideif regexp problems
Mattias Engdegård [Fri, 27 Jan 2023 16:21:28 +0000 (17:21 +0100)]
Repair hideif regexp problems

* lisp/progmodes/hideif.el (hif-white-regexp, hif-tokenize):
Avoid superlinear backtracking behaviour by rewriting regexps
to avoid nested repetitions and make positive progress each time.
Use lazy matching of the innards of /*...*/ comments to avoid
matching too much.

23 months agoDon't inhibit LAP-level DCE when switch ops are present
Mattias Engdegård [Tue, 17 Jan 2023 16:57:25 +0000 (17:57 +0100)]
Don't inhibit LAP-level DCE when switch ops are present

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Allow removal of unreachable basic blocks in the LAP peephole
optimiser even when switch ops are present.  The origins of
this apparently unnecessary condition are unclear.

23 months agoFix errors in fontification of JavaScript import-statements (bug#61083)
Jostein Kjønigsen [Thu, 26 Jan 2023 19:32:18 +0000 (20:32 +0100)]
Fix errors in fontification of JavaScript import-statements (bug#61083)

Currently js-ts-mode handles imports with aliases incorrectly. To be
consistent with how we otherwise do things, we should only highlight
the variable which is new and/or introduced, in this case "someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add new
import_clause rules that adhere to the comment above.

23 months agoFix fontification TypeScript of import-statements (bug#61081)
Jostein Kjønigsen [Thu, 26 Jan 2023 18:54:27 +0000 (19:54 +0100)]
Fix fontification TypeScript of import-statements (bug#61081)

Currently typescript-ts-mode and tsx-ts-mode handles imports with
aliases incorrectly.

Consider the following case:

import { someFunc as someAlias } from "module";

In this case the entire import ("someFunc as someAlias") will be
highlighted as a variable name. "as" is also highlighted as a
variable, rather than a reserved keyword.

To be consistent with how we otherwise do things, we should only
highlight the variable which is new and/or introduced, in this case
"someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Tweak import_clause rules to
adhere to the comment above.

23 months ago; Fix typos
Stefan Kangas [Mon, 23 Jan 2023 01:27:15 +0000 (02:27 +0100)]
; Fix typos

23 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
Merge from origin/emacs-29

5859413df23 ; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
f72a394716f Work around package.el transitive dependency bug

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

3766a666b55 ; Fix issues with processing out-of-order IRC messages

23 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
Merge from origin/emacs-29

f8c95d1a768 Fix xt-mouse on terminals that report UTF-8 encoded coord...
4bf7cb71edc Fix go-ts-mode indentation and set indent offset to 8 (Bu...
ff9498624fc ; * src/insdel.c (insert_from_buffer): Fix assertions.
41f497c8bee Fix doc strings of window-splitting commands
cdf74254ffa Fix indentation for c-ts-mode (bug#61026)
4bd06ce2a9f Fix call to treesit_record_change in insdel.c
00675aa724a Add support for building tree-sitter modules with MinGW
af28191b04f * lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp.
42e02480c2b * doc/emacs/text.texi (Outline Minor Mode): New node spli...
37c1c924666 ; * etc/NEWS: Minor reordering.
cfb180329b5 ruby-ts-mode: Don't reindent when "class" or "def" is und...
abb3becb9fb treesit-install-language-grammar: Provide default repo url
c6613403e5c Fix Dired face for directory symlinks
37454de0c8f Pacify --without-x unused function warning
9a21cb10751 ; * etc/NEWS: Fix typos.
f30a4f51fef Announce outline.el keymaps
8198803f660 ; Don't mention in the Gnus manual user options that were...
8a1498c01f7 Fix fontification of function-valued variables (bug#61053)
cfe26f31893 Add new java indent rules
987e53f3e2d ; * doc/misc/erc.texi: Improve Local Modules section.
3846e79c93b ; Fix filename mismatches in prop lines of ERC tests
ecf500b5e34 Handle relative file names in vc-resynch-window and vc-re...
695e9f71c3f Use named keymaps for outline buttons
e31a5623965 * lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's p...
deee3a92623 ; Fix last change in etc/NEWS
bc78285e686 ; * etc/NEWS: Fix typos.
c15c0f7f018 CC Mode: Change the default value of objc-font-lock-extra...
7f438ff543b Don't try to make a pipe process for remote processes in ...
cb9628373a8 * lisp/startup.el (command-line): Fix warning message.  (...
e6c5f32e77d * lisp/find-dired.el (find-dired): Fix bug where M-p skip...

# Conflicts:
# etc/NEWS

23 months ago; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
Stefan Kangas [Fri, 27 Jan 2023 10:29:47 +0000 (11:29 +0100)]
; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.

This was holding up the automatic merges due to commit hooks.

23 months ago; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
Stefan Kangas [Fri, 27 Jan 2023 10:25:08 +0000 (11:25 +0100)]
; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.

This was holding up the automatic merges due to commit hooks.

23 months ago* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Improve readability
Andrea Corallo [Fri, 27 Jan 2023 09:36:47 +0000 (10:36 +0100)]
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Improve readability

23 months agoWork around package.el transitive dependency bug
Basil L. Contovounesios [Fri, 27 Jan 2023 00:27:26 +0000 (00:27 +0000)]
Work around package.el transitive dependency bug

Eglot already depends transitively on Xref 1.4.0 via Project,
but package.el doesn't pick up on this in Emacs 28
(which has Xref 1.3.0).

* lisp/progmodes/eglot.el (Version): Bump to 1.11.
(Package-Requires): Explicitly require Xref 1.4.0, which is
the version already required by Project, for the benefit of
Emacs 28 (bug#61048).

23 months ago; Fix issues with processing out-of-order IRC messages
Philip Kaludercic [Thu, 26 Jan 2023 18:39:16 +0000 (19:39 +0100)]
; Fix issues with processing out-of-order IRC messages

* lisp/net/rcirc.el (rcirc-print): Always move to the beginning of the
line, before setting any markers.

23 months ago; Fix issues with processing out-of-order IRC messages
Philip Kaludercic [Thu, 26 Jan 2023 18:39:16 +0000 (19:39 +0100)]
; Fix issues with processing out-of-order IRC messages

* lisp/net/rcirc.el (rcirc-print): Always move to the beginning of the
line, before setting any markers.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 26 Jan 2023 14:19:31 +0000 (22:19 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months ago* doc/emacs/input.texi (On-Screen Keyboards): Fix typo.
Po Lu [Thu, 26 Jan 2023 14:14:39 +0000 (22:14 +0800)]
* doc/emacs/input.texi (On-Screen Keyboards): Fix typo.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 14:11:04 +0000 (22:11 +0800)]
Update Android port

* INSTALL.android: Describe that apksigner is also required.
* configure.ac: Correctly add cross/Makefile to
SUBDIR_MAKEFILES.
* cross/Makefile.in: (config.status): Depend on
$(top_srcdir)/config.status.
* doc/emacs/input.texi (On-Screen Keyboards): Document how to
quit without a physical keyboard.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `quit'.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): New field
`lastVolumeButtonPress'.
(onKeyDown): Quit if necessary.
* m4/ndk-build.m4 (ndk_where_cc): Fix search if CC is not a
single word.
* src/android.c (android_open): Remove unused variable.
(quit): New function.
* src/androidmenu.c (android_process_events_for_menu): Allow
quitting the menu.
* src/xterm.c (handle_one_xevent, x_term_init, syms_of_xterm):
Implement features described above, so they work on free
operating systems.
* src/xterm.h (struct x_display_info): New fields `quit_keysym',
`quit_keysym_time'.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 11:54:38 +0000 (19:54 +0800)]
Update Android port

* INSTALL.android: Document how to install sqlite3.
* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):
* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Add liblog
and libandroid.
* configure.ac (SQLITE3_LIBS, HAVE_SQLITE3)
(HAVE_SQLITE3_LOAD_EXTENSION): Support on Android.
(APKSIGNER): Look for this new required binary.

* cross/ndk-build/ndk-build-shared-library.mk (objname):
* cross/ndk-build/ndk-build-static-library.mk (objname): Avoid
duplicate rules by prefixing objects with module type.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_SHARED): Fix
definition.
* cross/ndk-build/ndk-resolve.mk:
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Handle new system
libraries.

* doc/emacs/android.texi (Android File System): Document Android
10 system restriction.

* java/AndroidManifest.xml.in: Target Android 33, not 28.
* java/Makefile.in (SIGN_EMACS_V2, APKSIGNER): New variables.
($(APK_NAME)): Make sure to apply a ``version 2 signature'' to
the package as well.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
argument apiLevel.
* java/org/gnu/emacs/EmacsNoninteractive.java (main):
* java/org/gnu/emacs/EmacsThread.java (run): Pass API level.
* m4/ndk-build.m4 (ndk_package_mape): Add package mapping for
sqlite3.
* src/Makefile.in (SQLITE3_CFLAGS): New substition.
(EMACS_CFLAGS): Add that variable.

* src/android.c (android_api_level): New variable.
(initEmacs): Set it.
(android_file_access_p): Make static.
(android_hack_asset_fd): Adjust for restrictions in Android 29
and later.
(android_close_on_exec): New function.
(android_open): Adjust to not duplicate file descriptor even if
CLOEXEC.
(android_faccessat): Use fstatat at-func emulation.

* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file): Now that
sys_faccessat takes care of everything, stop calling
android_file_access_p.

23 months agoFix xref-clear-marker-stack refactoring mistake
Mattias Engdegård [Thu, 26 Jan 2023 11:36:20 +0000 (12:36 +0100)]
Fix xref-clear-marker-stack refactoring mistake

* lisp/progmodes/xref.el (xref-clear-marker-stack):
Clear the history correctly.  Changing a lexical variable has no effect.

23 months agoFix xt-mouse on terminals that report UTF-8 encoded coordinates
Eli Zaretskii [Thu, 26 Jan 2023 08:54:43 +0000 (10:54 +0200)]
Fix xt-mouse on terminals that report UTF-8 encoded coordinates

* lisp/xt-mouse.el (xterm-mouse--read-coordinate): Fix conversion
of mouse coordinates in rxvt-unicode.  Patches by Vladimir
Panteleev <git@cy.md> and Jared Finder <jared@finder.org>.
(Bug#61022)

23 months agoFix go-ts-mode indentation and set indent offset to 8 (Bug#61006)
Randy Taylor [Wed, 25 Jan 2023 02:20:48 +0000 (21:20 -0500)]
Fix go-ts-mode indentation and set indent offset to 8 (Bug#61006)

* lisp/progmodes/go-ts-mode.el (go-ts-mode-indent-offset): Change
default value to 8.
(go-ts-mode--indent-rules): Add indentation for parameters and
interfaces.

23 months ago; * src/insdel.c (insert_from_buffer): Fix assertions.
Eli Zaretskii [Thu, 26 Jan 2023 08:23:58 +0000 (10:23 +0200)]
; * src/insdel.c (insert_from_buffer): Fix assertions.

23 months agoFix doc strings of window-splitting commands
Eli Zaretskii [Thu, 26 Jan 2023 07:59:58 +0000 (09:59 +0200)]
Fix doc strings of window-splitting commands

* lisp/window.el (split-window-below, split-window-right): Doc
fixes.  (Bug#60886)

23 months agoFix indentation for c-ts-mode (bug#61026)
Yuan Fu [Thu, 26 Jan 2023 07:47:27 +0000 (23:47 -0800)]
Fix indentation for c-ts-mode (bug#61026)

Fix indentation for things like

  while (true)
    if (true)
      {
        puts ("Hello");
      }

Note that the outer while loop omits brackets.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--statement-offset-post-processr): New variable.
(c-ts-mode--statement-offset): Use the new function.
(c-ts-mode--fix-bracketless-indent): New function.
(c-ts-base-mode): Use the new function.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.

23 months agoUpdate Android port
Po Lu [Thu, 26 Jan 2023 07:37:04 +0000 (15:37 +0800)]
Update Android port

* .gitignore: Ignore lib/math.h.
* INSTALL.android: Update accordingly.
* build-aux/ndk-build-helper-1.mk:
* build-aux/ndk-build-helper-2.mk:
* build-aux/ndk-build-helper.mk:
* build-aux/ndk-module-extract.awk: Handle C++ modules.
* configure.ac: Enable libxml2 on Android.

* cross/ndk-build/Makefile.in:
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk:
* cross/ndk-build/ndk-build.mk.in:
* cross/ndk-build/ndk-resolve.mk: Fix dependency resolution of
includes.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Fix minimum SDK
version for actual popup menus.
* lib/math.h: Delete file.

* m4/ndk-build.m4 (ndk_SEARCH_MODULE, ndk_CHECK_MODULES): Look
for nasm and C++ libraries.

* src/android.c (faccessat): Rename to `android_faccessat'.
* src/android.h: Update prototypes.
* src/dired.c (file_name_completion_dirp):
* src/fileio.c (file_access_p, Faccess_file, file_directory_p):
* src/lisp.h:
* src/lread.c (openp):
* src/process.c (allocate_pty): Use sys_faccessat.
* src/sysdep.c (sys_faccessat): New function.

23 months agoFix call to treesit_record_change in insdel.c
Yuan Fu [Thu, 26 Jan 2023 07:12:41 +0000 (23:12 -0800)]
Fix call to treesit_record_change in insdel.c

The start position of the change shouldn't be PT_BYTE, IIUC PT_BYTE is
actually the end position.

* src/insdel.c (insert_from_buffer): Move to here.
(insert_from_buffer_1): Remove call to treesit_record_change.

23 months agoAdd support for building tree-sitter modules with MinGW
Randy Taylor [Thu, 19 Jan 2023 14:16:55 +0000 (09:16 -0500)]
Add support for building tree-sitter modules with MinGW

* admin/notes/tree-sitter/build-module/build.sh: Add support for
building tree-sitter modules with MinGW.

23 months agoRemove unused file
Po Lu [Thu, 26 Jan 2023 06:13:24 +0000 (14:13 +0800)]
Remove unused file

* cross/ndk-build/ndk-build.in: Delete unused file.

23 months agoIncrease DUMPED_HEAP_SIZE
Po Lu [Thu, 26 Jan 2023 00:40:27 +0000 (08:40 +0800)]
Increase DUMPED_HEAP_SIZE

* src/w32heap.c (DUMPED_HEAP_SIZE): Add 5 megabytes.

23 months agoWhen base64-decoding part of decrypted text, save the decoding
Richard Stallman [Wed, 25 Jan 2023 21:35:37 +0000 (16:35 -0500)]
When base64-decoding part of decrypted text, save the decoding
  permanently if we save the decryption permanently.

(rmail-epa-decode): Take arguments BEG and BACK-FROM-END to designate region.
(rmail-epa-decrypt-1): Call rmail-epa-decode from here, when decrypting one
encrypted passage.
(rmail-epa-decrypt): Not from here.

23 months ago* lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp.
Michael Albinus [Wed, 25 Jan 2023 19:14:12 +0000 (20:14 +0100)]
* lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp.

23 months ago* doc/emacs/text.texi (Outline Minor Mode): New node split from "Outline Mode"
Juri Linkov [Wed, 25 Jan 2023 18:19:44 +0000 (20:19 +0200)]
* doc/emacs/text.texi (Outline Minor Mode): New node split from "Outline Mode"

(Outline Mode): Move all outline-minor-mode related information to the
new node "Outline Minor Mode" (bug#61062).

23 months ago; * etc/NEWS: Minor reordering.
Juri Linkov [Wed, 25 Jan 2023 17:38:01 +0000 (19:38 +0200)]
; * etc/NEWS: Minor reordering.

Move Exif section closer to Image changes, define-keymap/defvar-keymap
and lookup-key closer to Keymaps section.

23 months agoruby-ts-mode: Don't reindent when "class" or "def" is under "ERROR"
Dmitry Gutov [Wed, 25 Jan 2023 15:21:49 +0000 (17:21 +0200)]
ruby-ts-mode: Don't reindent when "class" or "def" is under "ERROR"

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Don't reindent when "class" or "def" is under "ERROR" (bug#61017).

23 months agotreesit-install-language-grammar: Provide default repo url
Dmitry Gutov [Wed, 25 Jan 2023 15:01:28 +0000 (17:01 +0200)]
treesit-install-language-grammar: Provide default repo url

* lisp/treesit.el (treesit--check-repo-url): New function.
(treesit--install-language-grammar-build-recipe): Use it (bug#61051).

23 months agoFix Dired face for directory symlinks
Basil L. Contovounesios [Wed, 25 Jan 2023 14:24:39 +0000 (14:24 +0000)]
Fix Dired face for directory symlinks

* lisp/dired.el (dired-font-lock-keywords): Fontify directory
symlinks with the value of dired-directory-face rather than its name
as a (nonexistent) face (bug#60977).

23 months agoPacify --without-x unused function warning
Basil L. Contovounesios [Wed, 25 Jan 2023 01:02:30 +0000 (01:02 +0000)]
Pacify --without-x unused function warning

* src/xfaces.c (font_maybe_unset_attribute): Move definition...
[HAVE_WINDOW_SYSTEM] (font_maybe_unset_attribute): ...to here, since
the function is used only when we HAVE_WINDOW_SYSTEM (bug#61049).

23 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 25 Jan 2023 14:31:33 +0000 (15:31 +0100)]
; * etc/NEWS: Fix typos.

23 months agoUpdate Android port
Po Lu [Wed, 25 Jan 2023 14:07:51 +0000 (22:07 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsDrawLine.java: Fix this again.  Gosh,
how does Android do this.
* java/org/gnu/emacs/EmacsNoninteractive.java (main): Port to
Android 2.3.3.

* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard): Port to Android 4.0.3.
* java/org/gnu/emacs/EmacsService.java (getClipboardManager):
New function.

* src/alloc.c (find_string_data_in_pure): Fix Android alignment
issue.

* src/android-emacs.c (main): Port to Android 4.4.
* src/android.c (initEmacs): Align stack to 32 bytes, so it ends
up aligned to 16 even though gcc thinks the stack is already
aligned to 16 bytes.

* src/callproc.c (init_callproc): Use /system/bin/sh instead of
/bin/sh by default.

23 months agoRemove extra header
Po Lu [Wed, 25 Jan 2023 14:05:15 +0000 (22:05 +0800)]
Remove extra header

* cross/lib/math.h: Delete header.

23 months agoAnnounce outline.el keymaps
Robert Pluim [Wed, 25 Jan 2023 13:23:44 +0000 (14:23 +0100)]
Announce outline.el keymaps

* etc/NEWS: Announce new keymaps.

23 months ago; Don't mention in the Gnus manual user options that were removed
Arash Esbati [Wed, 25 Jan 2023 10:02:24 +0000 (11:02 +0100)]
; Don't mention in the Gnus manual user options that were removed

* doc/misc/gnus.texi (HTML): Delete entries for custom variables
removed in commit 2c8b2fc8d5.  (Bug#61054)

23 months agoFix fontification of function-valued variables (bug#61053)
Jostein Kjønigsen [Wed, 25 Jan 2023 09:38:09 +0000 (10:38 +0100)]
Fix fontification of function-valued variables (bug#61053)

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Remove overrides and reorder
the variable_declarator rule.

23 months agoAdd new java indent rules
Theodor Thornhill [Wed, 25 Jan 2023 12:00:33 +0000 (13:00 +0100)]
Add new java indent rules

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check
for enum_body_declarations and switch_label.

23 months agoMinor fixes to Android port
Po Lu [Wed, 25 Jan 2023 11:15:30 +0000 (19:15 +0800)]
Minor fixes to Android port

* java/Makefile.in: (emacs.apk-in): Don't call cp with empty
args.
* java/org/gnu/emacs/EmacsDrawLine.java (perform): Fix for
PostScript filling semantics.
* src/Makefile.in (android-emacs): Build android-emacs directly.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 25 Jan 2023 10:45:09 +0000 (18:45 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Wed, 25 Jan 2023 10:44:47 +0000 (18:44 +0800)]
Update Android port

* doc/emacs/android.texi (Android Startup, Android Environment):
Document that restrictions on starting Emacs have been lifted.

* java/README: Document Java for Emacs developers and how the
Android port works.

* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication)
(findDumpFile): New function.
(onCreate): Factor out dump file finding functions to there.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Update
function declarations.
* java/org/gnu/emacs/EmacsNoninteractive.java
(EmacsNoninteractive): New class.

* java/org/gnu/emacs/EmacsService.java (EmacsService, getApkFile)
(onCreate): Pass classpath to setEmacsParams.
* java/org/gnu/emacs/EmacsThread.java (EmacsThread): Make run an
override.
* lisp/loadup.el: Don't dump on Android when noninteractive.
* lisp/shell.el (shell--command-completion-data): Handle
inaccessible directories.
* src/Makefile.in (android-emacs): Link with gnulib.
* src/android-emacs.c (main): Implement to launch app-process
and then EmacsNoninteractive.
* src/android.c (setEmacsParams): New argument `class_path'.
Don't set stuff up when running noninteractive.
* src/android.h (initEmacs): Likewise.
* src/androidfont.c (init_androidfont):
* src/androidselect.c (init_androidselect): Don't initialize
when running noninteractive.
* src/emacs.c (load_pdump): New argument `dump_file'.
(android_emacs_init): Give new argument `dump_file' to
`load_pdump'.
* src/sfntfont-android.c (init_sfntfont_android): Don't
initialize when running noninteractive.

23 months agoImport gnulib modules printf-posix and vasprintf-posix
Po Lu [Wed, 25 Jan 2023 10:39:36 +0000 (18:39 +0800)]
Import gnulib modules printf-posix and vasprintf-posix

These are neccessary because Android's printf is missing basic format
modifiers such as t.

* admin/merge-gnulib (GNULIB_MODULES): Add printf-posix and
vasprintf-posix.  Update from gnulib.
* configure.ac (CFLAGS): Add -DHAVE_CONFIG_H.

23 months ago; * doc/misc/erc.texi: Improve Local Modules section.
F. Jason Park [Wed, 25 Jan 2023 03:49:02 +0000 (19:49 -0800)]
; * doc/misc/erc.texi: Improve Local Modules section.

23 months ago; Fix filename mismatches in prop lines of ERC tests
F. Jason Park [Tue, 24 Jan 2023 10:34:29 +0000 (02:34 -0800)]
; Fix filename mismatches in prop lines of ERC tests

* test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el: Fix file
name in prop line and footer.
* test/lisp/erc/erc-scenarios-base-local-modules.el: Fix file name in
prop line and footer.
* test/lisp/erc/erc-scenarios-base-netid-samenet.el: Fix file name in
prop line and footer.
* test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el: Fix file
name in prop line and footer.
* test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el: Fix file
name in prop line and footer.

23 months agoPacify Apple clang version 13.0.0 (clang-1300.0.29.30):
Paul Eggert [Tue, 24 Jan 2023 23:18:55 +0000 (15:18 -0800)]
Pacify Apple clang version 13.0.0 (clang-1300.0.29.30):

* src/coding.c: When compiling with Apple clang, ignore
-Wunused-but-set-variable only in Clang 14 and greater.
Problem reported by Mattias Engdegård.

23 months agoHandle relative file names in vc-resynch-window and vc-resynch-buffer
Juri Linkov [Tue, 24 Jan 2023 18:48:20 +0000 (20:48 +0200)]
Handle relative file names in vc-resynch-window and vc-resynch-buffer

* lisp/vc/vc-dispatcher.el (vc-resynch-window, vc-resynch-buffer):
While comparing with `buffer-file-name' if `file' is not absolute
use `expand-file-name' in `vc-root-dir'.  This fixes the case of
refreshing the buffers after typing `C-x v = C-x v u' (bug#60897).

23 months agoUse named keymaps for outline buttons
Robert Pluim [Tue, 24 Jan 2023 18:37:56 +0000 (20:37 +0200)]
Use named keymaps for outline buttons

https://lists.gnu.org/archive/html/emacs-devel/2023-01/msg00334.html

* lisp/outline.el (outline-button-icon-map)
(outline-overlay-button-map, outline-inserted-button-map):
Keymaps refactored from outline--create-button-icons and
outline--insert-button.
(outline--create-button-icons, outline--insert-button): Move
keymaps to separate variables.

23 months ago* lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's process.
Juri Linkov [Tue, 24 Jan 2023 18:24:15 +0000 (20:24 +0200)]
* lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's process.

* lisp/vc/vc-git.el (vc-git--pushpull): Add comment.

* lisp/vc/vc.el (vc-pull-and-push): Expand docstring about
prerequisites for backend to support this command (bug#60569).

23 months ago; Fix last change in etc/NEWS
Michael Albinus [Tue, 24 Jan 2023 17:27:57 +0000 (18:27 +0100)]
; Fix last change in etc/NEWS

23 months agoMake binaries distributed with Emacs work on Android
Po Lu [Tue, 24 Jan 2023 13:37:22 +0000 (21:37 +0800)]
Make binaries distributed with Emacs work on Android

* doc/lispref/processes.texi (Subprocess Creation): Document
variables containing program names.
* etc/NEWS: Document new variables.
* java/Makefile.in (CROSS_BINS): Add missing etags binary.
* lisp/cedet/semantic/db-ebrowse.el
(semanticdb-create-ebrowse-database):
* lisp/gnus/mail-source.el (mail-source-movemail-program):
* lisp/hexl.el (hexl-program):
* lisp/htmlfontify.el (hfy-etags-bin):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/mail/rmail.el (rmail-autodetect):
(rmail-insert-inbox-text):
* lisp/org/org-ctags.el (org-ctags-path-to-ctags):
* lisp/progmodes/cperl-mode.el (cperl-etags):
* lisp/speedbar.el (speedbar-fetch-etags-command):
* lisp/textmodes/reftex-global.el (reftex-create-tags-file): Use
new variables.
* src/callproc.c (syms_of_callproc): New variables naming
binaries redistributed with Emacs.

23 months agoEnable libjpeg on Android
Po Lu [Tue, 24 Jan 2023 11:10:58 +0000 (19:10 +0800)]
Enable libjpeg on Android

* INSTALL.android: Update documentation.
* build-aux/ndk-build-helper-1.mk: When building shared
libraries, do not link libemacs.so with dependent archive files.
* build-aux/ndk-build-helper-2.mk: Add whole archive
dependencies as well.

* configure.ac (HAVE_JPEG): Enable on Android.

* cross/ndk-build/ndk-build-shared-library.mk: Link the shared
object with archive file dependencies.
* cross/ndk-build/ndk-build-static-library.mk: Build all code
position-independently.
* cross/ndk-build/ndk-resolve.mk: Separately resolve a names of
archive and whole archive dependencies.

* src/Makefile.in (JPEG_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.

23 months agoUpdate Android port
Po Lu [Tue, 24 Jan 2023 09:31:16 +0000 (17:31 +0800)]
Update Android port

* INSTALL.android: Update.
* build-aux/ndk-build-helper-1.mk: Fix typo.
* configure.ac: Enable --with-json on Android.
* cross/ndk-build/ndk-build-shared-library.mk:
(NDK_CFLAGS_$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME):
* cross/ndk-build/ndk-build-static-library.mk:
(ALL_OBJECT_FILES$(LOCAL_MODULE)):
(LOCAL_MODULE_FILENAME): Recursively resolve dependencies.
* cross/ndk-build/ndk-resolve.mk: New function.

* doc/emacs/android.texi (Android Startup): Document how Emacs
is dumped during initial startup.

* java/Makefile.in (filename): Fix build with multiple shared
libraries.
* java/README: Improve commentary.
* java/org/gnu/emacs/EmacsApplication.java (onCreate): Look and
set dump file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function getFingerprint.
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate):
Add option to erase the dump file.
* java/org/gnu/emacs/EmacsService.java (browseUrl): New
function.
* java/org/gnu/emacs/EmacsThread.java (run): Specify dump file
if found.
* lisp/loadup.el: Always dump during loadup on Android.

* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
(browse-url-default-browser):
(browse-url-default-android-browser): New browse url type.

* m4/ndk-build.m4 (ndk_package_map): Map jansson to libjansson.
* src/android.c (struct android_emacs_service): New method
`browse_url'.
(getFingerprint): New function.
(android_init_emacs_service): Initialize new method.
(android_browse_url): New function.

* src/android.h: Update prototypes.

* src/androidselect.c (Fandroid_browse_url): New function.
(syms_of_androidselect): Define it.

* src/emacs.c (load_pdump): Don't look in fancy places on
Android.
* src/pdumper.c (Fdump_emacs_portable): Allow dumping while
interactive on Android.
(syms_of_pdumper): New variable `pdumper-fingerprint'.

* src/sfntfont-android.c (sfntfont_android_composite_bitmap):
Fix unused variables.

23 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Tue, 24 Jan 2023 08:27:17 +0000 (09:27 +0100)]
; * etc/NEWS: Fix typos.

23 months agoUpdate from gnulib
Po Lu [Tue, 24 Jan 2023 02:46:53 +0000 (10:46 +0800)]
Update from gnulib

Update from gnulib.  In addition,

* admin/merge-gnulib: Fix paths for rename.

23 months agoImprove lib-src/Makefile.in
Po Lu [Tue, 24 Jan 2023 02:40:44 +0000 (10:40 +0800)]
Improve lib-src/Makefile.in

* lib-src/Makefile.in (DONT_INSTALL):
(clean): Correctly define asset-directory-tool.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 24 Jan 2023 02:38:07 +0000 (10:38 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoFix distclean target
Po Lu [Tue, 24 Jan 2023 02:37:26 +0000 (10:37 +0800)]
Fix distclean target

* cross/Makefile.in (distclean bootstrap-clean): Remove Makefile.

23 months agoUpdate Android port
Po Lu [Tue, 24 Jan 2023 02:34:40 +0000 (10:34 +0800)]
Update Android port

* .gitignore: Update with new files.  Do not ignore std*.in.h.
* INSTALL.android: Explain how to build Emacs with external
dependencies.

* Makefile.in (xcompile, cross): Rename to `cross'.
(clean_dirs): Clean cross, not xcompile.

* README: Document new directories.

* build-aux/ndk-build-helper-1.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-3.mk (build_kind):
* build-aux/ndk-build-helper-4.mk:
* build-aux/ndk-build-helper.mk (NDK_BUILD_DIR, my-dir):
* build-aux/ndk-module-extract.awk: New files.
* configure.ac: Set up libgif, libwebp, and libpng for
ndk-build.
* cross/ndk-build/Makefile.in (srcdir, NDK_BUILD_ANDROID_MK):
* cross/ndk-build/ndk-build-executable.mk:
* cross/ndk-build/ndk-build-shared-library.mk (eq, objname):
* cross/ndk-build/ndk-build-static-library.mk (eq, objname):
* cross/ndk-build/ndk-build.in (NDK_BUILD_MODULES):
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-prebuilt-shared-library.mk:
* cross/ndk-build/ndk-prebuilt-static-library.mk: New files.
* doc/emacs/android.texi (Android, Android Environment):
Document clipboard support on Android.
* doc/emacs/emacs.texi (Top): Update menus.
* etc/MACHINES: Document Android.
* java/AndroidManifest.xml.in: Respect new
`--with-android-debug' option.
* java/Makefile.in (CROSS_BINS, CROSS_LIBS): Adjust for rename.
Include ndk-build.mk.:(emacs.apk-in): Depend on shared
libraries.  Then, package shared libraries.
* java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New
class.
* java/org/gnu/emacs/EmacsFontDriver.java: Update comment to say
this is unused.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `sendExpose'.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard):
* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(EmacsSdk8Clipboard): New classes.
* java/org/gnu/emacs/EmacsView.java (EmacsView, handleDirtyBitmap)
(onDetachedFromWindow): When window is reattached, expose the
frame.

* lib/Makefile.in (VPATH):
(ALL_CFLAGS): Adjust for rename.

* lisp/term/android-win.el (android-clipboard-exists-p)
(android-get-clipboard, android-set-clipboard)
(android-clipboard-owner-p, android-primary-selection)
(android-get-clipboard-1, android-get-primary)
(android-selection-bounds, android-encode-select-string)
(gui-backend-get-selection, gui-backend-selection-exists-p)
(gui-backend-selection-owner-p, gui-backend-set-selection): New
functions.

* m4/ndk-build.m4: New file.
* src/Makefile.in (GIF_CFLAGS, ANDROID_LDFLAGS): New variables.
(EMACS_CFLAGS): Add GIF_CFLAGS.  Include
ndk-build.mk.
(libemacs.so): Depend on and link with required
libraries.

* src/android.c (android_check_compressed_file): New function.
(android_open): Work around Android platform bug.
(sendExpose): New function.
(android_readdir): Set d_type if this is a directory.

* src/androidgui.h (enum android_event_type)
(struct android_expose_event, union android_event): Add expose
events.

* src/androidselect.c (struct android_emacs_clipboard)
(android_init_emacs_clipboard, Fandroid_clipboard_owner_p)
(Fandroid_set_clipboard, Fandroid_get_clipboard)
(Fandroid_clipboard_exists_p, init_androidselect)
(syms_of_androidselect): New file.

* src/androidterm.c (handle_one_android_event): Handle
exposures.
* src/androidterm.h: Update prototypes.
* src/emacs.c (android_emacs_init): Initialize androidselect.

23 months agoUpdate android port
Po Lu [Tue, 24 Jan 2023 02:24:13 +0000 (10:24 +0800)]
Update android port

* xcompile: Move to cross.
* cross: New directory.

23 months agoUpdate android port
Po Lu [Tue, 24 Jan 2023 02:23:52 +0000 (10:23 +0800)]
Update android port

* xcompile: Move to cross.
* cross: New directory.

23 months agoCC Mode: Change the default value of objc-font-lock-extra-types to nil
Alan Mackenzie [Mon, 23 Jan 2023 21:28:32 +0000 (21:28 +0000)]
CC Mode: Change the default value of objc-font-lock-extra-types to nil

This fixes bug #59234, in which random identifiers in a .m file were getting
fontified as types.

* lisp/progmodes/cc-vars.el (objc-font-lock-extra-types): Change the default
value to nil.

* etc/NEWS: Mention the change in default value of objc-font-lock-extra-types,
and how to get the old behavior back.

23 months agoCC Mode: Don't do c-backward-syntactic-ws following a forward movement
Alan Mackenzie [Mon, 23 Jan 2023 20:25:53 +0000 (20:25 +0000)]
CC Mode: Don't do c-backward-syntactic-ws following a forward movement

This was happening in, e.g., c-forward-type, which moves over whitespace at
the end of the scanned type.  This WS movement can exit a comment or a macro,
such that a c-backward-syntactic-ws does not return to the desired point, but
to before the entire comment/macro.

* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id)
(c-forward-id-comma-list, c-forward-noise-clause, c-forward-keyword-clause)
(c-forward-name, c-forward-type): Add a new &optional parameter `stop-at-end'
which when non-nil means "do not move over syntactic WS after performing the
main job", and adapt the internals of these macros and functions accordingly.
(c-forward-declarator, c-forward-decl-or-cast-1): In the calls to
c-forward-type and c-forward-name, set the stop-at-end argument to t, and call
c-forward-sytactic-ws later.

23 months agoDon't try to make a pipe process for remote processes in Eshell
Jim Porter [Mon, 23 Jan 2023 06:54:53 +0000 (22:54 -0800)]
Don't try to make a pipe process for remote processes in Eshell

Tramp currently isn't able to handle this, so the result will just
produce an error (bug#61024).

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Check for a
remote 'default-directory' before trying to make a pipe process.

* test/lisp/eshell/esh-proc-tests.el
(esh-var-test/output/remote-redirect): New test.

23 months ago; * lisp/calendar/appt.el (appt-check): Fix byte-compile warning
Robert Pluim [Mon, 23 Jan 2023 13:42:11 +0000 (14:42 +0100)]
; * lisp/calendar/appt.el (appt-check): Fix byte-compile warning

23 months ago* lisp/startup.el (command-line): Fix warning message. (Bug#61014)
Eli Zaretskii [Mon, 23 Jan 2023 13:09:07 +0000 (15:09 +0200)]
* lisp/startup.el (command-line): Fix warning message.  (Bug#61014)

23 months agoSwap tag and element in html-ts-mode (bug#60972)
Theodor Thornhill [Sun, 22 Jan 2023 18:17:41 +0000 (19:17 +0100)]
Swap tag and element in html-ts-mode (bug#60972)

* lisp/textmodes/html-ts-mode.el: New values for
'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp'.

23 months ago; * lisp/eshell/esh-arg.el (eshell-prepare-splice): Fix quoting.
Robert Pluim [Mon, 23 Jan 2023 10:33:23 +0000 (11:33 +0100)]
; * lisp/eshell/esh-arg.el (eshell-prepare-splice): Fix quoting.

23 months agoFactor out some Tramp code
Michael Albinus [Mon, 23 Jan 2023 10:02:56 +0000 (11:02 +0100)]
Factor out some Tramp code

* lisp/net/tramp-compat.el (tramp-file-name-handler): Don't declare.

* lisp/net/tramp.el (tramp-skeleton-file-truename)
(tramp-skeleton-handle-make-symbolic-link): New defmacros.
(tramp-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-file-truename):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename)
(tramp-sudoedit-handle-make-symbolic-link): Use them.

* lisp/net/tramp.el (tramp-call-process, tramp-call-process-region):
Let-bind `temporary-file-directory'.

* test/lisp/net/tramp-tests.el (tramp-action-yesno):
Suppress run in tests.
(tramp-test21-file-links, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test42-utf8): Adapt tests.

23 months agoAdd `yes-or-no-prompt' user option
Robert Pluim [Tue, 3 Jan 2023 16:09:53 +0000 (17:09 +0100)]
Add `yes-or-no-prompt' user option

This implements Bug#60312

* src/fns.c (syms_of_fns): Define `yes-or-no-prompt' Lisp variable.
(Fyes_or_no_p): Use `yes-or-no-prompt' instead of a hard-coded string.
* lisp/cus-start.el (standard): Add custom specification for it.

* doc/emacs/mini.texi (Yes or No Prompts): Document `yes-or-no-prompt'
* doc/lispref/minibuf.texi (Yes-or-No Queries): And here.

* etc/NEWS: Announce the new option.

23 months ago* lisp/find-dired.el (find-dired): Fix bug where M-p skips first history item.
Juri Linkov [Mon, 23 Jan 2023 07:55:29 +0000 (09:55 +0200)]
* lisp/find-dired.el (find-dired): Fix bug where M-p skips first history item.

Don't apply "skip first duplicate history item" trick when find-args
used as initial input is nil.

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 05:30:18 +0000 (06:30 +0100)]
Merge from origin/emacs-29

647cc9c65e7 Update to Org 9.6.1-16-ge37e9b

23 months agoUpdate to Org 9.6.1-16-ge37e9b
Kyle Meyer [Mon, 23 Jan 2023 02:53:39 +0000 (21:53 -0500)]
Update to Org 9.6.1-16-ge37e9b

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 01:09:15 +0000 (02:09 +0100)]
Merge from origin/emacs-29

b3814b43f60 (ruby-ts--predefined-variables): Fix the $` and $' entries
db02cbdfe02 * lisp/find-dired.el (find-dired-with-command): Quote fin...
2343a067c3d Generalize vc-pull-and-push to support more backends (bug...
846838dbab8 Add test suite for sgml-html-meta-auto-coding-function
0fb90f524db Fix decoding HTML files from archives
c854ef7a187 ; Fix last change (bug#60556).
8e83604dfe0 Avoid crashes in batch Emacs sub-processes on MS-Windows
808e101fabe Tweak BSD style indentation (bug#60984)
204519a2e73 Fix typo of exposed symbol name
9296e0c6495 Fix typo after move to common lib (bug#61001)
e74ba72a6a3 ruby-ts-mode: Fix two additional cases with ruby-method-c...
ae7e28a4372 ruby-mode.el: Expand some docstrings with examples
89cb3c3f157 Minor fixes for Haiku
6adc193ad66 Move c-like common utils into own library (bug#60961)

# Conflicts:
# lisp/progmodes/typescript-ts-mode.el

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

161706ec331 ; Actually use dummy package descriptor

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
Merge from origin/emacs-29

b875c9bf67e Fix file-regular-p in Tramp
63fa225d443 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
9f5d6c541e5 ; * doc/emacs/custom.texi (Init Rebinding): Fix wording i...
a91b435d0d5 ; Reword user documentation on binding keys in Lisp
0400de6a7de Fix typo in c-ts-mode (bug#60932)

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:43 +0000 (01:34 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

0400de6a7de Fix typo in c-ts-mode (bug#60932)

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 23 Jan 2023 00:34:39 +0000 (01:34 +0100)]
Merge from origin/emacs-29

b3de81a6ee3 MH-E: handle removal of mhparam libdir from nmh 1.8
d63e1a89518 Use point-min to anchor top-level constructs (bug#60602)
34793337783 * lisp/org/ob-ruby.el: Fix outdated comments.
472f1425985 ; ruby-ts-mode: Add a Version tag
0cf053648a4 ; ruby-ts-mode: Update font-lock features list in Commentary
67ee627c38d (project-try-vc): Add string-start and string-end anchors...
06953fc8e1d Make `keymap-set-after' work for menus
dcd59457b48 Use `key-parse' in `keymap-lookup'
8904a26a9d2 Improve `keymap-set-after' documentation
c7e02eaa3d9 Handle after arg correctly in `keymap-set-after'
628b6241763 Don't load erc-goodies atop erc.el
40cf494b7ce ; * etc/NEWS: Fix typos.
6b2f85caa6c Make tree-sitter based modes optional
b56cf28b325 ; (ruby-ts--predefined-variables): Make it a little shorter
d94dc606a09 ruby-ts-mode: Claw back half of the performance drop from...
d0d34514097 (ruby-ts-mode): Rename 'builtin-functions' to 'builtin-fu...
d66ac5285f7 ruby-ts-mode: Highlight builtin methods
370b1ac99ec ; ruby-ts-mode.el: Add customize-group mention to commentary
7b7b2b95138 Fix c-ts-mode indent (bug#60873)
7ca71d66dc7 Fix various problems in treesit-explore-mode (bug#60800)
b7d6bb47ee5 ; * lisp/treesit.el (treesit-font-lock-fontify-region): M...
0c6bfeddb21 ; Update tree-sitter major mode manual
c289786886b ; Add commentary and dostring in c-ts-mode

# Conflicts:
# etc/NEWS
# lisp/progmodes/c-ts-mode.el
# lisp/progmodes/go-ts-mode.el

23 months ago(ruby-ts--predefined-variables): Fix the $` and $' entries
Dmitry Gutov [Sun, 22 Jan 2023 18:50:54 +0000 (20:50 +0200)]
(ruby-ts--predefined-variables): Fix the $` and $' entries

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-variables):
Fix the $` and $' entries, somehow replaced by curly quote.

Reported by Mattias Engdegård.

23 months ago* lisp/find-dired.el (find-dired-with-command): Quote find-command-history.
Juri Linkov [Sun, 22 Jan 2023 17:51:51 +0000 (19:51 +0200)]
* lisp/find-dired.el (find-dired-with-command): Quote find-command-history.

23 months agoGeneralize vc-pull-and-push to support more backends (bug#60569)
Juri Linkov [Sun, 22 Jan 2023 17:27:10 +0000 (19:27 +0200)]
Generalize vc-pull-and-push to support more backends (bug#60569)

* lisp/vc/vc-git.el (vc-git-pull-and-push): Remove and move its logic to
vc-pull-and-push.

* lisp/vc/vc.el (vc-pull-and-push): Add code from vc-git-pull-and-push.

23 months agoAdd test suite for sgml-html-meta-auto-coding-function
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:13:39 +0000 (20:13 +0200)]
Add test suite for sgml-html-meta-auto-coding-function

* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post, sgml-html-meta-run, sgml-html-meta-utf-8)
(sgml-html-meta-windows-hebrew, sgml-html-meta-none)
(sgml-html-meta-unknown-coding, sgml-html-meta-no-pre)
(sgml-html-meta-no-post-less-than-10lines)
(sgml-html-meta-no-post-10lines, sgml-html-meta-utf-8-with-bom): Add.

23 months agoFix decoding HTML files from archives
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:08:15 +0000 (20:08 +0200)]
Fix decoding HTML files from archives

* lisp/international/mule.el (sgml-xml-auto-coding-function): Avoid
signaling an error from coding-system-equal when the XML encoding tag
specifies an encoding whose type is 'charset'.  (Bug#61005)

This is the same fix as in #df7ed10e for
sgml-xml-auto-coding-function.

23 months ago; Fix last change (bug#60556).
Eli Zaretskii [Sun, 22 Jan 2023 13:12:05 +0000 (15:12 +0200)]
; Fix last change (bug#60556).