[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It
From: |
Michael Heerdegen |
Subject: |
Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It |
Date: |
Mon, 24 Jun 2013 00:55:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Haroogan <haroogan@gmail.com> writes:
> > Good hint. If I do that, and create a new buffer, enter `elisp-mode'
> > (with the parts of code referencing to variables that the OP didn't send
> > along skipped), I see that the function `ac-emacs-lisp-mode-setup' has
> > been called, i.e., `ac-sources' has been set.
> >
> > If I then turn on auto-complete-mode, it seems to work as intended.
> If I open some *.el file, I automatically enter my elisp-mode as shown
> in my first mail. But as I said auto-completion does not work even
> though the hook should turn it on. However, I've just tried your
> suggestion, i.e. after opening some *.el file, I type:
>
> [M-x] auto-complete-mode
>
> then auto-completion starts to work.
So we are making some progress!
> Why is that? I mean in the
> configurations I already have:
>
> (global-auto-complete-mode t)
>
> Why should I turn on auto-completion manually like that for my
> elisp-mode, but I don't have to do anything for the standard
> emacs-lisp-mode?
Have a look at the definitions of `global-auto-complete-mode' and
`auto-complete-mode-maybe'. Summary: you have to push your mode
variable into the variable `ac-modes' to make
`global-auto-complete-mode' turn on the thingy for your mode.
BTW, I wonder why you decided to derive an own mode, instead of simply
customize emacs-lisp-mode. I mean, there is `font-lock-add-keywords'
and such stuff, which allows to modify the existing mode. Using an own
mode sometimes has inconveniences - like the problem you described.
Michael.
- Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Haroogan, 2013/06/15
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Haroogan, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Michael Heerdegen, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Dmitry Gutov, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Michael Heerdegen, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Haroogan, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It,
Michael Heerdegen <=
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Haroogan, 2013/06/23
- Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It, Michael Heerdegen, 2013/06/23