Subject: bug#70368: [PATCH] Use a dedicated type to represent interpreted-function values

From: Michael Heerdegen <[email-masked]>
Date: Mon, 29 Apr 2024 11:05:26 +0200

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Thanks, and pushed.  Closing,

Thanks - but seems you broke some use cases of the old defadvice - I am
greeted with this *Compile Log* when starting Emacs:

| Error (bytecomp): Wrong type argument: arrayp, (lambda
| (ad--addoit-function &optional nopush edit) (let (ad-return-value) (setq
| ad-return-value (with-no-warnings (funcall ad--addoit-function nopush
| edit))) (setq ring-bell-function isearchp-orig-ring-bell-fn)
| ad-return-value))
|
| Error (bytecomp): Wrong type argument: arrayp, (lambda
| (ad--addoit-function &optional nopush edit) (let (ad-return-value) (setq
| ad-return-value (with-no-warnings (funcall ad--addoit-function nopush
| edit))) (if isearchp-auto-keep-filter-predicate-flag (setq
| isearchp-kept-filter-predicate isearch-filter-predicate) (setq
| isearch-filter-predicate isearchp-kept-filter-predicate)) (setq
| ring-bell-function isearchp-orig-ring-bell-fn) ad-return-value))
|
| Error (bytecomp): Wrong type argument: arrayp, (lambda
| (ad--addoit-function symbol type library) (let (ad-return-value) (prog1
| (setq ad-return-value (with-no-warnings (funcall ad--addoit-function
| symbol type library))) (when (symbolp symbol) (unless (cdr
| ad-return-value) (with-current-buffer (find-file-noselect library) (let
| ((sn (symbol-name symbol))) (when (and (null type) (string-match
| "\\`\\(hydra-[a-z-A-Z0-9]+\\)/\\(.*\\)\\'" sn) (re-search-forward
| (concat "(defhydra " (match-string 1 sn)) nil t)) (goto-char
| (match-beginning 0))) (cons (current-buffer) (point)))))))
| ad-return-value))
|
| Error (bytecomp): Wrong type argument: arrayp, (lambda
| (ad--addoit-function line &optional buffer relative) (let
| (ad-return-value) (let nil (setq ad-return-value (with-no-warnings
| (funcall ad--addoit-function line buffer relative))) (if (and
| folding-mode (or (folding-point-folded-p (point)) (<= (point)
| (point-min-marker)) (>= (point) (point-max-marker)))) (let ((line line))
| (if folding-shift-in-on-goto (progn (folding-show-all) (goto-char 1)
| (and (< 1 line) (not (folding-use-overlays-p)) (re-search-forward "[
| .]" nil 0 (1- line))) (let ((goal (point))) (while (prog2
| (beginning-of-line) (if folding-shift-in-on-goto (progn
| (folding-show-current-entry t t) (folding-point-folded-p goal))
| (folding-shift-in t)) (goto-char goal))) (folding-narrow-to-region (and
| folding-narrow-by-default (point-min)) (point-max) t))) (if (or
| folding-stack (folding-point-folded-p (point)))
| (folding-open-buffer)))))) ad-return-value))

These pop up even when just loading the .el sources of libraries,
e.g. folding.el or isearch+.  Could you please have a look?

Thx,

Michael.