Thread View: gnu.epoch.misc
1 messages
1 total messages
Started by Rick Braumoeller
Tue, 11 Aug 1992 03:39
Bug report, I think
Author: Rick Braumoeller
Date: Tue, 11 Aug 1992 03:39
Date: Tue, 11 Aug 1992 03:39
58 lines
2257 bytes
2257 bytes
I have been using Epoch for a few months now, and this is the
first time I've had it crash consistently for me. I've started
using some new Elisp stuff that a friend of mine wrote -
it's pretty simple stuff - but Epoch will crash every time
I use it. The elisp code remembers window configurations in a
ring and lets you move around in it. I'll usually save a few
configurations in it (3) and then move around. Within a
few traversals of the ring, epoch dies with "Fatal error 11."
So the question is, what's wrong with this elisp code that
causes epoch to crash? (I'm using epoch::version ->
"Epoch 4.0 Patchlevel 0".)
Thanks in advance...
--- window-ring.el ---
(defun put-at-end (elem list)
(if (cdr list) (cons (car list) (put-at-end elem (cdr list)))
(cons (car list) (list elem))))
(defun rotate-ring (ring)
(cond ((not ring) ()) ; There is no ring to rotate
((not (cdr ring)) ring) ; Ring has one member
(t (put-at-end (car ring) (cdr ring)))))
(defun prepend-ring (elem ring)
(cons elem ring))
(defun chop-ring (ring)
(if (not ring) ()
(cdr ring)))
(defvar window-config-ring ()) ; Start will a null ring
(defun chop-window-config-ring ()
(interactive)
(setq window-config-ring
(chop-ring window-config-ring)))
(defun add-to-window-config-ring ()
(interactive)
(setq window-config-ring
(prepend-ring (current-window-configuration) window-config-ring)))
(defun rotate-window-config-ring ()
(interactive)
(message "Moving thru' window ring...")
(setq window-config-ring (rotate-ring window-config-ring))
(set-window-configuration (car window-config-ring))
(recenter nil))
(global-set-key "\C-c\C-a" 'add-to-window-config-ring)
(global-set-key "\C-t" 'rotate-window-config-ring)
(global-set-key "\C-c\C-q" 'chop-window-config-ring)
--- end of window-ring.el
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads