From 9fba804b9ecca10dc33bd5508bd4fed4ebba3cc7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 28 Aug 2012 15:35:35 -0400 Subject: [PATCH] * lisp/emacs-lisp/cl-lib.el (buffer-string): Fix setter macro. Fixes: debbugs:12293 --- lisp/ChangeLog | 36 ++++++++++++++++++++---------------- lisp/emacs-lisp/cl-lib.el | 3 ++- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d05f3b8f3a..72eafdca639 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-08-28 Stefan Monnier + + * emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293). + 2012-08-28 Leo Liu * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to @@ -53,8 +57,8 @@ 2012-08-26 Chong Yidong - * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): New - variable, replacing gdb-frame-parameters. + * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): + New variable, replacing gdb-frame-parameters. (gdb-frame-io-buffer, gdb-frame-breakpoints-buffer) (gdb-frame-threads-buffer, gdb-frame-memory-buffer) (gdb-frame-disassembly-buffer, gdb-frame-stack-buffer) @@ -130,17 +134,17 @@ 2012-08-22 Martin Rudalics - * window.el (walk-window-tree, window-with-parameter): New - optional argument MINIBUF to control whether these functions + * window.el (walk-window-tree, window-with-parameter): + New optional argument MINIBUF to control whether these functions should run on the minibuffer window. (window-at-side-list): Don't operate on minibuffer window. (window-in-direction): Simplify and rewrite doc-string. - (window--size-ignore): Rename to window--size-ignore-p. Update - callers. + (window--size-ignore): Rename to window--size-ignore-p. + Update callers. (display-buffer-in-atom-window, window--major-non-side-window) (window--major-side-window, display-buffer-in-major-side-window) - (delete-side-window, display-buffer-in-side-window): New - functions. + (delete-side-window, display-buffer-in-side-window): + New functions. (window--side-check, window-deletable-p, delete-window) (delete-other-windows, split-window): Handle side windows and atomic windows appropriately. @@ -192,8 +196,8 @@ * window.el (window-point-1, set-window-point-1): Remove. (window-in-direction, record-window-buffer) (set-window-buffer-start-and-point, split-window-below) - (window--state-get-1, display-buffer-record-window): Replace - calls to window-point-1 and set-window-point-1 by calls to + (window--state-get-1, display-buffer-record-window): + Replace calls to window-point-1 and set-window-point-1 by calls to window-point and set-window-point respectively. 2012-08-21 Glenn Morris @@ -311,8 +315,8 @@ (yank-excluded-properties): Add font-lock-face and category. (yank): Doc fix. - * subr.el (remove-yank-excluded-properties): Obey - yank-handled-properties. The special handling of font-lock-face + * subr.el (remove-yank-excluded-properties): + Obey yank-handled-properties. The special handling of font-lock-face and category is now done this way, instead of being hard-coded. (insert-for-yank-1): Remove font-lock-face handling. (yank-handle-font-lock-face-property) @@ -326,8 +330,8 @@ 2012-08-17 Michael Albinus - * net/tramp-sh.el (tramp-sh-handle-start-file-process): Eliminate - superfluous prompt. (Bug#12203) + * net/tramp-sh.el (tramp-sh-handle-start-file-process): + Eliminate superfluous prompt. (Bug#12203) 2012-08-17 Chong Yidong @@ -354,8 +358,8 @@ (next-buffer, previous-buffer, split-window, balance-windows-2) (set-window-text-height, window-buffer-height) (fit-window-to-buffer, shrink-window-if-larger-than-buffer) - (truncated-partial-width-window-p): Minor code adjustments. In - doc-strings state whether the argument window has to denote a + (truncated-partial-width-window-p): Minor code adjustments. + In doc-strings state whether the argument window has to denote a live, valid or any window. 2012-08-16 Phil Sainty (tiny change) diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 86497a3c73f..7239b5bd8ca 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -635,7 +635,8 @@ If ALIST is non-nil, the new pairs are prepended to it." (set-buffer-modified-p ,flag))) (gv-define-simple-setter buffer-name rename-buffer t) (gv-define-setter buffer-string (store) - `(progn (erase-buffer) (insert ,store))) + ;; Eval `store' first since it may look at the buffer. + (macroexp-let2 nil s store `(progn (erase-buffer) (insert ,s)))) (gv-define-simple-setter buffer-substring cl--set-buffer-substring) (gv-define-simple-setter current-buffer set-buffer) (gv-define-simple-setter current-case-table set-case-table) -- 2.39.2