From: Juanma Barranquero <lekktu@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Unused static functions
Date: Fri, 23 Jul 2010 13:21:45 +0200 [thread overview]
Message-ID: <AANLkTinYGc0f=pf7RpthZY8Hjwm_T3860gdkGFDUYX2t@mail.gmail.com> (raw)
The following patch removes static functions that are not used or
referenced anywhere.
However, perhaps some of them are intended to be used when debugging
and should be kept?
Juanma
=== modified file 'src/alloc.c'
--- src/alloc.c 2010-07-20 20:21:03 +0000
+++ src/alloc.c 2010-07-23 11:15:19 +0000
@@ -2538,16 +2538,6 @@
}
-/* Explicitly free a float cell by putting it on the free-list. */
-
-static void
-free_float (struct Lisp_Float *ptr)
-{
- ptr->u.chain = float_free_list;
- float_free_list = ptr;
-}
-
-
/* Return a new float object with value FLOAT_VALUE. */
Lisp_Object
=== modified file 'src/font.c'
--- src/font.c 2010-07-14 03:40:47 +0000
+++ src/font.c 2010-07-23 11:15:19 +0000
@@ -980,39 +980,6 @@
}
-#ifdef ENABLE_CHECKING
-/* Match a 14-field XLFD pattern against a full XLFD font name. */
-static int
-font_match_xlfd (char *pattern, char *name)
-{
- while (*pattern && *name)
- {
- if (*pattern == *name)
- pattern++;
- else if (*pattern == '*')
- if (*name == pattern[1])
- pattern += 2;
- else
- ;
- else
- return 0;
- name++;
- }
- return 1;
-}
-
-/* Make sure the font object matches the XLFD font name. */
-static int
-font_check_xlfd_parse (Lisp_Object font, char *name)
-{
- char name_check[256];
- font_unparse_xlfd (font, 0, name_check, 255);
- return font_match_xlfd (name_check, name);
-}
-
-#endif
-
-
/* Parse NAME (null terminated) as XLFD and store information in FONT
(font-spec or font-entity). Size property of FONT is set as
follows:
=== modified file 'src/frame.c'
--- src/frame.c 2010-07-17 18:34:44 +0000
+++ src/frame.c 2010-07-23 11:15:19 +0000
@@ -1280,14 +1280,6 @@
return 1;
}
-/* Error handler for `delete-frame-functions'. */
-static Lisp_Object
-delete_frame_handler (Lisp_Object arg)
-{
- add_to_log ("Error during `delete-frame': %s", arg, Qnil);
- return Qnil;
-}
-
extern Lisp_Object Qrun_hook_with_args;
/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
=== modified file 'src/ralloc.c'
--- src/ralloc.c 2010-07-07 22:18:28 +0000
+++ src/ralloc.c 2010-07-23 11:15:19 +0000
@@ -519,35 +519,6 @@
return 1;
}
-
-/* Reorder the bloc BLOC to go before bloc BEFORE in the doubly linked list.
- This is necessary if we put the memory of space of BLOC
- before that of BEFORE. */
-
-static void
-reorder_bloc (bloc_ptr bloc, bloc_ptr before)
-{
- bloc_ptr prev, next;
-
- /* Splice BLOC out from where it is. */
- prev = bloc->prev;
- next = bloc->next;
-
- if (prev)
- prev->next = next;
- if (next)
- next->prev = prev;
-
- /* Splice it in before BEFORE. */
- prev = before->prev;
-
- if (prev)
- prev->next = bloc;
- bloc->prev = prev;
-
- before->prev = bloc;
- bloc->next = before;
-}
\f
/* Update the records of which heaps contain which blocs, starting
with heap HEAP and bloc BLOC. */
=== modified file 'src/w32menu.c'
--- src/w32menu.c 2010-07-08 21:25:08 +0000
+++ src/w32menu.c 2010-07-23 11:15:19 +0000
@@ -111,30 +111,6 @@
int pending_menu_activation;
\f
-
-/* Return the frame whose ->output_data.w32->menubar_widget equals
- ID, or 0 if none. */
-
-static struct frame *
-menubar_id_to_frame (HMENU id)
-{
- Lisp_Object tail, frame;
- FRAME_PTR f;
-
- for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
- {
- frame = XCAR (tail);
- if (!FRAMEP (frame))
- continue;
- f = XFRAME (frame);
- if (!FRAME_WINDOW_P (f))
- continue;
- if (f->output_data.w32->menubar_widget == id)
- return f;
- }
- return 0;
-}
-\f
#ifdef HAVE_MENUS
DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
@@ -1316,14 +1292,6 @@
return (*name == '\0' || start + 2 == name);
}
-
-/* Indicate boundary between left and right. */
-static int
-add_left_right_boundary (HMENU menu)
-{
- return AppendMenu (menu, MF_MENUBARBREAK, 0, NULL);
-}
-
/* UTF8: 0xxxxxxx, 110xxxxx 10xxxxxx, 1110xxxx, 10xxxxxx, 10xxxxxx */
static void
utf8to16 (unsigned char * src, int len, WCHAR * dest)
next reply other threads:[~2010-07-23 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 11:21 Juanma Barranquero [this message]
2010-07-23 15:35 ` Unused static functions Chong Yidong
2010-07-23 17:57 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTinYGc0f=pf7RpthZY8Hjwm_T3860gdkGFDUYX2t@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.