emacs-devel
[Top][All Lists]
Advanced

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

Re: define-abbrev


From: Andreas Röhler
Subject: Re: define-abbrev
Date: Tue, 30 Oct 2007 21:04:58 +0100
User-agent: KMail/1.9.5

Am Dienstag, 30. Oktober 2007 20:11 schrieb Stefan Monnier:
> > With emacs -Q sometimes it's gone, sometimes
> > not. Strange enough: with -q sometimes also. Maybe the
> > daylight or the moon have influence too? :)
> >
> > Error occurs at nearly the last line 898
> >
> >       (apply 'define-abbrev table elt))))
>
> I'm pretty sure I know where the error is signalled and how to fix this
> symptom, but depending on the cause the real fix might be conmpletely
> different, and the cause is elsewhere (the problem seems to be that
> you're somehow using an abbrev-table that was not created by
> make-abbrev-table).

My Englisch-Mode? I'll remember your remark
should I ran into trouble at this point again, thanks.

>
> > BTW having a closer look at the code, I see abbrevs
> > still downcased.
>
> The behavior of abbrevs is not supposed to have changed *at all*.
> If you look at the patch I installed, it only changes
> doc/lispref/abbrevs.texi, but not doc/emacs/abbrevs.texi.
>
> If you want case-fixed abbrevs, then you need to specify it in elisp:
> there is currently no command to do that.  The way to specify it is to
> pass ":case-fixed t" to define-abbrev.
>
> I'll let other people take care of such UI-level issues because I do not
> use abbrevs in this way at all, so I have no idea what would be
> convenient and what would be insufferable.
>
> > Can you tell me an example where this downcasing is
> > useful, why it's introduced once?
>
> No idea.  I just preserved the old behavior.

Maybe it's worthwhile to speak about. IMO behaviour as
described by the manual is a misfeature:

,----
|    Abbrev expansion preserves case; thus, `foo' expands into `find
| outer otter'; `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
| OTTER' or `Find Outer Otter' according to the variable
| `abbrev-all-caps' (a non-`nil' value chooses the first of the two
| expansions).
`----

Rather an abbrev should simply deliver that expansion
which was defined without calculating things at this
point. And abbrev should take any expansion.

> > For me both GNU and Xemacs abbrev.c codes look much
> > simpler than new abbrev.el.
>
> Tell me which part is too complex, and I may be able to help you
> understand it (and add relevant comments in the code as I do that).
>
>

Thought changing the C-code to get rid of
the downcasing would be simple and it was. 

I have an abbrev.c now, which does it so far. When
multi-word abbreviations in XEmacs are debugged, I'll
try to adapt it.

An abbrev.el completely in Emacs Lisp its
certainly a chance too.

Andreas Röhler





reply via email to

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