[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm c23acc1898 1/5: Fail safe in helm-find-function with
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm c23acc1898 1/5: Fail safe in helm-find-function with prefarg and fix |
Date: |
Sun, 30 Jul 2023 15:59:40 -0400 (EDT) |
branch: elpa/helm
commit c23acc1898ff5511f6e818ff33546044cb9af609
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fail safe in helm-find-function with prefarg and fix
action name in menu.
---
helm-elisp.el | 4 ++--
helm-lib.el | 9 +++++++--
helm-types.el | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/helm-elisp.el b/helm-elisp.el
index 9225f8be5a..4040197fa5 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -721,7 +721,7 @@ is only used to test DEFAULT."
:persistent-help "Toggle describe class"
:keymap helm-apropos-map
:action '(("Describe Class" . helm-describe-class)
- ("Find Class" . helm-find-function)
+ ("Find Class (C-u for source)" . helm-find-function)
("Info lookup" . helm-info-lookup-symbol))))
(defun helm-def-source--eieio-generic (&optional default)
@@ -743,7 +743,7 @@ is only used to test DEFAULT."
:persistent-help "Toggle describe generic function"
:keymap helm-apropos-map
:action '(("Describe function" . helm-describe-function)
- ("Find function" . helm-find-function)
+ ("Find function (C-u for source)" . helm-find-function)
("Info lookup" . helm-info-lookup-symbol))))
(defun helm-info-lookup-fallback-source (candidate)
diff --git a/helm-lib.el b/helm-lib.el
index 7970a5c72b..7a99acf967 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1295,8 +1295,13 @@ using LOAD-PATH."
(if (not helm-current-prefix-arg)
(find-function (helm-symbolify func))
(let ((place (helm-find-function-noselect func)))
- (when place
- (switch-to-buffer (car place)) (goto-char (cdr place))))))
+ (if (cdr place)
+ (progn
+ (switch-to-buffer (car place)) (goto-char (cdr place)))
+ (helm-aif (car place)
+ (message "Couldn't find Function `%s' in `%s'"
+ func (buffer-name it))
+ (message "Couldn't find Function `%s'" func))))))
(defun helm-find-variable (var)
"Try to jump to VAR definition.
diff --git a/helm-types.el b/helm-types.el
index 65280fff7a..6f129b22e5 100644
--- a/helm-types.el
+++ b/helm-types.el
@@ -232,7 +232,7 @@
(defcustom helm-type-function-actions
(helm-make-actions
"Describe function" 'helm-describe-function
- "Find function" 'helm-find-function
+ "Find function (C-u for source)" 'helm-find-function
"Info lookup" 'helm-info-lookup-symbol
"Debug on entry" 'debug-on-entry
"Cancel debug on entry" 'cancel-debug-on-entry