Michael Albinus [Tue, 17 Aug 2010 04:52:16 +0000 (06:52 +0200)]
* net/tramp.el (tramp-handle-make-symbolic-link): Flush file
properties.
(tramp-handle-process-file): Call the program in a subshell, in
order to preserve working directory.
(tramp-action-password): Hide password prompt before next run.
(tramp-process-actions): Widen connection buffer for the trace.
Deniz Dogan [Mon, 16 Aug 2010 03:34:10 +0000 (23:34 -0400)]
Don't always log RCIRC process buffers to disk (Bug#6828).
* lisp/net/rcirc.el (rcirc-log-process-buffers): New option.
(rcirc-print): Use it.
(rcirc-generate-log-filename): New function.
(rcirc-log-filename-function): Change default to
rcirc-generate-log-filename (Bug#6828).
Chong Yidong [Mon, 16 Aug 2010 02:33:17 +0000 (22:33 -0400)]
Let all active regions set the primary selection.
This includes both temporarily active regions (mouse drag and
shift-select) and those made with C-SPC and cursor motion.
* lisp/cus-start.el: Change defcustom for select-active-regions.
* lisp/simple.el (deactivate-mark): If select-active-regions is `only',
only set selection for temporarily active regions.
* src/insdel.c (prepare_to_modify_buffer): Handle `only' value of
select-active-regions.
* src/keyboard.c (command_loop_1): Avoid setting selection twice,
since it's done in deactivate-mark as well.
(Vselect_active_regions): Replace `lazy' value with `only',
meaning to only set PRIMARY for temporarily active regions.
Chong Yidong [Mon, 16 Aug 2010 02:08:01 +0000 (22:08 -0400)]
Fix mouse dragging of words and lines (Bug#6840).
* mouse.el (mouse--drag-set-mark-and-point): New function.
(mouse-drag-track): Use LOCATION arg to push-mark. Use
mouse--drag-set-mark-and-point to take click-count into
consideration when updating point and mark (Bug#6840).
Eli Zaretskii [Sat, 14 Aug 2010 12:55:04 +0000 (15:55 +0300)]
Fix cursor drawing on stretch glyphs in R2L lines.
xterm.c (x_draw_stretch_glyph_string):
w32term.c (x_draw_stretch_glyph_string): In R2L rows, display the
cursor on the right edge of the stretch glyph.
xdisp.c (window_box_right_offset, window_box_right): Fix commentary.
Eli Zaretskii [Sat, 14 Aug 2010 10:59:55 +0000 (13:59 +0300)]
Fix current-bidi-paragraph-direction within whitespace chars.
xdisp.c (Fcurrent_bidi_paragraph_direction): Fix paragraph
direction when point is inside a run of whitespace characters.
bidi.c (bidi_at_paragraph_end): Remove obsolete comment.
Jason Rumney [Fri, 13 Aug 2010 14:54:32 +0000 (22:54 +0800)]
Fix for bug#5629: Use unicode message box if available.
* w32menu.c (simple_dialog_show): Use unicode message box if available.
(MessageBoxW_Proc): New function typedef.
(unicode-message-box): New function pointer.
(globals_of_w32menu): Import it from user32.dll.
Eli Zaretskii [Fri, 13 Aug 2010 11:09:51 +0000 (14:09 +0300)]
Fix compilation of xmenu.c and unexcoff.c, clean up MSDOS source files.
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).
msdos.c (IT_set_face): Fix format string to match argument
types.
(IT_write_glyphs, IT_note_mode_line_highlight)
(IT_set_frame_parameters): Remove unused variables.
(x_set_menu_bar_lines): Declare set_menu_bar_lines.
(IT_set_terminal_modes): Disambiguate expression in if clause.
(Fmsdos_remember_default_colors): Return Qnil.
(IT_set_frame_parameters): Add parens to disambiguate boolean
expression for logging the cursor type to termscript.
(keyboard_layout_list, keypad_translate_map)
(grey_key_translate_map): Add braces in inner initializers.
(dos_rawgetc): Add parens in condition for mouse-3 button-press.
(dos_rawgetc): Remove unused label.
(XMenuActivate): Add braces to remove ambiguous `else'.
(dos_ttraw): Always return a value.
(spawnve): Declare.
(run_msdos_command): Cast 3rd arg of spawnve to "char **".
dosfns.h (x_set_title): Declare.
w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
Remove unused variables.
dosfns.c (Fint86, Fdos_memget, Fdos_memput): Remove unused
variables.
(init_dosfns): Declare get_lim_data.
(system_process_attributes): Declare Fget_internal_run_time.
xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Fix argument
list to be consistent with menu.h.
Katsumi Yamaoka [Fri, 13 Aug 2010 11:03:19 +0000 (11:03 +0000)]
Optimizations for gnus-sync.el.
From Ted Zlatanov <tzz@lifelogs.com>.
* gnus-sync.el: Add docs about gnus-sync-backend
possibilities.
(gnus-sync-save): Remove unnecessary message.
(gnus-sync-read): Optimize and show what groups were skipped.
Katsumi Yamaoka [Fri, 13 Aug 2010 10:44:22 +0000 (10:44 +0000)]
Make saving and restoring of hidden threads work with overlays.
Patch applied by Ted Zlatanov.
* gnus-sum.el (gnus-hidden-threads-configuration)
(gnus-restore-hidden-threads-configuration): Update to deal with text
properties, rather than searching for a magic character.
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.