aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-12-20 21:58:14 +0000
committerStefan Monnier2005-12-20 21:58:14 +0000
commitaa230d94e5c9b99020740d2d36432e8a2b81789e (patch)
treed6caee3f07da0887b23215b4d9cec196ec20f4cf
parent3bdba51db2bee762b526a90c43252a574e62cf4e (diff)
downloademacs-aa230d94e5c9b99020740d2d36432e8a2b81789e.tar.gz
emacs-aa230d94e5c9b99020740d2d36432e8a2b81789e.zip
(log-view-file-re, log-view-message-re): Use shy groups.
(log-view-font-lock-keywords): Ajust subgroup numbers. (log-view-current-tag): Don't hard code the number of subgroups.
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/log-view.el55
2 files changed, 57 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b601cd036f1..b3b1757b2e4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * log-view.el (log-view-file-re, log-view-message-re): Use shy groups.
4 (log-view-font-lock-keywords): Ajust subgroup numbers.
5 (log-view-current-tag): Don't hard code the number of subgroups.
6
12005-12-20 Juri Linkov <juri@jurta.org> 72005-12-20 Juri Linkov <juri@jurta.org>
2 8
3 * tooltip.el (tooltip): Move defgroup before define-minor-mode. 9 * tooltip.el (tooltip): Move defgroup before define-minor-mode.
@@ -29,8 +35,7 @@
29 (org-set-tags): Efficiency improvements. 35 (org-set-tags): Efficiency improvements.
30 (org-auto-align-tags): New option. 36 (org-auto-align-tags): New option.
31 (org-todo, org-demote, org-promote): Realign tags. 37 (org-todo, org-demote, org-promote): Realign tags.
32 (org-tags-completion-function): Use also "&" and "|" as 38 (org-tags-completion-function): Use also "&" and "|" as separators.
33 separators.
34 (org-org-menu): Agenda commands simplified. 39 (org-org-menu): Agenda commands simplified.
35 40
362005-12-19 Luc Teirlinck <teirllm@auburn.edu> 412005-12-19 Luc Teirlinck <teirllm@auburn.edu>
@@ -7292,7 +7297,7 @@
72922005-08-26 Kim F. Storm <storm@cua.dk> 72972005-08-26 Kim F. Storm <storm@cua.dk>
7293 7298
7294 * subr.el (version-list-<, version-list-<=, version-list-=): 7299 * subr.el (version-list-<, version-list-<=, version-list-=):
7295 Renamed from integer-list-*. 7300 Rename from integer-list-*.
7296 (version-list-not-zero): Likewise. Fix while loop. 7301 (version-list-not-zero): Likewise. Fix while loop.
7297 (version=): Use version-list-= instead of string-equal. 7302 (version=): Use version-list-= instead of string-equal.
7298 7303
@@ -12439,8 +12444,7 @@
12439 (multiple-value-bind, multiple-value-setq, shiftf): 12444 (multiple-value-bind, multiple-value-setq, shiftf):
12440 Improve argument/docstring consistency. 12445 Improve argument/docstring consistency.
12441 12446
12442 * subr.el (focus-frame, unfocus-frame): 12447 * subr.el (focus-frame, unfocus-frame): Revert deletion on 2005-05-01.
12443 Revert deletion on 2005-05-01.
12444 12448
124452005-05-22 Andre Spiegel <spiegel@gnu.org> 124492005-05-22 Andre Spiegel <spiegel@gnu.org>
12446 12450
@@ -12573,8 +12577,7 @@
12573 (subst-if-not, nsubst, nsubst-if, nsubst-if-not, sublis) 12577 (subst-if-not, nsubst, nsubst-if, nsubst-if-not, sublis)
12574 (nsublis, tree-equal): Improve argument/docstring consistency. 12578 (nsublis, tree-equal): Improve argument/docstring consistency.
12575 12579
12576 * subr.el (send-string, send-region): 12580 * subr.el (send-string, send-region): Remove obsolescence declaration.
12577 Remove obsolescence declaration.
12578 (window-dot, set-window-dot, read-input, show-buffer) 12581 (window-dot, set-window-dot, read-input, show-buffer)
12579 (eval-current-buffer, string-to-int): 12582 (eval-current-buffer, string-to-int):
12580 Add release number to obsolescence declarations. 12583 Add release number to obsolescence declarations.
@@ -12651,8 +12654,8 @@
12651 * emacs-lisp/byte-run.el (eval-when-compile): Doc fix. 12654 * emacs-lisp/byte-run.el (eval-when-compile): Doc fix.
12652 12655
12653 * emacs-lisp/bytecomp.el 12656 * emacs-lisp/bytecomp.el
12654 (byte-compile-file-form-custom-declare-variable): Call 12657 (byte-compile-file-form-custom-declare-variable):
12655 byte-compile-nogroup-warn if appropriate. 12658 Call byte-compile-nogroup-warn if appropriate.
12656 12659
12657 * progmodes/compile.el (compilation-finish-function): Mark obsolete. 12660 * progmodes/compile.el (compilation-finish-function): Mark obsolete.
12658 (compilation-set-window): Don't call left-fringe-p; do it directly. 12661 (compilation-set-window): Don't call left-fringe-p; do it directly.
diff --git a/lisp/log-view.el b/lisp/log-view.el
index 6a9464005fb..9249531129b 100644
--- a/lisp/log-view.el
+++ b/lisp/log-view.el
@@ -25,11 +25,36 @@
25 25
26;;; Commentary: 26;;; Commentary:
27 27
28;; Todo: 28;; Major mode to browse revision log histories.
29;; Currently supports the format output by:
30;; RCS, SCCS, CVS, Subversion.
31
32;; Examples of log output:
33
34;;;; RCS/CVS:
35
36;; ----------------------------
37;; revision 1.35 locked by: turlutut
38;; date: 2005-03-22 18:48:38 +0000; author: monnier; state: Exp; lines: +6 -8
39;; (gnus-display-time-event-handler):
40;; Check display-time-timer at runtime rather than only at load time
41;; in case display-time-mode is turned off in the mean time.
42;; ----------------------------
43;; revision 1.34
44;; date: 2005-02-09 15:50:38 +0000; author: kfstorm; state: Exp; lines: +7 -7
45;; branches: 1.34.2;
46;; Change release version from 21.4 to 22.1 throughout.
47;; Change development version from 21.3.50 to 22.0.50.
48
49;;;; SCCS:
50
51;;;; Subversion:
52
53;;; Todo:
29 54
30;; - add compatibility with cvs-log.el
31;; - add ability to modify a log-entry (via cvs-mode-admin ;-) 55;; - add ability to modify a log-entry (via cvs-mode-admin ;-)
32;; - remove references to cvs-* 56;; - remove references to cvs-*
57;; - make it easier to add support for new backends without changing the code.
33 58
34;;; Code: 59;;; Code:
35 60
@@ -87,17 +112,20 @@
87(defvar log-view-message-face 'log-view-message) 112(defvar log-view-message-face 'log-view-message)
88 113
89(defconst log-view-file-re 114(defconst log-view-file-re
90 (concat "^\\(" 115 (concat "^\\(?:Working file: \\(.+\\)" ;RCS and CVS.
91 "Working file: \\(.+\\)" 116 "\\|SCCS/s\\.\\(.+\\):" ;SCCS.
92 "\\|SCCS/s\\.\\(.+\\):" 117 "\\)\n")) ;Include the \n for font-lock reasons.
93 "\\)\n")) 118
94;; In RCS, a locked revision will look like "revision N.M\tlocked by: FOO". 119(defconst log-view-message-re
95(defconst log-view-message-re "^\\(revision \\([.0-9]+\\)\\(?:\t.*\\)?\\|r\\([0-9]+\\) | .* | .*\\|D \\([.0-9]+\\) .*\\)$") 120 (concat "^\\(?:revision \\([.0-9]+\\)\\(?:\t.*\\)?" ; RCS and CVS.
121 "\\|r\\([0-9]+\\) | .* | .*" ; Subversion.
122 "\\|D \\([.0-9]+\\) .*" ; SCCS.
123 "\\)$"))
96 124
97(defconst log-view-font-lock-keywords 125(defconst log-view-font-lock-keywords
98 `((,log-view-file-re 126 `((,log-view-file-re
127 (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t)
99 (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) 128 (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t)
100 (3 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t)
101 (0 log-view-file-face append)) 129 (0 log-view-file-face append))
102 (,log-view-message-re . log-view-message-face))) 130 (,log-view-message-re . log-view-message-face)))
103(defconst log-view-font-lock-defaults 131(defconst log-view-font-lock-defaults
@@ -158,10 +186,17 @@
158 (forward-line 1) 186 (forward-line 1)
159 (let ((pt (point))) 187 (let ((pt (point)))
160 (when (re-search-backward log-view-message-re nil t) 188 (when (re-search-backward log-view-message-re nil t)
161 (let ((rev (or (match-string 2) (match-string 3) (match-string 4)))) 189 (let (rev)
190 ;; Find the subgroup that matched.
191 (dotimes (i (/ (match-data 'integers) 2))
192 (setq rev (or rev (match-string (1+ i)))))
162 (unless (re-search-forward log-view-file-re pt t) 193 (unless (re-search-forward log-view-file-re pt t)
163 rev)))))) 194 rev))))))
164 195
196(defvar cvs-minor-current-files)
197(defvar cvs-branch-prefix)
198(defvar cvs-secondary-branch-prefix)
199
165(defun log-view-minor-wrap (buf f) 200(defun log-view-minor-wrap (buf f)
166 (let ((data (with-current-buffer buf 201 (let ((data (with-current-buffer buf
167 (cons 202 (cons