emacs-devel
[Top][All Lists]
Advanced

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

question about `quit-char'


From: Drew Adams
Subject: question about `quit-char'
Date: Tue, 21 Oct 2008 09:57:01 -0700

A recent message (can't find it now) that mentioned that `quit-char' is not
necessarily `C-g' prompted me to look through the docs for info about
`quit-char'. 

I found it only in the Elisp manual, node Input Modes, where `quit-char' is used
to name the 4th element of the list returned by `current-input-mode' (it is also
mentioned wrt `set-input-mode'; `set-quit-char' is not mentioned).

There is no variable or function `quit-char'.

I wonder what the recommendation or the intention is about referencing the quit
character. I have code, for instance, that does this for Icicle mode, where
`map' is a minibuffer map:

(define-key map [(control ?g)] 'foo)

Should I instead be doing something like this?

(define-key map (vector (cadr (cddr (current-input-mode)))) 'foo)

That seems to work OK, at least when the quit character is `C-g'. Dunno if it is
robust. If so, is it preferable in general?

If so, shouldn't such a recommendation be documented? And in that case shouldn't
we perhaps define a function `quit-char' that returns (cadr (cddr
(current-input-mode)))?








reply via email to

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