gtk-doc r549 - in trunk: . tools



Author: stefkost
Date: Wed Feb 27 07:59:48 2008
New Revision: 549
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=549&view=rev

Log:
	patch by: Carlos Garnacho <carlos imendio com>
	* tools/gtk-doc.el:
	  Update emacs mode to work with emacs22. Fixes #513318.



Modified:
   trunk/ChangeLog
   trunk/tools/gtk-doc.el

Modified: trunk/tools/gtk-doc.el
==============================================================================
--- trunk/tools/gtk-doc.el	(original)
+++ trunk/tools/gtk-doc.el	Wed Feb 27 07:59:48 2008
@@ -113,11 +113,16 @@
   :type '(string)
   :group 'gnome-doc)
 
-(defcustom gnome-doc-blank " * \n"
+(defcustom gnome-doc-blank " *\n"
   "Used to put a blank line into the header."
   :type '(string)
   :group 'gnome-doc)
 
+(defcustom gnome-doc-blank-space " * \n"
+  "Used to put a blank line into the header, plus a space"
+  :type '(string)
+  :group 'gnome-doc)
+
 (defcustom gnome-doc-trailer " **/\n"
   "End of documentation header.
 
@@ -164,6 +169,7 @@
 (make-variable-buffer-local 'gnome-doc-parameter)
 (make-variable-buffer-local 'gnome-doc-section)
 (make-variable-buffer-local 'gnome-doc-blank)
+(make-variable-buffer-local 'gnome-doc-blank-space)
 (make-variable-buffer-local 'gnome-doc-match-block)
 (make-variable-buffer-local 'gnome-doc-match-header)
 
@@ -179,6 +185,10 @@
 (defun gnome-doc-insert-blank ()
   (insert gnome-doc-blank))
 
+;; insert a 'blank-space' comment line
+(defun gnome-doc-insert-blank-space ()
+  (insert gnome-doc-blank-space))
+
 ;; insert a section comment line
 (defun gnome-doc-insert-section (section)
   (insert (format gnome-doc-section section)))
@@ -198,12 +208,10 @@
 	(narrow-to-page)
 	(let (c-arglist
 	      c-funcname
-	      (c-point (point))
+	      c-point
 	      c-comment-point
 	      c-isvoid
 	      c-doinsert)
-	  (search-backward "(")
-	  (forward-line -2)
 	  (while (or (looking-at "^$")
 		     (looking-at "^ *}")
 		     (looking-at "^ \\*")
@@ -212,6 +220,9 @@
 	  (if (or (looking-at ".*void.*(")
 		  (looking-at ".*void[ \t]*$"))
 	      (setq c-isvoid 1))
+
+	  (setq c-point point)
+
 	  (save-excursion
 	    (if (re-search-forward "\\([A-Za-z0-9_:~]+\\)[ \t\n]*\\(([^)]*)\\)" c-point nil)
 		(let ((c-argstart (match-beginning 2))
@@ -244,7 +255,7 @@
 	
 		;; finish it off
 		(gnome-doc-insert-blank)
-		(gnome-doc-insert-blank)
+		(gnome-doc-insert-blank-space)
 		;; record the point of insertion
 		(setq c-insert-here (- (point) 1))
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]