unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Adding a sublist to a list on startup
Date: Tue, 14 Dec 2010 21:18:25 -0700	[thread overview]
Message-ID: <ie9fia$o9m$1@dough.gmane.org> (raw)
In-Reply-To: <87zks9o3bw.fsf@guruji.demimonde>

On 12/13/10 12:55 PM, Tyler Smith wrote:
> Hi,
>
> I need to customize the variable LaTeX-environment-list in Auctex. To
> get the behaviour I want, I have included the following in my .emacs:
>
> (defun my-LaTeX-hook ()
>    (push '("choices" . LaTeX-insert-choice) LaTeX-item-list)
>    (push '("parts" . LaTeX-insert-part) LaTeX-item-list)
>    (push '("questions" . LaTeX-insert-question) LaTeX-item-list)
>    (push '("choices" LaTeX-env-item) LaTeX-environment-list)
>    (push '("questions" LaTeX-env-item) LaTeX-environment-list)
>    (push '("parts" LaTeX-env-item) LaTeX-environment-list))
>
> (add-hook 'LaTeX-mode-hook 'my-LaTeX-hook)
>
> However, the last three push commands aren't doing what I expect. If I
> evaluate them from a buffer that is in Auctex/LaTeX mode, the value of
> LaTeX-environment-list contains:
>
> Value:
> (("abstract")
>   ("array" LaTeX-env-array)
>   ("center")
>   ("choices" LaTeX-env-item)
> ;; Extra lines snipped
>   ("verse"))
>
> However, my hook doesn't work properly - it gives me this instead:
>
> Value:
> ((LaTeX-env-item)
>   ("abstract")
>   ("array" LaTeX-env-array)
>   ("center")
>   ("choices")
> ;; Extra lines snipped
>   ("verse"))
>
> So the two-element list I'm trying to add to LaTeX-environment-list is
> getting split into two atoms, each added as a separate list. I guess I'm
> modifying something at the wrong time, but I'm not sure exactly what.

Are you sure that's the version of my-LaTeX-hook that's being executed?
(It could be redefined by something loaded later, or perhaps you've got
a compiled version of .emacs that is being loaded instead.)

-- 
Kevin Rodgers
Denver, Colorado, USA




  parent reply	other threads:[~2010-12-15  4:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 19:55 Adding a sublist to a list on startup Tyler Smith
2010-12-13 21:17 ` Drew Adams
2010-12-13 21:31   ` Tyler Smith
2010-12-13 21:57     ` Drew Adams
2010-12-16 13:52       ` Tyler Smith
2010-12-16 14:52         ` Drew Adams
2010-12-17  2:43           ` Tyler Smith
2010-12-16 16:48         ` PJ Weisberg
2010-12-15  4:18 ` Kevin Rodgers [this message]
2010-12-15 15:21   ` Tyler Smith
2010-12-16  7:18     ` Kevin Rodgers

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='ie9fia$o9m$1@dough.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).