help-gnu-emacs
[Top][All Lists]
Advanced

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

What should which-func-functions return?


From: Shuguang Sun
Subject: What should which-func-functions return?
Date: Tue, 21 Aug 2018 17:33:07 +0800

Hi,


I'm trying which-funciton-mode in ess-mode, and the imenu provide redundant 
information in case of which fun. For example, I juse tneed Functions, but 
imenu provide library, class, and etc.
Therefore I come to which-func-functions, and  put the following code for 
ess-mode, however, it doesn't work.

What hould the function in the list of which-func-functions return?


(defun ess-r--which-function ()
  "goto function name"
  (save-excursion
    (cond
     ((ess-beginning-of-function t)
      (goto-char (ess-beginning-of-function t))
      (if (looking-at "[[:space:]]*\\(?1:.*?\\)[[:space:]]*<-")
          (match-string-no-properties 1)))
     )))
(add-to-list 'which-func-functions 'ess-r--which-function)








Best Regards,
Shuguang

reply via email to

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