Commit b9808e77 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/calc/calc-keypd.el (calc-keypad-execute): `x-flush-mouse-queue' doesn't

exist any more.
(calc-keypad-redraw): Remove unused var `pad'.
(calc-keypad-press): Remove unused var `menu'.
parent 6c6014d4
2013-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
* calc/calc-keypd.el (calc-keypad-execute): `x-flush-mouse-queue' doesn't
exist any more.
(calc-keypad-redraw): Remove unused var `pad'.
(calc-keypad-press): Remove unused var `menu'.
2013-08-23 Martin Rudalics <rudalics@gmx.at> 2013-08-23 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-pop-up-frame): Call * window.el (display-buffer-pop-up-frame):
pop-up-frame-function with BUFFER current so `make-frame' will Call pop-up-frame-function with BUFFER current so `make-frame' will
use it as the new frame's buffer (Bug#15133). use it as the new frame's buffer (Bug#15133).
2013-08-22 Stefan Monnier <monnier@iro.umontreal.ca> 2013-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
......
...@@ -349,8 +349,7 @@ ...@@ -349,8 +349,7 @@
(if (> (length (car key)) cwid) (if (> (length (car key)) cwid)
(substring (car key) 0 cwid) (substring (car key) 0 cwid)
(car key)))) (car key))))
(wid (length name)) (wid (length name)))
(pad (- cwid (/ wid 2))))
(insert (make-string (/ (- cwid wid) 2) 32) (insert (make-string (/ (- cwid wid) 2) 32)
name name
(make-string (/ (- cwid wid -1) 2) 32) (make-string (/ (- cwid wid -1) 2) 32)
...@@ -399,7 +398,6 @@ ...@@ -399,7 +398,6 @@
inv calc-inverse-flag) inv calc-inverse-flag)
calc-hyperbolic-flag)) calc-hyperbolic-flag))
(invhyp t) (invhyp t)
(menu (symbol-value (nth calc-keypad-menu calc-keypad-menus)))
(input calc-keypad-input) (input calc-keypad-input)
(iexpon (and input (iexpon (and input
(or (string-match "\\*[0-9]+\\.\\^" input) (or (string-match "\\*[0-9]+\\.\\^" input)
...@@ -535,19 +533,22 @@ ...@@ -535,19 +533,22 @@
(defun calc-keypad-left-click (event) (defun calc-keypad-left-click (event)
"Handle a left-button mouse click in Calc Keypad window." "Handle a left-button mouse click in Calc Keypad window."
;; FIXME: Why not use "@e" instead to select the buffer?
(interactive "e") (interactive "e")
(with-current-buffer calc-keypad-buffer (with-current-buffer calc-keypad-buffer
(goto-char (posn-point (event-start event))) (goto-char (posn-point (event-start event)))
(calc-keypad-press))) (calc-keypad-press)))
(defun calc-keypad-right-click (event) (defun calc-keypad-right-click (_event)
"Handle a right-button mouse click in Calc Keypad window." "Handle a right-button mouse click in Calc Keypad window."
;; FIXME: Why not use "@e" instead to select the buffer?
(interactive "e") (interactive "e")
(with-current-buffer calc-keypad-buffer (with-current-buffer calc-keypad-buffer
(calc-keypad-menu))) (calc-keypad-menu)))
(defun calc-keypad-middle-click (event) (defun calc-keypad-middle-click (_event)
"Handle a middle-button mouse click in Calc Keypad window." "Handle a middle-button mouse click in Calc Keypad window."
;; FIXME: Why not use "@e" instead to select the buffer?
(interactive "e") (interactive "e")
(with-current-buffer calc-keypad-buffer (with-current-buffer calc-keypad-buffer
(calc-keypad-menu-back))) (calc-keypad-menu-back)))
...@@ -588,7 +589,6 @@ ...@@ -588,7 +589,6 @@
(defun calc-keypad-execute () (defun calc-keypad-execute ()
(interactive) (interactive)
(let* ((prompt "Calc keystrokes: ") (let* ((prompt "Calc keystrokes: ")
(flush 'x-flush-mouse-queue)
(prefix nil) (prefix nil)
keys cmd) keys cmd)
(save-excursion (save-excursion
...@@ -605,10 +605,9 @@ ...@@ -605,10 +605,9 @@
(progn (progn
(setq last-command-event (aref keys (1- (length keys)))) (setq last-command-event (aref keys (1- (length keys))))
(command-execute cmd) (command-execute cmd)
(setq flush 'not-any-more (setq prefix t
prefix t
prompt (concat prompt (key-description keys) " "))) prompt (concat prompt (key-description keys) " ")))
(eq cmd flush))))) ; skip mouse-up event nil)))) ; skip mouse-up event
(message "") (message "")
(if (commandp cmd) (if (commandp cmd)
(command-execute cmd) (command-execute cmd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment