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

[xyzzy:02808] Re: ミニバッファーのキーマップ



逸見さん、こんにちは。

    Tue, 15 Jun 1999 10:28:56 +0900 の
   “[xyzzy:02806] ミニバッファーのキーマップ”
    への返事です.

| 1)そのミニバファーがどのキーマップを使っているか、表示する方法はあるので
| しょうか?

こんなベタな方法ならできますけど、表示しても嬉しいかどうか…。

(defun display-keymap ()
  (let ((keymap (local-keymap (window-buffer (minibuffer-window)))))
    (cond ((eq keymap minibuffer-local-map)
	   'minibuffer-local-map)
	  ((eq keymap minibuffer-local-completion-map)
	   'minibuffer-local-completion-map)
	  ((eq keymap minibuffer-local-command-line-map)
	   'minibuffer-local-command-line-map)
	  ((eq keymap minibuffer-local-must-match-map)
	   'minibuffer-local-must-match-map))))

| これの先頭行に上記の"minibuffer-local-completion-map"とかを
| 表示することは可能でしょうか?

(defun describe-bindings ()
  (interactive)
  (let ((lmap (local-keymap))
	(gmap *global-keymap*))
    (long-operation
      (message "Building binding list...")
      (with-output-to-temp-buffer ("*Help*")
	(format t "Local Bindings:~@[ ~A~]~%key~20Tbinding~%---~20T-------"
		(display-keymap))
	(ed::describe-bindings-1 "" lmap nil)
	(format t "~%Global Bindings:~%key~20Tbinding~%---~20T-------")
	(ed::describe-bindings-1 "" gmap lmap)
	(goto-char 0))
      (message "Building binding list...done"))))

--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx

Index Home