[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 326437e6c8a 3/3: Merge remote-tracking branch 'savannah/master' i
From: |
Po Lu |
Subject: |
master 326437e6c8a 3/3: Merge remote-tracking branch 'savannah/master' into master-android-1 |
Date: |
Tue, 23 Apr 2024 03:59:23 -0400 (EDT) |
branch: master
commit 326437e6c8a6497b1a38d002b1d28e74678a07aa
Merge: cd7456e00d7 d22c260cb7d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'savannah/master' into master-android-1
---
lisp/progmodes/c-ts-common.el | 16 +++++++++++++---
src/sysdep.c | 8 ++++----
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
index 735126e1eac..457aa55c195 100644
--- a/lisp/progmodes/c-ts-common.el
+++ b/lisp/progmodes/c-ts-common.el
@@ -301,7 +301,7 @@ and /* */ comments. SOFT works the same as in
(delete-region (line-beginning-position) (point))
(insert "//" whitespaces)))
- ;; Line starts with /* or /**
+ ;; Line starts with /* or /**.
((save-excursion
(beginning-of-line)
(looking-at (rx "/*" (group (? "*") (* " ")))))
@@ -310,14 +310,24 @@ and /* */ comments. SOFT works the same as in
(delete-region (line-beginning-position) (point))
(insert " *" (make-string whitespace-and-star-len ?\s))))
- ;; Line starts with *
+ ;; Line starts with *.
((save-excursion
(beginning-of-line)
(looking-at (rx (group (* " ") (or "*" "|") (* " ")))))
(let ((prefix (match-string 1)))
(if soft (insert-and-inherit ?\n) (newline 1))
(delete-region (line-beginning-position) (point))
- (insert prefix)))))
+ (insert prefix)))
+
+ ;; Line starts with whitespaces or no space. This is basically the
+ ;; default case since (rx (* " ")) matches anything.
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at (rx (* " "))))
+ (let ((whitespaces (match-string 0)))
+ (if soft (insert-and-inherit ?\n) (newline 1))
+ (delete-region (line-beginning-position) (point))
+ (insert whitespaces)))))
;;; Statement indent
diff --git a/src/sysdep.c b/src/sysdep.c
index cf2985b4b89..07237885cb9 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2037,10 +2037,10 @@ init_signals (void)
main_thread_id = pthread_self ();
#endif
- /* Don't alter signal handlers if dumping. On some machines,
- changing signal handlers sets static data that would make signals
- fail to work right when the dumped Emacs is run. */
- if (will_dump_p ())
+ /* Don't alter signal handlers if dumping with unexec. On some
+ machines, changing signal handlers sets static data that would make
+ signals fail to work right when the dumped Emacs is run. */
+ if (will_dump_with_unexec_p ())
return;
sigfillset (&process_fatal_action.sa_mask);