all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Extending 'emacs-lisp-mode' Disables 'auto-complete' for It
Date: Mon, 24 Jun 2013 00:55:27 +0200	[thread overview]
Message-ID: <877ghkbfog.fsf@web.de> (raw)
In-Reply-To: 51C7774D.6090808@gmail.com

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.




  reply	other threads:[~2013-06-23 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15 17:26 Extending 'emacs-lisp-mode' Disables 'auto-complete' for It Haroogan
2013-06-23 17:43 ` Haroogan
2013-06-23 18:29   ` Michael Heerdegen
2013-06-23 21:26     ` Dmitry Gutov
2013-06-23 22:10       ` Michael Heerdegen
2013-06-23 22:31         ` Haroogan
2013-06-23 22:55           ` Michael Heerdegen [this message]
2013-06-23 23:13             ` Haroogan
2013-06-24  1:13               ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ghkbfog.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.