[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Adding a sublist to a list on startup
From: |
Drew Adams |
Subject: |
RE: Adding a sublist to a list on startup |
Date: |
Mon, 13 Dec 2010 13:57:53 -0800 |
> No, sorry, there are two different lists getting modified there. The
> first three pushes add to LaTeX-item-list, which is an alist (thus the
> dots). This seems to work as expected. The second group of pushes adds
> to LaTeX-environment-list, which is a list of two-element lists (no
> dots).
M-x debug-on-entry RET my-LaTeX-hook RET
Then use `d' to step through the function. You can use `e' at any time to
evaluate something (e.g. `LaTeX-env-item'). That should show you what the
problem is.
> > I also wonder why you don't just use Customize to customize
> > `LaTeX-item-list' (I'm assuming that it is a user option).
> > That's what Customize is for: it type-checks changes you make.
>
> Two reasons. First, these are not customizable variables, so I can't.
That would be the first bug/enhancement request I would make, if I were in your
place.
> Second, even if I could use customize, trying to figure out
> how to enter anything more complex than a string, or selecting
> a checkbox, is, in my limited experience, harder than just
> figuring out the lisp.
Sometimes the person who defined the `defcustom' is lazy. ;-)
In this case, if `LaTeX-environment-list' is a list of items that are each
always a list of a string and a symbol, something like this shouldn't be
difficult to deal with in Customize:
(defcustom LaTeX-environment-list () "..."
:type '(repeat (list string symbol)) :group 'whatever)
The only fields to fill in are a string and a symbol name for each item. Plus
buttons INS and DEL to add or delete an item.
Re: Adding a sublist to a list on startup, Kevin Rodgers, 2010/12/14