GNU bug report logs -
#36243
26.2; defining inverse abbrevs include space
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Sun, 16 Jun 2019 10:36:02 UTC
Severity: normal
Tags: fixed
Found in version 26.2
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Any update on this?
On Mon, Jun 17, 2019 at 7:23 PM Allen Li <darkfeline <at> felesatra.moe> wrote:
>
> Thanks for suggesting skip-syntax-backward, see new patch.
>
> On Mon, Jun 17, 2019 at 7:44 AM Noam Postavsky <npostavs <at> gmail.com> wrote:
> >
> > Allen Li <darkfeline <at> felesatra.moe> writes:
> >
> > > Defining an inverse abbrev in a buffer like so (@ is point):
> > >
> > > some text foo @
> > >
> > > C-x a i l find outer otter RET
> > >
> > > defines an abbrev "foo " -> "find outer otter"
> >
> > > * lisp/abbrev.el (inverse-add-abbrev): Skip trailing nonword
> > > characters when defining abbrev.
> >
> > > (defun inverse-add-abbrev (table type arg)
> > > (let (name exp start end)
> > > (save-excursion
> > > - (forward-word (1+ (- arg)))
> > > + (if (<= arg 0)
> > > + (forward-word (1+ (- arg)))
> > > + (forward-word (- arg))
> > > + (forward-word))
> > > (setq end (point))
> > > (backward-word 1)
> >
> > This seems like a somewhat obfuscated way of skipping nonword
> > characters. How about using skip-syntax-backward instead?
This bug report was last modified 5 years and 332 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.