]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/cl-macs.el
* simple.el (shell-command-to-string): Use `process-file'.
[gnu-emacs] / lisp / emacs-lisp / cl-macs.el
index 0cd518bbe624f7905b004fff37fc926d9fc181ad..c57d37703b024091ffa76d4b8306f601b9efd120 100644 (file)
@@ -1,7 +1,6 @@
 ;;; cl-macs.el --- Common Lisp macros
 
-;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-;;   2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;; Version: 2.02
@@ -629,7 +628,7 @@ This is equivalent to `(return-from nil RESULT)'."
 ;;;###autoload
 (defmacro return-from (name &optional result)
   "Return from the block named NAME.
-This jump out to the innermost enclosing `(block NAME ...)' form,
+This jumps out to the innermost enclosing `(block NAME ...)' form,
 returning RESULT from that form (or nil if RESULT is omitted).
 This is compatible with Common Lisp, but note that `defun' and
 `defmacro' do not create implicit blocks as they do in Common Lisp."
@@ -965,16 +964,25 @@ Valid clauses are:
 
               ((memq word '(window windows))
                (let ((scr (and (memq (car loop-args) '(in of)) (cl-pop2 loop-args)))
-                     (temp (make-symbol "--cl-var--")))
+                     (temp (make-symbol "--cl-var--"))
+                     (minip (make-symbol "--cl-minip--")))
                  (push (list var (if scr
                                      (list 'frame-selected-window scr)
                                    '(selected-window)))
                        loop-for-bindings)
+                 ;; If we started in the minibuffer, we need to
+                 ;; ensure that next-window will bring us back there
+                 ;; at some point.  (Bug#7492).
+                 ;; (Consider using walk-windows instead of loop if
+                 ;; you care about such things.)
+                 (push (list minip `(minibufferp (window-buffer ,var)))
+                       loop-for-bindings)
                  (push (list temp nil) loop-for-bindings)
                  (push (list 'prog1 (list 'not (list 'eq var temp))
                              (list 'or temp (list 'setq temp var)))
                        loop-body)
-                 (push (list var (list 'next-window var)) loop-for-steps)))
+                 (push (list var (list 'next-window var minip))
+                       loop-for-steps)))
 
               (t
                (let ((handler (and (symbolp word)
@@ -1462,7 +1470,7 @@ lexical closures as in Common Lisp.
 (defmacro lexical-let* (bindings &rest body)
   "Like `let*', but lexically scoped.
 The main visible difference is that lambdas inside BODY, and in
-successive bindings within BINDINGS, will create lexical closures
+successive bindings within VARLIST, will create lexical closures
 as in Common Lisp.  This is similar to the behavior of `let*' in
 Common Lisp.
 \n(fn VARLIST BODY)"
@@ -1748,15 +1756,6 @@ Example:
 (defsetf default-file-modes set-default-file-modes t)
 (defsetf default-value set-default)
 (defsetf documentation-property put)
-(defsetf extent-data set-extent-data)
-(defsetf extent-face set-extent-face)
-(defsetf extent-priority set-extent-priority)
-(defsetf extent-end-position (ext) (store)
-  (list 'progn (list 'set-extent-endpoints (list 'extent-start-position ext)
-                    store) store))
-(defsetf extent-start-position (ext) (store)
-  (list 'progn (list 'set-extent-endpoints store
-                    (list 'extent-end-position ext)) store))
 (defsetf face-background (f &optional s) (x) (list 'set-face-background f x s))
 (defsetf face-background-pixmap (f &optional s) (x)
   (list 'set-face-background-pixmap f x s))