>>> David PONCE <david.ponce@...> seems to think that:
>Hi,
>
>> I find I get an error:
>>
>> In end of data:
>> semantic-idle.el:629:1:Warning: the function `eieio-oref' might not be defined
>> at runtime.
>> semantic-idle.el:629:1:Warning: the following functions are not known to be
>> defined: eldoc-message, semantic-completion-inline-active-p,
>> semantic-complete-inline-force-display
>> Wrote /usr/source/CVS-cedet/cedet/semantic/semantic-idle.elc
>>
>> In semantic-decorate-add-decorations:
>> semantic-decorate-mode.el:163:20:Warning: reference to free variable
>> `semantic-decoration-styles'
>> semantic-decorate-mode.el:380:1:Error: Symbol's value as variable is void: semantic-decoration-styles
>> make[1]: *** [tools] Error 1
>> make[1]: Leaving directory `/usr/source/CVS-cedet/cedet/semantic'
>> make: *** [semantic] Error 2
>>
>>
>> I'm using a CVS Emacs, so is that the problem?
>
>No, I experienced the same issue with GNU Emacs 21.3.1.
>The problem is in macro `define-semantic-decoration-style' which
>generates defun statements, and an add-to-list into
>`semantic-decoration-styles', evaluated at compilation time.
>
>That worked fine in my initial version that defined
>`semantic-decoration-styles' with a `defvar', but fails since Eric
>changed that to use a `defcustom'.
>
>Eric, is it really necessary to have that internal variable
>customizable?
>
>Anyway, following is a patch I committed, that seems to have fixed the
>problem. However, I am not sure it is correct to evaluate a defcustom
>at compilation time.
>
>Thanks!
>David
>
>2004-06-28 David Ponce <david@...>
>
> * cedet/semantic/semantic-decorate-mode.el
>
> (semantic-decoration-styles): Move before first use and make
> available at compilation time.
[ ... ]
Hi David,
I saw that compilation problem too but hadn't had a chance to look
at it until this morning. I did two things. The first is to move
the definition of the style list to the top of the file, in front of
the first reference. The second was I replaced the
`eval-and-compile' in the macro with a `progn'. That was the bit
that did fix it for me. I cannot recall why it uses
`eval-and-compile'. In retrospect I'm not certain it was necessary.
Eric
*** semantic-decorate-mode.el.~1.5.~ 2004-06-19 10:56:42.000000000 -0400
--- semantic-decorate-mode.el 2004-06-28 07:50:54.000000000 -0400
***************
*** 43,48 ****
--- 43,61 ----
(require 'semantic-util-modes)
(eval-when-compile (require 'cl))
+ ;;; Styles List
+ ;;
+ (defcustom semantic-decoration-styles nil
+ "*List of active decoration styles.
+ It is an alist of \(NAME . FLAG) elements, where NAME is a style name
+ and FLAG is non-nil if the style is enabled.
+ See also `define-semantic-decoration-style' which will automatically
+ add items to this list."
+ :group 'semantic
+ :type '(repeat (cons (string :tag "Decoration Name")
+ (boolean :tag "Enabled")))
+ )
+
;;; Misc.
;;
(defsubst semantic-decorate-style-predicate (style)
***************
*** 176,192 ****
;;
;; Generic mode for handling basic highlighting and decorations.
;;
- (defcustom semantic-decoration-styles nil
- "*List of active decoration styles.
- It is an alist of \(NAME . FLAG) elements, where NAME is a style name
- and FLAG is non-nil if the style is enabled.
- See also `define-semantic-decoration-style' which will automatically
- add items to this list."
- :group 'semantic
- :type '(repeat (cons (string :tag "Decoration Name")
- (boolean :tag "Enabled")))
- )
-
;;;###autoload
(defun global-semantic-decoration-mode (&optional arg)
"Toggle global use of option `semantic-decoration-mode'.
--- 189,194 ----
***************
*** 205,210 ****
--- 207,213 ----
When this mode is activated, decorations specified by
`semantic-decoration-styles'."
:group 'semantic
+ :group 'semantic-group
:type 'boolean
:require 'semantic-decorate-mode
:initialize 'custom-initialize-default
***************
*** 357,363 ****
decoration API found in this library."
(let ((predicate (semantic-decorate-style-predicate name))
(highlighter (semantic-decorate-style-highlighter name)))
! `(eval-and-compile
;; Create an override method to specify if a given tag belongs
;; to this type of decoration
(define-overload ,predicate (tag)
--- 360,366 ----
decoration API found in this library."
(let ((predicate (semantic-decorate-style-predicate name))
(highlighter (semantic-decorate-style-highlighter name)))
! `(progn
;; Create an override method to specify if a given tag belongs
;; to this type of decoration
(define-overload ,predicate (tag)
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|