]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/doc.el
Merge branch 'emacs-25-merge'
[gnu-emacs] / lisp / cedet / semantic / doc.el
index fdaeb95d0019adbe1622526b436d294ac861f2e8..65718a0532ef70784cf1b4357cf5e85ee3b0260c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semantic/doc.el --- Routines for documentation strings
 
-;; Copyright (C) 1999-2003, 2005, 2008-2014 Free Software Foundation,
+;; Copyright (C) 1999-2003, 2005, 2008-2015 Free Software Foundation,
 ;; Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -41,7 +41,7 @@ some documentation in a comment preceding TAG's definition which we
 can look for.  When appropriate, this can be overridden by a language specific
 enhancement.
 Optional argument NOSNARF means to only return the lexical analyzer token for it.
-If nosnarf if 'lex, then only return the lex token."
+If NOSNARF is `lex', then only return the lex token."
   (if (not tag) (setq tag (semantic-current-tag)))
   (save-excursion
     (when (semantic-tag-with-position-p tag)
@@ -56,18 +56,17 @@ If nosnarf if 'lex, then only return the lex token."
          doctmp
          ;; Check just before the definition.
          (when (semantic-tag-with-position-p tag)
-           (semantic-documentation-comment-preceeding-tag tag nosnarf))
+           (semantic-documentation-comment-preceding-tag tag nosnarf))
          ;;  Let's look for comments either after the definition, but before code:
          ;; Not sure yet.  Fill in something clever later....
          nil))))))
 
-;; FIXME this is not how you spell "preceding".
-(defun semantic-documentation-comment-preceeding-tag (&optional tag nosnarf)
+(defun semantic-documentation-comment-preceding-tag (&optional tag nosnarf)
   "Find a comment preceding TAG.
 If TAG is nil.  use the tag under point.
 Searches the space between TAG and the preceding tag for a comment,
 and converts the comment into clean documentation.
-Optional argument NOSNARF with a value of 'lex means to return
+Optional argument NOSNARF with a value of `lex' means to return
 just the lexical token and not the string."
   (if (not tag) (setq tag (semantic-current-tag)))
   (save-excursion
@@ -84,12 +83,16 @@ just the lexical token and not the string."
        ;; of a function.
        (semantic-doc-snarf-comment-for-tag nosnarf)))
     ))
+(define-obsolete-function-alias
+  'semantic-documentation-comment-preceeding-tag
+  'semantic-documentation-comment-preceding-tag
+  "25.1")
 
 (defun semantic-doc-snarf-comment-for-tag (nosnarf)
   "Snarf up the comment at POINT for `semantic-documentation-for-tag'.
 Attempt to strip out comment syntactic sugar.
 Argument NOSNARF means don't modify the found text.
-If NOSNARF is 'lex, then return the lex token."
+If NOSNARF is `lex', then return the lex token."
   (let* ((semantic-ignore-comments nil)
         (semantic-lex-analyzer #'semantic-comment-lexer))
     (if (memq nosnarf '(lex flex)) ;; keep `flex' for compatibility