unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11019: 24.0.94; ring-insert+extend does not grow ring properly
@ 2012-03-15  6:31 Chong Yidong
  2012-03-15  8:13 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Chong Yidong @ 2012-03-15  6:31 UTC (permalink / raw)
  To: 11019

Looks like ring-insert+extend with a non-nil GROW-P argument does not
grow the ring properly if the ring is already "wrapped around":

(require 'ring)

(setq ring (make-ring 4))
(ring-insert ring 0)
(ring-insert ring 1)
(ring-insert ring 2)
(ring-insert ring 3)
(ring-insert ring 4)

(setq foo (ring-elements ring))
;; ==> (4 3 2 1)

(ring-insert+extend ring 5 t)

(setq bar (ring-elements ring))
;; ==> (1 4 5 3 2)
;; expected: (5 4 3 2 1)


I will write up a fix for this soon.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#11019: 24.0.94; ring-insert+extend does not grow ring properly
  2012-03-15  6:31 bug#11019: 24.0.94; ring-insert+extend does not grow ring properly Chong Yidong
@ 2012-03-15  8:13 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2012-03-15  8:13 UTC (permalink / raw)
  To: 11019-done

Chong Yidong <cyd@gnu.org> writes:

> I will write up a fix for this soon.

Fixed in revno 107606.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-15  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15  6:31 bug#11019: 24.0.94; ring-insert+extend does not grow ring properly Chong Yidong
2012-03-15  8:13 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).