all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: emacs-devel@gnu.org
Cc: Glenn Morris <rgm@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Abbrev should preserve case
Date: Thu, 21 Jun 2007 11:00:23 +0200	[thread overview]
Message-ID: <200706211100.24533.andreas.roehler@online.de> (raw)
In-Reply-To: <jwvhcp1ivym.fsf-monnier+emacs@gnu.org>

Am Donnerstag, 21. Juni 2007 10:01 schrieb Stefan Monnier:
> > Might it not be the best solution to drop the down-case
> > commands in abbrev.c?
>
> The case-insensitivity (and magical treatment of case in general) is
> a feature, as evidenced by the amount of extra code in abbrev.c to
> implement it.  So we do not want to just throw it all out.

Hmm. To preserve the status quo quite often is a wise
decision. Will see...


> > Imaging the use of machine written abbrevs for NLP, context analyses
> > etc., speed will matter. Therefore I suggest to do the work in C as far
> > as possible, avoid re-implementations. (I intend to take part here as far
> > as it's welcome and I'm able to.)
>
> The expand-abbrev code has no loop.  So there is no issue
> w.r.t performance (at least as long as we stick to the current constraint
> that abbreviations can only contain chars of word-syntax"): the code of
> expand-abbrev basically extracts the word before point, looks it up in
> a hash-table (actually, an obarray) and then uses the result to do the
> expansion (if any).  The only part that will get slower with larger
> abbrev-tables is the hash-lookup which is coded in C anyway.
>
> > Please consider if a derived mode must copy all the
> > abbrevs. I'd say a derived mode should rather note the
> > differences, but read the major-mode first. Then the
> > abbrev-file, which already counts 500K here, would
> > shrink a lot.
>
> This may be solved by the use of inheritance. 

I'm looking forward for that. 

> Although given the rather 
> limited amount of derived major modes in use, I'm not sure your 500KB would
> really shrink that much.
>

You mentioned abbreviations depending on the
context. That could explode the size with the current
copying.

  reply	other threads:[~2007-06-21  9:00 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 17:48 Abbrev should preserve case Andreas Röhler
2007-06-20 22:18 ` Glenn Morris
2007-06-21  3:47   ` Davis Herring
2007-06-21  4:14     ` Stefan Monnier
2007-06-21  7:10       ` Andreas Röhler
2007-06-21  8:01         ` Stefan Monnier
2007-06-21  9:00           ` Andreas Röhler [this message]
2007-06-21  7:00     ` Glenn Morris
2007-06-21 17:32   ` Richard Stallman
2007-06-21 19:02     ` Stefan Monnier
2007-06-22 16:25       ` Richard Stallman
2007-06-22 17:51         ` Stefan Monnier
2007-06-22 21:53           ` Richard Stallman
2007-10-10 21:14             ` Abbrev tables in elisp with some extra stuff (was: Abbrev should preserve case) Stefan Monnier
2007-10-11 19:57               ` Andreas Röhler
2007-10-12 15:59               ` Richard Stallman
2007-10-12 21:26                 ` Abbrev tables in elisp with some extra stuff Stefan Monnier
2007-10-13  6:41                   ` Richard Stallman
2007-10-14 17:45                     ` Andreas Röhler
2007-10-15 16:04                       ` Richard Stallman
2007-10-15 18:04                         ` Andreas Röhler
2007-10-16  4:10                           ` Richard Stallman
2007-10-16 20:26                   ` Stefan Monnier
2007-10-17  5:03                     ` Richard Stallman
2007-10-17 14:10                     ` Richard Stallman
2007-10-17 20:48                     ` Richard Stallman
2007-10-24  2:21                       ` Stefan Monnier
2007-10-25  2:10                         ` Richard Stallman
2007-10-26  5:44                           ` Testing new abbrev tables in elisp Stefan Monnier
2007-10-26 19:13                             ` Andreas Röhler
2007-10-26 21:38                               ` Stefan Monnier
2007-10-28 14:13                                 ` Andreas Röhler
2007-10-28 21:03                                   ` Stefan Monnier
2007-10-30 15:10                                     ` Andreas Röhler
2007-10-31  7:47                                       ` Richard Stallman
2007-11-03 20:29                                         ` Stephen J. Turnbull
2007-11-04  0:11                                           ` Richard Stallman
2007-11-04  2:42                                             ` Stephen J. Turnbull
2007-11-04 21:06                                               ` Andreas Röhler
2007-11-05  8:47                                                 ` Richard Stallman
2007-10-31 16:09                                     ` Juri Linkov
2007-10-31 17:44                                       ` 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

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

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