--- Begin Message ---
Subject: |
setf behavior difference |
Date: |
Tue, 28 Aug 2012 09:47:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
setf behaves differently in 24.1 vs current trunk.
Save this in test.el:
(require 'cl)
(defvar my-string "
TEST
TEST")
(defun my-test ()
(with-temp-buffer
(insert my-string)
(goto-char (point-min))
(while (re-search-forward "\r\n" nil t)
(replace-match "\n" nil nil nil 1))
(setf (buffer-string) (buffer-string))
(princ (buffer-string))))
(my-test)
$ /usr/bin/emacs-24.1 --batch -l test.el
TEST
TEST
$ ./emacs --batch -l test.el
$
that is emacs from trunk prints nothing.
The code sequence is derived from bbdb-vcard.el at
http://github.com/trebb/bbdb-vcard
and the effect is that the package stopped working.
Searching the web for "(setf (buffer-string)" there are hits in a few
other packages.
It's a rather odd thing to do, but it looks like people are doing it...
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#12293: setf behavior difference |
Date: |
Tue, 28 Aug 2012 15:36:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
> (setf (buffer-string) (buffer-string))
Oops, indeed. Should be fixed now, thanks for catching it,
Stefan
--- End Message ---