Eli Zaretskii [Fri, 20 Aug 2010 19:45:24 +0000 (22:45 +0300)]
Fix version string in top-level MSDOS Makefile.
msods/mainmake.v2 (version): Update due to change in emacs.c.
src/emacs.c <emacs_version>: Add a comment regarding msdos/mainmake.v2's
dependency on the syntax of this declaration.
Eli Zaretskii [Fri, 13 Aug 2010 10:29:48 +0000 (13:29 +0300)]
Fix fallout from 2010-07-29T03:25:08Z!dann@ics.uci.edu, remove dead code in unexcoff.c.
unexcoff.c: Remove the parts used when "emacs" is not defined.
(report_error, report_error_1): Ditto.
(write_segment): Remove "#if 0" unused code.
(make_hdr): Remove code that was "#ifndef NO_REMAP" before
NO_REMAP was removed (in 2010-07-29T03:25:08Z!dann@ics.uci.edu).
(start_of_text): Remove unused function (was used only if NO_REMAP
was NOT defined).
Stefan Monnier [Thu, 12 Aug 2010 14:44:16 +0000 (16:44 +0200)]
Introduce a new comment style "c" flag.
* src/syntax.c (SYNTAX_FLAGS_COMMENT_STYLEB)
(SYNTAX_FLAGS_COMMENT_STYLEC): New macros.
(SYNTAX_FLAGS_COMMENT_STYLE): Use them, add an argument.
(syntax_prefix_flag_p): New function.
(Fstring_to_syntax): Understand new "c" flag.
(Finternal_describe_syntax_value): Recognize new flag; use the
SYNTAX_FLAGS_* macros.
(scan_sexps_forward, Fparse_partial_sexp): Change representation of
comment style to accomodate the new styles.
(back_comment, forw_comment, Fforward_comment, scan_lists)
(scan_sexps_forward): Update code to obey the new comment style flag.
* src/syntax.h: Move SYNTAX_FLAGS_FOO() macros to syntax.c.
* src/casefiddle.c (casify_region): Use the new syntax_prefix_flag_p.
* lisp/progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c"
comment style.
* lisp/progmodes/scheme.el (scheme-mode-syntax-table):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-syntax-table): Remove spurious
"b" flag in "14b" syntax.
Stefan Monnier [Thu, 12 Aug 2010 12:46:24 +0000 (14:46 +0200)]
Fix last change.
* lisp/progmodes/octave-mod.el (octave-mode-syntax-table):
Better describe the problem.
(octave-fill-paragraph): Also update caller.
(octave-completion-at-point-function): Fix up typo.
Stefan Monnier [Thu, 12 Aug 2010 11:22:16 +0000 (13:22 +0200)]
Misc code cleanup of octave-mode.el.
* lisp/progmodes/octave-mod.el (octave-mode-map): Remove special bindings
for (un)commenting the region and performing completion.
(octave-mode-menu): Use standard commands for help and completion.
(octave-mode-syntax-table): Support %{..%} comments (sort of).
(octave-mode): Use define-derived-mode.
Set completion-at-point-functions and don't set columns.
Don't disable adaptive-fill-regexp.
(octave-describe-major-mode, octave-comment-region)
(octave-uncomment-region, octave-comment-indent)
(octave-indent-for-comment): Remove.
(octave-indent-calculate): Rename from calculate-octave-indent.
(octave-indent-line): Update caller.
(octave-initialize-completions): No need to make an alist.
(octave-completion-at-point-function): New function.
(octave-complete-symbol): Use it.
(octave-insert-defun): Use define-skeleton.
Jan D [Wed, 11 Aug 2010 12:34:46 +0000 (14:34 +0200)]
Fix -Wwrite_strings in general and for Gtk+ specific code.
* callproc.c (synch_process_death): Make const.
(Fcall_process): Make signame const.
* emacs.c (main): Pass char[] to putenv instead of literal.
* floatfns.c (matherr): Use a const char* variable for x->name.
* font.c (font_open_by_name): Make name const.
* font.h (font_open_by_name): Make name const.
* gtkutil.c (get_utf8_string): Always return an allocated string.
Parameter is const.
(create_dialog, xg_create_one_menuitem, create_menus)
(xg_item_label_same_p, xg_update_menu_item): Free result from
get_utf8_string.
(xg_separator_p, xg_item_label_same_p): label is const.
* gtkutil.h: Replace widget_value with struct _widget_value.
(enum button_type, struct _widget_value): Remove and use the one from
keyboard.h.
* keyboard.h (_widget_value): Add defined USE_GTK. Replace Boolean
with unsigned char and XtPointer with void *.
* process.h (synch_process_death): Is const char*.
* xmenu.c (Fx_popup_dialog): error_name is const char*.
(xmenu_show): error parameter is const char **. pane_string is const
char *.
(button_names): Is const char *.
(xdialog_show): error_name and pane_string is const.
* xrdb.c (get_system_app): Make path const and use char *p for non-const
char.
* xselect.c (Fx_get_atom_name): Use char empty[] instead of literal "".
* xsmfns.c (NOSPLASH_OPT): Change to char[].
(smc_save_yourself_CB): Do xstrdup on all ->type and ->name for
props. Free them at the end.
* xterm.c (emacs_class): New char[] for EMACS_CLASS.
(xim_open_dpy, xim_initialize, xim_close_dpy): Use emacs_class.
(x_term_init): Use char[] display_opt and name_opt instead of
string literal. file is const char*.
Jan D [Wed, 11 Aug 2010 09:16:35 +0000 (11:16 +0200)]
Fix -Wwrite-strings warnings in fakemail.c.
* fakemail.c: Include stdlib.h for getenv. Remove declaration of
popen, fclose and pclose.
(my_name, fatal, error, put_line): Use const char*
(main): Remove extern getenv, mail_program_name is const char*.
Michael Mauger [Tue, 10 Aug 2010 23:04:32 +0000 (19:04 -0400)]
Suppress continuation prompts in SQL interactive mode
* progmodes/sql.el: Version 2.5
(sql-product-alist): Add :prompt-cont-regexp property for several
database products.
(sql-prompt-cont-regexp): New variable.
(sql-output-newline-count, sql-output-by-send): New
variables. Record number of newlines in input text.
(sql-send-string): Handle multiple filters and count newlines.
(sql-send-magic-terminator): Count terminator newline.
(sql-interactive-remove-continuation-prompt): Filters output to
remove continuation prompts; one for each newline.
(sql-interactive-mode): Set up new variables, prompt regexp and
output filter.
(sql-mode-sqlite-font-lock-keywords): Correct some keywords.
(sql-make-alternate-buffer-name): Correct buffer name in edge
cases.
Michael Albinus [Tue, 10 Aug 2010 09:58:15 +0000 (11:58 +0200)]
* net/tramp.el (tramp-vc-registered-read-file-names): Read input
as here-document, otherwise the command could exceed maximum
length of command line.
(tramp-handle-vc-registered): Call script accordingly. Reported
by Toru TSUNEYOSHI <t_tuneyosi@hotmail.com>.
Chong Yidong [Sun, 8 Aug 2010 21:57:34 +0000 (17:57 -0400)]
Fix 2010-07-03 change to mouse-drag-track.
* mouse.el (mouse-drag-track): Remove accidentally-removed check
for `double' value of mouse-1-click-follows-link (Bug#6807).
* replace.el (replace-highlight): Bind isearch-forward and
isearch-error, ensuring that highlighting is updated if the user
switches the search direction (Bug#6808).
* isearch.el (isearch-lazy-highlight-forward): New var.
(isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
(isearch-lazy-highlight-update): Use it.
Dan Nicolaescu [Sun, 8 Aug 2010 20:16:48 +0000 (13:16 -0700)]
Cleanup xrdb.c.
* src/xrdb.c: Remove include guard. Remove
DECLARE_GETPWUID_WITH_UID_T conditional it had no effect.
Remove #if 0 code. Replace malloc->xmalloc, free->xfree,
realloc->xrealloc instead of using #defines.
Eli Zaretskii [Sun, 8 Aug 2010 16:43:26 +0000 (19:43 +0300)]
Make some doc strings bidi-friendly.
cmds.c (Fforward_line, Fbeginning_of_line, Fend_of_line):
editfns.c (Fline_beginning_position, Fline_end_position): State
in the doc strings that start and end of line are in the logical order.
Jay Belanger [Sun, 8 Aug 2010 03:04:57 +0000 (22:04 -0500)]
calc.el (calc-trail-mode,calc-refresh): Use `face' property to italicize headers.
(calc-highlight-selections-with-faces): New variable.
(calc-selected-face, calc-nonselected-face): New faces.
calccomp.el (math-comp-highlight-string): Use
`calc-highlight-selections-with-faces' to determine how to highlight
subformulas.
calc-sel.el (calc-show-selections): Change message to something
appropriate.
calc.texi (Making Selections, Selecting Subformulas)
(Customizing Calc): Mention how to use faces to emphasize selected
subformulas.
Michael Mauger [Sat, 7 Aug 2010 23:57:07 +0000 (19:57 -0400)]
* progmodes/sql.el (sql-mode-sqlite-font-lock-keywords): Added
SQLite 3 keywords, functions and datatypes.
(sql-interactive-mode): Removed `comint-process-echoes' set to t
(Bug#6686).
Chong Yidong [Sat, 7 Aug 2010 19:39:04 +0000 (15:39 -0400)]
Change `select-active-region' mechanics.
Save region text prior to buffer modification.
Set window selection lazily, during `deactivate-mark' or after each
command when the region is temporarily active.
* lisp/cus-start.el: Add custom declaration for select-active-regions.
* lisp/mouse.el (mouse-drag-track): Remove hacks to deal with old
select-active-regions implementation.
(mouse-yank-at-click): Doc fix.
* lisp/simple.el (select-active-regions): Move to keyboard.c.
(deactivate-mark): Used saved-region-selection.
(select-active-region): Function removed.
(activate-mark, set-mark, push-mark-command)
(handle-shift-selection): Don't call it.
(keyboard-quit): Avoid adding the region to the window selection.
* src/insdel.c (prepare_to_modify_buffer): Save active region text to
Vsaved_region_selection.
* src/keyboard.c (Vselect_active_regions): Move from simple.el.
(Vsaved_region_selection, Qx_set_selection, QPRIMARY, Qlazy): New
vars.
(command_loop_1): Set window selection prior to deactivating the
mark.
Eli Zaretskii [Fri, 6 Aug 2010 15:05:21 +0000 (18:05 +0300)]
Fix redisplay bugs due to uninitialized glyphs.
Add diagnostics tools.
dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
msdos.c (IT_display_cursor): Log cursor position on termscript.
.gdbinit (pgx): Display the avoid_cursor_p flag.
Eli Zaretskii [Fri, 6 Aug 2010 14:54:06 +0000 (17:54 +0300)]
Fix redisplay bugs due to uninitialized glyphs in frame glyph pool.
dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
msdos.c (IT_display_cursor): Log cursor position on termscript.
.gdbinit (pgx): Display the avoid_cursor_p flag.
Michael Albinus [Fri, 6 Aug 2010 14:34:23 +0000 (16:34 +0200)]
* net/tramp.el (tramp-handle-start-file-process ): Set connection
property "vec".
(tramp-process-sentinel): Use it for flushing the cache. We
cannot do it via the process buffer, the buffer could be deleted
already when running the sentinel.
* src/image.c (xpm_scan, xpm_make_color_table_v)
(xpm_put_color_table_v, xpm_get_color_table_v)
(xpm_make_color_table_h, xpm_put_color_table_h)
(xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image)
(xpm_load): Convert to ANSI C prototypes.
* src/lisp.h (fmod_float): Declare.
* src/menu.h (x_set_menu_bar_line): Declare.
(free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions.
* src/window.c: Include menu.h.
* src/nsfns.m (have_menus_p, ns_display_info_for_name)
(x_set_cursor_type, ns_appkit_version_str)
(ns_appkit_version_int, ns_do_applescript)
(x_set_scroll_bar_default_width, x_sync, compute_tip_xy)
(syms_of_nsfns): Convert to ANSI C prototypes.
* src/nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C
prototypes.
* src/nsimage.m (ns_load_image): Move NSTRACE after declarations.
* src/nsmenu.m (popup_activated, name_is_separator)
(syms_of_nsmenu): Convert to ANSI C prototypes.
(runMenuAt): Prototypes and move declarations before code.
Dan Nicolaescu [Fri, 6 Aug 2010 04:09:54 +0000 (21:09 -0700)]
emacsclient.c cleanups.
* lib-src/emacsclient.c: Move socket related #includes together with the
rest of the #includes. Move a WINDOWSNT includes closer together.
(HAVE_CONFIG_H): Remove.
(NO_RETURN): Remove, defined in config.h.
(main): Convert definition to standard C.
Dan Nicolaescu [Fri, 6 Aug 2010 00:36:12 +0000 (17:36 -0700)]
Cleanup process.c.
* src/process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef
subprocesses, only MSDOS does not define HAVE_SOCKETS.
(socket_options): Use const char* for name.
Dan Nicolaescu [Thu, 5 Aug 2010 22:20:09 +0000 (15:20 -0700)]
Fix emacs -Q -f server-start & emacsclient -t on GNU/Linux.
* src/term.c (dissociate_if_controlling_tty): Use USG5 instead of
USG. This is equivalent to defined (USG) && !defined (BSD_PGRPS),
which is what was there before BSD_PGRPS was removed.