branch: externals/hydra
commit 84a9db01eff1fcc52ad054c5ad3c22316739573f
Merge: 54e9db2b02 59a2a45a35
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Merge remote-tracking branch 'upstream/hydra/main' into externals/hydra
---
 hydra.el | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/hydra.el b/hydra.el
index 5d5623c383..6d0f29b461 100644
--- a/hydra.el
+++ b/hydra.el
@@ -1,6 +1,6 @@
 ;;; hydra.el --- Make bindings that stick around. -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2022  Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025  Free Software Foundation, Inc.
 
 ;; Author: Oleh Krehel <ohwoeo...@gmail.com>
 ;; Maintainer: Oleh Krehel <ohwoeo...@gmail.com>
@@ -322,31 +322,6 @@ Exitable only through a blue head.")
      "^.*(\\(defhydra\\) \\([[:alpha:]-]+\\)"
      2)))
 
-;;* Find Function
-
-;; FIXME: Maybe we can dispense with this advice if `defhydra' adds appropriate
-;; `definition-name' properties to the functions it defines?
-(advice-add 'find-function-search-for-symbol :around
-            #'hydra--around-find-function-search-for-symbol-advice)
-
-(defun hydra--around-find-function-search-for-symbol-advice
-    (orig-fun symbol type library)
-  "Navigate to hydras with `find-function-search-for-symbol'."
-  (let ((res (apply orig-fun symbol type library)))
-    (when (symbolp symbol)
-        ;; The original function returns (cons (current-buffer) (point))
-        ;; if it found the point.
-        (unless (cdr res)
-          (with-current-buffer (find-file-noselect library)
-            (let ((sn (symbol-name symbol)))
-              (when (and (null type)
-                         (string-match 
"\\`\\(hydra-[[:alnum:]-]+\\)/\\(.*\\)\\'" sn)
-                         (re-search-forward (concat "(defhydra " (match-string 
1 sn))
-                                            nil t))
-                (goto-char (match-beginning 0)))
-              (cons (current-buffer) (point))))))
-    res))
-
 ;;* Universal Argument
 (defvar hydra-base-map
   (let ((map (make-sparse-keymap)))

Reply via email to