[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing new abbrev tables in elisp
From: |
Stefan Monnier |
Subject: |
Re: Testing new abbrev tables in elisp |
Date: |
Wed, 31 Oct 2007 13:44:33 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
> But maybe abbrev-mode should try to update :regexp automatically when the
> user interactively defines a new multi-word abbrev? So instead of giving
> the error message "Some abbrev characters are not word constituents" it
> could run something like:
> (let ((abbrevs ()))
> (mapatoms (lambda (sym)
> (if (symbol-value sym) (push (symbol-name sym) abbrevs)))
> global-abbrev-table)
> (abbrev-table-put global-abbrev-table :regexp (regexp-opt abbrevs
> 'words)))
> to rebuild :regexp from all abbrevs when at least one of them is not
> word constituent?
Indeed it could. It could even rebuild it dynamically from the abbrev
table's :enable-function by looking at the :abbrev-table-modiff value to
detect changes.
Stefan
PS: I believe I've provided enough hooks to do most such crazy things.
My own personal interest in improving abbrevs was in their use for
skeletons, so I'll let other people work on other aspects.
- Re: Abbrev tables in elisp with some extra stuff, (continued)
- Re: Abbrev tables in elisp with some extra stuff, Stefan Monnier, 2007/10/23
- Re: Abbrev tables in elisp with some extra stuff, Richard Stallman, 2007/10/24
- Testing new abbrev tables in elisp, Stefan Monnier, 2007/10/26
- Re: Testing new abbrev tables in elisp, Andreas Röhler, 2007/10/26
- Re: Testing new abbrev tables in elisp, Stefan Monnier, 2007/10/26
- Re: Testing new abbrev tables in elisp, Andreas Röhler, 2007/10/28
- Re: Testing new abbrev tables in elisp, Stefan Monnier, 2007/10/28
- Re: Testing new abbrev tables in elisp, Andreas Röhler, 2007/10/30
- Re: Testing new abbrev tables in elisp, Richard Stallman, 2007/10/31
- Re: Testing new abbrev tables in elisp, Juri Linkov, 2007/10/31
- Re: Testing new abbrev tables in elisp,
Stefan Monnier <=