From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Start of Emacs 30 release cycle Date: Tue, 25 Jun 2024 12:41:02 +0200 Message-ID: <87y16t485d.fsf@gmx.net> References: <86frt3eptb.fsf@gnu.org> <8734p2212i.fsf@gmx.net> <86jziebj8j.fsf@gnu.org> <87pls6zc0r.fsf@rub.de> <86cyo6bcub.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: maurooaranda@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 25 12:42:01 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sM3ce-0005io-Tw for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jun 2024 12:42:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sM3bv-0002vP-0w; Tue, 25 Jun 2024 06:41:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sM3bs-0002uv-Tk for emacs-devel@gnu.org; Tue, 25 Jun 2024 06:41:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sM3bp-0004e2-MK; Tue, 25 Jun 2024 06:41:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1719312065; x=1719916865; i=stephen.berman@gmx.net; bh=q8wsNRFKqltsuv/i8UFZ0UJbbXr6B+rjHlJ4yYKDgbo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=DgoAArm3eBFnmy2pvF2wwQKwMtCMx8OEcFFLF2tM2wQ5nTfsseIE+RfGDwGmBqw7 qjBf+W8uZ2/627L9RI2PEOcaERFufO+bzXYYjSev6EwvDwmWwnJy+uAnfiQ8z9I1f ep2GxRyuC6MrRQCvyiMHZHpw/ElT6iuU0QDUyqWv1Y//Y73zAtAyW3YIicSOB+QAc CrE6Hgj1Cf6dU2FAwwBvwcbnUgWIR6ZNsee09tVlpHS72iASYwogmGLJx0JXLx9U4 NMyzF97n9sB1a0gV8lVq2a82HuVyclS8sxH+CQO0RuuImkaxkwQ1z94CptDcGV9ml lztg/lWr9moGcG1nAA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([88.130.50.211]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtOGa-1sbvCh13S2-00t1Uh; Tue, 25 Jun 2024 12:41:05 +0200 In-Reply-To: <86cyo6bcub.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 24 Jun 2024 18:05:32 +0300") X-Provags-ID: V03:K1:QZ4lnQquGaXv2Dlwzdu0D1emGaBgNQHaiaAzcSW5T38xkZzf8R6 aJWtFaL8sL+qAX4iDGNkhzC/Wo0zaf1LJSJBzAr3MngX96YFhqbhARnJG5Fq/ovoqxP1gIU Jq8WvCBlwP0TmwWlIcsp4fZsumNAM/P985wwuKMokED98F7UVJqJEoLxlM/CU3GrSEUIq+E +1dRykxtyU7p9pT1zLdaw== UI-OutboundReport: notjunk:1;M01:P0:5ePlUYSSM+c=;ncpc+u0nyPUNMbz2tdZbiSnIcYz auBM5pOggKZwFZEtQ4CiIKUmudcLlla8QY6nSraObItcwjWwotcSWRBpuWrmj1Tn+IzNnjWrX 4qKJcotpUHAykpkI9CnBBrPouwUeMREkIrHUukzz8pl/kbGw9SfhgO7E+EkT8GPoMsadURKXB ZVn9IPxFWMCCPnNJwZkmSZmU5LXFCoyMkWR9IKreaNUgYkwuP28/S3qoGmimCXS2EtHCBke8/ 5HyW3eDjoiW8i1Kv/bfnhJ41v6Qc4XOS7WJ3Df4FiN+UY7iXGLo5pqYDD+2nqCL/A3hg7ZCbo 2PXFDo50kk5CRaXPaIprFn2qvl0stECzppNF9SgtI7BxQXfW3Av6HaXN3RT2JStBYU+1K3ADV 0MDoZ+yHUTCff/vbRV/ePwHJtiOz9PUiVSODk/KaJHbp+yYON05YkU7J24cbOC6rrGWXDLUMV Z5N3iY+Fw2+FMjA/7tk0O+AmNgmxhznnhIWfllCF73GOvRgGSYvuhvtqWCdP7U5Hwh5HWYn7B 1lMxqooQpJG2lMsW/YDJqUanvgsVbKCwugIPDVV6dQzYsugMnuAcZDb9uxHy+YzyL7fa4mY1K CDPRvxOuKmEYE2KWJ5Cszf1X7E8lV5YxHHPPWge7sUbeWB/uM5l70PIUh4fSAZPKZp1fFLXyw E7Kni1pMmHjg36gxHnOf5u9JdNkhomXA2gzcEfKFqmOat95RiUA2FmabEVgp0cJYOYevGCqkV 7yjficc6JP+3iSxYpU7AteAhwVuxr8zARxbC9r8D9zDRVLQRCUhx9+MVgdM5UWyR09wKVpRU Received-SPF: pass client-ip=212.227.15.19; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320632 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 24 Jun 2024 18:05:32 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: maurooaranda@gmail.com, emacs-devel@gnu.org >> Date: Mon, 24 Jun 2024 15:49:24 +0200 [...] >> >> Here's the patch for bug#69942: > > Thanks, but I thought there was a documentation addition to it? Yes, indeed. Is the attached complete patch ready to install in emacs-30? >> And here's the patch for bug#70594: > > This one is okay for the emacs-30 branch. Thanks, I pushed it in commit 2f18929319a and I'll close the bug. Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: patch for bug#69942 Content-Transfer-Encoding: quoted-printable diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index 2e378e86fc7..8769d9c6191 100644 =2D-- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -3287,6 +3287,16 @@ Customization Face used for inactive widgets. @end deffn +@deffn Face widget-unselected +Face used for unselected widgets. This face is also used on the text +labels of radio-button and checkbox widgets. + +The default value inherits @code{widget-inactive} face. If you want to +visually distinguish the labels of unselected active radio-button or +checkbox widgets from the labels of unselected inactive widgets, +customize this face to a non-default value. +@end deffn + @defopt widget-mouse-face Face used for highlighting a button when the mouse pointer moves across it. diff --git a/etc/NEWS b/etc/NEWS index d8fa92eb71e..841eb7c9c35 100644 =2D-- a/etc/NEWS +++ b/etc/NEWS @@ -1906,6 +1906,12 @@ options of GNU 'ls'. ** Widget +++ +*** New face 'widget-unselected'. +Customize this face to a non-default value to visually distinguish the +labels of unselected active radio-button or checkbox widgets from the +labels of unselected inactive widgets (the default value inherits +'widget-inactive' face). + *** New user option 'widget-skip-inactive'. If non-nil, moving point forward or backward between widgets by typing 'TAB' or 'S-TAB' skips over inactive widgets. The default value is nil. diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 3b467434d29..c86e82f5852 100644 =2D-- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -568,6 +568,29 @@ widget-specify-active (delete-overlay inactive) (widget-put widget :inactive nil)))) +(defface widget-unselected + '((t :inherit widget-inactive)) + "Face used for unselected widgets." + :group 'widget-faces + :version "30.1") + +(defun widget-specify-unselected (widget from to) + "Fontify WIDGET as unselected (not chosen)." + (let ((overlay (make-overlay from to nil t nil))) + (overlay-put overlay 'face 'widget-unselected) + (overlay-put overlay 'evaporate t) + ;; The overlay priority here should be lower than the priority in + ;; `widget-specify-active' (bug#69942). + (overlay-put overlay 'priority 90) + (widget-put widget :unselected overlay))) + +(defun widget-specify-selected (widget) + "Remove fontification of WIDGET as unselected (not chosen)." + (let ((unselected (widget-get widget :unselected))) + (when unselected + (delete-overlay unselected) + (widget-put widget :unselected nil)))) + ;;; Widget Properties. (defsubst widget-type (widget) @@ -2452,10 +2475,16 @@ 'checkbox (defun widget-checkbox-action (widget &optional event) "Toggle checkbox, notify parent, and set active state of sibling." (widget-toggle-action widget event) - (let ((sibling (widget-get-sibling widget))) + (let* ((sibling (widget-get-sibling widget)) + (from (widget-get sibling :from)) + (to (widget-get sibling :to))) (when sibling - (widget-apply sibling - (if (widget-value widget) :activate :deactivate)) + (if (widget-value widget) + (progn + (widget-apply sibling :activate) + (widget-specify-selected sibling)) + :deactivate + (widget-specify-unselected sibling from to)) (widget-clear-undo)))) ;;; The `checklist' Widget. @@ -2511,15 +2540,18 @@ widget-checklist-add-item ((eq escape ?v) (setq child (cond ((not chosen) - (let ((child (widget-create-child widget type))) - (widget-apply child :deactivate) + (let* ((child (widget-create-child widget type)) + (from (widget-get child :from)) + (to (widget-get child :to))) + (widget-specify-unselected child from to) child)) ((widget-inline-p type t) (widget-create-child-value widget type (cdr chosen))) (t (widget-create-child-value - widget type (car (cdr chosen))))))) + widget type (car (cdr chosen))) + (widget-specify-selected child))))) (t (error "Unknown escape `%c'" escape))))) ;; Update properties. @@ -2690,8 +2722,11 @@ widget-radio-add-item (widget-create-child-value widget type value) (widget-create-child widget type))) - (unless chosen - (widget-apply child :deactivate))) + (if chosen + (widget-specify-selected child) + (let ((from (widget-get child :from)) + (to (widget-get child :to))) + (widget-specify-unselected child from to)))) (t (error "Unknown escape `%c'" escape))))) ;; Update properties. @@ -2741,14 +2776,17 @@ widget-radio-value-set (dolist (current (widget-get widget :children)) (let* ((button (widget-get current :button)) (match (and (not found) - (widget-apply current :match value)))) + (widget-apply current :match value))) + (from (widget-get current :from)) + (to (widget-get current :to))) (widget-value-set button match) (if match - (progn - (widget-value-set current value) - (widget-apply current :activate)) - (widget-apply current :deactivate)) - (setq found (or found match)))))) + (progn + (widget-value-set current value) + (widget-apply current :activate) + (widget-specify-selected current)) + (widget-specify-unselected current from to)) + (setq found (or found match)))))) (defun widget-radio-validate (widget) ;; Valid if we have made a valid choice. @@ -2768,13 +2806,16 @@ widget-radio-action (let ((buttons (widget-get widget :buttons))) (when (memq child buttons) (dolist (current (widget-get widget :children)) - (let* ((button (widget-get current :button))) + (let* ((button (widget-get current :button)) + (from (widget-get current :from)) + (to (widget-get current :to))) (cond ((eq child button) (widget-value-set button t) - (widget-apply current :activate)) + (widget-apply current :activate) + (widget-specify-selected current)) ((widget-value button) (widget-value-set button nil) - (widget-apply current :deactivate))))))) + (widget-specify-unselected current from to))))))) ;; Pass notification to parent. (widget-apply widget :notify child event)) --=-=-=--