[gs-cvs] rev 7934 - trunk/gs/doc

till at ghostscript.com till at ghostscript.com
Wed May 9 03:12:29 PDT 2007


Author: till
Date: 2007-05-09 03:12:29 -0700 (Wed, 09 May 2007)
New Revision: 7934

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


Modified: trunk/gs/doc/gsdoc.el
===================================================================
--- trunk/gs/doc/gsdoc.el	2007-05-09 10:11:25 UTC (rev 7933)
+++ trunk/gs/doc/gsdoc.el	2007-05-09 10:12:29 UTC (rev 7934)
@@ -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: " g~thisfile " $ -->"))
+      (insert (concat "\n<!-- $" "Id: " g~thisfile " $ -->"))
       (setq Original "(UNSET by gs-structure)")
       )
     )



More information about the gs-cvs mailing list