diff options
| author | Paul Eggert <eggert@twinsun.com> | 1993-07-19 04:03:52 +0000 | 
|---|---|---|
| committer | Paul Eggert <eggert@twinsun.com> | 1993-07-19 04:03:52 +0000 | 
| commit | b0c901a35ed249ba991a1cfcb6691c11d2ad1ffb (patch) | |
| tree | b00adf1a48592f84137b008ebea6d675a4d8cb30 /lisp/vc-hooks.el | |
| parent | 43cea1ab616300f217456be62375e8f59dc53015 (diff) | |
| download | emacs-b0c901a35ed249ba991a1cfcb6691c11d2ad1ffb.tar.gz | |
(vc-rcs-status): Omit "LOCKER:" if you are the locker.
Diffstat (limited to 'lisp/vc-hooks.el')
| -rw-r--r-- | lisp/vc-hooks.el | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index ceae9bfe715..092084f6906 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -157,7 +157,8 @@ visiting FILE."    ;; If FILE is registered but not locked, return " REV" if there is a head    ;; revision and " @@" otherwise.    ;; If FILE is locked then return all locks in a string of the -  ;; form " LOCKER1:REV1 LOCKER2:REV2 ...". +  ;; form " LOCKER1:REV1 LOCKER2:REV2 ...", where "LOCKERi:" is empty if you +  ;; are the locker, and otherwise is the name of the locker followed by ":".    ;; Algorithm:  @@ -205,12 +206,16 @@ visiting FILE."  	    (setq found (re-search-forward "^locks\\([^;]*\\);" nil t)))            (if found -	      ;; Clean control characters from text. -	      (let* ((locks +	      ;; Clean control characters and self-locks from text. +	      (let* ((lock-pattern +		      (concat "[ \b\t\n\v\f\r]+\\(" +			      (regexp-quote (user-login-name)) +			      ":\\|\\)")) +		     (locks  		      (save-restriction  			(narrow-to-region (match-beginning 1) (match-end 1))  			(goto-char (point-min)) -			(while (re-search-forward "[ \b\t\n\v\f\r]+" nil t) +			(while (re-search-forward lock-pattern nil t)  			  (replace-match " " t t))  			(buffer-string)))  		     (status | 
