[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 7be4524864 3/3: Fix issue#2666 lambdas are no more re
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 7be4524864 3/3: Fix issue#2666 lambdas are no more represented as list |
Date: |
Mon, 6 May 2024 01:00:29 -0400 (EDT) |
branch: elpa/helm
commit 7be4524864ea1cf974a1adf451695db14b3d916b
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix issue#2666 lambdas are no more represented as list
Check now with (not (symbolp x)) instead of (consp x).
---
helm-core.el | 29 ++++++++++++++++++-----------
helm-lib.el | 8 ++++++--
helm-mode.el | 4 +++-
3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index bb599b639a..29bdff4b74 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -2491,15 +2491,18 @@ i.e. functions called with RET."
(helm-log "helm-exit-and-execute-action" "Start executing action")
(let ((actions (helm-get-actions-from-current-source)))
(when actions
- (cl-assert (or (eq action actions)
- ;; Compiled lambdas
- (byte-code-function-p action)
- ;; Natively compiled (libgccjit)
- (helm-subr-native-elisp-p action)
- ;; Lambdas
- (and (listp action) (functionp action))
- ;; One of current actions.
- (rassq action actions))
+ (cl-assert (or
+ ;; Single actions defined as symbol.
+ (eq action actions)
+ ;; Compiled lambdas
+ (byte-code-function-p action)
+ ;; Natively compiled (libgccjit)
+ (helm-subr-native-elisp-p action)
+ ;; Lambdas (lambdas are no more represented as list in
+ ;; Emacs-29+) Bug#2666.
+ (and (not (symbolp action)) (functionp action))
+ ;; One of current actions.
+ (rassq action actions))
nil "No such action `%s' for this source" action)))
(setq helm-saved-action action)
(setq helm-saved-selection (or (helm-get-selection) ""))
@@ -5636,7 +5639,9 @@ If action buffer is selected, back to the Helm buffer."
helm-onewindow-p)
(if (functionp actions)
(message "Sole action: %s"
- (if (or (consp actions)
+ ;; lambdas are no more represented as
list in
+ ;; Emacs-29+ Bug#2666.
+ (if (or (not (symbolp actions))
(byte-code-function-p actions)
(helm-subr-native-elisp-p
actions))
"Anonymous" actions))
@@ -5664,7 +5669,9 @@ If action buffer is selected, back to the Helm buffer."
(setq helm-saved-current-source src)
(if (functionp it)
(message "Sole action: %s"
- (if (or (consp it)
+ ;; lambdas are no more represented as list in
+ ;; Emacs-29+ Bug#2666.
+ (if (or (not (symbolp it))
(byte-code-function-p it)
(helm-subr-native-elisp-p it))
"Anonymous" it))
diff --git a/helm-lib.el b/helm-lib.el
index 6e82ab86de..69796988e5 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1350,11 +1350,15 @@ used to modify each element of LIST to be displayed in
PROMPT."
(t (intern it))))
(defun helm-symbol-name (obj)
- (if (or (and (consp obj) (functionp obj))
+ "Return name of OBJ.
+If object is a lambda, return \"Anonymous\"."
+ ;; lambdas are no more represented as list in
+ ;; Emacs-29+ Bug#2666.
+ (if (or (and (not (symbolp obj)) (functionp obj))
(byte-code-function-p obj)
(helm-subr-native-elisp-p obj))
"Anonymous"
- (symbol-name obj)))
+ (symbol-name obj)))
(defun helm-describe-class (class)
"Display documentation of Eieio CLASS, a symbol or a string."
diff --git a/helm-mode.el b/helm-mode.el
index 470dbe69aa..e3e01dda5b 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1793,7 +1793,9 @@ See documentation of `completing-read' and
`all-completions' for details."
;; otherwise helm have not the time to close its initial session.
(minibuffer-setup-hook
(cl-loop for h in minibuffer-setup-hook
- unless (or (consp h) ; a lambda.
+ ;; lambdas are no more represented as list in
+ ;; Emacs-29+ Bug#2666.
+ unless (or (and (not (symbolp h)) (functionp h)) ; a lambda.
(byte-code-function-p h)
(helm-subr-native-elisp-p h)
(memq h
helm-mode-minibuffer-setup-hook-black-list))