commit 245793432326b2fb12b3251516a7b7a3c08e28b0 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Sat Sep 20 10:07:59 2025 +0800 Fix reference leak in displaying successive dashes of distinct styles on Android * src/android.c (android_set_dashes): Always release local reference to dash array even when it was returned by GetObjectField. diff --git a/src/android.c b/src/android.c index 345ddf8663d..6cc416063f6 100644 --- a/src/android.c +++ b/src/android.c @@ -3709,10 +3709,11 @@ android_set_dashes (struct android_gc *gc, int dash_offset, gcontext, emacs_gc_dashes, array); - ANDROID_DELETE_LOCAL_REF (array); + gc->n_segments = n; } - gc->n_segments = n; + if (array) + ANDROID_DELETE_LOCAL_REF (array); set_offset: /* And the offset. */ commit ea01e59eb1eac133bec57d8fd260e470722fccf2 Author: Alan Mackenzie Date: Fri Sep 19 20:51:45 2025 +0000 CC Mode: Don't indent a construct in a class after a template This fixes bug#79438. * lisp/progmodes/cc-align.el (c-lineup-class-field-cont): New function. * lisp/progmodes/cc-vars.el (c-offsets-alist): Change the entry for class-field-cont from + to c-lineup-class-field-cont. * doc/misc/cc-mode.texi (Misc Line-Up): Add a new entry for c-lineup-class-field-cont. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index c4fabf30235..fe93bc759b2 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -6992,6 +6992,18 @@ the_larch, @hereFn{c-lineup-topmost-intro-cont} @workswith @code{topmost-intro-cont}. @end defun +@comment ------------------------------------------------------------ + +@defun c-lineup-class-field-cont +@findex lineup-class-field-cont (c-) +Indent continutation lines zero or one @code{c-basic-offset} steps. +This is intended for continuation lines within a class/struct +etc. construct. For a declaration following a template specification, +zero steps are used. Other constructs are indented one step. + +@workswith @code{class-field-cont}. +@end defun + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Custom Line-Up @section Custom Line-Up Functions diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index a293fd858b7..5766c87388f 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el @@ -97,6 +97,16 @@ Works with: topmost-intro-cont." t)))) c-basic-offset)))) +(defun c-lineup-class-field-cont (langelem) + "Line up continuation lines in a class zero or one indentation steps. +For a declaration following a template specification, zero steps are +used. Other constructs are indented one step." + (save-excursion + (beginning-of-line) + (c-backward-syntactic-ws (c-langelem-pos langelem)) + (unless (eq (char-before) ?>) + c-basic-offset))) + (defun c-lineup-gnu-DEFUN-intro-cont (langelem) "Line up the continuation lines of a DEFUN macro in the Emacs C source. These lines are indented `c-basic-offset' columns, usually from column 0. diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 4df6017bc56..bb7f3cbe257 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1302,7 +1302,7 @@ can always override the use of `c-default-style' by making calls to ;; Anchor pos: Boi at the func decl arglist open. (member-init-cont . c-lineup-multi-inher) ;; Anchor pos: Beg of the first member init. - (class-field-cont . +) + (class-field-cont . c-lineup-class-field-cont) ;; Anchor pos: BOI of the line containing the class keyword. ;; 2nd pos: At the open brace. (inher-intro . +) commit 2cc525467bcf3ec5c3ba437fc8291a236ee138bc Author: Juri Linkov Date: Fri Sep 19 18:15:42 2025 +0300 New mode 'minibuffer-nonselected-mode' * lisp/minibuffer.el (minibuffer-nonselected): New face. (minibuffer-nonselected-overlay): New buffer-local variable. (minibuffer-nonselected-check, minibuffer-nonselected-setup): New functions. (minibuffer-nonselected-mode): New command (bug#49844). diff --git a/etc/NEWS b/etc/NEWS index 1d8e85f7d1a..bd928345283 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -253,6 +253,13 @@ that your popup interface uses for a more integrated experience. ('completion-preview-sort-function' was already present in Emacs 30.1, but as a plain Lisp variable, not a user option.) +--- +*** New mode 'minibuffer-nonselected-mode'. +This mode enabled by default directs the attention to the active +minibuffer window using the 'minibuffer-nonselected' face in case +when the minibuffer window is no longer selected, but the minibuffer +is still waiting for input. + ** Mouse *** New mode 'mouse-shift-adjust-mode' extends selection with 'S-'. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8d58189ef85..ff1b68b49a4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -5425,6 +5425,7 @@ The latter is implemented in `touch-screen.el'." (add-hook 'minibuffer-setup-hook #'minibuffer-setup-on-screen-keyboard) (add-hook 'minibuffer-exit-hook #'minibuffer-exit-on-screen-keyboard) + (defvar minibuffer-regexp-mode) (defun minibuffer--regexp-propertize () @@ -5595,6 +5596,50 @@ interactions is customizable via `minibuffer-regexp-prompts'." (remove-hook 'minibuffer-setup-hook #'minibuffer--regexp-setup) (remove-hook 'minibuffer-exit-hook #'minibuffer--regexp-exit))) + +(defface minibuffer-nonselected + '((t (:background "yellow" :foreground "dark red" :weight bold))) + "Face for non-selected minibuffer prompts. +It's displayed on the minibuffer window when the minibuffer +remains active, but the minibuffer window is no longer selected." + :version "31.1") + +(defvar-local minibuffer-nonselected-overlay nil) + +(defun minibuffer-nonselected-check (window) + "Check if the active minibuffer's window is no longer selected. +Use overlay to highlight the minibuffer window when another window +is selected. But don't warn in case when the *Completions* window +becomes selected." + (if (eq window (selected-window)) + (when (overlayp minibuffer-nonselected-overlay) + (delete-overlay minibuffer-nonselected-overlay)) + (unless (eq major-mode 'completion-list-mode) + (with-current-buffer (window-buffer window) + (let ((ov (make-overlay (point-min) (point-max)))) + (overlay-put ov 'face 'minibuffer-nonselected) + (overlay-put ov 'window window) + (overlay-put ov 'evaporate t) + (setq minibuffer-nonselected-overlay ov)))))) + +(defun minibuffer-nonselected-setup () + (add-hook 'window-selection-change-functions + 'minibuffer-nonselected-check nil t)) + +(define-minor-mode minibuffer-nonselected-mode + "Minor mode to warn about non-selected active minibuffer. +Use the face `minibuffer-nonselected' to highlight the minibuffer +window when the minibuffer remains active, but the minibuffer window +is no longer selected." + :global t + :initialize 'custom-initialize-delay + :init-value t + :version "31.1" + (if minibuffer-nonselected-mode + (add-hook 'minibuffer-setup-hook #'minibuffer-nonselected-setup) + (remove-hook 'minibuffer-setup-hook #'minibuffer-nonselected-setup))) + + (provide 'minibuffer) ;;; minibuffer.el ends here commit 9f174f08d87ca779fad77f3e8f1b619f23cc62d7 Author: Mattias EngdegÄrd Date: Fri Sep 19 10:31:54 2025 +0200 ; * src/bytecode.c (exec_byte_code): Revert gratuituous style change diff --git a/src/bytecode.c b/src/bytecode.c index 9bdc2eaeefe..424d00f20ec 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -961,7 +961,7 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, { /* No need to restore old quitcounter; just check at the next backward branch. */ - quitcounter = (unsigned char) -1; + quitcounter = (unsigned char)-1; struct handler *c = handlerlist; handlerlist = c->next; top = c->bytecode_top;