all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Teng Wang <twang.umn@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to use "if" in lisp
Date: Fri, 16 Nov 2007 22:56:55 -0600	[thread overview]
Message-ID: <87ir41jwq0.fsf@supermath.math.umn> (raw)
In-Reply-To: 87d4u94qiq.fsf@lion.rapttech.com.au

Tim X <timx@nospam.dev.null> writes:

> Teng Wang <twang.umn@gmail.com> writes:
>
>> Thank you for your help.
>>
>> I think about it for a while. I think my design is sort of
>> nonsense. Since .emacs only be loaded once when start up. When I
>> change the buffer, it cannot run again.
>>
>> So now, I am wondering: is there any way to make it run on fly?
>>
>
> Can I suggest you let us know what it is you want to do as then we can
> possibly give you better alternative solutions. I'm guessing that what you
> are really looking for is how to make some elisp run when you enter a
> particular mode. If this is the case, what you are looking for is known in
> emacs as a 'hook'. Many modes provide various hooks that are run a certain
> times, such as wehn a mode is first loaded. Using hooks is one of the
> standard ways to customize a mode.
Yes, I just want to run some function to particular mode, for example:
run abbrev-mode when entering LaTeX-mode. And yesterday I read the
manual again and I found there is LaTeX-mode-hook variable. So now, I
am happy.

But Thank you all the same.
>
> Tim


Best,

----

Teng

  reply	other threads:[~2007-11-17  4:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15 18:01 how to use "if" in lisp Teng Wang
2007-11-15 18:08 ` Mirko
2007-11-15 18:30 ` Joel J. Adamson
2007-11-15 18:37   ` Joel J. Adamson
2007-11-15 19:05     ` Teng Wang
2007-11-15 19:16       ` Teng Wang
2007-11-16  1:04       ` Xah Lee
2007-11-16 14:35       ` Joel J. Adamson
2007-11-17  1:19       ` Tim X
2007-11-17  4:56         ` Teng Wang [this message]
2007-11-15 19:32     ` Sebastian Tennant

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=87ir41jwq0.fsf@supermath.math.umn \
    --to=twang.umn@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.
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.