0

My question is how to let the command SPC-m-c-Cget the function name automatically?

I am using [email protected] (spacemacs), on Ubuntu 16.04 64 bit
I am using cscope layer, it is great but with one function cannot be used normally.

Every time when I press SPC-m-c-C to call helm-cscope-find-calling-this-funtcion, I get error command-execute: Wrong type argument: commandp, helm-cscope-find-calling-this-funtcion
I then do M-x helm-cscope-find-calling-this-funtcion, it will then ask me to input the function name and after I input the function name, everything works well.

I have also searched for some similar questions, but they are not the problem I am facing.
ref001
ref002
ref003

My config file for cscope

(defun cscope/init-helm-cscope ()
  (use-package helm-cscope
    :defer t
    :init
    (defun spacemacs/setup-helm-cscope (mode)
      "Setup `helm-cscope' for MODE"
      (spacemacs/set-leader-keys-for-major-mode mode
        "cc" 'helm-cscope-find-called-function
        "cC" 'helm-cscope-find-calling-this-funtcion
        "cd" 'helm-cscope-find-global-definition
        "ce" 'helm-cscope-find-egrep-pattern
        "cf" 'helm-cscope-find-this-file
        "cF" 'helm-cscope-find-files-including-file
        "cr" 'helm-cscope-find-this-symbol
        "cx" 'helm-cscope-find-this-text-string))
    :config
    (defadvice helm-cscope-find-this-symbol (before cscope/goto activate)
      (evil--jumps-push))))
Drew
  • 77,472
  • 10
  • 114
  • 243
sflee
  • 103
  • 3
  • Is it really spelled "funtcion"? The error tells you that that function is not a command, which means that it does not have an interactive spec. But you can apparently invoke it using M-x, which requires a command.

    Can you repro the problem when starting with emacs -Q (no init file)? What does C-h k M-x tell you M-x is bound to? There seems to be some info missing from this question.

    – Drew Dec 16 '17 at 06:13
  • Thank you very much. It is really a wrong spelling and they have already updated this bug in the develop branch https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Btags/cscope/packages.el – sflee Dec 16 '17 at 13:47

1 Answers1

1

You have a spelling mistake:

helm-cscope-find-calling-this-funtcion

The word is spelled function

I'm not using these features so I don't know for sure, but I suspect that the problem will be solved if you fix that name.

phils
  • 50,977
  • 3
  • 79
  • 122