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

* lisp/subr.el (internal--before-with-selected-window)

(internal--after-with-selected-window): Fix typo seleted->selected.
(with-selected-window): Adjust callers.
Reported by Dmitry Gutov <dgutov@yandex.ru>.
parent 31cd32c9
......@@ -200,18 +200,32 @@ ANSI terminal colors and styles by customizing the corresponding
`term-color-<COLOR>', `term-color-underline' and `term-color-bold'
faces.
** CL's main entry is now (require 'cl-lib).
** CL
*** CL's main entry is now (require 'cl-lib).
`cl-lib' is like the old `cl' except that it uses the namespace cleanly,
i.e. all its definitions have the "cl-" prefix.
i.e. all its definitions have the "cl-" prefix (and internal definitions use
the "cl--" prefix).
If `cl' provided a feature under the name `foo', then `cl-lib' provides it
under the name `cl-foo' instead, with the exceptions of the few definitions
that had to use `foo*' to avoid conflicts with pre-existing Elisp entities,
which have not been renamed to `cl-foo*' but just `cl-foo'.
The old `cl' is now deprecated and is nothing more than a bunch of aliases that
The old `cl' is now deprecated and is just a bunch of aliases that
provide the old non-prefixed names.
*** `cl-flet' is not like `flet' (which is deprecated).
Instead it obeys the behavior of Common-Lisp's `flet'.
*** `cl-labels' is slightly different from `labels'.
The difference is that it relies on the `lexical-binding' machinery (as opposed
to the `lexical-let' machinery used previously) to capture definitions in
closures, so such closures will only work if `lexical-binding' is in use.
*** `progv' was rewritten to use the `let' machinery.
A side effect is that vars without corresponding value are bound to nil
rather than making them unbound.
** Desktop
*** `desktop-path' no longer includes the "." directory. Desktop
......
2012-08-13 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (internal--before-with-selected-window)
(internal--after-with-selected-window): Fix typo seleted->selected.
(with-selected-window): Adjust callers.
Reported by Dmitry Gutov <dgutov@yandex.ru>.
2012-08-13 Bastien Guerry <bzg@gnu.org>
* window.el (special-display-popup-frame): Small docstring
......
......@@ -3023,7 +3023,7 @@ also `with-temp-buffer'."
(set-buffer ,buffer-or-name)
,@body))
(defun internal--before-with-seleted-window (window)
(defun internal--before-with-selected-window (window)
(let ((other-frame (window-frame window)))
(list window (selected-window)
;; Selecting a window on another frame also changes that
......@@ -3034,7 +3034,7 @@ also `with-temp-buffer'."
(unless (eq (selected-frame) other-frame)
(tty-top-frame other-frame)))))
(defun internal--after-with-seleted-window (state)
(defun internal--after-with-selected-window (state)
;; First reset frame-selected-window.
(when (window-live-p (nth 2 state))
;; We don't use set-frame-selected-window because it does not
......@@ -3065,12 +3065,12 @@ potentially make a different buffer current. It does not alter
the buffer list ordering."
(declare (indent 1) (debug t))
`(let ((save-selected-window--state
(internal--before-with-seleted-window ,window)))
(internal--before-with-selected-window ,window)))
(save-current-buffer
(unwind-protect
(progn (select-window (car save-selected-window--state) 'norecord)
,@body)
(internal--after-with-seleted-window save-selected-window--state)))))
(internal--after-with-selected-window save-selected-window--state)))))
(defmacro with-selected-frame (frame &rest body)
"Execute the forms in BODY with FRAME as the selected frame.
......
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