unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12170: save-excursion fails boundary case with recenter
@ 2012-08-10  1:23 Bill Brodie
  2012-08-10  9:34 ` martin rudalics
  0 siblings, 1 reply; 25+ messages in thread
From: Bill Brodie @ 2012-08-10  1:23 UTC (permalink / raw)
  To: 12170

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Running GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN
under Windows 7.

 

Define:

 

                (defun f (n) (save-excursion (forward-line (- n)) (recenter
0)))

 

Let H be the window height in lines, and suppose that point is positioned at
the beginning of line L > H.

 

Despite 'save-excursion', (f K) moves point if K = H.  It leaves point
unchanged for any other value of K, 0 <= K < L.

 

 


[-- Attachment #2: Type: text/html, Size: 2450 bytes --]

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

end of thread, other threads:[~2012-08-12 10:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10  1:23 bug#12170: save-excursion fails boundary case with recenter Bill Brodie
2012-08-10  9:34 ` martin rudalics
2012-08-10  9:50   ` Bastien
2012-08-10 13:03     ` martin rudalics
2012-08-10 13:40   ` Bill Brodie
2012-08-10 14:47     ` martin rudalics
2012-08-10 16:18       ` Stefan Monnier
2012-08-10 16:47         ` martin rudalics
2012-08-10 17:07           ` Stefan Monnier
2012-08-10 19:01       ` Eli Zaretskii
2012-08-11  9:32         ` martin rudalics
2012-08-11 11:11           ` Eli Zaretskii
2012-08-11 14:22             ` martin rudalics
2012-08-11 15:10               ` Eli Zaretskii
2012-08-11 16:05                 ` martin rudalics
2012-08-11 16:31                   ` Eli Zaretskii
2012-08-11 16:49                     ` Eli Zaretskii
2012-08-12 10:31                       ` martin rudalics
2012-08-11 16:27                 ` Bill Brodie
2012-08-10 15:04     ` Stefan Monnier
2012-08-10 15:46       ` Bill Brodie
2012-08-10 16:46         ` martin rudalics
2012-08-10 16:46       ` martin rudalics
2012-08-10 18:58     ` Eli Zaretskii
2012-08-11  9:31       ` martin rudalics

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).