Mercurial > emacs
comparison lisp/log-view.el @ 28861:bab7620d1466
(log-view-goto-rev): New function for the new VC.
(log-view-minor-wrap): Use mark-active.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 10 May 2000 22:22:21 +0000 |
parents | 21d27711125f |
children | 49e8918cab44 |
comparison
equal
deleted
inserted
replaced
28860:40a22b85650e | 28861:bab7620d1466 |
---|---|
3 ;; Copyright (C) 1999-2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1999-2000 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
6 ;; Keywords: pcl-cvs cvs log | 6 ;; Keywords: pcl-cvs cvs log |
7 ;; Version: $Name: $ | 7 ;; Version: $Name: $ |
8 ;; Revision: $Id: log-view.el,v 1.1 2000/03/11 03:42:28 monnier Exp $ | 8 ;; Revision: $Id: log-view.el,v 1.2 2000/03/22 01:10:09 monnier Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
105 | 105 |
106 ;; define log-view-{msg,file}-{next,prev} | 106 ;; define log-view-{msg,file}-{next,prev} |
107 (easy-mmode-define-navigation log-view-msg log-view-message-re "log message") | 107 (easy-mmode-define-navigation log-view-msg log-view-message-re "log message") |
108 (easy-mmode-define-navigation log-view-file log-view-file-re "file") | 108 (easy-mmode-define-navigation log-view-file log-view-file-re "file") |
109 | 109 |
110 (defun log-view-goto-rev (rev) | |
111 (goto-char (point-min)) | |
112 (ignore-errors | |
113 (while (not (equal rev (log-view-current-tag))) | |
114 (log-view-msg-next)) | |
115 t)) | |
116 | |
110 ;;;; | 117 ;;;; |
111 ;;;; Linkage to PCL-CVS (mostly copied from cvs-status.el) | 118 ;;;; Linkage to PCL-CVS (mostly copied from cvs-status.el) |
112 ;;;; | 119 ;;;; |
113 | 120 |
114 (defconst log-view-dir-re "^cvs[.ex]* [a-z]+: Logging \\(.+\\)$") | 121 (defconst log-view-dir-re "^cvs[.ex]* [a-z]+: Logging \\(.+\\)$") |
141 (defun log-view-minor-wrap (buf f) | 148 (defun log-view-minor-wrap (buf f) |
142 (let ((data (with-current-buffer buf | 149 (let ((data (with-current-buffer buf |
143 (cons | 150 (cons |
144 (cons (log-view-current-file) | 151 (cons (log-view-current-file) |
145 (log-view-current-tag)) | 152 (log-view-current-tag)) |
146 (when (ignore-errors (mark)) | 153 (when mark-active |
147 ;; `mark-active' is not provided by XEmacs :-( | |
148 (save-excursion | 154 (save-excursion |
149 (goto-char (mark)) | 155 (goto-char (mark)) |
150 (cons (log-view-current-file) | 156 (cons (log-view-current-file) |
151 (log-view-current-tag)))))))) | 157 (log-view-current-tag)))))))) |
152 (let ((cvs-branch-prefix (cdar data)) | 158 (let ((cvs-branch-prefix (cdar data)) |
160 (funcall f)))) | 166 (funcall f)))) |
161 | 167 |
162 (provide 'log-view) | 168 (provide 'log-view) |
163 | 169 |
164 ;;; Change Log: | 170 ;;; Change Log: |
165 ;; $Log$ | 171 ;; $Log: log-view.el,v $ |
172 ;; Revision 1.2 2000/03/22 01:10:09 monnier | |
173 ;; (log-view-(msg|file)-(prev|next)): Rename from | |
174 ;; log-view-*-(message|file) and use easy-mmode-define-navigation. | |
175 ;; (log-view-message-re): Match SCCS format as well. | |
176 ;; And match the revision line rather than the dashed separator line. | |
177 ;; (log-view-mode): Use the new define-derived-mode. | |
178 ;; (log-view-current-tag): Fill in with an actual implementation. | |
179 ;; | |
166 | 180 |
167 ;;; log-view.el ends here | 181 ;;; log-view.el ends here |