x-popup-dialog 的 header 参数起什么作用?

文档是这么写的:

(x-popup-dialog POSITION CONTENTS &optional HEADER)

...
If HEADER is non-nil, the frame title for the box is "Information",
otherwise it is "Question".

看了一下 C 代码:

    /*  Frame title: 'Q' = Question, 'I' = Information.
        Can also have 'E' = Error if, one day, we want
        a popup for errors. */
    if (NILP (header))
      dialog_name[0] = 'Q';
    else
      dialog_name[0] = 'I';

header 就是一个布尔参数,用来指定 frame title 样式的,但实际却看不出有区别:


  • macOS 10.12.6
  • Emacs 26.1

换个系统就好了

Emacs Mac Port 正常

(x-popup-dialog
 (selected-frame)
 '("Are you ready?" ("Yes" . :yes) ("No" . :no))
 t)

image

(x-popup-dialog
 (selected-frame)
 '("Are you ready?" ("Yes" . :yes) ("No" . :no)))

image

GNU Emacs 26.2.90 (build 3, x86_64-apple-darwin18.6.0, Carbon Version 158 AppKit 1671.5) of 2019-06-22