bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12293: setf behavior difference


From: Dan Nicolaescu
Subject: bug#12293: 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...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]