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

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

bug#24907: 26.0.50; Opening bracket in char-class :alnum:


From: Andreas Röhler
Subject: bug#24907: 26.0.50; Opening bracket in char-class :alnum:
Date: Wed, 9 Nov 2016 16:43:03 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0



On 09.11.2016 13:45, npostavs@users.sourceforge.net wrote:
tags 24907 notabug
close 24907
quit

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

Behind some opening brackets:

[[[[[

Funktion below would skip backward over

(defun my-skb ()
   (interactive)
   (skip-chars-backward "[[:alnum:]]"))
Yes, skip-chars-backward doesn't take a regexp, it takes a character
set.  You wanted (skip-chars-backward "[:alnum:]")

     (skip-chars-backward STRING &optional LIM)

     Move point backward, stopping after a char not in STRING
     Move point backward, stopping after a char not in STRING, or at pos LIM.
     See ‘skip-chars-forward’ for details.
     [...]

     (skip-chars-forward STRING &optional LIM)

     Move point forward, stopping before a char not in STRING, or at pos LIM.
     STRING is like the inside of a ‘[...]’ in a regular expression
     except that ‘]’ is never special and ‘\’ quotes ‘^’, ‘-’ or ‘\’
      (but not at the end of a range; quoting is never needed there).
     Thus, with arg "a-zA-Z", this skips letters stopping before first 
nonletter.
     With arg "^a-zA-Z", skips nonletters stopping before first letter.
     Char classes, e.g. ‘[:alpha:]’, are supported.

Ah, thanks and sorry for the noise.





reply via email to

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