Mercurial > hg > xemacs-beta
diff src/window.c @ 22:8fc7fe29b841 r19-15b94
Import from CVS: tag r19-15b94
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:50:29 +0200 |
parents | 859a2309aef8 |
children | 441bb1e64a06 |
line wrap: on
line diff
--- a/src/window.c Mon Aug 13 08:50:06 2007 +0200 +++ b/src/window.c Mon Aug 13 08:50:29 2007 +0200 @@ -4041,15 +4041,23 @@ } +extern int signal_error_on_buffer_boundary; + DEFUN ("scroll-up", Fscroll_up, 0, 1, "_P", /* Scroll text of current window upward ARG lines; or near full screen if no ARG. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll downward. When calling from a program, supply a number as argument or nil. + +If `signal-error-on-buffer-boundary' is nil, the usual error and +loss of zmacs region is suppressed when moving past end of buffer. */ (n)) { - window_scroll (Fselected_window (Qnil), n, 1, ERROR_ME); + Error_behavior errb = + signal_error_on_buffer_boundary ? ERROR_ME : ERROR_ME_NOT; + + window_scroll (Fselected_window (Qnil), n, 1, errb); return Qnil; } @@ -4058,10 +4066,16 @@ A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll upward. When calling from a program, supply a number as argument or nil. + +If `signal-error-on-buffer-boundary' is nil, the usual error and +loss of zmacs region is suppressed when moving past end of buffer. */ (n)) { - window_scroll (Fselected_window (Qnil), n, -1, ERROR_ME); + Error_behavior errb = + signal_error_on_buffer_boundary ? ERROR_ME : ERROR_ME_NOT; + + window_scroll (Fselected_window (Qnil), n, -1, errb); return Qnil; }