1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 15:21:51 -08:00
Commit graph

29220 commits

Author SHA1 Message Date
Juanma Barranquero
e6cb2cbb4a * strftime.c: Revert conversion to standard C (2010-07-04T07:50:25Z!dann@ics.uci.edu). 2010-07-04 22:42:36 +02:00
Juanma Barranquero
b950307853 * unexelf.c (round_up, find_section): Use ElfW macro for arguments. 2010-07-04 18:07:11 +02:00
Juanma Barranquero
dcc7404b4e * print.c (strout): Use const char* for arg PTR. 2010-07-04 16:40:41 +02:00
Juanma Barranquero
b8ce688b11 Fix comments and whitespace. 2010-07-04 15:51:05 +02:00
Juanma Barranquero
e5447b22e9 Fix more prototypes.
* atimer.c (start_atimer): Use EMACS_TIME, not struct timeval.
* sysdep.c (set_file_times): Use EMACS_TIME, not struct timeval.
* xgselect.c (xg_select): Use SELECT_TYPE, EMACS_TIME.
2010-07-04 15:41:55 +02:00
Juanma Barranquero
438105ed4d Fix prototypes.
* dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
* fileio.c (read_non_regular, read_non_regular_quit): Pass Lisp_Object,
  as required by internal_condition_case_1.
* regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
  (analyse_first): Fix "const const".
2010-07-04 13:51:28 +02:00
Dan Nicolaescu
971de7fb15 Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
2010-07-04 00:50:25 -07:00
Eli Zaretskii
76ea4cc96b Fix setting colors on MS-DOS frames.
msdos.c (IT_set_frame_parameters): Fix setting of colors in
 frames other than the initial one.  Fix reversal of colors when
 `reverse' is specified in the frame parameters.  Call
 update_face_from_frame_parameter instead of
 internal-set-lisp-face-attribute.  Initialize screen colors from
 initial_screen_colors[] when f->default_face_done_p is zero,
 instead of depending on being called with default-frame-alist as
 the alist argument.
 xfaces.c (update_face_from_frame_parameter): Move out of
 HAVE_WINDOW_SYSTEM portion.  Condition window-system only parts
 with HAVE_WINDOW_SYSTEM.
2010-07-03 17:36:18 +03:00
Eli Zaretskii
1e6255ae88 Fix menu bar display on MS-DOS.
msdos.c (IT_set_frame_parameters): Set menu-bar-lines according
 to menu-bar-mode, if not set in the frame parameters or in
 default-frame-alist.
2010-07-03 14:54:21 +03:00
Eli Zaretskii
ae492bec16 w32console.c (sys_tputs): Adjust argument list to prototype in term.c. 2010-07-03 10:49:55 +03:00
Juanma Barranquero
3a35a84c93 Fix prototypes.
* src/cm.c (evalcost): Fix arg type.
* src/cm.h (evalcost): Fix prototype.
* src/lisp.h (memory_warnings): Fix prototype.

* lib-src/ebrowse.c (match_qualified_namespace_alias):
  Pass sym* to find_namespace, not link*.
* lib-src/emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
* lib-src/sorted-doc.c (qsort_compare): New typedef.
  (main): Use it to cast cmpdoc.
2010-07-03 09:44:17 +02:00
Dan Nicolaescu
c532d34963 Convert some prototypes to standard C.
* lib-src/make-docfile.c (xmalloc, xrealloc, concat, readline, fatal):
* lib-src/b2m.c (scan_file, scan_lisp_file, scan_c_file): Convert to
standard C prototypes.

* src/term.c (term_clear_mouse_face, Fidentity):
* src/syssignal.h (signal_handler_t):
* src/lisp.h (memory_warnings):
* src/coding.h (preferred_coding_system):
* src/cm.h (evalcost):
* src/blockinput.h (reinvoke_input_signal): Convert to standard C prototypes.
2010-07-02 15:18:28 -07:00
Eli Zaretskii
4f15a37091 Fix MS-DOS build due to removal of P_.
msdos.h (load_pixmap): Don't define away.
2010-07-02 16:10:00 +03:00
Eli Zaretskii
c0b36d462b Fix the MS-DOS build due to removal of P_.
dosfns.h (msdos_stdcolor_idx, msdos_stdcolor_name): Remove P_
 from prototypes.
 msdos.h (load_pixmap): Don't define away.
2010-07-02 16:05:59 +03:00
Jan D
9e892c8d8b Remove __P. 2010-07-02 14:55:51 +02:00
Jan D
f57e2426f0 Remove __P and P_ from .c and .m files and definition of P_
* lisp.h:
* atimer.h: Remove define for P_.

* alloc.c: Remove __P and P_ from .c and .m files.
* atimer.c:
* buffer.c:
* callint.c:
* category.c:
* charset.c:
* chartab.c:
* cm.c:
* coding.c:
* composite.c:
* data.c:
* dired.c:
* dispnew.c:
* doc.c:
* editfns.c:
* emacs.c:
* eval.c:
* fileio.c:
* filelock.c:
* fns.c:
* font.c:
* fontset.c:
* frame.c:
* ftfont.c:
* ftxfont.c:
* gmalloc.c:
* gtkutil.c:
* image.c:
* indent.c:
* intervals.c:
* keyboard.c:
* keymap.c:
* lread.c:
* marker.c:
* menu.c:
* minibuf.c:
* print.c:
* process.c:
* scroll.c:
* search.c:
* sound.c:
* strftime.c:
* syntax.c:
* sysdep.c:
* term.c:
* terminal.c:
* textprop.c:
* unexalpha.c:
* w32console.c:
* w32fns.c:
* w32font.c:
* w32menu.c:
* w32term.c:
* w32uniscribe.c:
* window.c:
* xdisp.c:
* xfaces.c:
* xfns.c:
* xfont.c:
* xftfont.c:
* xmenu.c:
* xselect.c:
* xterm.c: Likewise.

* ebrowse.c: Remove P_ and __P.
* etags.c:
* movemail.c:
* pop.c:
* update-game-score.c: Likewise.
2010-07-02 14:19:53 +02:00
Jan D
383e09700c Remove P_ and __P macros.
* lwlib/lwlib-Xaw.h: Remove P_ and __P macros.
* lwlib/lwlib-Xlw.h:
* lwlib/lwlib-Xm.h:
* lwlib/lwlib-int.h:
* lwlib/lwlib-utils.h:
* lwlib/lwlib.h: Likewise.

* src/buffer.h: Remove P_ and __P macros.
* src/category.h:
* src/ccl.h:
* src/character.h:
* src/charset.h:
* src/cm.h:
* src/coding.h:
* src/composite.h:
* src/dispextern.h:
* src/disptab.h:
* src/font.h:
* src/fontset.h:
* src/frame.h:
* src/gtkutil.h:
* src/indent.h:
* src/intervals.h:
* src/keyboard.h:
* src/keymap.h:
* src/lisp.h:
* src/macros.h:
* src/md5.h:
* src/menu.h:
* src/msdos.h:
* src/nsterm.h:
* src/puresize.h:
* src/region-cache.h:
* src/syntax.h:
* src/syssignal.h:
* src/systime.h:
* src/termhooks.h:
* src/w32term.h:
* src/widget.h:
* src/window.h:
* src/xgselect.h:
* src/xsettings.h:
* src/xterm.h: Likewise.
2010-07-02 11:26:33 +02:00
Dan Nicolaescu
d9170db520 Define USE_LISP_UNION_TYPE using autoconf.
* configure.in (--enable-use-lisp-union-type): New flag.
* src/lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
2010-07-02 01:11:24 -07:00
Dan Nicolaescu
986011195e Cleanup old code.
* src/dired.c (BSD4_3): Remove all uses, redundant with BSD4_2.
* src/syssignal.h: Remove code for Lynx, not supported anymore.
* src/vm-limit.c: Remove unused code the depends on emacs not being
defined and NO_LIM_DATA being defined.
* src/mem-limits.h: Remove dead code.
2010-07-02 00:05:09 -07:00
Jan D
c49d071ad0 * window.c (Fwindow_absolute_pixel_edges): Doc fix. 2010-07-01 20:09:28 +02:00
Jan D
9d5405ec3c New functions that return window edges with absolute coords (bug#5721).
* window.c (calc_absolute_offset, Fwindow_absolute_pixel_edges)
(Fwindow_inside_absolute_pixel_edges): New functions (bug#5721).
2010-07-01 14:34:40 +02:00
Jan D
7a18115b47 * nsfns.m (compute_tip_xy): Do not convert coordinates from frame parameters. 2010-07-01 14:20:14 +02:00
Jan D
581a81003c Rename FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT to aid common code.
* nsmenu.m (update_frame_tool_bar, free_frame_tool_bar): Update
FRAME_TOOLBAR_HEIGHT.

* nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGH

* nsterm.m (x_set_window_size, initFrameFromEmacs): Renamed
FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT.
2010-07-01 14:16:33 +02:00
Jan D
1f984e12b4 * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Add
BLOCK/UNBLOCK_INPUT so asserts don't trigger.
2010-07-01 12:45:26 +02:00
Chong Yidong
c1ef4455ea Fix application of default-frame-alist (Bug#5378).
* lisp/frame.el (make-frame): Add default-frame-alist to the PARAMETERS
argument passed to frame-creation-function (Bug#5378).

* lisp/faces.el (x-handle-named-frame-geometry)
(x-handle-reverse-video, x-create-frame-with-faces)
(face-set-after-frame-default, tty-create-frame-with-faces): Don't
separately consult default-frame-alist.  It is now passed as the
PARAMETER argument.

* src/frame.c (get_future_frame_param, Fmake_terminal_frame): Don't
check default-frame-alist.
2010-06-30 20:14:17 -04:00
Juanma Barranquero
acd0102aa4 Fix whitespace in ChangeLogs. 2010-07-01 02:08:29 +02:00
Andreas Schwab
ce8f5a9a47 Avoid erroneous syscalls
* process.c (create_process): Avoid using invalid file descriptors.

* callproc.c (child_setup): Avoid closing a file descriptor twice.
2010-07-01 01:07:11 +02:00
Andreas Schwab
2b7e356a10 Fix typo 2010-07-01 01:07:00 +02:00
Jan D
bf93533944 Improve doc for system font things. Return font regardless of use_system_font.
* xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
Improve documentation.  Return font regardless of use_system_font.
(syms_of_xsettings): Improve documentation for font-use-system-font.
2010-06-30 13:16:01 +02:00
Kenichi Handa
769e9d470d Check FC_DUAL too. For such fonts, check width one by one. 2010-06-30 15:55:41 +09:00
Glenn Morris
f4981b7e31 Fix some whitespace in previous. 2010-06-29 21:29:49 -07:00
Glenn Morris
a46007e939 * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM):
Set with AC_DEFINE rather than AH_BOTTOM.

* src/s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now.

* admin/CPP-DEFINES: Remove INHIBIT_X11R6_XIM.

* configure, src/config.in: Regenerate.
2010-06-29 20:43:30 -07:00
Glenn Morris
e7586c7a67 Remove last internal use of cpp and src/{m,s}/*.h files in configure.in.
* configure.in (CFLAGS, REAL_CFLAGS): Set with shell, not cpp.
* configure, src/config.in: Regenerate.
2010-06-29 19:55:15 -07:00
Glenn Morris
6259c2ec7a Remove some cpp that is internal to configure.in.
* configure.in (C_OPTIMIZE_SWITCH, CANNOT_DUMP, SYSTEM_MALLOC):
(USE_MMAP_FOR_BUFFERS, C_WARNING_SWITCH): Set with shell, not cpp.
(LIBX): Remove, just use -lX11 in the one place this was used.
(cannot_dump): Replace with CANNOT_DUMP.

* src/Makefile.in (CANNOT_DUMP): Update for configure name change.

* src/s/freebsd.h (USE_MMAP_FOR_BUFFERS):
* src/s/irix6-5.h (USE_MMAP_FOR_BUFFERS):
* src/s/darwin.h (SYSTEM_MALLOC):
* src/s/sol2-10.h (SYSTEM_MALLOC): Move to configure.

* src/m/alpha.h: Remove old comment.
* src/s/aix4-2.h: Update comment.
* src/s/template.h: Remove USE_MMAP_FOR_BUFFERS.

* msdos/sed1v2.inp (CANNOT_DUMP): Update for configure name change.

* admin/CPP-DEFINES: Remove USE_MMAP_FOR_BUFFERS, CANNOT_DUMP.

* etc/DEBUG: Update SYSTEM_MALLOC and CANNOT_DUMP references.
Some re-filling.
2010-06-29 19:48:54 -07:00
Jan D
5d1d3d0461 Fix some compilation errors in nsfns.c
* nsfns.m: extern declare Vmenu_bar_mode, Vtool_bar_mode.
(ns_get_screen): Don't assign integer to f.
(Fx_display_color_cells): Declarations before statements.
2010-06-29 11:49:20 +02:00
Jan D
5fc8e5bc7c xfns.c (x_default_font_parameter): Remove got_from_system (Bug#6526). 2010-06-28 14:46:39 +02:00
Jan D
e547b05103 Use non-deprecated Gtk+ functions, add changes for Gtk+3 with GSEAL_ENABLE.
* configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY,
check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied
by minimum required Gtk+ 2.6).  Add checks for functions introduced
in Gtk+ 2.14 or newer.

* xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
(gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New
defines based on what configure finds.

* xterm.c (XTflash): Use gtk_widget_get_window.
(xg_scroll_callback): Use gtk_adjustment_get_upper and
gtk_adjustment_get_page_size.
(handle_one_xevent): Use gtk_widget_get_mapped.
(x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error
messages.

* xmenu.c (create_and_show_popup_menu): Call gtk_widget_get_mapped.

* gtkutil.h: Replace HAVE_GTK_FILE_BOTH with
HAVE_GTK_FILE_SELECTION_NEW.

* gtkutil.c (xg_display_open, xg_display_close): Remove
HAVE_GTK_MULTIDISPLAY, it is always defined.
(xg_display_open): Return type is void.
(gtk_widget_set_has_window)
(gtk_dialog_get_action_area, gtk_dialog_get_content_area)
(gtk_widget_get_sensitive, gtk_adjustment_set_page_size)
(gtk_adjustment_set_page_increment)
(gtk_adjustment_get_step_increment): #define these if not found
by configure.
(remove_submenu): New define based on Gtk+ version.
(xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar): Use
gtk_widget_get_window.
(xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped.
(xg_create_frame_widgets): Use gtk_widget_set_has_window.
(create_dialog): Use gtk_dialog_get_action_area and
gtk_dialog_get_content_area.
(xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH
and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW.  File chooser is always
available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough.
(xg_update_menubar, xg_update_submenu, xg_show_toolbar_item): Use
g_object_ref and g_object_unref.
(xg_update_menu_item, xg_tool_bar_menu_proxy): Use
gtk_widget_get_sensitive.
(xg_update_submenu): Use remove_submenu.
(xg_update_scrollbar_pos): Don't use GtkFixedChild, use child
properties instead to get old x and y position.
(xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size,
gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size,
gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment.
(xg_get_tool_bar_widgets): New function.
(xg_tool_bar_menu_proxy, xg_show_toolbar_item)
(update_frame_tool_bar): Call xg_get_tool_bar_widgets.
(toolbar_set_orientation): New #define based on if configure
finds gtk_orientable_set_orientation.
(xg_create_tool_bar): Call toolbar_set_orientation.
(xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start
instead of gtk_box_pack_start_defaults.
2010-06-28 12:11:26 +02:00
Chong Yidong
b922967396 * bindings.el (global-map): Bind delete and DEL, the former to
delete-forward-char.

* mouse.el (mouse-region-delete-keys): Deleted.
(mouse-show-mark): Simplify.

* simple.el (delete-active-region): New option.
(delete-backward-char): Implement in Lisp.
(delete-forward-char): New command.

* src/cmds.c (Fdelete_backward_char): Move into Lisp.
2010-06-27 21:01:11 -04:00
Dan Nicolaescu
bbc803b0bc * src/s/freebsd.h (BSD4_2): Remove redundant definition.
bsd-common.h defines it already.
2010-06-27 14:28:51 -07:00
Chong Yidong
6431f2e619 Change default-frame-alist and menu/tool-bar-mode interaction (Bug#2249).
Don't add entries for `menu-bar-lines' and `tool-bar-lines' to
`default-frame-alist' and `initial-frame-alist' at startup.
Instead, use X resources to update the `menu-bar-mode' and
`tool-bar-mode' variables at startup, and use them as defaults during
frame creation.

* lisp/frame.el (frame-notice-user-settings): Don't change
default-frame-alist based on menu-bar-mode and tool-bar-mode, or
vice versa.

* lisp/menu-bar.el (menu-bar-mode):
* lisp/tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
Set init-value to t.

* lisp/startup.el (command-line): Use X resources to set the value of
menu-bar-mode and tool-bar-mode, before calling frame-initialize.

* src/frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.

* src/w32fns.c (Fx_create_frame):
* src/nsfns.m (Fx_create_frame): Likewise.

* src/xfns.c (Fx_create_frame): Don't consult X resouces when setting
menu-bar-lines and tool-bar-lines.  Use menu-bar-mode and
tool-bar-mode, which are now set using these X resources at
startup, to determine the defaults.
2010-06-26 20:30:52 -04:00
Chong Yidong
fac580ebfa Revert last change. 2010-06-25 15:32:37 -04:00
Chong Yidong
a9fdbaae1a Change initial-frame-alist and default-frame-alist defaults (Bug#2249).
Since the menu-bar and tool-bar are now unconditionally turned on by
default, we can let the defcustom defaults reflect that.

* frame.el (initial-frame-alist): Give default value entries for
menu-bar-lines and tool-bar-lines consistent with the startup
default (Bug#2249).

* frame.c (Vdefault_frame_alist): Give default value entries for
menu-bar-lines and tool-bar-lines consistent with the startup
default (Bug#2249).
2010-06-25 15:24:05 -04:00
Juanma Barranquero
8c079ebbd2 src/gtkutil.c (xg_update_scrollbar_pos): Avoid C99 mid-block variable declaration. 2010-06-24 18:08:22 +02:00
Jan Djärv
bc869eca8c Hide scroll bar when window is too small to avoid Gtk+ warning.
* gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
if height is less than scroll bar min size.
(xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.

* gtkutil.h (xg_show_scroll_bar): : Remove.

* xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
2010-06-22 14:28:08 +02:00
Jan Djärv
e9b7ab963b Don't use font names from GConf if font backend can't handle it (bug#6478).
* xfns.c (x_default_font_parameter): Try to open font from system
before using it (bug#6478).  Rename got_from_gconf to got_from_system.
2010-06-22 09:55:08 +02:00
Jan Djärv
32a679fd52 * font.c (font_parse_fcname): Allow . for sizes like 7.5 (bug#6437). 2010-06-22 08:42:00 +02:00
Eli Zaretskii
70c4cfbb3b Avoid recentering when lines differ in their height.
xdisp.c (try_scrolling): When scroll-conservatively is set to
 most-positive-fixnum, be extra accurate when scrolling window
 start, to avoid missing the cursor line.
2010-06-20 21:04:30 +03:00
Eli Zaretskii
d4aaac0f37 xdisp.c (try_scrolling): Fix last change. 2010-06-19 14:57:19 +03:00
Eli Zaretskii
ad5a12b51b Fix occasional recentering under scroll-conservatively.
xdisp.c (try_scrolling): Compute the limit for searching point
 in forward scroll from scroll_max, instead of an arbitrary limit
 of 10 screen lines.  See
 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html and
 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html for
 details.
2010-06-19 12:40:15 +03:00
Stefan Monnier
2a64315a11 Merge from emacs-23 2010-06-16 16:08:41 -04:00