Commit 9c104369 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/dframe.el (dframe-get-focus): Remove `hook' argument.

* lisp/speedbar.el (speedbar-get-focus): Run the "hook" afterwards instead.

Fixes: debbugs:17311
parent 622eef68
2014-04-21 Stefan Monnier <monnier@iro.umontreal.ca> 2014-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
   
* dframe.el (dframe-get-focus): Remove `hook' argument (bug#17311).
* speedbar.el (speedbar-get-focus): Run the "hook" afterwards instead.
* emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name. * emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name.
   
2014-04-21 Michael Albinus <michael.albinus@gmx.de> 2014-04-21 Michael Albinus <michael.albinus@gmx.de>
......
...@@ -606,13 +606,12 @@ Argument E is the event deleting the frame." ...@@ -606,13 +606,12 @@ Argument E is the event deleting the frame."
;;; Utilities ;;; Utilities
;; ;;
(defun dframe-get-focus (frame-var activator &optional hook) (defun dframe-get-focus (frame-var activator)
"Change frame focus to or from a dedicated frame. "Change frame focus to or from a dedicated frame.
If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
frame is selected. If the FRAME-VAR is active, then select the frame is selected. If the FRAME-VAR is active, then select the
attached frame. If FRAME-VAR is nil, ACTIVATOR is called to attached frame. If FRAME-VAR is nil, ACTIVATOR is called to
created it. HOOK is an optional hook to run when created it."
selecting FRAME-VAR."
(interactive) (interactive)
(if (eq (selected-frame) (symbol-value frame-var)) (if (eq (selected-frame) (symbol-value frame-var))
(if (frame-live-p dframe-attached-frame) (if (frame-live-p dframe-attached-frame)
...@@ -623,9 +622,7 @@ selecting FRAME-VAR." ...@@ -623,9 +622,7 @@ selecting FRAME-VAR."
;; go there ;; go there
(select-frame (symbol-value frame-var)) (select-frame (symbol-value frame-var))
) )
(other-frame 0) (other-frame 0))
;; If updates are off, then refresh the frame (they want it now...)
(run-hooks hook))
(defun dframe-close-frame () (defun dframe-close-frame ()
......
...@@ -1076,9 +1076,9 @@ If the selected frame is not speedbar, then speedbar frame is ...@@ -1076,9 +1076,9 @@ If the selected frame is not speedbar, then speedbar frame is
selected. If the speedbar frame is active, then select the attached frame." selected. If the speedbar frame is active, then select the attached frame."
(interactive) (interactive)
(speedbar-reset-scanners) (speedbar-reset-scanners)
(dframe-get-focus 'speedbar-frame 'speedbar-frame-mode (dframe-get-focus 'speedbar-frame 'speedbar-frame-mode)
(lambda () (let ((speedbar-update-flag t)) (let ((speedbar-update-flag t))
(speedbar-timer-fn))))) (speedbar-timer-fn)))
(defsubst speedbar-frame-width () (defsubst speedbar-frame-width ()
"Return the width of the speedbar frame in characters. "Return the width of the speedbar frame in characters.
......
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