mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 07:41:28 -08:00
This makes it easier for human readers (and static analyzers) to see whether these functions can be called from other modules. DEFUN now defines a static function. To make the function external so that it can be used in other C modules, use the new macro DEFUE. * lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN. (DEFUN): Rewrite in terms of DEFINE_FUNC. It now generates a static function definition. Use DEFUE if you want an extern one. (DEFUE, INFUN): New macros. (Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library): (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer): (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute): (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes): Remove decls, since these functions are now static. (Funintern, Fget_internal_run_time): New decls, since these functions were already external. * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c: * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c: * fns.c, font.c, fontset.c, frame.c, image.c, indent.c: * keyboard.c, keymap.c, lread.c: * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c: * syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c: Mark functions with DEFUE instead of DEFUN, if they are used in other modules. * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward decls for now-static functions. * buffer.h (Fdelete_overlay): Remove decl. * callproc.c (Fgetenv_internal): Mark as internal. * composite.c (Fremove_list_of_text_properties): Remove decl. (Fcomposition_get_gstring): New forward static decl. * composite.h (Fcomposite_get_gstring): Remove decl. * dired.c (Ffile_attributes): New forward static decl. * doc.c (Fdocumntation_property): New forward static decl. * eval.c (Ffetch_bytecode): New forward static decl. (Funintern): Remove extern decl; now in .h file where it belongs. * fileio.c (Fmake_symbolic_link): New forward static decl. * image.c (Finit_image_library): New forward static decl. * insdel.c (Fcombine_after_change_execute): Make forward decl static. * intervals.h (Fprevious_property_change): (Fremove_list_of_text_properties): Remove decls. * keyboard.c (Fthis_command_keys): Remove decl. (Fcommand_execute): New forward static decl. * keymap.c (Flookup_key): New forward static decl. (Fcopy_keymap): Now static. * keymap.h (Flookup_key): Remove decl. * process.c (Fget_process): New forward static decl. (Fprocess_datagram_address): Mark as internal. * syntax.c (Fsyntax_table_p): New forward static decl. (skip_chars): Remove duplicate decl. * textprop.c (Fprevious_property_change): New forward static decl. * window.c (Fset_window_fringes, Fset_window_scroll_bars): Now internal. (Fset_window_margins, Fset_window_vscroll): New forward static decls. * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
54 lines
2.1 KiB
C
54 lines
2.1 KiB
C
/* Functions to manipulate keymaps.
|
|
Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
|
|
|
This file is part of GNU Emacs.
|
|
|
|
GNU Emacs is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
GNU Emacs is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef KEYMAP_H
|
|
#define KEYMAP_H
|
|
|
|
#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0)))
|
|
extern Lisp_Object Qkeymap, Qmenu_bar;
|
|
extern Lisp_Object Qremap;
|
|
extern Lisp_Object Qmenu_item;
|
|
extern Lisp_Object current_global_map;
|
|
EXFUN (Fmake_sparse_keymap, 1);
|
|
EXFUN (Fkeymap_prompt, 1);
|
|
EXFUN (Fdefine_key, 3);
|
|
EXFUN (Fcommand_remapping, 3);
|
|
EXFUN (Fkey_binding, 4);
|
|
EXFUN (Fkey_description, 2);
|
|
EXFUN (Fsingle_key_description, 2);
|
|
EXFUN (Fwhere_is_internal, 5);
|
|
EXFUN (Fcurrent_active_maps, 2);
|
|
extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int);
|
|
extern Lisp_Object get_keymap (Lisp_Object, int, int);
|
|
EXFUN (Fset_keymap_parent, 2);
|
|
extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
|
|
const char *, int, int, int, int);
|
|
extern int current_minor_maps (Lisp_Object **, Lisp_Object **);
|
|
extern void initial_define_key (Lisp_Object, int, const char *);
|
|
extern void initial_define_lispy_key (Lisp_Object, const char *, const char *);
|
|
extern void syms_of_keymap (void);
|
|
extern void keys_of_keymap (void);
|
|
|
|
typedef void (*map_keymap_function_t)
|
|
(Lisp_Object key, Lisp_Object val, Lisp_Object args, void* data);
|
|
extern void map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object largs, void* cargs, int autoload);
|
|
extern void map_keymap_canonical (Lisp_Object map,
|
|
map_keymap_function_t fun,
|
|
Lisp_Object args, void *data);
|
|
|
|
#endif
|