このブログは、旧・はてなダイアリー「檜山正幸のキマイラ飼育記 メモ編」(http://d.hatena.ne.jp/m-hiyama-memo/)のデータを移行・保存したものであり、今後(2019年1月以降)更新の予定はありません。

今後の更新は、新しいブログ http://m-hiyama-memo.hatenablog.com/ で行います。

メニューバーの定義の確認

キーマップ内に定義されている。メニュー項目の選択がイベントで、そのイベントに対するコマンドが実行される。

http://www.geocities.co.jp/SiliconValley-Bay/9285/EMACS-JA/emacs_11.html より:

メニュー項目の完全なコマンド名や説明文を見るには、 C-h kと打ってから、通常どおりにマウスでメニューバーを選択します

実行例:

runs the command menu-set-font,
which is an interactive compiled Lisp function in `menu-bar.el'.

It is bound to .

(menu-set-font)

Interactively select a font and make it the default on all existing frames.

menu-set-font関数は、

(defun menu-set-font ()
  "Interactively select a font and make it the default on all existing frames."
  (interactive)
  (set-frame-font (if (fboundp 'x-select-font)
                      (x-select-font)
                    (mouse-select-font))
                  nil t))

(x-select-font) はWindowsでも実行できて、システムのフォントを選ぶことができる。(setq selected-font (x-select-font)) とか。

なお、set-frame-font は、

set-frame-font is an interactive compiled Lisp function in `frame.el'.

(set-frame-font FONT &optional KEEP-SIZE FRAMES)

Set the default font to FONT.
When called interactively, prompt for the name of a font, and use
that font on the selected frame.  When called from Lisp, FONT
should be a font name (a string), a font object, font entity, or
font spec.

If KEEP-SIZE is nil, keep the number of frame lines and columns
fixed.  If KEEP-SIZE is non-nil (or with a prefix argument), try
to keep the current frame size fixed (in pixels) by adjusting the
number of lines and columns.

If FRAMES is nil, apply the font to the selected frame only.
If FRAMES is non-nil, it should be a list of frames to act upon,
or t meaning all existing graphical frames.
Also, if FRAMES is non-nil, alter the user's Customization settings
as though the font-related attributes of the `default' face had been
"set in this session", so that the font is applied to future frames.

最近とみに感じること: 型記述が自然言語なのがほんとに残念。