aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* src/buffer.c: Fix last change.Eli Zaretskii2011-07-281-1/+1
|
* Turn on bidi-display-reordering by default.Eli Zaretskii2011-07-281-2/+2
| | | | | | | | | src/buffer.c (init_buffer_once, syms_of_buffer): Set bidi-display-reordering to t by default. doc/emacs/mule.texi (Bidirectional Editing): Document the fact that bidi-display-reordering is t by default. lispref/display.texi (Bidirectional Display): Document the fact that bidi-display-reordering is t by default.
* Merge from trunk.Paul Eggert2011-07-131-1/+1
|\
| * src/buffer.c (mmap_find): Fix a typo.Eli Zaretskii2011-07-131-1/+1
| |
* | Merge from trunk.Paul Eggert2011-07-121-0/+1
|\|
| * * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.Paul Eggert2011-07-121-0/+1
| | | | | | | | The old code sometimes used this field without initializing it.
* | Merge from trunk.Paul Eggert2011-07-101-68/+47
|\|
| * ProtoizeAndreas Schwab2011-07-101-68/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge) (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Protoize. * src/data.c (fmod): Likewise. * src/dispnew.c (swap_glyphs_in_rows): Likewise. * src/emacs.c (memory_warning_signal): Likewise. * src/floatfns.c (float_error): Likewise. * src/font.c (check_gstring, check_otf_features, otf_tag_symbol) (otf_open, font_otf_capability, generate_otf_features) (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): Likewise. * src/image.c (pbm_read_file): Likewise. * src/indent.c (string_display_width): Likewise. * src/intervals.c (check_for_interval, search_for_interval) (inc_interval_count, count_intervals, root_interval) (adjust_intervals_for_insertion, make_new_interval): Likewise. * src/lread.c (defalias): Likewise. * src/regex.c (set_image_of_range_1, set_image_of_range) (regex_grow_registers): Likewise. * src/sysdep.c (strerror): Likewise. * src/termcap.c (valid_filename_p, tprint, main): Likewise. * src/tparam.c (main): Likewise. * src/unexhp9k800.c (run_time_remap, save_data_space) (update_file_ptrs, read_header, write_header, calculate_checksum) (copy_file, copy_rest, display_header): Likewise. * src/widget.c (mark_shell_size_user_specified, create_frame_gcs): Likewise. * src/xdisp.c (check_it): Likewise. * src/xfaces.c (register_color, unregister_color, unregister_colors): Likewise. * src/xfns.c (print_fontset_result): Likewise. * src/xrdb.c (member, fatal, main): Likewise.
* | * buffer.c: Integer signedness fixes.Paul Eggert2011-07-071-4/+4
|/ | | | | | (alloc_buffer_text, enlarge_buffer_text): Use ptrdiff_t rather than size_t when either will do, as we prefer signed integers.
* Remove more assumptions re struct layout (Bug#8884).Paul Eggert2011-07-061-4/+4
|
* Remove unportable assumption about struct layout (Bug#8884).Paul Eggert2011-07-061-2/+2
| | | | | | | | | * buffer.c (clone_per_buffer_values): Don't assume that sizeof (struct buffer) is a multiple of sizeof (Lisp_Object). This isn't true in general, and it's particularly not true if Emacs is configured with --with-wide-int. * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): New macros, used in the buffer.c change.
* * buffer.c (Foverlay_put): Say what the return value isLars Magne Ingebrigtsen2011-07-041-1/+2
| | | | (bug#7835).
* Remove clone-number support. Provide clone-of parameter in window states.Martin Rudalics2011-07-021-17/+6
| | | | | | | | | | | | | | | | * window.h (window): Remove clone_number slot. * window.c (Fwindow_clone_number, Fset_window_clone_number): Remove. (make_parent_window, make_window, saved_window) (Fset_window_configuration, save_window_save): Don't deal with clone numbers. * buffer.c (Qclone_number): Remove declaration. (sort_overlays, overlay_strings): Don't deal with clone numbers. * window.el (window-state-get-1): Don't assign clone numbers. Add clone-of item to list of window parameters. (window-state-put-2): Don't process clone numbers. (display-buffer-alist): Fix doc-string.
* Have overlays with window property respect clone numbers.Martin Rudalics2011-06-271-6/+17
| | | | | | | * buffer.c (Qclone_number): Declare static and DEFSYM it. (sort_overlays, overlay_strings): When an overlay's clone number matches the window's clone number process the overlay even if the overlay's window property doesn't match the current window.
* Move DEFSYM to lisp.h and use everywhere.Juanma Barranquero2011-06-241-33/+18
|
* * buffer.c (OVERLAY_COUNT_MAX): New macro.Paul Eggert2011-06-211-17/+19
| | | | | | (overlays_in, mouse_face_overlay_overlaps, Foverlays_in): Use ptrdiff_t, not int, for sizes. (overlays_in): Check for size-calculation overflow.
* Use ptrdiff_t, not int, for overlay counts.Paul Eggert2011-06-211-19/+19
| | | | | | | | | | | | * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT): * editfns.c (overlays_around, get_pos_property): * textprop.c (get_char_property_and_overlay): * xdisp.c (next_overlay_change, note_mouse_highlight): * xfaces.c (face_at_buffer_position): * buffer.c (overlays_at, sort_overlays, Foverlays_at) (Fnext_overlay_change, Fprevious_overlay_change): Use ptrdiff_t, not int, for sizes. (overlays_at): Check for size-calculation overflow.
* * buffer.c (init_buffer): Don't assume string length fits in 'int'.Paul Eggert2011-06-191-1/+1
|
* * buffer.c: Include <verify.h>.Paul Eggert2011-06-171-1/+3
| | | | (init_buffer_once): Check at compile-time, not run-time.
* * buffer.c (record_overlay_string): Check for size-calculation overflow.Paul Eggert2011-06-171-3/+6
| | | | (struct sortstrlist.size, struct sortlist.used): Don't truncate size to int.
* * buffer.c (struct sortstr.size, record_overlay_string): Don't truncate size ↵Paul Eggert2011-06-171-2/+3
| | | | to int.
* * buffer.c (compare_overlays, cmp_for_strings): Avoid subtraction overflow.Paul Eggert2011-06-171-5/+5
|
* * buffer.c (struct sortstr.priority): Now EMACS_INT, not int.Paul Eggert2011-06-171-1/+1
|
* * buffer.c (struct sortvec.priority): Now EMACS_INT, not int.Paul Eggert2011-06-171-1/+1
|
* Merge from trunk.Paul Eggert2011-06-131-257/+195
|\
| * * buffer.c (Qclone_number): Remove for now, as it's unused.Paul Eggert2011-06-111-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (record_buffer, Funrecord_buffer): Rename local to avoid shadowing. (record_buffer): Remove unused local. * frame.c (other_visible_frames, frame_buffer_list): Now static. (set_frame_buffer_list): Remove; unused. * frame.h (other_visible_frames): Remove decl. * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF. * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls. (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only if HAVE_GPM. * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF. * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Define only if HAVE_GPM. * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static. (update_hints_inhibit): Remove; never set. All uses removed. * widgetprv.h (emacsFrameClassRec): Remove decl. * window.c (delete_deletable_window): Now returns void, since it wasn't returning anything. (compare_window_configurations): Remove unused locals. * xfns.c (x_set_scroll_bar_default_width): Remove unused locals. * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF. Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is implied by USE_GTK || USE_MOTIF. (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers the same widths as pointers. This follows up on the 2011-05-06 patch. * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID. * xterm.h: Likewise. (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
| * Move/add window-buffer-related functions to window.el.Martin Rudalics2011-06-111-258/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * buffer.c: New Lisp objects Qbuffer_list_update_hook and Qclone_number. Remove external declaration of Qdelete_window. (Fbuffer_list): Rewrite doc-string. Minor restructuring of code. (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): Run Qbuffer_list_update_hook if allowed. (Fother_buffer): Rewrite doc-string. Major rewrite for new buffer list implementation. (other_buffer_safely): New function. (Fkill_buffer): Replace call to replace_buffer_in_all_windows by calls to replace_buffer_in_windows and replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook if allowed. (record_buffer): Inhibit quitting and rewrite using quittable functions. Run Qbuffer_list_update_hook if allowed. (Frecord_buffer, Funrecord_buffer): New functions. (switch_to_buffer_1, Fswitch_to_buffer): Remove. Move switch-to-buffer to window.el. (bury-buffer): Move to window.el. (Vbuffer_list_update_hook): New variable. * lisp.h (other_buffer_safely): Add prototype in buffer.c section. * window.h (resize_frame_windows): Move up in code. (Fwindow_frame): Remove EXFUN. (replace_buffer_in_all_windows): Remove prototype. (replace_buffer_in_windows_safely): Add prototype. * window.c: Declare Qdelete_window static again. Move down declaration of select_count. (Fnext_window, Fprevious_window): Rewrite doc-strings. (Fother_window): Move to window.el. (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case. (Fdelete_windows_on, Freplace_buffer_in_windows): Move to window.el. (replace_buffer_in_windows): Implement by calling Qreplace_buffer_in_windows. (replace_buffer_in_all_windows): Remove with some functionality moved into replace_buffer_in_windows_safely. (replace_buffer_in_windows_safely): New function. (select_window_norecord, select_frame_norecord): Move in front of run_window_configuration_change_hook. Remove now obsolete declarations. (Fset_window_buffer): Rewrite doc-string. Call Qrecord_window_buffer. (keys_of_window): Move binding for other-window to window.el. * loadup.el (top-level): Load window before files for the sake of replace-buffer-in-windows. * files.el (read-buffer-to-switch) (switch-to-buffer-other-window) (switch-to-buffer-other-frame, display-buffer-other-frame): Move to window.el. * simple.el (get-next-valid-buffer, last-buffer, next-buffer) (previous-buffer): Move to window.el. * bindings.el (unbury-buffer): Move to window.el. * window.el (delete-other-windows-vertically): Move after definition of delete-other-windows. (other-window, delete-windows-on, replace-buffer-in-windows): Move here from window.c. (record-window-buffer, unrecord-window-buffer) (set-window-buffer-start-and-point, switch-to-prev-buffer) (switch-to-next-buffer): New functions. (get-next-valid-buffer, last-buffer, next-buffer): Move here from simple.el. Call switch-to-next-buffer. (previous-buffer): Move here from simple.el. Call switch-to-prev-buffer. (bury-buffer): Move here from buffer.c. Switch to previous buffer when window cannot be deleted. (unbury-buffer): Move here from bindings.el. (ctl-x-map): Move binding for other-window from window.c to here. (read-buffer-to-switch, switch-to-buffer-other-window) (switch-to-buffer-other-frame): Move here from files.el. (normalize-buffer-to-switch-to): New functions. (switch-to-buffer): Move here from buffer.c. Use read-buffer-to-switch and normalize-buffer-to-switch-to.
* | Merge from trunk.Paul Eggert2011-06-101-1/+3
|\|
| * Move window resize code from window.c to window.el.Martin Rudalics2011-06-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * window.c: Remove declarations of Qwindow_size_fixed, window_min_size_1, window_min_size_2, window_min_size, size_window, window_fixed_size_p, enlarge_window, delete_window. Remove static from declaration of Qdelete_window, it's temporarily needed by Fbury_buffer. (replace_window): Don't assign orig_top_line and orig_total_lines. (Fdelete_window, delete_window): Remove. Window deletion is handled by window.el. (window_loop): Remove DELETE_OTHER_WINDOWS case. Replace Fdelete_window calls with calls to Qdelete_window. (Fdelete_other_windows): Remove. Deleting other windows is handled by window.el. (window_fixed_size_p): Remove. Fixed-sizeness of windows is handled in window.el. (window_min_size_2, window_min_size_1, window_min_size): Remove. Window minimum sizes are handled in window.el. (shrink_windows, size_window, set_window_height) (set_window_width, change_window_heights, window_height) (window_width, CURBEG, CURSIZE, enlarge_window) (adjust_window_trailing_edge, Fadjust_window_trailing_edge) (Fenlarge_window, Fshrink_window): Remove. Window resizing is handled in window.el. (make_dummy_parent): Rename to make_parent_window and give it a second argument horflag. (make_window): Don't set resize_proportionally any more. (Fsplit_window): Remove. Windows are split in window.el. (save_restore_action, save_restore_orig_size) (shrink_window_lowest_first, save_restore_orig_size): Remove. Resize mini windows in window.el. (grow_mini_window, shrink_mini_window): Implement by calling Qresize_root_window_vertically, resize_window_check and resize_window_apply. (saved_window, Fset_window_configuration, save_window_save): Do not handle orig_top_line, orig_total_lines, and resize_proportionally. (window_min_height, window_min_width): Move to window.el. (keys_of_window): Move bindings for delete-other-windows, split-window, delete-window and enlarge-window to window.el. * buffer.c: Temporarily extern Qdelete_window. (Fbury_buffer): Temporarily call Qdelete_window instead of Fdelete_window (Fbury_buffer will move to window.el soon). * frame.c (set_menu_bar_lines_1): Remove code handling orig_top_line and orig_total_lines. * dispnew.c (adjust_frame_glyphs_initially): Don't use set_window_height but set heights directly. (change_frame_size_1): Use resize_frame_windows. * xdisp.c (init_xdisp): Don't use set_window_height but set heights directly. * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Use resize_frame_windows instead of change_window_heights and run run_window_configuration_change_hook. * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows instead of change_window_heights and run run_window_configuration_change_hook. * window.el (window-min-height, window-min-width): Move here from window.c. Add defcustoms and rewrite doc-strings. (resize-mini-window, resize-window): New functions. (adjust-window-trailing-edge, enlarge-window, shrink-window): Move here from window.c. (maximize-window, minimize-window): New functions. (delete-window, delete-other-windows, split-window): Move here from window.c. (window-split-min-size): New function. (split-window-keep-point): Mention split-window-above-each-other instead of split-window-vertically. (split-window-above-each-other, split-window-vertically): Rename split-window-vertically to split-window-above-each-other and provide defalias for old definition. (split-window-side-by-side, split-window-horizontally): Rename split-window-horizontally to split-window-side-by-side and provide defalias for the old definition. (ctl-x-map): Move bindings for delete-window, delete-other-windows and enlarge-window here from window.c. Replace bindings for split-window-vertically and split-window-horizontally by bindings for split-window-above-each-other and split-window-side-by-side. * cus-start.el (all): Remove entries for window-min-height and window-min-width. Add entries for window-splits and window-nest.
* | * buffer.c (advance_to_char_boundary): Return EMACS_INT, not int.Paul Eggert2011-06-081-1/+1
| |
* | * buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.Paul Eggert2011-06-081-3/+3
|/
* [ChangeLog]Paul Eggert2011-05-301-3/+3
| | | | | | | | | | | | | | Malloc failure behavior now depends on size of allocation. * lib/allocator.h (struct allocator.die): New size arg. * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function. If the actual problem is an ssize_t limitation, not a size_t or malloc failure, fail with errno == ENAMETOOLONG instead of calling 'die'. [src/ChangeLog] Malloc failure behavior now depends on size of allocation. * alloc.c (buffer_memory_full, memory_full): New arg NBYTES. * lisp.h: Change signatures accordingly. * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c: All callers changed.
* * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing changePaul Eggert2011-04-271-1/+1
|
* Merge from mainline.Paul Eggert2011-04-251-1/+2
|\
| * Merge from emacs-23; up to 2010-06-09T17:54:28Z!albinus@detlef.Glenn Morris2011-04-221-1/+2
| |\
| | * * src/buffer.c (syms_of_buffer): Doc fix (Bug#6902).Chong Yidong2011-04-101-1/+2
| | |
| | * Backport fix for Bug#8219 from trunk.Chong Yidong2011-03-191-105/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). These macros can no longer be used for assignment. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign struct members directly, instead of using BUF_BEGV etc. (record_buffer_markers, fetch_buffer_markers): New functions for recording and fetching special buffer markers. (set_buffer_internal_1, set_buffer_temp): Use them. * lread.c (unreadchar): Use SET_BUF_PT_BOTH. * insdel.c (adjust_point): Use SET_BUF_PT_BOTH. * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH. (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH. * xdisp.c (hscroll_window_tree): (reconsider_clip_changes): Use PT instead of BUF_PT.
| | * Fix typos.Juanma Barranquero2011-02-231-1/+1
| | |
* | | * lisp.h: (XVECTOR_SIZE): Remove. All uses replaced with ASIZE.Paul Eggert2011-04-251-1/+1
| | | | | | | | | | | | | | | (ASIZE): Now contains previous implementation of XVECTOR_SIZE instead of invoking XVECTOR_SIZE.
* | | Fix minor typos in previous change.Paul Eggert2011-04-251-1/+1
| | |
* | | lisp.h: Fix a problem with aliasing and vector headers.Paul Eggert2011-04-251-9/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.6.0 optimizes based on type-based alias analysis. For example, if b is of type struct buffer * and v of type struct Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size != &v->size, and therefore "v->size = 1; b->size = 2; return v->size;" must therefore return 1. This assumption is incorrect for Emacs, since it type-puns struct Lisp_Vector * with many other types. To fix this problem, this patch adds a new type struct vector_header that documents the constraints on layout of vectors and pseudovectors, and helps optimizing compilers not get fooled by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons. * lisp.h (XVECTOR_SIZE): New convenience macro. All previous uses of XVECTOR (foo)->size replaced to use this macro, to avoid the hassle of writing XVECTOR (foo)->header.size. (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR. (XSETTYPED_PVECTYPE): New macro, specifying the name of the size member. (XSETPVECTYPE): Rewrite in terms of new macro. (XSETPVECTYPESIZE): New macro, specifying both type and size. This is a bit clearer, and further avoids the possibility of undesirable aliasing. (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size. (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XVECTOR_HEADER_SIZE. (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE, since Lisp_Subr is a special case (no "next" field). (ASIZE): Rewrite in terms of XVECTOR_SIZE. (struct vector_header): New type. (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the object, to help avoid aliasing. (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP. (SUBRP): Likewise, since Lisp_Subr is a special case. * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table): (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector): (struct Lisp_Hash_Table): Combine first two members into a single struct vector_header member. All uses of "size" and "next" members changed to be "header.size" and "header.next". * buffer.h (struct buffer): Likewise. * font.h (struct font_spec, struct font_entity, struct font): Likewise. * frame.h (struct frame): Likewise. * process.h (struct Lisp_Process): Likewise. * termhooks.h (struct terminal): Likewise. * window.c (struct save_window_data, struct saved_window): Likewise. * window.h (struct window): Likewise. * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector): Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems. * buffer.c (init_buffer_once): Likewise. * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a special case. * process.c (Fformat_network_address): Use local var for size, for brevity.
* | * lisp.h (INFUN): Remove. Suggested by Dan Nicolaescu inPaul Eggert2011-04-141-2/+2
| | | | | | | | | | <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00393.html>. All uses spelled out.
* | Undo the DEFUN->DEFUE change.Paul Eggert2011-04-131-23/+23
| |
* | * buffer.c (buffer_count): Remove unused var.Paul Eggert2011-04-101-3/+0
| |
* | Declare Lisp_Object Q* variables to be 'static' if not exproted.Paul Eggert2011-04-101-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier for human readers (and static analyzers) to see whether these variables are used from other modules. * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c: * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c: * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c: * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c: * lread.c, macros.c, minibuf.c, print.c, process.c, search.c: * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c: * xmenu.c, xselect.c: Declare Q* vars static if they are not used in other modules. * ccl.h, character.h, charset.h, coding.h, composite.h, font.h: * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h: Remove decls of unexported vars. * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
* | Make Emacs functions such as Fatom 'static' by default.Paul Eggert2011-04-101-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * buffer.c (Fprevious_overlay_change): Remove var that is setPaul Eggert2011-04-021-3/+2
| | | | | | | | but not used.
* | Merge from trunkStefan Monnier2011-03-311-4/+3
|\ \
| * | src/*.c: Remove unused function parameters.Juanma Barranquero2011-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | * buffer.c (defvar_per_buffer): Remove unused parameter `doc'. (DEFVAR_PER_BUFFER): Don't pass it. * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'. (scrolling_window): Don't pass it.
| * | Use Frun_hooks rather than calling Vrun_hooks manuallyJulien Danjou2011-03-231-2/+1
| | |