|
From: | Jean Louis |
Subject: | Re: Removing line and column number settings from some buffers |
Date: | Sat, 5 Dec 2020 20:58:16 +0300 |
User-agent: | Mutt/2.0 (3d08634) (2020-11-07) |
* Drew Adams <drew.adams@oracle.com> [2020-12-05 18:42]: > > No experience with ring. How is it used and what do you do? Suppose I > > want a keybinding to cycle auto-fill with three things. > > > > 1. Auto-Fill Comments > > 2. Auto-Fill Entire Buffer > > 3. Disable Auto-Fill > > > https://lists.gnu.org/archive/html/help-gnu-emacs/2020-11/msg00392.html > > And you do have experience with Emacs rings, even if you're not aware of it: > > `C-h v search-ring' > `C-h v regexp-search-ring' Please help with `toto' in this example. On the other hand, if you want to be able to go either forward or backward then you might want to use a ring (as defined in standard library ring.el): (defvar ring (ring-convert-sequence-to-ring '(nil t always))) (defvar current nil) (defun next () (interactive) (setq current (ring-next toto current)) (message "NOW: %s" current)) (defun previous () (interactive) (setq current (ring-previous toto current)) (message "NOW: %s" current))
[Prev in Thread] | Current Thread | [Next in Thread] |