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

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

bug#52877: 27.2; Let `use-dialog-box' apply to more than just yes/no que


From: Drew Adams
Subject: bug#52877: 27.2; Let `use-dialog-box' apply to more than just yes/no questions
Date: Wed, 29 Dec 2021 17:47:19 +0000

A starting point is to redefine commands such as `menu-set-font', to
respect `use-dialog-box'.  For example:

(defun menu-set-font ()
  "Interactively select a font and make it the default on all frames.
The selected font will be the default on both the existing and future frames."
  (interactive)
  (if use-dialog-box
      (menu-set-font)
    (call-interactively #'set-frame-font-all)))

(defun set-frame-font-all (font)
  "Set the default font to FONT on all existing and future frames.
\(This is `set-frame-font' with `t' as argument FRAMES.)"
  (interactive
   (let* ((completion-ignore-case t)
          (font (completing-read "Font name: "
                                 (x-list-fonts "*" nil (selected-frame))
                                 nil nil nil nil
                                 (frame-parameter nil 'font))))
     (list font)))
  (set-frame-font font nil t))

If you prefer, instead of attempting the more general improvement of
commands that could respect `use-dialog-box', just fix `menu-set-font'
as indicated (or similarly).  But I think more commands that today
always raise a dialog box should be able to respect `use-dialog-box'.

In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
 of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1348)





reply via email to

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