commit efbeefd17e3e8a3dcc02439805e42b9d9cedded9 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Thu Aug 1 08:29:50 2024 +0800 Conclude previous change * lisp/international/fontset.el (script-representative-chars) : Remove practically unattested characters, since this variable is not used in font resolution on MS-Windows any longer. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 3e16e1f35bd..f5b4b0b4aa4 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -209,8 +209,7 @@ (bopomofo #x3105) (kanbun #x319D) (han #x2e90 #x2f00 #x3010 #x3200 #x3300 #x3400 #x31c0 #x4e10 - #x5B57 #xfe30 #xf900 - #x1f210 #x20000 #x2a700 #x2b740 #x2b820 #x2ceb0 #x2f804) + #x5B57 #xfe30 #xf900) (yi #xA288) (syloti-nagri #xA807 #xA823 #xA82C) (rejang #xA930 #xA947 #xA95F) commit 96097d362322595e308157ff70f191ef2b49640d Merge: d00eb0468b1 1154d8aafe2 Author: Po Lu Date: Thu Aug 1 08:25:31 2024 +0800 Merge from savannah/emacs-30 1154d8aafe2 Better resolve bug#72188 ceb5a152227 MacOS: Let EmacsView implement NSTextInputClient 9f7c1ace9f8 NS: Set frame position when entering/exiting fullscreen (... 74fe889a93f Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... abefd9514bc * lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a ... e09982f8f5a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... 5cf64d8377a Fix sporadic crashes and `select' failures in dumped images a475360af98 Correct display of Doc View documents after tab switching b0d927e1dce Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... 469bc7c9686 Use 'kill-process' as a fallback when a pipe gets broken ... 158835668df ; * doc/lispref/modes.texi (Mode Line Data): Fix formatting. commit 1154d8aafe2f4702b8fc775835f830fd00cfbaaf Author: Po Lu Date: Thu Aug 1 08:23:36 2024 +0800 Better resolve bug#72188 * lisp/international/fontset.el (setup-default-fontset) : Don't search for fonts matching the `han' script elsewhere than on Android, which restores the status quo existing in Emacs 29. (bug#72188) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 33e444507c4..d60349e05e3 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -697,10 +697,11 @@ (nil . "JISX0213.2004-1") ,(font-spec :registry "iso10646-1" :lang 'ja) ,(font-spec :registry "iso10646-1" :lang 'zh) - ;; This is required, as otherwise many TrueType fonts with - ;; CJK characters but no corresponding ``design language'' - ;; declaration can't be found. - ,(font-spec :registry "iso10646-1" :script 'han)) + ;; This is required on Android, as otherwise many TrueType + ;; fonts with CJK characters but no corresponding ``design + ;; language'' declaration can't be found. + ,@(and (featurep 'android) + (list (font-spec :registry "iso10646-1" :script 'han)))) (cjk-misc (nil . "GB2312.1980-0") (nil . "JISX0208*") commit d00eb0468b147f2bfcb58bc586801f0495f5973d Author: Eli Zaretskii Date: Wed Jul 31 18:36:41 2024 +0300 Revert "Re-enable displaying `han' characters on Android" This reverts commit bf0aeaa0d7a1581a095aa423e75d0d71cceb28cd. The characters removed by this commit cause Emacs to select sub-optimal fonts that lack many Chinese characters, because Emacs generally stops looking for fonts when it finds the first one that seems to match. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index d8c83c46e68..d4e24899d11 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -209,7 +209,8 @@ (bopomofo #x3105) (kanbun #x319D) (han #x2e90 #x2f00 #x3010 #x3200 #x3300 #x3400 #x31c0 #x4e10 - #x5B57 #xfe30 #xf900) + #x5B57 #xfe30 #xf900 + #x1f210 #x20000 #x2a700 #x2b740 #x2b820 #x2ceb0 #x2f804) (yi #xA288) (syloti-nagri #xA807 #xA823 #xA82C) (rejang #xA930 #xA947 #xA95F) commit 44c9c2c8456117625ec8a54d4a6908404e483f83 Author: Stefan Monnier Date: Wed Jul 31 04:52:08 2024 -0400 (vhdl-run-when-idle): Don't use `timer--triggered` * lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle): Avoid relying needlessly on internal accessor and fix last change to make sure we always create a timer. diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 2c4b83bed23..bf309500a38 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -2338,11 +2338,13 @@ Ignore byte-compiler warnings you might see." (defun vhdl-run-when-idle (secs repeat function) "Wait until idle, then run FUNCTION." - (if (fboundp 'start-itimer) + (if (fboundp 'start-itimer) ;;XEmacs (start-itimer "vhdl-mode" function secs repeat t) ;; explicitly activate timer (necessary when Emacs is already idle) - (when (featurep 'xemacs) - (aset (run-with-idle-timer secs repeat function) 0 nil)))) + (let ((timer (run-with-idle-timer secs repeat function))) + ;; `run-with-idle-timer' already sets the `triggered' flag to nil, + ;; at least since Emacs-24. + (if (< emacs-major-version 24) (aset timer 0 nil))))) (defun vhdl-warning-when-idle (&rest args) "Wait until idle, then print out warning STRING and beep." commit ceb5a1522270c41d0c9f5e6b52d61e3173f72f1d Author: Gerd Möllmann Date: Tue Jul 30 07:47:44 2024 +0200 MacOS: Let EmacsView implement NSTextInputClient * src/nsterm.h (@interface EmacsView): Implement NSTextInputClient protocol. * src/nsterm.m: Implement required NSTextInputClient methods, forwarding to existing NSTextInput methods. diff --git a/src/nsterm.h b/src/nsterm.h index e3f55c4e41c..a07829a36ec 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -463,7 +463,7 @@ enum ns_return_frame_mode @class EmacsLayer; #ifdef NS_IMPL_COCOA -@interface EmacsView : NSView +@interface EmacsView : NSView #else @interface EmacsView : NSView #endif diff --git a/src/nsterm.m b/src/nsterm.m index 8a0c12c7369..b56c587bc69 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7032,9 +7032,48 @@ In that case we use UCKeyTranslate (ns_get_shifted_character) [nsEvArray removeObject: theEvent]; } +/*********************************************************************** + NSTextInputClient + ***********************************************************************/ -/* implementation (called through [super interpretKeyEvents:]). */ +#ifdef NS_IMPL_COCOA + +- (void) insertText: (id) string + replacementRange: (NSRange) replacementRange +{ + if ([string isKindOfClass:[NSAttributedString class]]) + string = [string string]; + [self unmarkText]; + [self insertText:string]; +} + +- (void) setMarkedText: (id) string + selectedRange: (NSRange) selectedRange + replacementRange: (NSRange) replacementRange +{ + [self setMarkedText: string selectedRange: selectedRange]; +} + +- (nullable NSAttributedString *) + attributedSubstringForProposedRange: (NSRange) range + actualRange: (nullable NSRangePointer) actualRange +{ + return nil; +} + +- (NSRect) firstRectForCharacterRange: (NSRange) range + actualRange: (nullable NSRangePointer) actualRange +{ + return NSZeroRect; +} +#endif /* NS_IMPL_COCOA */ + +/*********************************************************************** + NSTextInput + ***********************************************************************/ + +/* implementation (called through [super interpretKeyEvents:]). */ /* : called when done composing; NOTE: also called when we delete over working text, followed commit 9f7c1ace9f86e4b657030a6e94c5d6aadc586878 Author: Gerd Möllmann Date: Thu Jul 25 09:20:04 2024 +0200 NS: Set frame position when entering/exiting fullscreen (bug#71912) * src/nsterm.h ([EmacsView adjustEmacsRectRect]): Declare. * src/nsterm.m ([EmacsView windowDidEnterFullScreen]): New method. ([EmacsView windowDidEnterFullScreen]): Call it. ([EmacsView windowDidExitFullScreen]): Call it. diff --git a/src/nsterm.h b/src/nsterm.h index 3a713f8e8c9..e3f55c4e41c 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -522,6 +522,7 @@ enum ns_return_frame_mode - (void)copyRect:(NSRect)srcRect to:(NSPoint)dest; /* Non-notification versions of NSView methods. Used for direct calls. */ +- (void)adjustEmacsFrameRect; - (void)windowWillEnterFullScreen; - (void)windowDidEnterFullScreen; - (void)windowWillExitFullScreen; diff --git a/src/nsterm.m b/src/nsterm.m index d25f216edd4..8a0c12c7369 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8318,6 +8318,15 @@ - (void)windowDidEnterFullScreen:(NSNotification *)notification [self windowDidEnterFullScreen]; } +- (void)adjustEmacsFrameRect +{ + struct frame *f = emacsframe; + NSWindow *frame_window = [FRAME_NS_VIEW (f) window]; + NSRect r = [frame_window frame]; + f->left_pos = NSMinX (r) - NS_PARENT_WINDOW_LEFT_POS (f); + f->top_pos = NS_PARENT_WINDOW_TOP_POS (f) - NSMaxY (r); +} + - (void)windowDidEnterFullScreen /* provided for direct calls */ { NSTRACE ("[EmacsView windowDidEnterFullScreen]"); @@ -8347,6 +8356,10 @@ - (void)windowDidEnterFullScreen /* provided for direct calls */ } #endif } + + /* Do what windowDidMove does which isn't called when entering/exiting + fullscreen mode. */ + [self adjustEmacsFrameRect]; } - (void)windowWillExitFullScreen:(NSNotification *)notification @@ -8389,6 +8402,10 @@ - (void)windowDidExitFullScreen /* provided for direct calls */ if (next_maximized != -1) [[self window] performZoom:self]; + + /* Do what windowDidMove does which isn't called when entering/exiting + fullscreen mode. */ + [self adjustEmacsFrameRect]; } - (BOOL)fsIsNative commit 74fe889a93ffefbc1e734a4e7d48073237e3d491 Merge: e09982f8f5a abefd9514bc Author: Eli Zaretskii Date: Mon Jul 29 21:52:05 2024 +0300 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 commit abefd9514bcf9d8de9d9e7f000ef55fad0d822fb Author: Juri Linkov Date: Mon Jul 29 21:16:16 2024 +0300 * lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a new group's tab. Move tab with a new group to the end of the tab bar (bug#72352) Suggested by Ship Mints diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index edec6543a82..60d5bbf169b 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -2229,14 +2229,16 @@ function `tab-bar-tab-name-function'." (seq-position (nthcdr beg tabs) group (lambda (tb gr) (not (equal (alist-get 'group tb) gr)))))) - (pos (when beg - (cond - ;; Don't move tab when it's already inside group bounds - ((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil) - ;; Move tab from the right to the group end - ((and len (> tab-index (+ beg len))) (+ beg len 1)) - ;; Move tab from the left to the group beginning - ((< tab-index beg) beg))))) + (pos (if beg + (cond + ;; Don't move tab when it's already inside group bounds + ((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil) + ;; Move tab from the right to the group end + ((and len (> tab-index (+ beg len))) (+ beg len 1)) + ;; Move tab from the left to the group beginning + ((< tab-index beg) beg)) + ;; Move tab with a new group to the end + -1))) (when pos (tab-bar-move-tab-to pos (1+ tab-index))))) commit e09982f8f5a8580005594ad9ba939667fd6189f4 Merge: b0d927e1dce 5cf64d8377a Author: Eli Zaretskii Date: Mon Jul 29 13:57:01 2024 +0300 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 commit b0d927e1dcef524a178d92f3380f605504ae2ca1 Merge: 158835668df 469bc7c9686 Author: Eli Zaretskii Date: Sun Jul 28 07:30:32 2024 +0300 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 commit 158835668dffcad0c5668dd01200f2737972bb3e Author: Eli Zaretskii Date: Sat Jul 27 15:56:47 2024 +0300 ; * doc/lispref/modes.texi (Mode Line Data): Fix formatting. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 7c7823b5f9b..27b74a9d233 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2259,7 +2259,7 @@ space filled on the right if its width is less than @var{width}. When @minus{}@var{width} columns if its width exceeds @minus{}@var{width}. For example, the usual way to show what percentage of a buffer is above -the top of the window is to use a list like this: @code{(-3 "%p")}. +the top of the window is to use a list like this: @w{@code{(-3 "%p")}}. @end table @node Mode Line Top