X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/412f24b9ddf1e07022f8c5fe05f0717f130c4c02..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/cedet/semantic/format.el diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el index fa6e751762..1fe703fd09 100644 --- a/lisp/cedet/semantic/format.el +++ b/lisp/cedet/semantic/format.el @@ -1,6 +1,6 @@ ;;; semantic/format.el --- Routines for formatting tags -;; Copyright (C) 1999-2005, 2007-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2016 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Keywords: syntax @@ -291,7 +291,7 @@ local definitions." ;; Try and find a trail of parents from PARENT (let ((rlist (list parent)) ) - ;; IMPLELEMENT ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ;; IMPLEMENT ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (reverse rlist))) (define-overloadable-function semantic-format-tag-canonical-name (tag &optional parent color) @@ -431,7 +431,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors." (doc (semantic-tag-docstring tag buf))) (when (and (not doc) (not buf) fname) ;; If there is no doc, and no buffer, but we have a filename, - ;; lets try again. + ;; let's try again. (save-match-data (setq buf (find-file-noselect fname))) (setq doc (semantic-tag-docstring tag buf))) @@ -499,7 +499,12 @@ Optional argument COLOR means highlight the prototype with font-lock colors." (setq r (concat r "[]") deref (1- deref))) r))) - ) + (default (when (eq class 'variable) + (let ((defval + (semantic-tag-get-attribute tag :default-value))) + (when (and defval (stringp defval)) + (concat "[=" defval "]"))))) + ) (if args (setq args (concat " " @@ -512,7 +517,8 @@ Optional argument COLOR means highlight the prototype with font-lock colors." (if type (concat type " ")) name (or args "") - (or array "")))) + (or array "") + (or default "")))) ;;;###autoload (define-overloadable-function semantic-format-tag-concise-prototype (tag &optional parent color) @@ -603,7 +609,7 @@ This associates a symbol, such as 'public with the st ring \"+\".") "Convert PROTECTION-SYMBOL to a string for UML. By default, uses `semantic-format-tag-protection-symbol-to-string-assoc-list' to convert. -By defaul character returns are: +By default character returns are: public -- + private -- - protected -- #.