all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.