emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode ada5576 389/496: Merge pull request #144 from n


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode ada5576 389/496: Merge pull request #144 from nhojb/which_function_mode_fix
Date: Sun, 29 Aug 2021 11:34:13 -0400 (EDT)

branch: elpa/swift-mode
commit ada55760d6308be1852793ff6bed9a8db161c54a
Merge: 7739e49 c67b950
Author: taku0 <taku0@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #144 from nhojb/which_function_mode_fix
    
    Fixes which-function-mode hang
---
 swift-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/swift-mode.el b/swift-mode.el
index 063c967..d3159e9 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -215,7 +215,9 @@ Signal `scan-error' if it hits opening parentheses."
 
   (delete-overlay swift-mode:anchor-overlay)
 
-  (add-hook 'which-func-functions #'swift-mode:current-defun-name)
+  (add-hook 'which-func-functions (lambda ()
+                                    (when (equal (with-current-buffer 
(current-buffer) major-mode) 'swift-mode)
+                                      (swift-mode:current-defun-name))))
   (setq-local add-log-current-defun-function #'swift-mode:current-defun-name))
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.swift\\'" . swift-mode))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]