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

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

bug#1194: marked as done (define-abbrev with EXPANSION equal to nil doe


From: Emacs bug Tracking System
Subject: bug#1194: marked as done (define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook)
Date: Fri, 17 Oct 2008 14:35:05 -0700

Your message dated Fri, 17 Oct 2008 17:27:36 -0400
with message-id <87r66e6hfb.fsf@cyd.mit.edu>
and subject line Re: define-abbrev with EXPANSION equal to nil doesn't run the 
abbrev hook
has caused the Emacs bug report #1194,
regarding define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1194: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1194
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook Date: Fri, 17 Oct 2008 15:25:59 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt)
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




--- End Message ---
--- Begin Message --- Subject: Re: define-abbrev with EXPANSION equal to nil doesn't run the abbrev hook Date: Fri, 17 Oct 2008 17:27:36 -0400
> 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.

When EXPANSION is nil, that undefines the abbrev.  This is mentioned
earlier in the docstring of define-abbrev.  I made a small change to the
docstring to make this clearer.


--- End Message ---

reply via email to

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