]> git.eshelyaron.com Git - emacs.git/commitdiff
* pcvs.el (cvs-mode-previous-line, cvs-mode-next-line): Move to
authorKai Großjohann <kgrossjo@eu.uu.net>
Wed, 3 Apr 2002 16:56:36 +0000 (16:56 +0000)
committerKai Großjohann <kgrossjo@eu.uu.net>
Wed, 3 Apr 2002 16:56:36 +0000 (16:56 +0000)
spot indicated by text property `cvs-goal-column', if present.

* pcvs-info.el (cvs-fileinfo-pp): Use text property
`cvs-goal-column' to indicate position of file name (if present).

lisp/ChangeLog
lisp/pcvs-info.el
lisp/pcvs.el

index 283d8a8ce85543f1706a0a14fb62159df73d56cd..15cfd98cac048cc688f339f22aedc11ca698297c 100644 (file)
@@ -1,3 +1,11 @@
+2002-04-03  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+       * pcvs.el (cvs-mode-previous-line, cvs-mode-next-line): Move to
+       spot indicated by text property `cvs-goal-column', if present.
+
+       * pcvs-info.el (cvs-fileinfo-pp): Use text property
+       `cvs-goal-column' to indicate position of file name (if present).
+
 2002-04-03  Richard M. Stallman  <rms@gnu.org>
 
        * mail/mailabbrev.el (mail-abbrev-complete-alias):
index 0074e77b2b289dc539b7a2adb36260e4a2a46cf7..1b1ea95f97518e02ecb5c67c40ea79d82c45b92f 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: pcl-cvs
-;; Revision: $Id: pcvs-info.el,v 1.7 2001/07/16 07:46:48 pj Exp $
+;; Revision: $Id: pcvs-info.el,v 1.8 2001/12/31 20:28:40 rms Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -318,14 +318,17 @@ FI-OR-TYPE can either be a symbol (a fileinfo-type) or a fileinfo."
     (and (not (eq type 'MESSAGE))
         (eq (car (memq func (cdr (assq type cvs-states)))) func))))
 
-(defun cvs-add-face (str face &optional keymap)
-  (when cvs-highlight
+(defun cvs-add-face (str face &optional keymap &rest properties)
+  (when (or cvs-highlight properties)
     (add-text-properties 0 (length str)
-                        (list* 'face face
-                               (when keymap
-                                 (list* 'mouse-face 'highlight
-                                        (when (keymapp keymap)
-                                          (list 'keymap keymap)))))
+                        (append
+                         (when cvs-highlight
+                           (list* 'face face
+                                  (when keymap
+                                    (list* 'mouse-face 'highlight
+                                           (when (keymapp keymap)
+                                             (list 'keymap keymap))))))
+                         properties)
                         str))
   str)
 
@@ -349,7 +352,8 @@ For use by the cookie package."
                           (cvs-add-face "*" 'cvs-marked-face)
                         " "))
               (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo)
-                                  'cvs-filename-face t))
+                                  'cvs-filename-face t
+                                  'cvs-goal-column t))
               (base (or (cvs-fileinfo->base-rev fileinfo) ""))
               (head (cvs-fileinfo->head-rev fileinfo))
               (type
@@ -371,8 +375,8 @@ For use by the cookie package."
                      (when (and head (not (string= head base))) head)
                      ;; or nothing
                      "")))
-         (format "%-11s %s %-11s %-11s %s"
-                 side status type base file)))))))
+          (format "%-11s %s %-11s %-11s %s"
+                  side status type base file)))))))
 
 
 (defun cvs-fileinfo-update (fi fi-new)
index 3b20b2ff506b9bf9f5e0d81c93d941c5a9c8feb5..725332809e10d339774340dd3849e94aeccf341a 100644 (file)
@@ -13,7 +13,7 @@
 ;;     (Jari Aalto+mail.emacs) jari.aalto@poboxes.com
 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
 ;; Keywords: CVS, version control, release management
-;; Revision: $Id: pcvs.el,v 1.32 2001/12/20 18:43:35 pj Exp $
+;; Revision: $Id: pcvs.el,v 1.33 2002/01/25 22:41:28 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -1089,13 +1089,25 @@ Full documentation is in the Texinfo file."
   "Go to the previous line.
 If a prefix argument is given, move by that many lines."
   (interactive "p")
-  (ewoc-goto-prev cvs-cookies arg))
+  (ewoc-goto-prev cvs-cookies arg)
+  (let ((fpos (next-single-property-change
+              (point) 'cvs-goal-column
+              (current-buffer) (line-end-position)))
+       (eol (line-end-position)))
+    (when (< fpos eol)
+      (goto-char fpos))))
 
 (defun-cvs-mode cvs-mode-next-line (arg)
   "Go to the next line.
 If a prefix argument is given, move by that many lines."
   (interactive "p")
-  (ewoc-goto-next cvs-cookies arg))
+  (ewoc-goto-next cvs-cookies arg)
+  (let ((fpos (next-single-property-change
+              (point) 'cvs-goal-column
+              (current-buffer) (line-end-position)))
+       (eol (line-end-position)))
+    (when (< fpos eol)
+      (goto-char fpos))))
 
 ;;;;
 ;;;; Mark handling