emacs-devel
[Top][All Lists]
Advanced

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

extern for variables defined in the same file?


From: Pavel Janík
Subject: extern for variables defined in the same file?
Date: Tue, 23 Oct 2001 19:07:34 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50

Hi,

in xdisp.c we have something like this:

,----
| ...
| Lisp_Object Qmargin;
| ...
| static int
| single_display_prop_string_p (prop, string)
|      Lisp_Object prop, string;
| {
|   extern Lisp_Object Qwhen, Qmargin;
| ...
| }
| ...
| static int
| display_prop_string_p (prop, string)
|      Lisp_Object prop, string;
| {
|   extern Lisp_Object Qmargin;
| ...
`----

The variable Qmargin is defined only in this file and is not referenced in
any other file. Is the proper fix here to simply remove mentioned lines
beginning with extern? Or is there any reason to use extern here? If we
declare the variable as local we shadow its global value, but why we use
extern here? Maybe in the past, this variable was defines elsewhere
(xfaces.c) and this remained? Is it safe to delete it?
-- 
Pavel Janík

UNIX is basically a simple operating system, but you have to be a genius to
understand the simplicity.
                  -- Dennis Ritchie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]