GNU bug report logs - #69950
[PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Fri, 22 Mar 2024 21:52:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 69950 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to andrew <at> trop.in, cox.katherine.e+guix <at> gmail.com, liliana.prikler <at> gmail.com, guix-patches <at> gnu.org:
bug#69950; Package guix-patches. (Fri, 22 Mar 2024 21:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
New bug report received and forwarded. Copy sent to andrew <at> trop.in, cox.katherine.e+guix <at> gmail.com, liliana.prikler <at> gmail.com, guix-patches <at> gnu.org. (Fri, 22 Mar 2024 21:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols.
Date: Fri, 22 Mar 2024 22:45:13 +0100
Some variants, like emacs-no-x, come with a reduced set of preloaded symbols,
so don't expect them to always be native.

* gnu/packages/aux-files/emacs/comp-integrity.el (expect-native-if-bound): New
function.
(x-setup-function-keys, dynamic-setting-handle-config-changed-event)
(fontset-plain-name, fringe-mode, image-type, regexp-opt, scroll-bar-scale):
Use ‘expect-native-if-bound’.
(x-handle-no-bitmap-icon): Likewise, was already conditional.
---
 .../aux-files/emacs/comp-integrity.el         | 22 ++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el b/gnu/packages/aux-files/emacs/comp-integrity.el
index 191e2ddb98..abe7e7c0c9 100644
--- a/gnu/packages/aux-files/emacs/comp-integrity.el
+++ b/gnu/packages/aux-files/emacs/comp-integrity.el
@@ -24,6 +24,9 @@
   (defmacro expect-native (fun &optional feature)
     `(progn (expect-help ,fun native ,feature)))
 
+  (defmacro expect-native-if-bound (fun)
+    `(and (boundp ',fun) (expect-help ,fun native)))
+
   (defmacro expect-builtin (fun &optional feature)
     `(progn (expect-help ,fun built-in ,feature))))
 
@@ -38,7 +41,7 @@
 (expect-native use-default-char-width-table)
 (expect-native cl-generic-p)
 (expect-native cl-struct-define)
-(expect-native x-setup-function-keys)
+(expect-native-if-bound x-setup-function-keys)
 (expect-native encode-composition-rule)
 (expect-native custom-declare-face)
 (expect-native minibuffer-prompt-properties--setter)
@@ -48,7 +51,7 @@
 (expect-native dnd-open-file)
 (expect-native dos-mode25 dos-fns)
 (expect-native find-file-text dos-w32)
-(expect-native dynamic-setting-handle-config-changed-event)
+(expect-native-if-bound dynamic-setting-handle-config-changed-event)
 (expect-native easy-menu-item-present-p)
 (expect-native eldoc-mode)
 (expect-native electric-indent-mode)
@@ -60,12 +63,12 @@
 (expect-native fill-region)
 (expect-native font-lock-change-mode)
 (expect-native font-lock-add-keywords)
-(expect-native fontset-plain-name)
+(expect-native-if-bound fontset-plain-name)
 (expect-native format-read)
 (expect-native frame-edges)
-(expect-native fringe-mode)
+(expect-native-if-bound fringe-mode)
 (expect-native help-quick)
-(expect-native image-type)
+(expect-native-if-bound image-type)
 (expect-native indent-region)
 (expect-native indian-compose-regexp)
 (expect-native msdos-setup-keyboard term/internal)
@@ -86,7 +89,7 @@
 (expect-native convert-define-charset-argument)
 (expect-native coding-system-change-eol-conversion)
 (expect-native store-substring mule-util)
-(expect-native mouse-wheel-change-button)
+(expect-native-if-bound mouse-wheel-change-button)
 (expect-native advice-function-mapc)
 (expect-native comment-string-strip)
 (if (>= emacs-major-version 30)
@@ -99,12 +102,12 @@
 (expect-native show-paren-function)
 (expect-native pgtk-dnd-init-frame pgtk-dnd)
 (expect-native prog-context-menu)
-(expect-native regexp-opt)
+(expect-native-if-bound regexp-opt)
 (expect-native get-register)
 (expect-native query-replace-descr)
 (expect-native rfn-eshadow-setup-minibuffer)
 (expect-native read-multiple-choice)
-(expect-native scroll-bar-scale)
+(expect-native-if-bound scroll-bar-scale)
 (expect-native gui-select-text)
 (expect-native seq-first)
 (expect-native hack-read-symbol-shorthands)
@@ -126,5 +129,4 @@
 (expect-native define-widget)
 (expect-native window-right)
 (expect-native x-dnd-init-frame x-dnd)
-(and (boundp 'x-handle-no-bitmap-icon)
-     (expect-native x-handle-no-bitmap-icon))
+(expect-native-if-bound x-handle-no-bitmap-icon)

base-commit: 058532bdd8953feefbd84fd7514822886c7f1a7e
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69950; Package guix-patches. (Thu, 11 Apr 2024 14:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 69950 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 69950 <at> debbugs.gnu.org
Cc: cox.katherine.e+guix <at> gmail.com, liliana.prikler <at> gmail.com
Subject: Re: [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify
 integrity of bound symbols.
Date: Thu, 11 Apr 2024 17:45:57 +0300
[Message part 1 (text/plain, inline)]
On 2024-03-22 22:45, Liliana Marie Prikler wrote:

> Some variants, like emacs-no-x, come with a reduced set of preloaded symbols,
> so don't expect them to always be native.
>
> * gnu/packages/aux-files/emacs/comp-integrity.el (expect-native-if-bound): New
> function.
> (x-setup-function-keys, dynamic-setting-handle-config-changed-event)
> (fontset-plain-name, fringe-mode, image-type, regexp-opt, scroll-bar-scale):
> Use ‘expect-native-if-bound’.
> (x-handle-no-bitmap-icon): Likewise, was already conditional.
> ---
>  .../aux-files/emacs/comp-integrity.el         | 22 ++++++++++---------
>  1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/gnu/packages/aux-files/emacs/comp-integrity.el b/gnu/packages/aux-files/emacs/comp-integrity.el
> index 191e2ddb98..abe7e7c0c9 100644
> --- a/gnu/packages/aux-files/emacs/comp-integrity.el
> +++ b/gnu/packages/aux-files/emacs/comp-integrity.el
> @@ -24,6 +24,9 @@
>    (defmacro expect-native (fun &optional feature)
>      `(progn (expect-help ,fun native ,feature)))
>  
> +  (defmacro expect-native-if-bound (fun)
> +    `(and (boundp ',fun) (expect-help ,fun native)))
> +
>    (defmacro expect-builtin (fun &optional feature)
>      `(progn (expect-help ,fun built-in ,feature))))
>  
> @@ -38,7 +41,7 @@
>  (expect-native use-default-char-width-table)
>  (expect-native cl-generic-p)
>  (expect-native cl-struct-define)
> -(expect-native x-setup-function-keys)
> +(expect-native-if-bound x-setup-function-keys)
>  (expect-native encode-composition-rule)
>  (expect-native custom-declare-face)
>  (expect-native minibuffer-prompt-properties--setter)
> @@ -48,7 +51,7 @@
>  (expect-native dnd-open-file)
>  (expect-native dos-mode25 dos-fns)
>  (expect-native find-file-text dos-w32)
> -(expect-native dynamic-setting-handle-config-changed-event)
> +(expect-native-if-bound dynamic-setting-handle-config-changed-event)
>  (expect-native easy-menu-item-present-p)
>  (expect-native eldoc-mode)
>  (expect-native electric-indent-mode)
> @@ -60,12 +63,12 @@
>  (expect-native fill-region)
>  (expect-native font-lock-change-mode)
>  (expect-native font-lock-add-keywords)
> -(expect-native fontset-plain-name)
> +(expect-native-if-bound fontset-plain-name)
>  (expect-native format-read)
>  (expect-native frame-edges)
> -(expect-native fringe-mode)
> +(expect-native-if-bound fringe-mode)
>  (expect-native help-quick)
> -(expect-native image-type)
> +(expect-native-if-bound image-type)
>  (expect-native indent-region)
>  (expect-native indian-compose-regexp)
>  (expect-native msdos-setup-keyboard term/internal)
> @@ -86,7 +89,7 @@
>  (expect-native convert-define-charset-argument)
>  (expect-native coding-system-change-eol-conversion)
>  (expect-native store-substring mule-util)
> -(expect-native mouse-wheel-change-button)
> +(expect-native-if-bound mouse-wheel-change-button)
>  (expect-native advice-function-mapc)
>  (expect-native comment-string-strip)
>  (if (>= emacs-major-version 30)
> @@ -99,12 +102,12 @@
>  (expect-native show-paren-function)
>  (expect-native pgtk-dnd-init-frame pgtk-dnd)
>  (expect-native prog-context-menu)
> -(expect-native regexp-opt)
> +(expect-native-if-bound regexp-opt)
>  (expect-native get-register)
>  (expect-native query-replace-descr)
>  (expect-native rfn-eshadow-setup-minibuffer)
>  (expect-native read-multiple-choice)
> -(expect-native scroll-bar-scale)
> +(expect-native-if-bound scroll-bar-scale)
>  (expect-native gui-select-text)
>  (expect-native seq-first)
>  (expect-native hack-read-symbol-shorthands)
> @@ -126,5 +129,4 @@
>  (expect-native define-widget)
>  (expect-native window-right)
>  (expect-native x-dnd-init-frame x-dnd)
> -(and (boundp 'x-handle-no-bitmap-icon)
> -     (expect-native x-handle-no-bitmap-icon))
> +(expect-native-if-bound x-handle-no-bitmap-icon)
>
> base-commit: 058532bdd8953feefbd84fd7514822886c7f1a7e

Hi Liliana,

Looks good!

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.