1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00
Commit graph

30671 commits

Author SHA1 Message Date
Paul Eggert
9ae848fc4a * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
Remove var that is set but not used.
2011-04-01 10:44:26 -07:00
Paul Eggert
a5a62657a2 * xfaces.c (realize_named_face): Remove vars that are set but not used.
(map_tty_color) [!defined MSDOS]: Likewise.
2011-04-01 10:41:46 -07:00
Paul Eggert
5c5cdd398e * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning. 2011-04-01 10:34:25 -07:00
Paul Eggert
66ebf9838b * coding.c: Remove vars that are set but not used.
(DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
All callers changed.
(decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
(decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
(decode_coding_charset): Remove vars that are set but not used.
2011-04-01 10:20:24 -07:00
Paul Eggert
1be4d76143 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
that is set but not used.
2011-04-01 00:18:17 -07:00
Paul Eggert
1f7196bf92 Add Bug#. 2011-04-01 00:15:34 -07:00
Paul Eggert
47553fa8f1 * print.c (print_object): Remove var that is set but not used. 2011-04-01 00:13:23 -07:00
Paul Eggert
fdb6180492 Fix dependencies. 2011-03-31 23:38:52 -07:00
Paul Eggert
d1fdcab742 Replace two copies of readlink code with single gnulib version. 2011-03-31 23:28:48 -07:00
Juanma Barranquero
e2abce014d src/xdisp.c (redisplay_internal): Fix prototype. 2011-03-31 21:42:38 +02:00
Eli Zaretskii
63696a737c Fix bug #6671 with recentering and other scrolling problems.
src/xdisp.c (SCROLL_LIMIT): New macro.
 (try_scrolling): Use it when setting scroll_limit.  Limit
 scrolling to 100 screen lines.
 (redisplay_window): Even when falling back on "recentering",
 position point in the window according to scroll-conservatively,
 scroll-margin, and scroll-*-aggressively variables.
 (try_scrolling): When point is above the window, allow searching
 as far as scroll_max, or one screenful, to compute vertical
 distance from PT to the scroll margin position.  This prevents
 try_scrolling from unnecessarily failing when
 scroll-conservatively is set to a value slightly larger than the
 window height.  Clean up the case of PT below the margin at bottom
 of window: scroll_max can no longer be INT_MAX.  When aggressive
 scrolling is in use, don't let point enter the opposite scroll
 margin as result of the scroll.
 (syms_of_xdisp) <scroll-conservatively>: Document the
 threshold of 100 lines for never-recentering scrolling.

 doc/emacs/display.texi (Auto Scrolling): Document the limit of 100 lines
 for never-recentering scrolling with `scroll-conservatively'.
2011-03-31 21:12:30 +02:00
Juanma Barranquero
e4cc2dfc38 src/xdisp.c: Remove unused parameters.
* dispextern.h (move_it_by_lines):
* xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
  since 2000-12-29T14:24:09Z!gerd@gnu.org.  All callers changed.
  (message_log_check_duplicate): Remove parameters `prev_bol' and
  `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org.  All callers changed.
  (redisplay_internal): Remove parameter `preserve_echo_area',
  unused since 1999-07-21T21:43:52Z!gerd@gnu.org.  All callers changed.
* indent.c (Fvertical_motion):
* window.c (window_scroll_pixel_based, Frecenter):
  Don't pass `need_y_p' to `move_it_by_lines'.
2011-03-31 03:37:51 +02:00
Eli Zaretskii
09725d2628 Documentation parts of the scroll fix.
src/xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the
 threshold of 100 lines for never-recentering scrolling.
 doc/emacs/display.texi (Auto Scrolling): Document the limit of 100
 lines for never-recentering scrolling with `scroll-conservatively'.
2011-03-30 22:59:42 +02:00
Stefan Monnier
44f230aa04 * src/eval.c (struct backtrace): Don't cheat with negative numbers, but do
steal a few bits to be more compact.
(interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
Remove unneeded casts.
2011-03-30 15:18:12 -04:00
Stefan Monnier
1c47056297 * src/bytecode.c (Fbyte_code): CAR and CDR can GC. 2011-03-30 14:04:11 -04:00
Zachary Kanfer
888adce96c * src/keyboard.c (Fexecute_extended_command): Do log the "suggest key
binding" message.

Fixes: debbugs:7967
2011-03-30 09:35:37 -04:00
Paul Eggert
77861b9528 Fix more problems found by GCC 4.6.0's static checks. 2011-03-29 17:39:12 -07:00
Paul Eggert
de6dbc14a7 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
Remove unused local var.
2011-03-29 17:19:27 -07:00
Paul Eggert
f838ed7b0a * editfns.c (Fmessage_box): Remove unused local var. 2011-03-29 17:17:26 -07:00
Paul Eggert
8289296548 Merge from mainline. 2011-03-29 16:35:49 -07:00
Eli Zaretskii
492001e973 Fix off-by-one in scroll down aggressively.
src/xdisp.c (try_scrolling): When scrolling down aggressively,
 scroll one screen line less, to make sure we end up at the margin
 for fractions close to 1.
2011-03-29 21:58:13 +02:00
Juanma Barranquero
94eab1c84d src/scroll.c, src/w32.c: Trivial whitespace changes. 2011-03-29 16:00:16 +02:00
Paul Eggert
792c7b2ba5 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
(note_mode_line_or_margin_highlight, note_mouse_highlight):
Omit unused local vars.
2011-03-29 00:01:11 -07:00
Paul Eggert
c499e55717 * window.c (shrink_windows): Omit unused local var. 2011-03-28 23:59:27 -07:00
Paul Eggert
b01a1c2912 * menu.c (digest_single_submenu): Omit unused local var. 2011-03-28 23:58:36 -07:00
Paul Eggert
0bc329278f * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
Omit unused local var.
2011-03-28 23:57:40 -07:00
Juanma Barranquero
461c2ab9a5 src/*.c: Remove some additional unused parameters.
* lisp.h (multibyte_char_to_unibyte):
* character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
  unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
* character.h (CHAR_TO_BYTE8):
* cmds.c (internal_self_insert):
* editfns.c (general_insert_function):
* keymap.c (push_key_description):
* search.c (Freplace_match):
* xdisp.c (message_dolog, set_message_1): All callers changed.

* coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
  unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
  All callers changed.
2011-03-29 00:41:01 +02:00
Stefan Monnier
f6d6298639 Don't reset post-command-hook to nil upon error.
* src/eval.c (enum run_hooks_condition): Remove.
(funcall_nil, funcall_not): New functions.
(run_hook_with_args): Call each function through a `funcall' argument.
Remove `cond' argument, now redundant.
(Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
(Frun_hook_with_args_until_failure): Adjust accordingly.
(run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
* src/keyboard.c (safe_run_hook_funcall): New function.
(safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
don't set the hook to nil, but remove the offending function instead.
(Qcommand_hook_internal): Remove, unused.
(syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
Vcommand_hook_internal.
* doc/lispref/commands.texi (Command Overview): post-command-hook is not reset
to nil any more.
2011-03-28 16:26:35 -04:00
Eli Zaretskii
9f3842cef7 Fix failures in try_scrolling when scrolling back.
src/xdisp.c (try_scrolling): When point is above the window, allow
 searching as far as scroll_max, or one screenful, to compute
 vertical distance from PT to the scroll margin position.  This
 prevents try_scrolling from unnecessarily failing when
 scroll-conservatively is set to a value slightly larger than the
 window height.
2011-03-28 21:30:35 +02:00
Juanma Barranquero
1db5b1ad87 src/*.c: Remove unused parameters and other warnings.
* dispextern.h (string_buffer_position): Remove declaration.

* print.c (strout): Remove parameter `multibyte', unused since
  1999-08-21T19:30:21Z!gerd@gnu.org.  All callers changed.

* search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
  never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
  All callers changed.

* w32.c (_wsa_errlist): Use braces for struct initializers.

* xdisp.c (string_buffer_position_lim): Remove parameter `w',
  never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
  All callers changed.
  (string_buffer_position): Likewise.  Also, make static (it's never
  used outside xdisp.c).
  (cursor_row_p): Remove parameter `w', unused since
  2000-10-17T16:08:57Z!gerd@gnu.org.  All callers changed.
  (decode_mode_spec): Remove parameter `precision', introduced during
  Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
  All callers changed.
2011-03-28 05:29:18 +02:00
Eli Zaretskii
fd738ca513 Fix scrolling back with scroll-down-aggressively.
src/xdisp.c (try_scrolling): Clean up the case of PT below the
 margin at bottom of window: scroll_max can no longer be INT_MAX.
 (redisplay_window): Find character position of margin and use
 that, rather than adding margin to PT.
2011-03-27 22:01:46 +02:00
Paul Eggert
48011560d7 * keyboard.c (read_key_sequence): Don't check last_real_key_start redundantly. 2011-03-27 11:33:45 -07:00
Paul Eggert
32ad8845a4 * keyboard.c (keyremap_step, read_key_sequence): Use size_t for sizes. 2011-03-27 11:18:31 -07:00
Paul Eggert
ba0165e1f1 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
Don't assume string length fits in int.
2011-03-27 10:14:11 -07:00
Jan Djärv
5ffb62aa7e Format doc and add customize for ns-auto-hide-menu-bar.
* lisp/cus-start.el (all): Add boolean ns-auto-hide-menu-bar.

* src/nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
2011-03-27 12:55:07 +02:00
Jan Djärv
f0a1382af3 Introduce ns-auto-hide-menu-bar to hide menubar for Emacs frames.
Code by Anders Lindgren.

* nsterm.m (ns_menu_bar_is_hidden): New variable.
(ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
(ns_update_auto_hide_menu_bar): New functions.
(ns_update_begin): Call ns_update_auto_hide_menu_bar.
(applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
ns_constrain_all_frames.
(constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
(syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
2011-03-27 12:36:44 +02:00
Jan Djärv
5c380ffb17 * nsmenu.m (runDialogAt): Remove argument to timer_check. 2011-03-27 11:23:52 +02:00
Paul Eggert
3c59b4c9d6 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
instead of alloca (Bug#8344).
2011-03-27 02:07:38 -07:00
Paul Eggert
5d5d959d59 * eval.c (Fbacktrace_frame): Don't assume nframes fits in int. 2011-03-27 01:31:16 -07:00
Paul Eggert
a3eed4788d * eval.c (Fbacktrace): Don't assume nargs fits in int. 2011-03-27 01:29:39 -07:00
Paul Eggert
eb4d412de8 * syntax.c (scan_sexps_forward): Avoid pointer wraparound. 2011-03-27 01:21:49 -07:00
Paul Eggert
1658b4014f Merge from atest branch. 2011-03-27 01:15:26 -07:00
Paul Eggert
fe75f92609 * chartab.c (sub_char_table_ref_and_range): Redo for slight
efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
2011-03-27 01:10:27 -07:00
Paul Eggert
4a843dd730 Merge from mainline. 2011-03-26 19:32:40 -07:00
Glenn Morris
9af30bdf17 Remove (RET)SIGTYPE; it is identical to void on all supported systems.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg01068.html

* configure.in (AC_TYPE_SIGNAL): Remove obsolete macro.
(AH_BOTTOM): Do not define SIGTYPE.

* lib-src/emacsclient.c: Replace SIGTYPE with void.

* nt/config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void).

* src/syssignal.h: Replace RETSIGTYPE with void.

* src/atimer.c, src/data.c, src/dispnew.c, src/emacs.c, src/floatfns.c:
* src/keyboard.c, src/keyboard.h, src/lisp.h, src/process.c, src/sysdep.c:
* src/xterm.c: Replace SIGTYPE with void everywhere.

* src/s/template.h (SIGTYPE): Remove commented out definition.
* src/s/usg5-4-common.h (SIGTYPE): Remove definition.

* admin/CPP-DEFINES: Remove SIGTYPE.
2011-03-26 19:27:11 -07:00
Paul Eggert
ffa8c828c6 * keyboard.c, keyboard.h (num_input_events): Now size_t.
This avoids undefined behavior on integer overflow, and is a bit
more convenient anyway since it is compared to a size_t variable.
2011-03-26 19:20:34 -07:00
Paul Eggert
c5101a77a4 Variadic C functions now count arguments with size_t, not int. 2011-03-26 19:12:36 -07:00
Eli Zaretskii
3b2c5ab1f0 Fix scrolling with scroll-*-aggressively.
Aggressive scrolling backward by large distance still doesn't DTRT.

 src/xdisp.c (try_scrolling): When aggressive scrolling is in use, don't
 let point enter the opposite scroll margin as result of the scroll.
 (redisplay_window): Fix operator precedence in condition.
2011-03-27 00:05:30 +02:00
Eli Zaretskii
06b6bbb578 Fix bug #6671 with point position in the window when scrolling far away.
src/xdisp.c (redisplay_window): Don't check buffer's clip_changed
 flag as a prerequisite for invoking try_scrolling.
 (try_scrolling): Limit scrolling to 100 screen lines.
 (SCROLL_LIMIT): New macro.
 (try_scrolling): Use it when setting scroll_limit.
 (redisplay_window): Even when falling back on "recentering",
 position point in the window according to scroll-conservatively,
 scroll-margin, and scroll-*-aggressively variables.
2011-03-26 20:31:36 +02:00
Eli Zaretskii
5d9bd9764f Don't scroll more than 100 lines in try_scrolling.
src/xdisp.c (try_scrolling): Limit scrolling to 100 screen lines.
2011-03-26 16:03:23 +02:00