From: Stefan Monnier Date: Mon, 13 Aug 2012 14:12:47 +0000 (-0400) Subject: * lisp/subr.el (internal--before-with-selected-window) X-Git-Tag: emacs-24.2.90~705 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89660017d14b5c2ca7d621636604f4acab63138c;p=emacs.git * 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 . --- diff --git a/etc/NEWS b/etc/NEWS index 2b4b3ed8c25..af5577f1066 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -200,18 +200,32 @@ ANSI terminal colors and styles by customizing the corresponding `term-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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5880b4da9aa..ba335bdadb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-08-13 Stefan Monnier + + * 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 . + 2012-08-13 Bastien Guerry * window.el (special-display-popup-frame): Small docstring diff --git a/lisp/subr.el b/lisp/subr.el index 2fd322dc77e..6b64bbc2f4d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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.