diff src/abbrev.c @ 39988:eac4e9ae201c

Change doc-string comments to `new style' [w/`doc:' keyword].
author Miles Bader <miles@gnu.org>
date Wed, 17 Oct 2001 03:16:12 +0000
parents d0d7ddac8c5e
children d641fcc16219
line wrap: on
line diff
--- a/src/abbrev.c	Wed Oct 17 03:11:30 2001 +0000
+++ b/src/abbrev.c	Wed Oct 17 03:16:12 2001 +0000
@@ -22,7 +22,7 @@
 
 #include <config.h>
 #include <stdio.h>
-#define DOC_STRINGS_IN_COMMENTS
+
 #include "lisp.h"
 #include "commands.h"
 #include "buffer.h"
@@ -84,15 +84,15 @@
 Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook;
 
 DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0,
-       /* Create a new, empty abbrev table object.  */
-       ())
+       doc: /* Create a new, empty abbrev table object.  */)
+     ()
 {
   return Fmake_vector (make_number (59), make_number (0));
 }
 
 DEFUN ("clear-abbrev-table", Fclear_abbrev_table, Sclear_abbrev_table, 1, 1, 0,
-       /* Undefine all abbrevs in abbrev table TABLE, leaving it empty.  */
-       (table))
+       doc: /* Undefine all abbrevs in abbrev table TABLE, leaving it empty.  */)
+     (table)
      Lisp_Object table;
 {
   int i, size;
@@ -106,7 +106,7 @@
 }
 
 DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 5, 0,
-       /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
+       doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
 NAME must be a string.
 EXPANSION should usually be a string.
 To undefine an abbrev, define it with EXPANSION = nil.
@@ -115,8 +115,8 @@
 If EXPANSION is not a string, the abbrev is a special one,
  which does not expand in the usual way but only runs HOOK.
 COUNT, if specified, initializes the abbrev's usage-count
-which is incremented each time the abbrev is used.  */
-       (table, name, expansion, hook, count))
+which is incremented each time the abbrev is used.  */)
+     (table, name, expansion, hook, count)
      Lisp_Object table, name, expansion, hook, count;
 {
   Lisp_Object sym, oexp, ohook, tem;
@@ -149,8 +149,8 @@
 
 DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2,
        "sDefine global abbrev: \nsExpansion for %s: ",
-       /* Define ABBREV as a global abbreviation for EXPANSION.  */
-       (abbrev, expansion))
+       doc: /* Define ABBREV as a global abbreviation for EXPANSION.  */)
+     (abbrev, expansion)
      Lisp_Object abbrev, expansion;
 {
   Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev),
@@ -160,8 +160,8 @@
 
 DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2,
        "sDefine mode abbrev: \nsExpansion for %s: ",
-       /* Define ABBREV as a mode-specific abbreviation for EXPANSION.  */
-       (abbrev, expansion))
+       doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION.  */)
+     (abbrev, expansion)
      Lisp_Object abbrev, expansion;
 {
   if (NILP (current_buffer->abbrev_table))
@@ -173,13 +173,13 @@
 }
 
 DEFUN ("abbrev-symbol", Fabbrev_symbol, Sabbrev_symbol, 1, 2, 0,
-       /* Return the symbol representing abbrev named ABBREV.
+       doc: /* Return the symbol representing abbrev named ABBREV.
 This symbol's name is ABBREV, but it is not the canonical symbol of that name;
 it is interned in an abbrev-table rather than the normal obarray.
 The value is nil if that abbrev is not defined.
 Optional second arg TABLE is abbrev table to look it up in.
-The default is to try buffer's mode-specific abbrev table, then global table.  */
-       (abbrev, table))
+The default is to try buffer's mode-specific abbrev table, then global table.  */)
+     (abbrev, table)
      Lisp_Object abbrev, table;
 {
   Lisp_Object sym;
@@ -202,10 +202,10 @@
 }
 
 DEFUN ("abbrev-expansion", Fabbrev_expansion, Sabbrev_expansion, 1, 2, 0,
-       /* Return the string that ABBREV expands into in the current buffer.
+       doc: /* Return the string that ABBREV expands into in the current buffer.
 Optionally specify an abbrev table as second arg;
-then ABBREV is looked up in that table only.  */
-       (abbrev, table))
+then ABBREV is looked up in that table only.  */)
+     (abbrev, table)
      Lisp_Object abbrev, table;
 {
   Lisp_Object sym;
@@ -218,10 +218,10 @@
   Returns 1 if an expansion is done. */
 
 DEFUN ("expand-abbrev", Fexpand_abbrev, Sexpand_abbrev, 0, 0, "",
-       /* Expand the abbrev before point, if there is an abbrev there.
+       doc: /* Expand the abbrev before point, if there is an abbrev there.
 Effective when explicitly called even when `abbrev-mode' is nil.
-Returns the abbrev symbol, if expansion took place.  */
-       ())
+Returns the abbrev symbol, if expansion took place.  */)
+     ()
 {
   register char *buffer, *p;
   int wordstart, wordend;
@@ -389,10 +389,10 @@
 }
 
 DEFUN ("unexpand-abbrev", Funexpand_abbrev, Sunexpand_abbrev, 0, 0, "",
-       /* Undo the expansion of the last abbrev that expanded.
+       doc: /* Undo the expansion of the last abbrev that expanded.
 This differs from ordinary undo in that other editing done since then
-is not undone.  */
-       ())
+is not undone.  */)
+     ()
 {
   int opoint = PT;
   int adjust = 0;
@@ -467,13 +467,13 @@
 
 DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description,
   Sinsert_abbrev_table_description, 1, 2, 0,
-       /* Insert before point a full description of abbrev table named NAME.
+       doc: /* Insert before point a full description of abbrev table named NAME.
 NAME is a symbol whose value is an abbrev table.
 If optional 2nd arg READABLE is non-nil, a human-readable description
 is inserted.  Otherwise the description is an expression,
 a call to `define-abbrev-table', which would
-define the abbrev table NAME exactly as it is currently defined.  */
-       (name, readable))
+define the abbrev table NAME exactly as it is currently defined.  */)
+     (name, readable)
      Lisp_Object name, readable;
 {
   Lisp_Object table;
@@ -507,10 +507,10 @@
 
 DEFUN ("define-abbrev-table", Fdefine_abbrev_table, Sdefine_abbrev_table,
        2, 2, 0,
-       /* Define TABLENAME (a symbol) as an abbrev table name.
+       doc: /* Define TABLENAME (a symbol) as an abbrev table name.
 Define abbrevs in it according to DEFINITIONS, which is a list of elements
-of the form (ABBREVNAME EXPANSION HOOK USECOUNT).  */
-       (tablename, definitions))
+of the form (ABBREVNAME EXPANSION HOOK USECOUNT).  */)
+     (tablename, definitions)
      Lisp_Object tablename, definitions;
 {
   Lisp_Object name, exp, hook, count;
@@ -541,64 +541,64 @@
 void
 syms_of_abbrev ()
 {
-  DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list
-	       /* List of symbols whose values are abbrev tables.  */);
+  DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list,
+	       doc: /* List of symbols whose values are abbrev tables.  */);
   Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"),
 				   Fcons (intern ("global-abbrev-table"),
 					  Qnil));
 
-  DEFVAR_LISP ("global-abbrev-table", &Vglobal_abbrev_table
-	       /* The abbrev table whose abbrevs affect all buffers.
+  DEFVAR_LISP ("global-abbrev-table", &Vglobal_abbrev_table,
+	       doc: /* The abbrev table whose abbrevs affect all buffers.
 Each buffer may also have a local abbrev table.
 If it does, the local table overrides the global one
 for any particular abbrev defined in both.  */);
   Vglobal_abbrev_table = Fmake_abbrev_table ();
 
-  DEFVAR_LISP ("fundamental-mode-abbrev-table", &Vfundamental_mode_abbrev_table
-	       /* The abbrev table of mode-specific abbrevs for Fundamental Mode.  */);
+  DEFVAR_LISP ("fundamental-mode-abbrev-table", &Vfundamental_mode_abbrev_table,
+	       doc: /* The abbrev table of mode-specific abbrevs for Fundamental Mode.  */);
   Vfundamental_mode_abbrev_table = Fmake_abbrev_table ();
   current_buffer->abbrev_table = Vfundamental_mode_abbrev_table;
   buffer_defaults.abbrev_table = Vfundamental_mode_abbrev_table;
 
-  DEFVAR_LISP ("last-abbrev", &Vlast_abbrev
-	       /* The abbrev-symbol of the last abbrev expanded.  See `abbrev-symbol'.  */);
+  DEFVAR_LISP ("last-abbrev", &Vlast_abbrev,
+	       doc: /* The abbrev-symbol of the last abbrev expanded.  See `abbrev-symbol'.  */);
 
-  DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text
-	       /* The exact text of the last abbrev expanded.
+  DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text,
+	       doc: /* The exact text of the last abbrev expanded.
 nil if the abbrev has already been unexpanded.  */);
 
-  DEFVAR_INT ("last-abbrev-location", &last_abbrev_point
-	      /* The location of the start of the last abbrev expanded.  */);
+  DEFVAR_INT ("last-abbrev-location", &last_abbrev_point,
+	      doc: /* The location of the start of the last abbrev expanded.  */);
 
   Vlast_abbrev = Qnil;
   Vlast_abbrev_text = Qnil;
   last_abbrev_point = 0;
 
-  DEFVAR_LISP ("abbrev-start-location", &Vabbrev_start_location
-	       /* Buffer position for `expand-abbrev' to use as the start of the abbrev.
+  DEFVAR_LISP ("abbrev-start-location", &Vabbrev_start_location,
+	       doc: /* Buffer position for `expand-abbrev' to use as the start of the abbrev.
 nil means use the word before point as the abbrev.
 Calling `expand-abbrev' sets this to nil.  */);
   Vabbrev_start_location = Qnil;
 
-  DEFVAR_LISP ("abbrev-start-location-buffer", &Vabbrev_start_location_buffer
-	       /* Buffer that `abbrev-start-location' has been set for.
+  DEFVAR_LISP ("abbrev-start-location-buffer", &Vabbrev_start_location_buffer,
+	       doc: /* Buffer that `abbrev-start-location' has been set for.
 Trying to expand an abbrev in any other buffer clears `abbrev-start-location'.  */);
   Vabbrev_start_location_buffer = Qnil;
 
-  DEFVAR_PER_BUFFER ("local-abbrev-table", &current_buffer->abbrev_table, Qnil
-		     /* Local (mode-specific) abbrev table of current buffer.  */);
+  DEFVAR_PER_BUFFER ("local-abbrev-table", &current_buffer->abbrev_table, Qnil,
+		     doc: /* Local (mode-specific) abbrev table of current buffer.  */);
 
-  DEFVAR_BOOL ("abbrevs-changed", &abbrevs_changed
-	       /* Set non-nil by defining or altering any word abbrevs.
+  DEFVAR_BOOL ("abbrevs-changed", &abbrevs_changed,
+	       doc: /* Set non-nil by defining or altering any word abbrevs.
 This causes `save-some-buffers' to offer to save the abbrevs.  */);
   abbrevs_changed = 0;
 
-  DEFVAR_BOOL ("abbrev-all-caps", &abbrev_all_caps
-	       /* *Set non-nil means expand multi-word abbrevs all caps if abbrev was so.  */);
+  DEFVAR_BOOL ("abbrev-all-caps", &abbrev_all_caps,
+	       doc: /* *Set non-nil means expand multi-word abbrevs all caps if abbrev was so.  */);
   abbrev_all_caps = 0;
 
-  DEFVAR_LISP ("pre-abbrev-expand-hook", &Vpre_abbrev_expand_hook
-	       /* Function or functions to be called before abbrev expansion is done.
+  DEFVAR_LISP ("pre-abbrev-expand-hook", &Vpre_abbrev_expand_hook,
+	       doc: /* Function or functions to be called before abbrev expansion is done.
 This is the first thing that `expand-abbrev' does, and so this may change
 the current abbrev table before abbrev lookup happens.  */);
   Vpre_abbrev_expand_hook = Qnil;