help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: `looking-back' strange warning


From: Drew Adams
Subject: RE: `looking-back' strange warning
Date: Sat, 3 Oct 2015 15:20:01 +0000 (UTC)

> >> See also bug #17284,
> >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17284,
> >> where this has been discussed and I and others proposed
> >> code for this.
> >
> > Martin's version is faster than mine, so no need to propose it.
> >
> >> You are welcome to contribute to that (short) bug thread,
> >> or to otherwise try to get such a function added to Emacs.
>
> (defun looking-back-string (string)
>    "Return non-nil if the literal STRING is right before point.
> This is more efficient that `looking-back' for this use case."
>    (string= string (ignore-errors
>                      (buffer-substring-no-properties
>                        (- (point) (length string)) (point)))))

Again, please consider posting your suggestion to the bug
thread, or otherwise try to get such a function added to Emacs
(emacs-devel@gnu.org).



reply via email to

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