changeset 108048:258c1175292f

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 14 Apr 2010 22:47:29 +0000
parents bf9a29f59be6 (current diff) 57532220127a (diff)
children 56ac0739b76d
files
diffstat 20 files changed, 193 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Tue Apr 13 22:52:59 2010 +0000
+++ b/etc/NEWS	Wed Apr 14 22:47:29 2010 +0000
@@ -69,12 +69,16 @@
 with Xft.
 
 ** New scrolling commands `scroll-up-command' and `scroll-down-command'
-(bound to [next] and [prior]) does not signal errors at top/bottom
-of buffer at first key-press (instead moves to top/bottom of buffer).
+(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom
+of buffer at first key-press (instead moves to top/bottom of buffer)
+when a new variable `scroll-error-top-bottom' is non-nil.
 
 ** New scrolling commands `scroll-up-line' and `scroll-down-line'
 scroll a line instead of full screen.
 
+** New variable `scroll-preserve-screen-position-commands' defines
+a list of scroll command affected by `scroll-preserve-screen-position.
+
 
 * Editing Changes in Emacs 24.1
 
--- a/lisp/ChangeLog	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/ChangeLog	Wed Apr 14 22:47:29 2010 +0000
@@ -1,3 +1,48 @@
+2010-04-14  Michael Albinus  <michael.albinus@gmx.de>
+
+	Fix Bug#5840.
+	* ido.el (ido-file-name-all-completions-1):
+	* minibuffer.el (minibuffer-completion-help):
+	* net/tramp.el (tramp-completion-mode-p): Use `non-essential'.
+
+2010-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* simple.el (non-essential): New var.
+
+	Add a new field `location' to bookmarks for non-file bookmarks.
+	* bookmark.el (bookmark-location): Use the new field, if present.
+	(bookmark-insert-location): Undo last change, not needed any more.
+	* man.el (Man-bookmark-make-record):
+	* woman.el (woman-bookmark-make-record): Add `location' field.
+
+2010-04-14  Juri Linkov  <juri@jurta.org>
+
+	* simple.el (scroll-error-top-bottom): New defcustom.
+	(scroll-up-command, scroll-down-command): Use it.  Doc fix.
+
+	* emulation/pc-select.el (pc-select-override-scroll-error):
+	Obsolete in favor of `scroll-error-top-bottom'.
+
+2010-04-14  Juri Linkov  <juri@jurta.org>
+
+	* tutorial.el (tutorial--default-keys): Rebind `C-v' to
+	`scroll-up-command' and `M-v' to `scroll-down-command'.
+
+	* emulation/cua-rect.el (cua--init-rectangles):
+	* forms.el (forms--change-commands):
+	* image-mode.el (image-mode-map):
+	Remap scroll-down-command and scroll-up-command
+	in addition to scroll-down and scroll-up.
+
+2010-04-14  Juri Linkov  <juri@jurta.org>
+
+	* mwheel.el (scroll-preserve-screen-position-commands):
+	Add mwheel-scroll to this list of commands.
+
+	* simple.el (scroll-preserve-screen-position-commands):
+	Add scroll-up-command, scroll-down-command, scroll-up-line,
+	scroll-down-line to this list of commands.
+
 2010-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* obsolete/complete.el: Move from lisp/complete.el.
--- a/lisp/bookmark.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/bookmark.el	Wed Apr 14 22:47:29 2010 +0000
@@ -1176,9 +1176,7 @@
   (or no-history (bookmark-maybe-historicize-string bookmark))
   (let ((start (point)))
     (prog1
-        ;; FIXME: Each bookmark should come with a `location' method
-        ;; rather than just say "-- no file --".
-	(insert (or (bookmark-location bookmark) "   -- no file --"))
+	(insert (bookmark-location bookmark))
       (if (display-mouse-p)
 	  (add-text-properties
 	   start
@@ -1193,10 +1191,16 @@
 (defalias 'bookmark-locate 'bookmark-insert-location)
 
 (defun bookmark-location (bookmark)
-  "Return the name of the file associated with BOOKMARK, or nil if none.
+  "Return a description of the location of BOOKMARK.
 BOOKMARK may be a bookmark name (a string) or a bookmark record."
   (bookmark-maybe-load-default-file)
-  (bookmark-get-filename bookmark))
+  ;; We could call the `handler' and ask for it to construct a description
+  ;; dynamically: it would open up several new possibilities, but it
+  ;; would have the major disadvantage of forcing to load each and
+  ;; every handler when the user calls bookmark-menu.
+  (or (bookmark-prop-get bookmark 'location)
+      (bookmark-get-filename bookmark)
+      "-- Unknown location --"))
 
 
 ;;;###autoload
--- a/lisp/emulation/cua-rect.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/emulation/cua-rect.el	Wed Apr 14 22:47:29 2010 +0000
@@ -1432,6 +1432,8 @@
   (define-key cua--rectangle-keymap [remap beginning-of-buffer] 'cua-resize-rectangle-top)
   (define-key cua--rectangle-keymap [remap scroll-down]         'cua-resize-rectangle-page-up)
   (define-key cua--rectangle-keymap [remap scroll-up]           'cua-resize-rectangle-page-down)
+  (define-key cua--rectangle-keymap [remap scroll-down-command] 'cua-resize-rectangle-page-up)
+  (define-key cua--rectangle-keymap [remap scroll-up-command]   'cua-resize-rectangle-page-down)
 
   (define-key cua--rectangle-keymap [remap delete-backward-char] 'cua-delete-char-rectangle)
   (define-key cua--rectangle-keymap [remap backward-delete-char] 'cua-delete-char-rectangle)
--- a/lisp/emulation/pc-select.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/emulation/pc-select.el	Wed Apr 14 22:47:29 2010 +0000
@@ -93,6 +93,9 @@
 errors are suppressed."
   :type 'boolean
   :group 'pc-select)
+(define-obsolete-variable-alias 'pc-select-override-scroll-error
+                                'scroll-error-top-bottom
+                                "24.1")
 
 (defcustom pc-select-selection-keys-only nil
   "*Non-nil means only bind the basic selection keys when started.
--- a/lisp/forms.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/forms.el	Wed Apr 14 22:47:29 2010 +0000
@@ -1407,7 +1407,9 @@
   (if forms-forms-scroll
       (progn
 	(local-set-key [remap scroll-up] 'forms-next-record)
-	(local-set-key [remap scroll-down] 'forms-prev-record)))
+	(local-set-key [remap scroll-down] 'forms-prev-record)
+	(local-set-key [remap scroll-up-command] 'forms-next-record)
+	(local-set-key [remap scroll-down-command] 'forms-prev-record)))
   ;;
   ;; beginning-of-buffer -> forms-first-record
   ;; end-of-buffer -> forms-end-record
--- a/lisp/gnus/ChangeLog	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/gnus/ChangeLog	Wed Apr 14 22:47:29 2010 +0000
@@ -1,3 +1,7 @@
+2010-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* gnus-sum.el (gnus-summary-bookmark-make-record): Add `location' field.
+
 2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* gnus-sum.el: Add bookmark declarations to silence the compiler.
--- a/lisp/gnus/gnus-sum.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/gnus/gnus-sum.el	Wed Apr 14 22:47:29 2010 +0000
@@ -12657,8 +12657,9 @@
          (id      (mail-header-id head)))
     `(,subject
       ,@(bookmark-make-record-default 'point-only)
-        (group . ,grp) (article . ,art)
-        (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
+      (location . ,(format "Gnus %s:%d:%s" grp art id))
+      (group . ,grp) (article . ,art)
+      (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
 
 ;;;###autoload
 (defun gnus-summary-bookmark-jump (bookmark)
--- a/lisp/ido.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/ido.el	Wed Apr 14 22:47:29 2010 +0000
@@ -3458,7 +3458,7 @@
     ;; Strip method:user@host: part of tramp completions.
     ;; Tramp completions do not include leading slash.
     (let* ((len (1- (length dir)))
-	   (tramp-completion-mode t)
+	   (non-essential t)
 	   (compl
 	    (or (file-name-all-completions "" dir)
 		;; work around bug in ange-ftp.
--- a/lisp/image-mode.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/image-mode.el	Wed Apr 14 22:47:29 2010 +0000
@@ -302,6 +302,8 @@
     (define-key map [remap next-line] 'image-next-line)
     (define-key map [remap scroll-up] 'image-scroll-up)
     (define-key map [remap scroll-down] 'image-scroll-down)
+    (define-key map [remap scroll-up-command] 'image-scroll-up)
+    (define-key map [remap scroll-down-command] 'image-scroll-down)
     (define-key map [remap move-beginning-of-line] 'image-bol)
     (define-key map [remap move-end-of-line] 'image-eol)
     (define-key map [remap beginning-of-buffer] 'image-bob)
--- a/lisp/man.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/man.el	Wed Apr 14 22:47:29 2010 +0000
@@ -1689,8 +1689,9 @@
   "Make a bookmark entry for a Man buffer."
   `(,(Man-default-bookmark-title)
     ,@(bookmark-make-record-default 'point-only)
-      (man-args . ,Man-arguments)
-      (handler . Man-bookmark-jump)))
+    (location . ,(concat "man " Man-arguments))
+    (man-args . ,Man-arguments)
+    (handler . Man-bookmark-jump)))
 
 ;;;###autoload
 (defun Man-bookmark-jump (bookmark)
--- a/lisp/minibuffer.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/minibuffer.el	Wed Apr 14 22:47:29 2010 +0000
@@ -1028,7 +1028,8 @@
   "Display a list of possible completions of the current minibuffer contents."
   (interactive)
   (message "Making completion list...")
-  (let* ((start (field-beginning))
+  (let* ((non-essential t)
+	 (start (field-beginning))
          (string (field-string))
          (completions (completion-all-completions
                        string
--- a/lisp/mwheel.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/mwheel.el	Wed Apr 14 22:47:29 2010 +0000
@@ -246,6 +246,8 @@
 	  (run-with-timer mouse-wheel-inhibit-click-time nil
 			  'mwheel-inhibit-click-timeout))))
 
+(add-to-list 'scroll-preserve-screen-position-commands 'mwheel-scroll)
+
 (defvar mwheel-installed-bindings nil)
 
 ;; preloaded ;;;###autoload
--- a/lisp/net/tramp.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/net/tramp.el	Wed Apr 14 22:47:29 2010 +0000
@@ -5527,7 +5527,9 @@
          ;; disable this part of the completion, unless the user implicitly
          ;; indicated his interest in using a fancier completion system.
          (or (eq tramp-syntax 'sep)
-             (featurep 'tramp) ; If it's loaded, we may as well use it.
+             (featurep 'tramp) ;; If it's loaded, we may as well use
+	     ;; it.  `partial-completion-mode' does not exist in
+	     ;; XEmacs.  It is obsoleted with Emacs 24.1.
              (and (boundp 'partial-completion-mode) partial-completion-mode)
              ;; FIXME: These may have been loaded even if the user never
              ;; intended to use them.
@@ -5603,7 +5605,8 @@
 (defun tramp-completion-mode-p ()
   "Checks whether method / user name / host name completion is active."
   (or
-   ;; Signal from outside.
+   ;; Signal from outside.  `non-essential' has been introduced in Emacs 24.
+   (and (boundp 'non-essential) (symbol-value 'non-essential))
    tramp-completion-mode
    ;; Emacs.
    (equal last-input-event 'tab)
@@ -8651,6 +8654,7 @@
 ;; * Let `shell-dynamic-complete-*' and `comint-dynamic-complete' work
 ;;   on remote hosts.
 ;; * Use secrets.el for password handling.
+;; * Load ~/.emacs_SHELLNAME on the remote host for `shell'.
 
 ;; Functions for file-name-handler-alist:
 ;; diff-latest-backup-file -- in diff.el
--- a/lisp/simple.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/simple.el	Wed Apr 14 22:47:29 2010 +0000
@@ -3940,6 +3940,14 @@
 If `widen-automatically' is nil, these commands will do something else
 as a fallback, and won't change the buffer bounds.")
 
+(defvar non-essential nil
+  "Whether the currently executing code is performing an essential task.
+This variable should be non-nil only when running code which should not
+disturb the user.  E.g. it can be used to prevent Tramp from prompting the
+user for a password when we are simply scanning a set of files in the
+background or displaying possible completions before the user even asked
+for it.")
+
 (defun pop-global-mark ()
   "Pop off global mark ring and jump to the top location."
   (interactive)
@@ -4744,20 +4752,34 @@
 ;;; of buffer at first key-press (instead moves to top/bottom
 ;;; of buffer).
 
+(defcustom scroll-error-top-bottom nil
+  "Move point to top/bottom of buffer before signalling a scrolling error.
+A value of nil means just signal an error if no more scrolling possible.
+A value of t means point moves to the beginning or the end of the buffer
+\(depending on scrolling direction) when no more scrolling possible.
+When point is already on that position, then signal an error."
+  :type 'boolean
+  :group 'scrolling
+  :version "24.1")
+
 (defun scroll-up-command (&optional arg)
   "Scroll text of selected window upward ARG lines; or near full screen if no ARG.
-If `scroll-up' cannot scroll window further, move cursor to the bottom line.
+If `scroll-error-top-bottom' is non-nil and `scroll-up' cannot
+scroll window further, move cursor to the bottom line.
 When point is already on that position, then signal an error.
 A near full screen is `next-screen-context-lines' less than a full screen.
 Negative ARG means scroll downward.
 If ARG is the atom `-', scroll downward by nearly full screen."
   (interactive "^P")
   (cond
-   ((eq arg '-) (scroll-down-command nil))
+   ((null scroll-error-top-bottom)
+    (scroll-up arg))
+   ((eq arg '-)
+    (scroll-down-command nil))
    ((< (prefix-numeric-value arg) 0)
     (scroll-down-command (- (prefix-numeric-value arg))))
    ((eobp)
-    (scroll-up arg))  ; signal error
+    (scroll-up arg))			; signal error
    (t
     (condition-case nil
 	(scroll-up arg)
@@ -4771,21 +4793,26 @@
 	 (goto-char (point-max))))))))
 
 (put 'scroll-up-command 'isearch-scroll t)
+(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-command)
 
 (defun scroll-down-command (&optional arg)
   "Scroll text of selected window down ARG lines; or near full screen if no ARG.
-If `scroll-down' cannot scroll window further, move cursor to the top line.
+If `scroll-error-top-bottom' is non-nil and `scroll-down' cannot
+scroll window further, move cursor to the top line.
 When point is already on that position, then signal an error.
 A near full screen is `next-screen-context-lines' less than a full screen.
 Negative ARG means scroll upward.
 If ARG is the atom `-', scroll upward by nearly full screen."
   (interactive "^P")
   (cond
-   ((eq arg '-) (scroll-up-command nil))
+   ((null scroll-error-top-bottom)
+    (scroll-down arg))
+   ((eq arg '-)
+    (scroll-up-command nil))
    ((< (prefix-numeric-value arg) 0)
     (scroll-up-command (- (prefix-numeric-value arg))))
    ((bobp)
-    (scroll-down arg))  ; signal error
+    (scroll-down arg))			; signal error
    (t
     (condition-case nil
 	(scroll-down arg)
@@ -4799,6 +4826,7 @@
 	 (goto-char (point-min))))))))
 
 (put 'scroll-down-command 'isearch-scroll t)
+(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-command)
 
 ;;; Scrolling commands which scroll a line instead of full screen.
 
@@ -4810,6 +4838,7 @@
   (scroll-up (or arg 1)))
 
 (put 'scroll-up-line 'isearch-scroll t)
+(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-line)
 
 (defun scroll-down-line (&optional arg)
   "Scroll text of selected window down ARG lines; or one line if no ARG.
@@ -4819,6 +4848,7 @@
   (scroll-down (or arg 1)))
 
 (put 'scroll-down-line 'isearch-scroll t)
+(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-line)
 
 
 (defun scroll-other-window-down (lines)
--- a/lisp/tutorial.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/tutorial.el	Wed Apr 14 22:47:29 2010 +0000
@@ -218,8 +218,8 @@
              (save-buffers-kill-terminal [?\C-x ?\C-c])
 
              ;; * SUMMARY
-             (scroll-up [?\C-v])
-             (scroll-down [?\M-v])
+             (scroll-up-command [?\C-v])
+             (scroll-down-command [?\M-v])
              (recenter-top-bottom [?\C-l])
 
              ;; * BASIC CURSOR CONTROL
--- a/lisp/woman.el	Tue Apr 13 22:52:59 2010 +0000
+++ b/lisp/woman.el	Wed Apr 14 22:47:29 2010 +0000
@@ -4533,6 +4533,7 @@
   "Make a bookmark entry for a Woman buffer."
   `(,(Man-default-bookmark-title)
     ,@(bookmark-make-record-default 'point-only)
+    (location . ,(concat "woman " woman-last-file-name))
     ;; Use the same form as man's bookmarks, as much as possible.
     (man-args . ,woman-last-file-name)
     (handler . woman-bookmark-jump)))
--- a/src/ChangeLog	Tue Apr 13 22:52:59 2010 +0000
+++ b/src/ChangeLog	Wed Apr 14 22:47:29 2010 +0000
@@ -1,3 +1,26 @@
+2010-04-14  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Reduce cpp use in Makefile.in.
+	* Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS)
+	(LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H)
+	(GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section.
+	(ORDINARY_LINK): Remove, defined in src/s/gnu.h.
+	(CRT0_COMPILE): Remove, inline it in the only user.
+
+2010-04-14  Juri Linkov  <juri@jurta.org>
+
+	* window.c (keys_of_window): Rebind `C-v' from `scroll-up' to
+	`scroll-up-command' and `M-v' from `scroll-down' to
+	`scroll-down-command'.
+
+2010-04-14  Juri Linkov  <juri@jurta.org>
+
+	* window.c (Vscroll_preserve_screen_position_commands): New variable
+	with the default value as the list of Qscroll_down and Qscroll_up.
+	(window_scroll_pixel_based, window_scroll_line_based): Search the
+	last command in the list Vscroll_preserve_screen_position_commands
+	instead of comparing with Qscroll_up and Qscroll_down.
+
 2010-04-13  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
--- a/src/Makefile.in	Tue Apr 13 22:52:59 2010 +0000
+++ b/src/Makefile.in	Wed Apr 14 22:47:29 2010 +0000
@@ -80,6 +80,24 @@
 
 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
 
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+
+LIBSOUND= @LIBSOUND@
+CFLAGS_SOUND= @CFLAGS_SOUND@
+
+RSVG_LIBS= @RSVG_LIBS@
+RSVG_CFLAGS= @RSVG_CFLAGS@
+
+INTERVALS_H = dispextern.h intervals.h composite.h
+
+GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
+
+RUN_TEMACS = `/bin/pwd`/temacs
+
 # ========================== start of cpp stuff =======================
 /* From here on, comments must be done in C syntax.  */
 
@@ -117,14 +135,6 @@
    do not let it interfere with this file.  */
 #undef register
 
-/* GNU libc requires ORDINARY_LINK so that its own crt0 is used.
-   GNU/Linux is an exception because it uses a funny variant of GNU libc.  */
-#ifdef __GNU_LIBRARY__
-#ifndef GNU_LINUX
-#define ORDINARY_LINK
-#endif
-#endif
-
 /* Some machines do not find the standard C libraries in the usual place.  */
 #ifndef ORDINARY_LINK
 #ifndef LIB_STANDARD
@@ -201,10 +211,6 @@
 
 #ifndef ORDINARY_LINK
 
-#ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS)
-#endif
-
 #ifndef START_FILES
 #ifdef NO_REMAP
 #define START_FILES pre-crt0.o /lib/crt0.o
@@ -234,16 +240,9 @@
 #endif
 
 #ifdef HAVE_DBUS
-DBUS_CFLAGS = @DBUS_CFLAGS@
-DBUS_LIBS = @DBUS_LIBS@
 DBUS_OBJ = dbusbind.o
 #endif
 
-#ifdef HAVE_GCONF
-GCONF_CFLAGS = @GCONF_CFLAGS@
-GCONF_LIBS = @GCONF_LIBS@
-#endif
-
 /* DO NOT use -R.  There is a special hack described in lastfile.c
    which is used instead.  Some initialized data areas are modified
    at initial startup, then labeled as part of the text area when
@@ -370,12 +369,6 @@
 #endif /* not HAVE_X11 */
 #endif /* not HAVE_X_WINDOWS */
 
-LIBSOUND= @LIBSOUND@
-CFLAGS_SOUND= @CFLAGS_SOUND@
-
-RSVG_LIBS= @RSVG_LIBS@
-RSVG_CFLAGS= @RSVG_CFLAGS@
-
 #ifndef ORDINARY_LINK
 /* Fix linking if compiled with GCC.  */
 #ifdef __GNUC__
@@ -445,15 +438,6 @@
 #define YMF_PASS_LDFLAGS(flags) flags
 #endif
 
-/* Allow config.h to specify a replacement file for unexec.c.  */
-#ifndef UNEXEC
-#define UNEXEC unexec.o
-#endif
-
-INTERVALS_H = dispextern.h intervals.h composite.h
-
-GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
-
 #ifdef MSDOS
 #ifdef HAVE_X_WINDOWS
 MSDOS_OBJ = dosfns.o msdos.o xmenu.o
@@ -844,8 +828,6 @@
    @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
 
-RUN_TEMACS = `/bin/pwd`/temacs
-
 all: emacs${EXEEXT} $(OTHER_FILES)
 
 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
@@ -961,7 +943,7 @@
 #ifdef AUTO_DEPEND
 	@-test -d deps || mkdir deps
 #endif
-	CRT0_COMPILE ${srcdir}/ecrt0.c
+	$(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c
 doc.o: buildobj.h
 
 #ifndef AUTO_DEPEND
--- a/src/window.c	Tue Apr 13 22:52:59 2010 +0000
+++ b/src/window.c	Wed Apr 14 22:47:29 2010 +0000
@@ -168,6 +168,10 @@
 
 Lisp_Object Vscroll_preserve_screen_position;
 
+/* List of commands affected by `Vscroll_preserve_screen_position'.  */
+
+Lisp_Object Vscroll_preserve_screen_position_commands;
+
 /* Non-nil means that text is inserted before window's markers.  */
 
 Lisp_Object Vwindow_point_insertion_type;
@@ -4946,8 +4950,8 @@
 	 possibility of point becoming "stuck" on a tall line when
 	 scrolling by one line.  */
       if (window_scroll_pixel_based_preserve_y < 0
-	  || (!EQ (current_kboard->Vlast_command, Qscroll_up)
-	      && !EQ (current_kboard->Vlast_command, Qscroll_down)))
+	  || NILP (Fmemq (current_kboard->Vlast_command,
+			  Vscroll_preserve_screen_position_commands)))
 	{
 	  start_display (&it, w, start);
 	  move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
@@ -5207,8 +5211,8 @@
   if (!NILP (Vscroll_preserve_screen_position))
     {
       if (window_scroll_preserve_vpos <= 0
-	  || (!EQ (current_kboard->Vlast_command, Qscroll_up)
-	      && !EQ (current_kboard->Vlast_command, Qscroll_down)))
+	  || NILP (Fmemq (current_kboard->Vlast_command,
+			  Vscroll_preserve_screen_position_commands)))
 	{
 	  struct position posit
 	    = *compute_motion (startpos, 0, 0, 0,
@@ -7265,9 +7269,19 @@
 A value of t means point keeps its screen position if the scroll
 command moved it vertically out of the window, e.g. when scrolling
 by full screens.
-Any other value means point always keeps its screen position.  */);
+Any other value means point always keeps its screen position.
+Scroll commands are defined by the variable
+`scroll-preserve-screen-position-commands'.  */);
   Vscroll_preserve_screen_position = Qnil;
 
+  DEFVAR_LISP ("scroll-preserve-screen-position-commands",
+	       &Vscroll_preserve_screen_position_commands,
+	       doc: /* A list of commands whose scrolling should keep screen position unchanged.
+This list defines the names of scroll commands affected by the variable
+`scroll-preserve-screen-position'.  */);
+  Vscroll_preserve_screen_position_commands =
+    Fcons (Qscroll_down, Fcons (Qscroll_up, Qnil));
+
   DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type,
 	       doc: /* Type of marker to use for `window-point'.  */);
   Vwindow_point_insertion_type = Qnil;
@@ -7377,9 +7391,9 @@
   initial_define_key (control_x_map, '<', "scroll-left");
   initial_define_key (control_x_map, '>', "scroll-right");
 
-  initial_define_key (global_map, Ctl ('V'), "scroll-up");
+  initial_define_key (global_map, Ctl ('V'), "scroll-up-command");
   initial_define_key (meta_map, Ctl ('V'), "scroll-other-window");
-  initial_define_key (meta_map, 'v', "scroll-down");
+  initial_define_key (meta_map, 'v', "scroll-down-command");
 }
 
 /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f