all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: define abbrev for emacs-lisp-mode but not other lisp-mode
Date: Tue, 16 Nov 2010 00:31:04 -0800 (PST)	[thread overview]
Message-ID: <47506466-243e-4662-a60d-c29d71e675c3@y3g2000vbm.googlegroups.com> (raw)


this is a odd thing.

when in emacs-lisp-mode, and when you define a abbrev (e.g. call
define-mode-abbrev then “ah” then “add-hook”), then call write-abbrev-
file

then you get this in your abbrev file (e.g. at 〔~/.emacs.d/
abbrev_defs〕)

(define-abbrev-table 'lisp-mode-abbrev-table '(
    ("ah" "add-hook" nil 0)
))

note that it's lisp-mode-abbrev-table not emacs-lisp-mode-abbrev-
table.

Why's that?

(if you change it to the latter, it won't work.)

i'm wondering because i want the abbrev to be for emacs-lisp-mode
only, not general lisp mode.
It appears that emacs-lisp-mode is defined on top of lisp-mode. Ok, so
my question is, what's the purpose of lisp-mode? Is that supposed to
be the base for other lisp lang modes to be defined on top of? A look
at scheme-mode seems to confirm this, but still, i want my abbrev for
emacs lisp mode only. Is that possible?

thanks.

 Xah ∑ http://xahlee.org/

             reply	other threads:[~2010-11-16  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16  8:31 Xah Lee [this message]
2010-11-16 14:54 ` define abbrev for emacs-lisp-mode but not other lisp-mode harven
     [not found]   ` <98f8192b-26cd-4e25-8163-3fc926ceb455@s9g2000vby.googlegroups.com>
2010-11-17  8:52     ` harven

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=47506466-243e-4662-a60d-c29d71e675c3@y3g2000vbm.googlegroups.com \
    --to=xahlee@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.