Emacs autocomplete w/perl

Phred on 2007-02-06T03:57:20

Been hacking on emacs more lately, my latest trick is auto-completion. I started here at Richard Rodger's page on autocompletion, and added the following lisp:

; load the autocompletion wordlist on startup
(setq perl-wordlist-default-file "~/.vim/wordlists/perl.list")
(setq auto-load-wordlist 't)
(if auto-load-wordlist
      (find-file-noselect perl-wordlist-default-file 'NOWARN)
)

; use this plugin in cperl-mode
(add-hook 'cperl-mode-hook
          '(lambda ()
             (local-set-key "\C-i"     'my-tab)))

I used the word list from my vim ide, but I think I will go one step further and generate a wordlist from the codebases I work on to make it complete. It's been working well so far.


now what would be really cool..

TeeJay on 2007-02-06T08:58:40

is if you did something similar to komodo and analysed all your perl, looking for function signatures, or even examples from synopsis.