GNU bug report logs -
#7946
Referring to a marker changes Emacs' behaviour.
Previous Next
Reported by: Le Wang <l26wang <at> gmail.com>
Date: Mon, 31 Jan 2011 07:20:03 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 7946-done <at> debbugs.gnu.org (full text, mbox):
> I found an issue where evaluating this line or not causes Emacs behaviour
> change:
> (format "%s" marked-point)
The patch below appears to fix the problem for me. I've installed it in
the emacs-23 branch.
The problem was that current-column uses a cache to try and speed up
some cases, and the cache was not flushed when exiting
a save-restriction. The workaround you used works because `set-buffer'
flushes the cache and `format' uses set-buffer internally.
Stefan
=== modified file 'src/editfns.c'
--- src/editfns.c 2011-01-02 23:50:46 +0000
+++ src/editfns.c 2011-02-02 15:45:27 +0000
@@ -3347,6 +3347,9 @@
}
}
+ /* Changing the buffer bounds invalidates any recorded current column. */
+ invalidate_current_column ();
+
if (cur)
set_buffer_internal (cur);
This bug report was last modified 14 years and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.