From 9e22ef64adefbc226d0e4ceb99b5823d9df99a3f Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 22 Mar 2024 22:45:13 +0100 Subject: gnu: emacs: Only verify integrity of bound symbols. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- gnu/packages/aux-files/emacs/comp-integrity.el | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'gnu/packages') 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) -- cgit v1.2.3