Mercurial > emacs
comparison lisp/pcvs-info.el @ 28256:06cfa273543d
* pcvs.el: Add a minimal leading commentary.
(cvs-make-cvs-buffer): Change the header part by removing the startup
message and adding a `Module' entry. Also replace the FOOTER and
HEADER special fileinfos with the new support in ewoc for updating
its own footer and header.
(cvs-update-header): Update to use the header/footer of the ewoc.
(cvs-mode): Use define-derived-mode and set truncate-lines to t.
(cvs-is-within-p): New function.
(cvs-mode-run): Take advantage of `save-some-buffers's new ability
to only examine some subset of the buffers.
* pcvs-info.el (cvs-fileinfo-pp): Use the new property-preserving
`format' instead of our own ad-hoc functions.
Remove HEADER and FOOTER cases, now handled in the EWOC.
(cvs-fileinfo<): Remove HEADER and FOOTER cases.
* pcvs-parse.el (cvs-parse-run-table): Change message for unknown
output to avoid scaring the user.
(cvs-parse-table): Catch message for non-up-to-date commits.
* pcvs-defs.el (cvs-startup-message): Remove.
(cvs-global-menu): New autoloaded menu.
* pcvs-util.el (cvs-string-fill): Remove.
* emacs-lisp/ewoc.el (ewoc--create-special-node): Remove.
(ewoc--refresh-node): Don't take the whole EWOC but only the relevant
PP part of it and also make it work for footers and headers.
(ewoc-create): Drop POS and BUFFER arguments.
Use the DLL's dummy node to store the end-of-footer position.
(ewoc-map, ewoc-invalidate): Update call to ewoc--refresh-node.
(ewoc-refresh): Remove unused `header' variable.
(ewoc-(get|set)-hf): New functions.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 22 Mar 2000 02:57:01 +0000 |
parents | b442dfc3cef0 |
children | 961f303cda37 |
comparison
equal
deleted
inserted
replaced
28255:0f3c283ff1b0 | 28256:06cfa273543d |
---|---|
3 ;; Copyright (C) 1991-2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1991-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 | 6 ;; Keywords: pcl-cvs |
7 ;; Version: $Name: $ | 7 ;; Version: $Name: $ |
8 ;; Revision: $Id: pcl-cvs-info.el,v 1.28 2000/03/05 21:32:21 monnier Exp $ | 8 ;; Revision: $Id: pcvs-info.el,v 1.1 2000/03/11 03:42:29 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 |
210 ;; DEAD An entry that should be removed | 210 ;; DEAD An entry that should be removed |
211 ;; MESSAGE x x This is a special fileinfo that is used | 211 ;; MESSAGE x x This is a special fileinfo that is used |
212 ;; to display a text that should be in | 212 ;; to display a text that should be in |
213 ;; full-log." | 213 ;; full-log." |
214 ;; TEMP A temporary message that should be removed | 214 ;; TEMP A temporary message that should be removed |
215 ;; HEADER A message that should stick at the top of the display | |
216 ;; FOOTER A message that should stick at the bottom of the display | |
217 ) | 215 ) |
218 (defun cvs-create-fileinfo (type dir file msg &rest keys) | 216 (defun cvs-create-fileinfo (type dir file msg &rest keys) |
219 (cvs-check-fileinfo (apply #'-cvs-create-fileinfo type dir file msg keys))) | 217 (cvs-check-fileinfo (apply #'-cvs-create-fileinfo type dir file msg keys))) |
220 | 218 |
221 ;; Fake selectors: | 219 ;; Fake selectors: |
360 (DIRCHANGE (concat "In directory " | 358 (DIRCHANGE (concat "In directory " |
361 (cvs-add-face (cvs-fileinfo->full-path fileinfo) | 359 (cvs-add-face (cvs-fileinfo->full-path fileinfo) |
362 'cvs-header-face cvs-dirname-map) | 360 'cvs-header-face cvs-dirname-map) |
363 ":")) | 361 ":")) |
364 (MESSAGE | 362 (MESSAGE |
365 (if (memq (cvs-fileinfo->subtype fileinfo) '(FOOTER HEADER)) | 363 (cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo)) |
366 (cvs-fileinfo->full-log fileinfo) | 364 'cvs-msg-face)) |
367 (cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo)) | |
368 'cvs-msg-face))) | |
369 (t | 365 (t |
370 (let* ((status (if (cvs-fileinfo->marked fileinfo) | 366 (let* ((status (if (cvs-fileinfo->marked fileinfo) |
371 (cvs-add-face "*" 'cvs-marked-face) | 367 (cvs-add-face "*" 'cvs-marked-face) |
372 " ")) | 368 " ")) |
373 (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo) | 369 (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo) |
388 ;; maybe a subtype | 384 ;; maybe a subtype |
389 (when subtype (downcase (symbol-name subtype))) | 385 (when subtype (downcase (symbol-name subtype))) |
390 ;; or the head-rev | 386 ;; or the head-rev |
391 (when (and head (not (string= head base))) head) | 387 (when (and head (not (string= head base))) head) |
392 ;; or nothing | 388 ;; or nothing |
393 "")) | 389 ""))) |
394 ;; (action (cvs-add-face (case (cvs-default-action fileinfo) | 390 (format "%-11s %s %-11s %-11s %s" |
395 ;; (commit "com") | 391 side status type base file))))))) |
396 ;; (update "upd") | |
397 ;; (undo "udo") | |
398 ;; (t " ")) | |
399 ;; 'cvs-action-face | |
400 ;; cvs-action-map)) | |
401 ) | |
402 (concat (cvs-string-fill side 11) " " | |
403 status " " | |
404 (cvs-string-fill type 11) " " | |
405 ;; action " " | |
406 (cvs-string-fill base 11) " " | |
407 file))))))) | |
408 ;; it seems that `format' removes text-properties. Too bad! | |
409 ;; (format "%-11s %s %-11s %-11s %s" | |
410 ;; side status type base file))))))) | |
411 | 392 |
412 | 393 |
413 (defun cvs-fileinfo-update (fi fi-new) | 394 (defun cvs-fileinfo-update (fi fi-new) |
414 "Update FI with the information provided in FI-NEW." | 395 "Update FI with the information provided in FI-NEW." |
415 (let ((type (cvs-fileinfo->type fi-new)) | 396 (let ((type (cvs-fileinfo->type fi-new)) |
431 sorted alphabetically, and inside every directory the DIRCHANGE | 412 sorted alphabetically, and inside every directory the DIRCHANGE |
432 fileinfo will appear first, followed by all files (alphabetically)." | 413 fileinfo will appear first, followed by all files (alphabetically)." |
433 (let ((subtypea (cvs-fileinfo->subtype a)) | 414 (let ((subtypea (cvs-fileinfo->subtype a)) |
434 (subtypeb (cvs-fileinfo->subtype b))) | 415 (subtypeb (cvs-fileinfo->subtype b))) |
435 (cond | 416 (cond |
436 ;; keep header and footer where they belong. Note: the order is important | |
437 ((eq subtypeb 'HEADER) nil) | |
438 ((eq subtypea 'HEADER) t) | |
439 ((eq subtypea 'FOOTER) nil) | |
440 ((eq subtypeb 'FOOTER) t) | |
441 | |
442 ;; Sort according to directories. | 417 ;; Sort according to directories. |
443 ((string< (cvs-fileinfo->dir a) (cvs-fileinfo->dir b)) t) | 418 ((string< (cvs-fileinfo->dir a) (cvs-fileinfo->dir b)) t) |
444 ((not (string= (cvs-fileinfo->dir a) (cvs-fileinfo->dir b))) nil) | 419 ((not (string= (cvs-fileinfo->dir a) (cvs-fileinfo->dir b))) nil) |
445 | 420 |
446 ;; The DIRCHANGE entry is always first within the directory. | 421 ;; The DIRCHANGE entry is always first within the directory. |