[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/positioned-lambdas 2dea559e5e1 2/2: Merge branch 'master' into f
From: |
Alan Mackenzie |
Subject: |
feature/positioned-lambdas 2dea559e5e1 2/2: Merge branch 'master' into feature/positioned-lambdas |
Date: |
Mon, 25 Mar 2024 07:37:12 -0400 (EDT) |
branch: feature/positioned-lambdas
commit 2dea559e5e1d7cf91012bddd92211672bb581fd1
Merge: 300d7ff70e8 f54b1d9f7b7
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
Merge branch 'master' into feature/positioned-lambdas
---
java/org/gnu/emacs/EmacsService.java | 24 ++++++++++++++++++++++--
lisp/emacs-lisp/byte-opt.el | 3 ---
lisp/vc/diff-mode.el | 2 +-
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/java/org/gnu/emacs/EmacsService.java
b/java/org/gnu/emacs/EmacsService.java
index 07bfb525be9..4e863c750d3 100644
--- a/java/org/gnu/emacs/EmacsService.java
+++ b/java/org/gnu/emacs/EmacsService.java
@@ -46,9 +46,11 @@ import android.view.KeyEvent;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.ExtractedText;
+import android.app.AlarmManager;
import android.app.Notification;
-import android.app.NotificationManager;
import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
import android.app.Service;
import android.content.ClipboardManager;
@@ -724,11 +726,29 @@ public final class EmacsService extends Service
restartEmacs ()
{
Intent intent;
+ PendingIntent pending;
+ AlarmManager manager;
intent = new Intent (this, EmacsActivity.class);
intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_CLEAR_TASK);
- startActivity (intent);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
+ startActivity (intent);
+ else
+ {
+ /* Experimentation has established that Android 4.3 and earlier
+ versions do not attempt to recreate a process when it crashes
+ immediately after requesting that an intent for itself be
+ started. Schedule an intent to start some time after Emacs
+ exits instead. */
+
+ pending = PendingIntent.getActivity (this, 0, intent, 0);
+ manager = (AlarmManager) getSystemService (Context.ALARM_SERVICE);
+ manager.set (AlarmManager.RTC, System.currentTimeMillis () + 100,
+ pending);
+ }
+
System.exit (0);
}
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 1241690cb0b..601f8fd8de1 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -482,9 +482,6 @@ There can be multiple entries for the same NAME if it has
several aliases.")
(push name byte-optimize--dynamic-vars)
`(,fn ,name . ,optimized-rest)))
- (`(,(pred byte-code-function-p) . ,exps)
- (cons fn (mapcar #'byte-optimize-form exps)))
-
((guard (when for-effect
(if-let ((tmp (byte-opt--fget fn 'side-effect-free)))
(or byte-compile-delete-errors
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 0f393ba86a2..66043059d14 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1619,7 +1619,7 @@ modified lines of the diff."
nil)))
(when (eq diff-buffer-type 'git)
(setq diff-outline-regexp
- (concat "\\(^diff --git.*\n\\|" diff-hunk-header-re "\\)")))
+ (concat "\\(^diff --git.*\\|" diff-hunk-header-re "\\)")))
(setq-local outline-level #'diff--outline-level)
(setq-local outline-regexp diff-outline-regexp))