Jan D [Wed, 7 Jul 2010 17:39:49 +0000 (19:39 +0200)]
If kbd_buffer is becoming full, stop reading until it drains (Bug#6571).
* keyboard.c (input_available_signal): Declare.
(kbd_buffer_nr_stored): New function.
(kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
(kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
(tty_read_avail_input): If input is on hold, return.
Don't read more that free slots in kbd_buffer (Bug#6571).
* process.c (kbd_is_on_hold): New variable.
(hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p): New
functions.
(wait_reading_process_output): If kbd_on_hold_p returns non-zero,
select on empty input mask.
(init_process): Initialize kbd_is_on_hold to 0.
* ispell.el (ispell-alternate-dictionary): Use file-readable-p.
Return nil if no word-list is found at default locations.
(ispell-complete-word-dict): Default to nil.
(ispell-command-loop): Use 'word-list' when using lookup-words.
(lookup-words): Use ispell-complete-word-dict or
ispell-alternate-dictionary. Check for word-list availability
and handle errors if needed with better messages (Bug#6539).
(ispell-complete-word): Use ispell-complete-word-dict or
ispell-alternate-dictionary.
Minor zone.el fixes for bug#6483.
Zone did not like the intangible newlines etc in the gomoku buffer.
* lisp/play/zone.el (top-level): Do not require timer, tabify, or cl.
(zone-shift-left): Ignore intangibility, and any errors from forward-char.
(zone-shift-right): Remove no-op end-of-line. Ignore intangibility.
(zone-pgm-putz-with-case): Use upcase-region rather than inserting,
deleting, and copying text properties.
(zone-line-specs, zone-pgm-stress): Check forward-line exit status.
(zone-pgm-rotate): Handle odd buffers like that of gomoku, where getting
to point-max is hard.
(zone-fret, zone-fill-out-screen): Replace cl's do with dotimes.
(zone-fill-out-screen): Ignore intangibility.
Dan Nicolaescu [Wed, 7 Jul 2010 02:49:37 +0000 (19:49 -0700)]
Make the function member of Lisp_Subr use standard C prototypes.
* src/lisp.h (struct Lisp_Subr): Use a union for the function member.
(DECL_ALIGN): Add a cast for the function.
* src/eval.c (Feval, Ffuncall): Use the proper type for each type
function call.
Dan Nicolaescu [Mon, 5 Jul 2010 16:29:35 +0000 (09:29 -0700)]
Convert function definitions and declarations to standard C.
* src/vm-limit.c (memory_warnings):
* src/keyboard.c (modify_event_symbol):
* src/floatfns.c (rounding_driver, ceiling2, floor2, truncate2)
(round2, emacs_rint):
* src/process.c (send_process, old_sigpipe): Convert function
definitions and declarations to standard C.
Jan D [Mon, 5 Jul 2010 09:17:12 +0000 (11:17 +0200)]
Fix some bad prototypes and formatting after conversion from K&R declaration.
* lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit.
(fill_xft_data, set_text): Remove unused variable screen.
(draw_text): Cast bp to FcChar8*.
(find_xft_data): Return 0 if inst or xft_data is not set.
(wm_delete_window): Correct prototype. Initialize widget to 0
and return if widget is still 0 after loop.
* src/xsmfns.c (SSDATA): New macro.
(smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
passed to strlen/strcpy/strcat.
(create_client_leader_window): Surround with #ifndef USE_GTK. Cast
7:th arg to XChangeProperty to (unsigned char *)
* 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.
* 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".
Michael Albinus [Sun, 4 Jul 2010 09:52:57 +0000 (11:52 +0200)]
* net/dbus.el: Implement signal "PropertiesChanged" (from D-Bus 1.3.1).
(dbus-register-property): New optional argument EMITS-SIGNAL.
(dbus-property-handler): Send signal "PropertiesChanged" if requested.
Dan Nicolaescu [Sun, 4 Jul 2010 05:47:55 +0000 (22:47 -0700)]
Convert function definitions in lwlib files to standard C.
* lwlib/lwlib-Xaw.c: Convert function definitions to standard C.
* lwlib/lwlib-Xlw.c:
* lwlib/lwlib-utils.c:
* lwlib/lwlib.c:
* lwlib/lwlib.h:
* lwlib/xlwmenu.c: Likewise.
Eli Zaretskii [Sat, 3 Jul 2010 14:42:02 +0000 (17:42 +0300)]
Fix menu bar and colors 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. 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.
Eli Zaretskii [Sat, 3 Jul 2010 14:36:18 +0000 (17:36 +0300)]
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.
* 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.
Simplify mouse-dragging implementation.
Now that DEL deletes active regions, we can handle it by using the
ordinary region instead of a separate overlay.
* mouse.el (mouse-drag-overlay): Variable deleted.
(mouse-move-drag-overlay, mouse-show-mark): Functions deleted.
(mouse--remap-link-click-p): New function.
(mouse-drag-track): Handle dragging by using temporary Transient
Mark mode, instead of a special overlay.
(mouse-kill-ring-save, mouse-save-then-kill): Don't call
mouse-show-mark.
Dan Nicolaescu [Sat, 3 Jul 2010 00:50:23 +0000 (17:50 -0700)]
Convert function definitions to standard C.
* lib-src/update-game-score.c: Convert function definitions to standard C.
* lib-src/sorted-doc.c:
* lib-src/profile.c:
* lib-src/pop.c:
* lib-src/movemail.c:
* lib-src/make-docfile.c:
* lib-src/hexl.c:
* lib-src/fakemail.c:
* lib-src/etags.c:
* lib-src/ebrowse.c:
* lib-src/digest-doc.c:
* lib-src/b2m.c: Likewise.
Juri Linkov [Fri, 2 Jul 2010 22:28:52 +0000 (01:28 +0300)]
* lisp/faces.el (read-face-name): Rename arg `string-describing-default'
to `default'. Doc fix. Display the default value in quotes
in the prompt. With empty input, return the `default' arg,
unless the default value is a string (in which case return nil).
(describe-face): Replace the string `default' arg of `read-face-name'
with the symbol `default'.
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg01109.html
Dan Nicolaescu [Fri, 2 Jul 2010 22:18:28 +0000 (15:18 -0700)]
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.
Dan Nicolaescu [Fri, 2 Jul 2010 08:11:24 +0000 (01:11 -0700)]
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.
Dan Nicolaescu [Fri, 2 Jul 2010 07:05:09 +0000 (00:05 -0700)]
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-01 Mark A. Hershberger <mah@everybody.org>
* url-http.el (url-http-create-request): Add a CRLF on the end so
that POSTs with content to https urls work. See
<https://bugs.launchpad.net/mediawiki-el/+bug/540759>
Prior to this, the following request would not terminate:
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.
Chong Yidong [Wed, 30 Jun 2010 22:43:52 +0000 (18:43 -0400)]
Don't always set ruler-mode-header-line-format-old (Bug#5370).
* ruler-mode.el (ruler--save-header-line-format): New fun.
(ruler-mode): Use it as a setter function, so as not to overwrite
ruler-mode-header-line-format-old if Ruler mode is on (Bug#5370).
Dan Nicolaescu [Wed, 30 Jun 2010 05:51:07 +0000 (22:51 -0700)]
Fix CFLAGS for non-GCC compilers.
* configure.in (CFLAGS): Always use -g like it was done before the
2010-03-30 change.
(REAL_CFLAGS): Use CFLAGS for non-GCC to get optimization flags. (Bug#6538)
Glenn Morris [Wed, 30 Jun 2010 02:48:54 +0000 (19:48 -0700)]
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.
Chong Yidong [Tue, 29 Jun 2010 18:17:31 +0000 (14:17 -0400)]
Allow global VC ops like `C-x v D' in Diff and Log-View buffers.
* vc/diff-mode.el (diff-vc-backend): New var.
* vc/vc.el (vc-deduce-backend): New fun. Handle diff buffers.
(vc-root-diff, vc-print-root-log, vc-log-incoming)
(vc-log-outgoing): Use it.
(vc-diff-internal): Set diff-vc-backend.
Jan D [Mon, 28 Jun 2010 10:11:26 +0000 (12:11 +0200)]
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.
* 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.
Chong Yidong [Sun, 27 Jun 2010 00:30:52 +0000 (20:30 -0400)]
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/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.