X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1259009aa17da6dc038afff96963f6d9bbd3b8e1..0e963201d03d9229bb8ac4323291d2b0119526ed:/lisp/cedet/semantic/format.el diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el index 158c32b15c..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-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2005, 2007-2016 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Keywords: syntax @@ -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)