Thread: Re: [cedet-semantic] Current CVS fails to build for me
Brought to you by:
zappo
From: David P. <dav...@wa...> - 2004-06-28 07:06:46
|
Hi, > I find I get an error: >=20 > In end of data: > semantic-idle.el:629:1:Warning: the function `eieio-oref' might not be de= fined > 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 >=20 > 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 >=20 >=20 > 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 <da...@dp...> =09* cedet/semantic/semantic-decorate-mode.el =09(semantic-decoration-styles): Move before first use and make =09available at compilation time. Index: semantic-decorate-mode.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/cedet/cedet/semantic/semantic-decorate-mode.el,v retrieving revision 1.5 diff -c -r1.5 semantic-decorate-mode.el *** semantic-decorate-mode.el=0919 Jun 2004 14:56:42 -0000=091.5 --- semantic-decorate-mode.el=0928 Jun 2004 06:53:29 -0000 *************** *** 130,135 **** --- 130,147 ---- =0C ;;; Global setup of active decorations ;; + (eval-and-compile + (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")))) + ) +=20 (defun semantic-decorate-flush-decorations (&optional buffer) "Flush decorations found in BUFFER. BUFFER defaults to the current buffer. *************** *** 176,191 **** ;; ;; 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") - =09=09 (boolean :tag "Enabled"))) - ) =20 ;;;###autoload (defun global-semantic-decoration-mode (&optional arg) --- 188,193 ---- |
From: David P. <dav...@wa...> - 2004-06-28 12:17:46
|
Hi Eric, [...] > 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. I think your fix is better than mine and keep the code simple. It would be nice if you could commit it in place of my fix ;-) Thanks! David |
From: Eric M. L. <er...@si...> - 2004-06-28 13:59:20
|
>>> David PONCE <dav...@wa...> seems to think that: >Hi Eric, > >[...] >> 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. > >I think your fix is better than mine and keep the code simple. It >would be nice if you could commit it in place of my fix ;-) It is in, with another change where I added a new customization group `semantic-modes'. If you customize this group, you can turn all the modes on/off via custom. Eric -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |
From: David P. <dav...@wa...> - 2004-06-28 14:26:23
|
[...] >>I think your fix is better than mine and keep the code simple. It >>would be nice if you could commit it in place of my fix ;-) >=20 >=20 > It is in, with another change where I added a new customization group > `semantic-modes'. If you customize this group, you can turn all the > modes on/off via custom. That's great! I just committed the following change to remove the duplicate definition of `semantic-decoration-styles' ;-) Thanks! David 2004-06-28 David Ponce <da...@dp...> NYC =09* cedet/semantic/semantic-decorate-mode.el =09 =09(semantic-decoration-styles): Remove duplicate definition. Index: semantic-decorate-mode.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/cedet/cedet/semantic/semantic-decorate-mode.el,v retrieving revision 1.7 diff -c -r1.7 semantic-decorate-mode.el *** semantic-decorate-mode.el=0928 Jun 2004 13:57:00 -0000=091.7 --- semantic-decorate-mode.el=0928 Jun 2004 14:17:19 -0000 *************** *** 143,160 **** =0C ;;; Global setup of active decorations ;; - (eval-and-compile - (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")))) - ) -=20 (defun semantic-decorate-flush-decorations (&optional buffer) "Flush decorations found in BUFFER. BUFFER defaults to the current buffer. --- 143,148 ---- |
From: Eric M. L. <er...@si...> - 2004-06-28 11:55:01
|
>>> David PONCE <dav...@wa...> 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 <da...@dp...> > > * 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: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |