[gs-cvs] rev 7933 - branches/gs-esp-gpl-merger/doc

till at ghostscript.com till at ghostscript.com
Wed May 9 03:11:25 PDT 2007


Author: till
Date: 2007-05-09 03:11:25 -0700 (Wed, 09 May 2007)
New Revision: 7933

Modified:
   branches/gs-esp-gpl-merger/doc/gsdoc.el
Log:
Protect expression "$Id: ... $" against being replaced by SubVersion (bug #689093).


Modified: branches/gs-esp-gpl-merger/doc/gsdoc.el
===================================================================
--- branches/gs-esp-gpl-merger/doc/gsdoc.el	2007-05-09 06:37:44 UTC (rev 7932)
+++ branches/gs-esp-gpl-merger/doc/gsdoc.el	2007-05-09 10:11:25 UTC (rev 7933)
@@ -427,6 +427,9 @@
 (while (search-forward ">" nil t) (replace-match ">" t t))
 
 (goto-char BEGIN)
+(while (search-forward "$" nil t) (replace-match "$" t t))
+
+(goto-char BEGIN)
 )
 
 ;;============================================================
@@ -462,7 +465,7 @@
 (goto-char (point-min))
 (insert "<pre>\n") (setq g~pre-point (point))
 (setq g~ID " [No pre-existing ID] ")
-(if (re-search-forward "^\\$Id:\\( [^ ]+ \\)\\$" nil t) (progn
+(if (re-search-forward (concat "^\\$" "Id:\\( [^ ]+ \\)\\$") nil t) (progn
     (setq g~ID (buffer-substring (match-beginning 1) (match-end 1)))
     (next-line 1) (beginning-of-line) (delete-region g~pre-point (point))
     ))
@@ -522,14 +525,14 @@
 ;; Replace the RCS $Id if one can be found in exactly the right format, and
 ;; otherwise insert one just after the title, along with a warning message.
 
-(if (re-search-forward "<!-- $Id$ -->" nil t)
+(if (re-search-forward (concat "<!-- $" "Id: *\\([^ ]*\\) $ -->") nil t)
     (progn
       (setq Original (buffer-substring (match-beginning 1) (match-end 1)))
       (replace-match g~thisfile t t nil 1)
       )
     (progn
       (search-forward "</title>" nil t) (end-of-line)
-      (insert (concat "\n<!-- $Id$ -->"))
+      (insert (concat "\n<!-- $" "Id: " g~thisfile " $ -->"))
       (setq Original "(UNSET by gs-structure)")
       )
     )



More information about the gs-cvs mailing list