comparison lisp/window.el @ 5753:dbd8305e13cb

Warn about non-string non-integer ARG to #'gensym, bytecomp.el. lisp/ChangeLog addition: 2013-08-21 Aidan Kehoe <kehoea@parhasard.net> * bytecomp.el: * bytecomp.el (gensym): * bytecomp.el (byte-compile-gensym): New. Warn that gensym called in a for-effect context is unlikely to be useful. Warn about non-string non-integer ARGs, this is incorrect. Am not changing the function to error with same, most code that makes the mistake is has no problems, which is why it has survived so long. * window-xemacs.el (save-window-excursion/mapping): * window.el (save-window-excursion): Call #'gensym with a string, not a symbol.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 21 Aug 2013 19:02:59 +0100
parents cc6f0266bc36
children
comparison
equal deleted inserted replaced
5752:70a3f4ff8da8 5753:dbd8305e13cb
200 (defmacro save-window-excursion (&rest body) 200 (defmacro save-window-excursion (&rest body)
201 "Execute body, preserving window sizes and contents. 201 "Execute body, preserving window sizes and contents.
202 Restores which buffer appears in which window, where display starts, 202 Restores which buffer appears in which window, where display starts,
203 as well as the current buffer. 203 as well as the current buffer.
204 Does not restore the value of point in current buffer." 204 Does not restore the value of point in current buffer."
205 (let ((window-config (gensym 'window-config))) 205 (let ((window-config (gensym "window-config")))
206 `(let ((,window-config (current-window-configuration))) 206 `(let ((,window-config (current-window-configuration)))
207 (unwind-protect 207 (unwind-protect
208 (progn ,@body) 208 (progn ,@body)
209 (set-window-configuration ,window-config))))) 209 (set-window-configuration ,window-config)))))
210 210