unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Meaning of \C-? in bracket regular expression
@ 2015-09-27 23:49 Joe Riel
  2015-09-28  0:11 ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Riel @ 2015-09-27 23:49 UTC (permalink / raw)
  To: Help GNU Emacs

What is the meaning of the elisp regular expression

 "[^\C-?}]"

Specifically, the "\C-?".  Is that a range? 
Then what character is \C?  
Or is it something else?

-- 
Joe Riel




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning of \C-? in bracket regular expression
  2015-09-27 23:49 Meaning of \C-? in bracket regular expression Joe Riel
@ 2015-09-28  0:11 ` Michael Heerdegen
  2015-09-28  4:51   ` Joe Riel
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2015-09-28  0:11 UTC (permalink / raw)
  To: help-gnu-emacs

Joe Riel <joer@san.rr.com> writes:

>  "[^\C-?}]"

(info "(elisp) Ctl-Char Syntax") says that

  For historical reasons, Emacs treats the <DEL> character as the
  control equivalent of ‘?’:

       ?\^? ⇒ 127     ?\C-? ⇒ 127

Try (string-to-vector "[^\C-?}]").

So this is a question of string read syntax - there is no character "-"
in this string representing a regexp.


Michael.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning of \C-? in bracket regular expression
  2015-09-28  0:11 ` Michael Heerdegen
@ 2015-09-28  4:51   ` Joe Riel
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Riel @ 2015-09-28  4:51 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

On Mon, 28 Sep 2015 02:11:04 +0200
Michael Heerdegen <michael_heerdegen@web.de> wrote:

> Joe Riel <joer@san.rr.com> writes:
> 
> >  "[^\C-?}]"
> 
> (info "(elisp) Ctl-Char Syntax") says that
> 
>   For historical reasons, Emacs treats the <DEL> character as the
>   control equivalent of ‘?’:
> 
>        ?\^? ⇒ 127     ?\C-? ⇒ 127
> 
> Try (string-to-vector "[^\C-?}]").
> 
> So this is a question of string read syntax - there is no character "-"
> in this string representing a regexp.

Thanks, that was helpful.


-- 
Joe Riel




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-28  4:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27 23:49 Meaning of \C-? in bracket regular expression Joe Riel
2015-09-28  0:11 ` Michael Heerdegen
2015-09-28  4:51   ` Joe Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).