[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

irritating compiler warnings



Consider this simple example:

;file1
	(defvar foo1 *menu* ...)
	(defobfun (menu-update foo1) () ...  (usual-menu-update))

;file2
	(defvar foo2 *menu* ...)
	(defobfun (menu-update foo2) () ...  (usual-menu-update))

All I'm doing is creating two different menus each with its own
specialized menu-update function. However, the compiler flags me with
the warning that menu-update is being re-defined in a different file.

Now its just a warning, but I like to keep my warning flags set and the
message is irritating to others who use my code.

Does anyone know if there is a good way to avoid these warnings. Are these
warnings bugs to be fixed or is there a legit reason for them?

I know of two (ugly) work arounds:

    1) I can create a class for each menu using defobject. Using
    defobfun on different classes won't flag any warnings.

    2) I can use fhave to install functions. However, this really
    doesn't work in the above example because usual-menu-update
    only work from withing a defobfun. So this method is ok as
    long as you don't need any usual-... calls.

-ME