emacs-devel
[Top][All Lists]
Advanced

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

Re: :regexp to abbrev table


From: Leo
Subject: Re: :regexp to abbrev table
Date: Tue, 20 Apr 2010 17:32:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On 2010-04-20 16:22 +0100, Stefan Monnier wrote:
>> Many thanks for this. I will bear this in mind when writing the abbrev
>> completion code. Since TAB can be configured to perform two roles:
>> indentation and completion through (setq tab-always-indent 'complete).
>> Completion in the middle of a 'word' often lead to undesirable change
>> of the text in buffer. For example: (emacs-lis|p-mode) where | is the
>> cursor. TAB will change the text to (emacs-lisp-p-mode).
>
> This is indeed a problem we need to fix: it should take the tail into
> account, just as is done in the minibuffer.  Try the patch below.
> Of course, it will not necessarily always solve the problem that "I just
> wanted to reindent and it started to complete and annoyed me".

The code works fine except probably wrapping backward-sexp inside
ignore-errors for the case like this (|emacs-lisp-mode). Otherwise
it errs with:

forward-sexp: Scan error: "Containing expression ends prematurely", 228, 228

Will you consider applying the patch to trunk?

Leo




reply via email to

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