unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Richard Stallman <rms@gnu.org>
Subject: Re: define-abbrev
Date: Tue, 30 Oct 2007 21:04:58 +0100	[thread overview]
Message-ID: <200710302104.59559.andreas.roehler@online.de> (raw)
In-Reply-To: <jwvir4owhht.fsf-monnier+emacs@gnu.org>

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	other threads:[~2007-10-30 20:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 14:21 define-abbrev Andreas Röhler
2007-10-28 21:38 ` define-abbrev Stefan Monnier
2007-10-29  9:36   ` define-abbrev Andreas Röhler
2007-10-29 15:38     ` define-abbrev Stefan Monnier
2007-10-29 17:34       ` define-abbrev Andreas Röhler
2007-10-29 20:57         ` define-abbrev Stefan Monnier
2007-10-30 11:20           ` define-abbrev Andreas Röhler
2007-10-30 19:11             ` define-abbrev Stefan Monnier
2007-10-30 20:04               ` Andreas Röhler [this message]
2007-10-30 20:25                 ` define-abbrev Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200710302104.59559.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).