help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp questions for Advanced Closing brackets function


From: Rupert Swarbrick
Subject: Re: elisp questions for Advanced Closing brackets function
Date: Wed, 21 May 2008 11:33:01 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Rupert Swarbrick <rswarbrick@gmail.com> writes:

>
> C-h c C-c C-t C-p gives TeX-PDF-mode. Now, what does that do? Well,
> let's look at its docs: C-h f TeX-PDF-mode
>
> Gives:
>
> ,----
> | TeX-PDF-mode is an interactive compiled Lisp function in <long stuff>
> | It is bound to C-c C-t C-p.
> | (TeX-PDF-mode &optional ARG)
> | 
> | Minor mode for using PDFTeX.
> | 
> | If enabled, PDFTeX will be used as an executable by default.
> | You can customize an initial value, and you can use the
> | function `TeX-global-PDF-mode' for toggling this value.
> `----
>
> Ahah! So we want to know about TeX-global-PDF-mode! Roight, let's look
> at that function, using C-h f TeX-global-PDF-mode. Well that says:
>
> ,----
> | TeX-global-PDF-mode is an interactive compiled Lisp func <blah blah>
> | (TeX-global-PDF-mode &optional ARG)
> | 
> | Toggle default for `TeX-PDF-mode'.
> `----
>
> (Ye gods, will we ever get there?!) But TeX-PDF-mode is a variable,
> which is looking promising. Maybe we can use customise. Finally (!)
> call C-h v TeX-PDF-mode and you'll see near the bottom of the help
> page a link to customise the variable. Tada!
>
> I realise this is a roundabout way to get the answer, but maybe this
> answer will help you solve the next problem you come across.
>

I've just read that again, and realised that I didn't notice we've
seen TeX-PDF-mode twice! But elisp, like many other lisps, uses two
different tables of symbols: one for functions and one for
variables. Which is why C-h f TeX-PDF-mode and C-h v TeX-PDF-mode do
different things. Random, eh?

Anyway, I think I've successfully demonstrated that even if you're a
bit dopey, you can still solve this sort of problem (-:

Rupert


reply via email to

[Prev in Thread] Current Thread [Next in Thread]