From xemacs-m  Fri Jun 27 14:25:01 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA02966
	for <xemacs-beta@xemacs.org>; Fri, 27 Jun 1997 14:25:00 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id VAA06863; Fri, 27 Jun 1997 21:24:59 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: [PATCH] Movement commands in dired
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 27 Jun 1997 21:24:58 +0200
Message-ID: <kigpvt7u9v9.fsf@jagor.srce.hr>
Lines: 170
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta9) - "Sofia"

I think dired movement commands should leave the region alone.

*** lisp/efs/dired.el.orig	Fri Jun 27 21:19:22 1997
--- lisp/efs/dired.el	Fri Jun 27 21:20:05 1997
***************
*** 2205,2211 ****
  (defun dired-next-line (arg)
    "Move down lines then position at filename.
  Optional prefix ARG says how many lines to move; default is one line."
!   (interactive "p")
    (condition-case err
        (next-line arg)
      (error
--- 2205,2211 ----
  (defun dired-next-line (arg)
    "Move down lines then position at filename.
  Optional prefix ARG says how many lines to move; default is one line."
!   (interactive "_p")
    (condition-case err
        (next-line arg)
      (error
***************
*** 2218,2224 ****
  (defun dired-previous-line (arg)
    "Move up lines then position at filename.
  Optional prefix ARG says how many lines to move; default is one line."
!   (interactive "p")
    (previous-line arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
--- 2218,2224 ----
  (defun dired-previous-line (arg)
    "Move up lines then position at filename.
  Optional prefix ARG says how many lines to move; default is one line."
!   (interactive "_p")
    (previous-line arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
***************
*** 2227,2233 ****
    "Dired version of scroll up.
  Scroll text of current window upward ARG lines; or near full screen if no ARG.
  When calling from a program, supply a number as argument or nil."
!   (interactive "P")
    (scroll-up arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
--- 2227,2233 ----
    "Dired version of scroll up.
  Scroll text of current window upward ARG lines; or near full screen if no ARG.
  When calling from a program, supply a number as argument or nil."
!   (interactive "_P")
    (scroll-up arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
***************
*** 2236,2242 ****
    "Dired version of scroll-down.
  Scroll text of current window down ARG lines; or near full screen if no ARG.
  When calling from a program, supply a number as argument or nil."
!   (interactive "P")
    (scroll-down arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
--- 2236,2242 ----
    "Dired version of scroll-down.
  Scroll text of current window down ARG lines; or near full screen if no ARG.
  When calling from a program, supply a number as argument or nil."
!   (interactive "_P")
    (scroll-down arg)
    (dired-move-to-filename)
    (dired-update-mode-line))
***************
*** 2243,2255 ****
  
  (defun dired-beginning-of-buffer (arg)
    "Dired version of `beginning of buffer'."
!   (interactive "P")
    (beginning-of-buffer arg)
    (dired-update-mode-line))
  
  (defun dired-end-of-buffer (arg)
    "Dired version of `end-of-buffer'."
!   (interactive "P")
    (end-of-buffer arg)
    (while (not (or (dired-move-to-filename) (dired-get-subdir) (bobp)))
      (forward-line -1))
--- 2243,2255 ----
  
  (defun dired-beginning-of-buffer (arg)
    "Dired version of `beginning of buffer'."
!   (interactive "_P")
    (beginning-of-buffer arg)
    (dired-update-mode-line))
  
  (defun dired-end-of-buffer (arg)
    "Dired version of `end-of-buffer'."
!   (interactive "_P")
    (end-of-buffer arg)
    (while (not (or (dired-move-to-filename) (dired-get-subdir) (bobp)))
      (forward-line -1))
***************
*** 2257,2263 ****
  
  (defun dired-next-dirline (arg &optional opoint)
    "Goto ARG'th next directory file line."
!   (interactive "p")
    (if dired-re-dir
        (progn
  	(dired-check-ls-l)
--- 2257,2263 ----
  
  (defun dired-next-dirline (arg &optional opoint)
    "Goto ARG'th next directory file line."
!   (interactive "_p")
    (if dired-re-dir
        (progn
  	(dired-check-ls-l)
***************
*** 2274,2285 ****
  
  (defun dired-prev-dirline (arg)
    "Goto ARG'th previous directory file line."
!   (interactive "p")
    (dired-next-dirline (- arg)))
  
  (defun dired-next-marked-file (arg &optional wrap opoint)
    "Move to the next marked file, wrapping around the end of the buffer."
!   (interactive "p\np")
    (or opoint (setq opoint (point))) ; return to where interactively started
    (if (if (> arg 0)
  	  (re-search-forward dired-re-mark nil t arg)
--- 2274,2285 ----
  
  (defun dired-prev-dirline (arg)
    "Goto ARG'th previous directory file line."
!   (interactive "_p")
    (dired-next-dirline (- arg)))
  
  (defun dired-next-marked-file (arg &optional wrap opoint)
    "Move to the next marked file, wrapping around the end of the buffer."
!   (interactive "_p\np")
    (or opoint (setq opoint (point))) ; return to where interactively started
    (if (if (> arg 0)
  	  (re-search-forward dired-re-mark nil t arg)
***************
*** 2297,2303 ****
  
  (defun dired-prev-marked-file (arg &optional wrap)
    "Move to the previous marked file, wrapping around the end of the buffer."
!   (interactive "p\np")
    (dired-next-marked-file (- arg) wrap)
    (dired-update-mode-line))
  
--- 2297,2303 ----
  
  (defun dired-prev-marked-file (arg &optional wrap)
    "Move to the previous marked file, wrapping around the end of the buffer."
!   (interactive "_p\np")
    (dired-next-marked-file (- arg) wrap)
    (dired-update-mode-line))
  




-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Psychos _do not_ explode when sunlight hits them."

