From: Francis Litterio <email@not.available>
To: gnu-emacs-bug@moderators.isc.org
Subject: bug#1194: define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook
Date: Fri, 17 Oct 2008 15:25:59 -0400 [thread overview]
Message-ID: <i5i6y70ngedn.fsf@not.available> (raw)
The docstring for define-abbrev says:
(define-abbrev table name expansion &optional hook &rest props)
Define an abbrev in table named name, to expand to expansion and call hook.
[...]
If expansion is not a string, the abbrev is a special one,
which does not expand in the usual way but only runs hook.
It seems that EXPANSION must be the empty string for the special
behavior described in the docstring to happen. To reproduce this,
evaluate this form:
(progn
(define-abbrev global-abbrev-table "zzz" nil '(lambda () (message "Hello")))
(define-abbrev global-abbrev-table "yyy" "" '(lambda () (message "Hello")))
(switch-to-buffer "temp"))
and then type " zzz yyy ". The "zzz" abbrev does cause the hook to run,
but the "yyy" abbrev causes the hook to run.
--
Fran
next reply other threads:[~2008-10-17 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87r66e6hfb.fsf@cyd.mit.edu>
2008-10-17 19:25 ` Francis Litterio [this message]
2008-10-17 21:35 ` bug#1194: marked as done (define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook) Emacs bug Tracking System
[not found] <mailman.1417.1224301722.25473.bug-gnu-emacs@gnu.org>
2008-10-18 17:25 ` bug#1194: define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook Francis Litterio
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=i5i6y70ngedn.fsf@not.available \
--to=email@not.available \
--cc=1194@emacsbugs.donarmstrong.com \
--cc=gnu-emacs-bug@moderators.isc.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.