Skip to content

Commit

Permalink
Merge pull request #28 from bet4it/compat
Browse files Browse the repository at this point in the history
Improve compatibility with aquamacs-ask-for-confirmation
  • Loading branch information
dholm committed Jul 26, 2018
2 parents 1fc3e22 + 241afd9 commit 0aec0e2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aquamacs-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The return value is the incremented value of PLACE."
(memq initial-window-system '(mac ns)))


(defun aquamacs-ask-for-confirmation (text long &optional yes-button no-button sheet no-cancel)
(defun aquamacs-ask-for-confirmation (text long &optional yes-button no-button sheet)
(let ((f (window-frame (minibuffer-window))))
(make-frame-visible f)
(raise-frame f) ; make sure frame is visible
Expand All @@ -88,11 +88,8 @@ The return value is the incremented value of PLACE."
(let ((ret (x-popup-dialog (or sheet (if (mouse-event-p last-command-event) last-command-event)
`(mouse-1 (,(selected-window) 100 (0 . 50) -1)))
(list text
`((,(or yes-button "Yes") . ?\r) . t) ; use \r instead of y until we have multi-keyEquivs
(if no-cancel 'no-cancel 'cancel)
`((,(or no-button "No") . ?n) . nil)))))
(if (eq ret 'cancel)
(keyboard-quit))
`(,(or yes-button "Yes") . t)
`(,(or no-button "No") . nil)))))
ret))))


Expand Down

0 comments on commit 0aec0e2

Please sign in to comment.