From 1e3890d19599e8c4736e74a11f95b70b6f11f72b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:41:38 -0700 Subject: [PATCH] * lread.c: Make symbols static if they're not exported. (read_objects, initial_obarray, oblookup_last_bucket_number): Now static. (make_symbol): Remove; unused. * lisp.h (initial_obarray, make_symbol): Remove decls. --- src/ChangeLog | 6 ++++++ src/lisp.h | 2 -- src/lread.c | 18 +++--------------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 322e3665e86..77c32b6a206 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-14 Paul Eggert + * lread.c: Make symbols static if they're not exported. + (read_objects, initial_obarray, oblookup_last_bucket_number): + Now static. + (make_symbol): Remove; unused. + * lisp.h (initial_obarray, make_symbol): Remove decls. + * keyboard.c: Make symbols static if they're not exported. (single_kboard, recent_keys_index, total_keys, recent_keys): (this_command_key_count_reset, raw_keybuf, raw_keybuf_count): diff --git a/src/lisp.h b/src/lisp.h index 460563fe4c1..0a787c54eb1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2770,7 +2770,6 @@ extern void syms_of_print (void); /* Defined in lread.c. */ extern Lisp_Object Qvariable_documentation, Qstandard_input; extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; -extern Lisp_Object initial_obarray; EXFUN (Fread, 1); EXFUN (Fread_from_string, 3); EXFUN (Fintern, 2); @@ -2783,7 +2782,6 @@ EXFUN (Fread_event, 3); extern Lisp_Object check_obarray (Lisp_Object); extern Lisp_Object intern (const char *); extern Lisp_Object intern_c_string (const char *); -extern Lisp_Object make_symbol (const char *); extern Lisp_Object oblookup (Lisp_Object, const char *, EMACS_INT, EMACS_INT); #define LOADHIST_ATTACH(x) \ do { \ diff --git a/src/lread.c b/src/lread.c index 2d383350ec1..fdb477c0218 100644 --- a/src/lread.c +++ b/src/lread.c @@ -91,7 +91,7 @@ static Lisp_Object Qload_in_progress; Each member of the list has the form (n . object), and is used to look up the object for the corresponding #n# construct. It must be set to nil before all top-level calls to read0. */ -Lisp_Object read_objects; +static Lisp_Object read_objects; /* Nonzero means READCHAR should read bytes one by one (not character) when READCHARFUN is Qget_file_char or Qget_emacs_mule_file_char. @@ -3578,11 +3578,11 @@ read_list (int flag, register Lisp_Object readcharfun) } } -Lisp_Object initial_obarray; +static Lisp_Object initial_obarray; /* oblookup stores the bucket number here, for the sake of Funintern. */ -int oblookup_last_bucket_number; +static int oblookup_last_bucket_number; static int hash_string (const char *ptr, int len); @@ -3642,18 +3642,6 @@ intern_c_string (const char *str) return Fintern (make_pure_c_string (str), obarray); } - -/* Create an uninterned symbol with name STR. */ - -Lisp_Object -make_symbol (const char *str) -{ - int len = strlen (str); - - return Fmake_symbol (!NILP (Vpurify_flag) - ? make_pure_string (str, len, len, 0) - : make_string (str, len)); -} DEFUE ("intern", Fintern, Sintern, 1, 2, 0, doc: /* Return the canonical symbol whose name is STRING. -- 2.39.2