all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: :regexp to abbrev table
Date: Tue, 20 Apr 2010 17:32:14 +0100	[thread overview]
Message-ID: <xbaimxwykru9.fsf@cam.ac.uk> (raw)
In-Reply-To: <jwvd3xutaym.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 20 Apr 2010 11:22:47 -0400")

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	other threads:[~2010-04-20 16:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 10:06 :regexp to abbrev table Leo
2010-04-19  6:29 ` Stefan Monnier
2010-04-19 18:26   ` Leo
     [not found]     ` <jwvljcj8ee1.fsf-monnier+emacs@gnu.org>
2010-04-20 13:37       ` Leo
2010-04-20 15:22         ` Stefan Monnier
2010-04-20 16:32           ` Leo [this message]
2010-04-20 18:39             ` Leo
2010-04-21  4:26               ` Stefan Monnier
2010-04-21  6:37                 ` Leo
     [not found]                   ` <jwv4oj46gfy.fsf-monnier+emacs@gnu.org>
2010-04-21 15:09                     ` Leo
     [not found]                       ` <jwvaasw4s7w.fsf-monnier+emacs@gnu.org>
2010-04-21 19:25                         ` Leo
2010-04-23  3:23                           ` 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=xbaimxwykru9.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.