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

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

standard framework for prompting user for next key cord in key sequence


From: Le Wang
Subject: standard framework for prompting user for next key cord in key sequence
Date: Sun, 4 Sep 2011 02:35:13 +0800

Pressing C-h in the middle of a key sequence shows what's possible
next.  Is there a standard framework, for doing some thing similar,
without invoking C-h?  That is -- always provide the user with
feedback as to what key chord is possible next.  The help window
should disappear once input is complete successfully or aborted.

(defvar my-map (make-sparse-keymap))

(define-key my-map [(control c) (a)] 'a-func)
(define-key my-map [(control c) (b)] 'b-func)

(defun cool-fun (func)
  ""
  (interactive (magic-input-helper my-map))

The magic-input-helper is what I'm after here.  It seems this should
be a generally helpful function.

-- 
Le



reply via email to

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