unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols.
@ 2024-03-22 21:45 Liliana Marie Prikler
  2024-04-11 14:45 ` Andrew Tropin via Guix-patches via
  0 siblings, 1 reply; 2+ messages in thread
From: Liliana Marie Prikler @ 2024-03-22 21:45 UTC (permalink / raw)
  To: 69950; +Cc: andrew, cox.katherine.e+guix, liliana.prikler

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols.
  2024-03-22 21:45 [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols Liliana Marie Prikler
@ 2024-04-11 14:45 ` Andrew Tropin via Guix-patches via
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Tropin via Guix-patches via @ 2024-04-11 14:45 UTC (permalink / raw)
  To: Liliana Marie Prikler, 69950; +Cc: cox.katherine.e+guix, liliana.prikler

[-- Attachment #1: Type: text/plain, Size: 4033 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-11 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 21:45 [bug#69950] [PATCH emacs-team] gnu: emacs: Only verify integrity of bound symbols Liliana Marie Prikler
2024-04-11 14:45 ` Andrew Tropin via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).