I just installed Devel::PerlySense 0.0180.
I have put the following in my .emacs file:
; PerlySense
(load \"~/perly-sense\")
(global-unset-key \"\\C-
Emacs, by default, only allows certain keys to be prefixes (the start of multi-key commands). See http://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Keys.html You need to create a keymap and bind it to C-p.
The explicit answer to your question is this:
(define-prefix-command 'perly-sense-map)
(global-set-key (kbd "C-p") 'perly-sense-map)
(define-key perly-sense-map (kbd "C-d") 'perly-sense-smart-docs-at-point)
(define-key perly-sense-map (kbd "C-g") 'perly-sense-smart-go-to-at-point)
For more information as to what's being done, check out documentation for
In the original post, you mixed using kbd
and the older "\C-p" notation. You can read this large tutorial discussing keybindings, which has tons of information (more than what you probably need). I find the kbd
usage to be the easiest, you just pass it the string that you'd see when you do help on a key (C-h k).