"Kevin Rodgers" <ihs_4664@xxxxxxxxx> wrote in message
> B. T. Raven wrote:
> > Is it possible to set the maximum length of this variable to 2? I want
> > write the from and to strings either to an association list or to a
> > with one dotted pair per line. Maybe this is equivalent to repeatedly
> > setqing it to nil. ??
> ,----[ C-h v history-length RET ]
> | history-length is a variable defined in `C source code'.
> | Its value is 30
> | Documentation:
> | *Maximum length for history lists before truncation takes place.
> | A number means that length; t means infinite. Truncation takes place
> | just after a new element is inserted. Setting the history-length
> | property of a history variable overrides this default.
> | You can customize this variable.
> | [back]
> So (put 'query-replace-history 'history-length 2)
Thanks, Kevin. Now that I understand what's going on, it doesn't seem like
it's worth while just to save a few hundred bytes. I had an idea to save
the qrh into a saved association list, something like:
(setq sal (cons (cons (cadr query-replace-history) (car
The idea is to re-load this later and run query replace in batch mode on
other files. I have no idea how to do this in detail but it seems possible
and it would be very useful to me. Maybe instead of setting it to 2, I'll
set it to t, and then then figure out how to manipulate the resulting flat
list of strings after an hours' long session of query-replacing.
Since for my needs this list (sal) of dotted pairs would be a few thousand
elements long, it is probably not the best data structure to use. Could
something along this line be done with a hash table?
help-gnu-emacs mailing list