summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-03-06 16:22:16 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-03-06 16:22:16 -0500
commit0d6459dfb52188481bfd6bb53f1b2f653ecd6a5d (patch)
tree306b87fc2903ad23343f3c84be1cccfa72e5a97e /src
parent798cb64441228d473f7bdd213183c70fb582595c (diff)
parent892777baa1739fa5f1f2d1c2975488c3e6f57bae (diff)
Merge from trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.104
-rw-r--r--src/ChangeLog.36
-rw-r--r--src/ChangeLog.trunk239
-rw-r--r--src/bidi.c2
-rw-r--r--src/bytecode.c2
-rw-r--r--src/character.c2
-rw-r--r--src/cmds.c42
-rw-r--r--src/config.in24
-rw-r--r--src/dired.c36
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c126
-rw-r--r--src/editfns.c2
-rw-r--r--src/fileio.c74
-rw-r--r--src/filelock.c4
-rw-r--r--src/font.c4
-rw-r--r--src/frame.c24
-rw-r--r--src/frame.h8
-rw-r--r--src/indent.c49
-rw-r--r--src/keymap.c4
-rw-r--r--src/lisp.h4
-rw-r--r--src/lread.c7
-rw-r--r--src/minibuf.c11
-rw-r--r--src/msdos.c15
-rw-r--r--src/msdos.h5
-rw-r--r--src/nsterm.m54
-rw-r--r--src/print.c32
-rw-r--r--src/s/msdos.h6
-rw-r--r--src/scroll.c5
-rw-r--r--src/sheap.c2
-rw-r--r--src/w32.c19
-rw-r--r--src/w32proc.c2
-rw-r--r--src/w32term.c2
-rw-r--r--src/window.c20
-rw-r--r--src/window.h9
-rw-r--r--src/xdisp.c315
-rw-r--r--src/xrdb.c5
36 files changed, 653 insertions, 514 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 869ab5b07d..6152b4c76a 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -20002,7 +20002,7 @@
* w32reg.c (w32_get_rdb_resource): New function.
(x_get_string_resource): Use it, so resources passed with -xrm
- supercede the ones in the registry.
+ supersede the ones in the registry.
2003-03-04 Jan Djärv <jan.h.d@swipnet.se>
@@ -25474,7 +25474,7 @@
recursive call unless that arg is non-nil.
(where_is_internal): New argument no_remap. Callers changed.
Call recursively to find original key bindings for a remapped
- comand unless that arg is non-nil.
+ command unless that arg is non-nil.
(Fwhere_is_internal): New optional argument NO-REMAP.
Doc updated. Callers changed. Pass arg to where_is_internal.
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index a361142faa..beb7a0a2ae 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -7023,7 +7023,7 @@
* fileio.c: There are two versions of Fexpand_file_name defined
here; the latter is inside a `#if 0' clause. Change its DEFUN to
a DEAFUN, so that its docstring doesn't make it into the DOC file
- and supercede the real docstring.
+ and supersede the real docstring.
* callint.c (Fcall_interactively): For the 'K' interactive spec,
set varies[i] to -1, indicating that the mouse click should be
@@ -11142,7 +11142,7 @@
wait_reading_process_input, instead of just the first two.
* process.c (wait_reading_process_input): Remove support for
- only waiting for mouse input, since that has been superceded.
+ only waiting for mouse input, since that has been superseded.
This removes X dependencies from process.c, and eliminates some
references to code that should only exist when using X10.
@@ -11450,7 +11450,7 @@
* minibuf.c (temp_echo_area_glyphs): Clear echo_area_glyphs and
previous_echo_glyphs, so the message we're displaying will
- supercede any existing message.
+ supersede any existing message.
* keyboard.c: Removed external declaration of echo_area_glyphs,
since it's declared in window.h.
diff --git a/src/ChangeLog.trunk b/src/ChangeLog.trunk
index 9713a4a6ed..a96edcdfdc 100644
--- a/src/ChangeLog.trunk
+++ b/src/ChangeLog.trunk
@@ -1,7 +1,193 @@
+2011-03-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ current_column: Now returns EMACS_INT, fixing some iftc
+ that was introduced in the 2002-06-02 change "temporarily"; see
+ <http://lists.gnu.org/archive/html/emacs-devel/2002-06/msg00039.html>.
+ * bytecode.c (Fbyte_code): Don't cast current_column () to int.
+ * cmds.c (internal_self_insert): Likewise.
+ * indent.c (Fcurrent_column): Likewise.
+ * keymap.c (describe_command): Likewise.
+ * minibuf.c (read_minibuf): Likewise.
+ * indent.c (Fcurrent_indentation): Don't cast position_indentation ()
+ to int.
+ * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec):
+ Likewise.
+ * cmds.c (internal_self_insert): Declare locals to be EMACS_INT,
+ not int or double, if they might contain a column number.
+ * indent.c (current_column, Findent_to, indented_beyond_p):
+ (compute_motion, vmotion): Likewise.
+ * keymap.c (describe_command): Likewise.
+ * xdisp.c (pint2str): Likewise.
+ * indent.c (last_known_column): Now EMACS_INT, not int.
+ * minibuf.c (minibuf_prompt_width): Likewise.
+ * indent.c (current_column, current_column_1, position_indentation):
+ Return EMACS_INT, not double.
+ * lisp.h (current_column): Likewise.
+ * indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double.
+ All callers changed.
+ * lisp.h (indented_beyond_p): Likewise.
+
+ * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here
+ from xdisp.c, and make static, since these are used only here.
+ * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width):
+ Remove decls.
+
+ * cmds.c (internal_self_insert): Reindent to match Emacs style.
+ * xdisp.c (redisplay_window): Likewise.
+
+ * xdisp.c: Rename or move local decls to avoid shadowing.
+ (init_iterator, handle_fontified_prop, handle_single_display_spec):
+ (message_dolog, message_with_string, redisplay_internal):
+ (redisplay_window, try_window_reusing_current_matrix, try_window_id):
+ (compute_line_metrics, highlight_trailing_whitespace, cursor_row_p):
+ (display_line, display_string, rows_from_pos_range):
+ (mouse_face_from_buffer_pos, note_mouse_highlight, expose_frame):
+ Rename or move local decls.
+ * xdisp.c (BUILD_GLYPHLESS_GLYPH_STRING): Omit unused local var.
+ (produce_glyphless_glyph): Make a pointer "const"
+ since it might point to immutable storage.
+ (update_window_cursor): Now static, since it's not used elsewhere.
+ (SKIP_GLYPHS): Removed unused macro.
+
+2011-03-06 Michael Shields <shields@msrl.com> (tiny change)
+
+ * window.c (Fnext_window): Doc fix. (Bug#5567)
+
+2011-03-05 Chong Yidong <cyd@stupidchicken.com>
+
+ * nsterm.m (ns_draw_window_cursor): Fix typo in 2011-02-23 commit.
+
+2011-03-02 Ken Brown <kbrown@cornell.edu>
+
+ * sheap.c (STATIC_HEAP_SIZE): Increase to 13MB.
+
+2011-03-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ Work around some portability problems with symlinks.
+
+ * fileio.c (Fmake_symbolic_link): Treat ENOSYS specially, and
+ generate a special message for it. Suggested by Eli Zaretskii in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00995.html>.
+ (Frename_file, Fmake_symbolic_link, Ffile_symlink_p):
+ Simplify the code by assuming that the readlink and symlink calls
+ exist, even if they always fail on this host.
+ (Ffile_readable_p): Likewise, for fifos.
+ * config.in: Regenerate.
+
+2011-02-27 Chong Yidong <cyd@stupidchicken.com>
+
+ * frame.c (store_frame_param): Don't store value directly in
+ buffer_list and buried_buffer_list; copy the list and remove dead
+ buffers (Bug#7898).
+
+2011-02-27 Eli Zaretskii <eliz@gnu.org>
+
+ * msdos.c (readlink) [DJGPP < 2.04]: New stub function.
+
+ * msdos.h (readlink) [DJGPP < 2.04]: Declare prototype.
+
+ * w32.c (symlink, readlink): New stub functions.
+
+2011-02-27 Paul Eggert <eggert@cs.ucla.edu>
+
+ * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
+ This avoids a gcc warning in some configurations.
+
+ * frame.c (x_set_screen_gamma): Rename local to avoid shadowing.
+
+ * frame.h: Avoid gcc -Wmissing-prototypes diagnostics.
+ (set_menu_bar_lines, x_get_resource_string): New decls.
+ * msdos.c (set_menu_bar_lines): Omit decl.
+
+ * dispextern.h (struct glyph): Make u.img_id int, not unsigned.
+ It's always given int values and used as an int. This suppresses
+ a gcc "comparison of unsigned expression >= 0" warning in some
+ configurations.
+
+ * dispnew.c: Rename locals to avoid shadowing.
+ (update_text_area, scrolling_window, update_frame_1): Rename locals.
+
+2011-02-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes.
+ (copy_glyph_row_contents): Remove; not used.
+ (frame_row_to_window, check_current_matrix_flags):
+ (window_change_signal): Now static, since they're not used elsewhere.
+ (check_current_matrix_flags): Surround with "#if 0", since its
+ only use is in a comment. Maybe both the comment and the "#if 0"
+ stuff should be removed?
+
+ * dispnew.c: Fix problem uncovered by gcc -Wunused-variable.
+ (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
+ contexts that actually need it.
+
+2011-02-26 Eli Zaretskii <eliz@gnu.org>
+
+ * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
+ (lstat): Define for DJGPP < 2.04.
+
+2011-02-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dired.c (Ffile_attributes): Increase size of modes from 10 to 12
+ as per recent filemodestring API change. Reported by Jonas Öster in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg01069.html>.
+
+2011-02-23 Ben Key <bkey76@gmail.com> (tiny change)
+
+ * nsterm.m (ns_draw_window_cursor): Obey the cursor_width argument
+ directly, for bar cursors.
+
+2011-02-23 Chong Yidong <cyd@stupidchicken.com>
+
+ * xdisp.c (set_frame_cursor_types): Don't write an undefined value
+ into the frame's cursor_width.
+
+2011-02-23 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * print.c (print_object): Never print old-style backquotes.
+ Obey escapeflag for hash tables as well.
+
+2011-02-23 Kenichi Handa <handa@m17n.org>
+
+ * font.c (font_open_entity): Be sure to set scaled_pixel_size.
+ (font_find_for_lface): Check if attrs[LFACE_HEIGHT_INDEX] is integer.
+
+2011-02-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dired.c (Ffile_attributes): Simplify and avoid #ifdef.
+
+2011-02-22 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
+
+ * lread.c (openp): Correct Boolean typo in last commit.
+
+2011-02-22 Adrian Robert <Adrian.B.Robert@gmail.com>
+
+ * nsterm.m (EmacsView-keyDown:): Don't pass shift-only-modified
+ key to Emacs, treat as unmodified (go to input manager processing).
+
+2011-02-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume S_ISLNK etc. work, since gnulib supports this.
+ * config.in: Regenerate.
+ * dired.c (lstat): Remove.
+ (file_name_completion): Assume S_ISDIR works.
+ (file_name_completion_stat): Assume S_ISLNK works.
+ Do not bother calling stat unless lstat says it's a symlink.
+ * fileio.c (S_ISLNK, S_ISFIFO, S_ISREG, lstat): Remove.
+ (Fcopy_file): Assume S_ISREG and S_ISLNK work.
+ (check_writable, Ffile_writable_p, Fset_file_times):
+ Assume S_ISDIR works.
+ (Ffile_readable_p): Use S_IFIFO, not S_ISFIFO, to guess whether
+ fifos exist.
+ (Ffile_regular_p, Finsert_file_contents): Assume S_ISREG works.
+ * filelock.c (S_ISLNK): Remove.
+ * lread.c (openp): Assume S_ISDIR works.
+ * xrdb.c (S_ISDIR): Remove.
+
2011-02-21 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to
- lib/makefilw.w32-in.
+ lib/makefile.w32-in.
($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h.
(GLOBAL_SOURCES): Remove filemode.c.
(OBJ1): Remove $(BLD)/filemode.$(O).
@@ -21,7 +207,7 @@
* makefile.w32-in ($(BLD)/fns.$(O)): Depend on
$(EMACS_ROOT)/lib/md5.h and on stamp_BLD.
-2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
+2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
* makefile.w32-in: Remove md5.$(O).
($(BLD)/md5.$(O)): Remove prerequisites, moved to
@@ -725,14 +911,14 @@
to const char *, since they're usually low-level C strings, and
this stays compatible with C89 pointer rules. All callers changed.
- * charset.c: conform to C89 pointer rules
+ * charset.c: Conform to C89 pointer rules.
(define_charset_internal): Switch between char * and unsigned char *.
- * xmenu.c: conform to C89 const rules
+ * xmenu.c: Conform to C89 const rules.
(xmenu_show, xdialog_show): Declare local var as char *, not
const char *, to stay compatible with C89 const rules.
- * xdisp.c: conform to C89 pointer rules
+ * xdisp.c: Conform to C89 pointer rules.
(store_mode_line_noprop, display_string, reseat_to_string):
(c_string_pos, number_of_chars, message_dolog):
(message_log_check_duplicate, set_message_1, store_mode_line_noprop):
@@ -740,7 +926,7 @@
Switch between char * and unsigned char * to stay compatible wth
C89 pointer rules.
- * regex.c: conform to C89 pointer rules
+ * regex.c: Conform to C89 pointer rules.
(re_wctype): Add cast, as C89 does not allow assigning between
char * and unsigned char *.
(regex_compile): Likewise.
@@ -897,10 +1083,10 @@
(ns_string_to_pasteboard_internal): Use initWithBytesNoCopy
instead of stringWithUTF8String (Bug#7934).
-2011-01-29 Anders Lindgren <andlind@gmail.com> (tiny change)
+2011-01-29 Anders Lindgren <andlind@gmail.com> (tiny change)
- * nsfont.m (nsfont_open): Ensure that fonts with inexact
- descenders would not become one pixel too tall (Bug#7887).
+ * nsfont.m (nsfont_open): Ensure that fonts with inexact
+ descenders would not become one pixel too tall (Bug#7887).
2011-01-28 Chong Yidong <cyd@stupidchicken.com>
@@ -1044,7 +1230,7 @@
(x_underline_at_descent_line): Remove declaration.
(syms_of_nsterm): Remove & from DEFVAR_LISP and DEFVAR_BOOL.
- * nsselect.m (Vns_sent_selection_hooks, Vns_lost_selection_hooks
+ * nsselect.m (Vns_sent_selection_hooks, Vns_lost_selection_hooks)
(Vselection_alist, Vselection_converter_alist): Move to globals.h.
(syms_of_nsselect): Remove & from DEFVAR_LISP.
@@ -1071,7 +1257,6 @@
f_Vns_lost_selection_hooks, f_Vselection_alist, f_Vns_reg_to_script
and corresponding defines.
-
2011-01-19 Sam Steingold <sds@gnu.org>
* w32.c (check_windows_init_file): Remove declarations of
@@ -2176,10 +2361,10 @@
* nsmenu.m: Use #include <config.h> instead of "config.h".
* term.c (Qglyphless_char,last_glyphless_glyph_frame)
- (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id):
+ (last_glyphless_glyph_face_id, last_glyphless_glyph_merged_face_id):
Move declarations ...
* lisp.h (Qglyphless_char,last_glyphless_glyph_frame)
- (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id):
+ (last_glyphless_glyph_face_id, last_glyphless_glyph_merged_face_id):
... here.
* emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits)
@@ -2283,7 +2468,7 @@
(Qonly): Remove declarations.
* lisp.h (pending_malloc_warning, Vsaved_region_selection)
(Vselect_active_regions):
- * keyboard.h (timers_run): Add declarations.
+ * keyboard.h (timers_run): Add declarations.
* strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r)
(tm_diff): Convert definitions to standard C.
@@ -2417,7 +2602,7 @@
2010-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
- * keyboard.c (modify_event_symbol) : Add const to array elements of
+ * keyboard.c (modify_event_symbol): Add const to array elements of
arg NAME_TABLE.
(lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys)
(lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names)
@@ -2508,7 +2693,6 @@
(x_set_sticky): Pass atoms to set_wm_state.
(do_ewmh_fullscreen): Ditto.
-
* xterm.h (x_display_info): Add Xatom_net_supported,
Xatom_net_supporting_wm_check, Xatom_net_active_window,
Xatom_net_wm_window_opacity, Xatom_XEMBED_INFO, SM_CLIENT_ID.
@@ -2712,10 +2896,9 @@
* coding.c (coding-category-list): Refer to set-coding-system-priority
instead of the obsolete set-coding-priority in the doc string.
-
2010-11-04 Adrian Robert <Adrian.B.Robert@gmail.com>
- * nsfont.m (nsfont_draw): Correct previous patch to return
+ * nsfont.m (nsfont_draw): Correct previous patch to return
correct value.
* nsimage.m (EmacsImage-setXBMColor:): Correct previous patch:
don't change the method signature, change the return.
@@ -2764,7 +2947,7 @@
(Qglyphless_char_display, Qhexa_code, Qempty_box, Qthin_space)
(Qzero_width): New variables.
(THIN_SPACE_WIDTH): New macro.
- (lookup_glyphless_char_display): New funciton.
+ (lookup_glyphless_char_display): New function.
(last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
(last_glyphless_glyph_merged_face_id): New variables.
(get_next_display_element): Check glyphless characters.
@@ -3050,7 +3233,7 @@
2010-10-12 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (Qleft): Declare.
- (ns_right_alternate_modifier): New variable
+ (ns_right_alternate_modifier): New variable.
(NSRightAlternateKeyMask): New define.
(EV_MODIFIERS): Parse NSRightAlternateKeyMask if
ns_right_alternate_modifier isn't Qleft.
@@ -3074,7 +3257,7 @@
* Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line.
(PROFILING_LDFLAGS): Remove, not needed anymore.
- * Makefile.in: Use $(...) everywhere instead of ${...}
+ * Makefile.in: Use $(...) everywhere instead of ${...}.
(CRT_DIR): Move near potential user.
(START_FILE): Move near CRT_DIR, it might use it.
@@ -4574,7 +4757,7 @@
2010-08-16 Jan Djärv <jan.h.d@swipnet.se>
- * nsselect.m: include keyboard.h for QPRIMARY, remove its
+ * nsselect.m: Include keyboard.h for QPRIMARY, remove its
declaration (Bug#6863).
(syms_of_nsselect): Don't intern QPRIMARY.
@@ -4635,7 +4818,7 @@
* 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. (Bug#5629)
+ (globals_of_w32menu): Import it from user32.dll. (Bug#5629)
2010-08-13 Jan Djärv <jan.h.d@swipnet.se>
@@ -6011,7 +6194,7 @@
* eval.c: Fix indentation problem.
- * keyboard.c: Include "process.h"
+ * keyboard.c: Include "process.h".
* eval.c: Remove obsolete noinline declaration.
* fns.c: Likewise.
@@ -8135,7 +8318,7 @@
2010-04-30 Jan Djärv <jan.h.d@swipnet.se>
- * xsettings.c: include limits.h and update file comment.
+ * xsettings.c: Include limits.h and update file comment.
2010-04-30 Glenn Morris <rgm@gnu.org>
@@ -8417,7 +8600,7 @@
Qtool_bar_style. Initialize current_tool_bar_style to nil.
defsubr Stool_bar_get_system_style. Fprovide on
dynamic-setting.
- Move misplaced HAVE_GCONF
+ Move misplaced HAVE_GCONF.
* xsettings.h (Ftool_bar_get_system_style): Declare.
@@ -8912,7 +9095,7 @@
* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.
- * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
+ * xmenu.c: Include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu):
Call apply_systemfont_to_menu.
@@ -9211,7 +9394,7 @@
rather than appending it.
(handle_stop_backwards): New function.
(reseat_1, pop_it, push_it): Set prev_stop and base_level_stop.
- (reseat): call handle_stop_backwards to recompute prev_stop and
+ (reseat): Call handle_stop_backwards to recompute prev_stop and
base_level_stop for the new position.
(handle_invisible_prop): Under bidi iteration, skip invisible text
using bidi_get_next_char_visually. If we are `reseat'ed, init the
diff --git a/src/bidi.c b/src/bidi.c
index 9740fe8f1d..eeacf65bd5 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1520,7 +1520,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
bidi_check_type (bidi_it->type);
/* For L1 below, we need to know, for each WS character, whether
- it belongs to a sequence of WS characters preceeding a newline
+ it belongs to a sequence of WS characters preceding a newline
or a TAB or a paragraph separator. */
if (bidi_it->orig_type == NEUTRAL_WS
&& bidi_it->next_for_ws.type == UNKNOWN_BT)
diff --git a/src/bytecode.c b/src/bytecode.c
index dbab02886e..b19f9687cd 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1406,7 +1406,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
- XSETFASTINT (v1, (int) current_column ()); /* iftc */
+ XSETFASTINT (v1, current_column ());
AFTER_POTENTIAL_GC ();
PUSH (v1);
break;
diff --git a/src/character.c b/src/character.c
index f12c4f28d3..6f3312fec2 100644
--- a/src/character.c
+++ b/src/character.c
@@ -761,7 +761,7 @@ str_as_unibyte (unsigned char *str, EMACS_INT bytes)
corresponding byte and store in DST. CHARS is the number of
characters in SRC. The value is the number of bytes stored in DST.
Usually, the value is the same as CHARS, but is less than it if SRC
- contains a non-ASCII, non-eight-bit characater. If ACCEPT_LATIN_1
+ contains a non-ASCII, non-eight-bit character. If ACCEPT_LATIN_1
is nonzero, a Latin-1 character is accepted and converted to a byte
of that character code.
Note: Currently the arg ACCEPT_LATIN_1 is not used. */
diff --git a/src/cmds.c b/src/cmds.c
index 336bf1154f..5e6884c080 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -381,33 +381,37 @@ internal_self_insert (int c, EMACS_INT n)
{
EMACS_INT pos = PT;
EMACS_INT pos_byte = PT_BYTE;
+
+ /* FIXME: Check for integer overflow when calculating
+ target_clm and actual_clm. */
+
/* Column the cursor should be placed at after this insertion.
The correct value should be calculated only when necessary. */
- int target_clm = ((int) current_column () /* iftc */
- + n * (int) XINT (Fchar_width (make_number (c))));
-
- /* The actual cursor position after the trial of moving
- to column TARGET_CLM. It is greater than TARGET_CLM
- if the TARGET_CLM is middle of multi-column
- character. In that case, the new point is set after
- that character. */
- int actual_clm
- = (int) XFASTINT (Fmove_to_column (make_number (target_clm),
- Qnil));
-
- chars_to_delete = PT - pos;
-
- if (actual_clm > target_clm)
- { /* We will delete too many columns. Let's fill columns
- by spaces so that the remaining text won't move. */
+ EMACS_INT target_clm = (current_column ()
+ + n * XINT (Fchar_width (make_number (c))));
+
+ /* The actual cursor position after the trial of moving
+ to column TARGET_CLM. It is greater than TARGET_CLM
+ if the TARGET_CLM is middle of multi-column
+ character. In that case, the new point is set after
+ that character. */
+ EMACS_INT actual_clm
+ = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil));
+
+ chars_to_delete = PT - pos;
+
+ if (actual_clm > target_clm)
+ {
+ /* We will delete too many columns. Let's fill columns
+ by spaces so that the remaining text won't move. */
EMACS_INT actual = PT_BYTE;
DEC_POS (actual);
if (FETCH_CHAR (actual) == '\t')
/* Rather than add spaces, let's just keep the tab. */
chars_to_delete--;
else
- spaces_to_insert = actual_clm - target_clm;
- }
+ spaces_to_insert = actual_clm - target_clm;
+ }
SET_PT_BOTH (pos, pos_byte);
}
diff --git a/src/config.in b/src/config.in
index 1fd1f89ede..7f33727c0b 100644
--- a/src/config.in
+++ b/src/config.in
@@ -465,6 +465,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `lrand48' function. */
#undef HAVE_LRAND48
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
/* Define to 1 if using libm17n-flt. */
#undef HAVE_M17N_FLT
@@ -573,6 +576,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
/* Define to 1 if you have the `recvfrom' function. */
#undef HAVE_RECVFROM
@@ -693,6 +699,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if struct stat has an st_dm_mode member. */
#undef HAVE_ST_DM_MODE
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
/* Define to 1 if you have the `sync' function. */
#undef HAVE_SYNC
@@ -894,6 +903,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if localtime caches TZ. */
#undef LOCALTIME_CACHE
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
/* String giving fallback POP mail host. */
#undef MAILHOST
@@ -965,10 +978,21 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
'ptrdiff_t'. */
#undef PTRDIFF_T_SUFFIX
+/* Define to 1 if readlink fails to recognize a trailing slash. */
+#undef READLINK_TRAILING_SLASH_BUG
+
/* Define REL_ALLOC if you want to use the relocating allocator for buffer
space. */
#undef REL_ALLOC
+/* Define to 1 if stat needs help when passed a directory name with a trailing
+ slash */
+#undef REPLACE_FUNC_STAT_DIR
+
+/* Define to 1 if stat needs help when passed a file name with a trailing
+ slash */
+#undef REPLACE_FUNC_STAT_FILE
+
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
diff --git a/src/dired.c b/src/dired.c
index b01ce8d4d8..96063680d4 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -84,13 +84,6 @@ extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
struct re_registers *,
Lisp_Object, int, int);
-/* if system does not have symbolic links, it does not have lstat.
- In that case, use ordinary stat instead. */
-
-#ifndef S_IFLNK
-#define lstat stat
-#endif
-
Lisp_Object Qdirectory_files;
Lisp_Object Qdirectory_files_and_attributes;
Lisp_Object Qfile_name_completion;
@@ -539,7 +532,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v
if (file_name_completion_stat (encoded_dir, dp, &st) < 0)
continue;
- directoryp = ((st.st_mode & S_IFMT) == S_IFDIR);
+ directoryp = S_ISDIR (st.st_mode);
tem = Qnil;
/* If all_flag is set, always include all.
It would not actually be helpful to the user to ignore any possible
@@ -843,20 +836,16 @@ file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_ad
memcpy (fullname + pos, dp->d_name, len);
fullname[pos + len] = 0;
-#ifdef S_IFLNK
/* We want to return success if a link points to a nonexistent file,
but we want to return the status for what the link points to,
in case it is a directory. */
value = lstat (fullname, st_addr);
- stat (fullname, st_addr);
- return value;
-#else
- value = stat (fullname, st_addr);
+ if (value == 0 && S_ISLNK (st_addr->st_mode))
+ stat (fullname, st_addr);
#ifdef MSDOS
_djstat_flags = save_djstat_flags;
#endif /* MSDOS */
return value;
-#endif /* S_IFLNK */
}
Lisp_Object
@@ -948,7 +937,11 @@ so last access time will always be midnight of that day. */)
Lisp_Object dirname;
struct stat sdir;
#endif /* BSD4_2 */
- char modes[10];
+
+ /* An array to hold the mode string generated by filemodestring,
+ including its terminating space and null byte. */
+ char modes[sizeof "-rwxr-xr-x "];
+
Lisp_Object handler;
struct gcpro gcpro1;
char *uname = NULL, *gname = NULL;
@@ -974,17 +967,8 @@ so last access time will always be midnight of that day. */)
if (lstat (SSDATA (encoded), &s) < 0)
return Qnil;
- switch (s.st_mode & S_IFMT)
- {
- default:
- values[0] = Qnil; break;
- case S_IFDIR:
- values[0] = Qt; break;
-#ifdef S_IFLNK
- case S_IFLNK:
- values[0] = Ffile_symlink_p (filename); break;
-#endif
- }
+ values[0] = (S_ISLNK (s.st_mode) ? Ffile_symlink_p (filename)
+ : S_ISDIR (s.st_mode) ? Qt : Qnil);
values[1] = make_number (s.st_nlink);
if (!(NILP (id_format) || EQ (id_format, Qinteger)))
diff --git a/src/dispextern.h b/src/dispextern.h
index 6bb0c3a6aa..37ae7ee5fd 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -431,7 +431,7 @@ struct glyph
} cmp;
/* Image ID for image glyphs (type == IMAGE_GLYPH). */
- unsigned img_id;
+ int img_id;
/* Sub-structure for type == STRETCH_GLYPH. */
struct
diff --git a/src/dispnew.c b/src/dispnew.c
index 4e068bde53..1408bea2fc 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1129,32 +1129,6 @@ copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
}
-/* Copy contents of glyph row FROM to glyph row TO. Glyph pointers in
- TO and FROM are left unchanged. Glyph contents are copied from the
- glyph memory of FROM to the glyph memory of TO. Increment buffer
- positions in row TO by DELTA/ DELTA_BYTES. */
-
-void
-copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from,
- EMACS_INT delta, EMACS_INT delta_bytes)
-{
- int area;
-
- /* This is like a structure assignment TO = FROM, except that
- glyph pointers in the rows are left unchanged. */
- copy_row_except_pointers (to, from);
-
- /* Copy glyphs from FROM to TO. */
- for (area = 0; area < LAST_AREA; ++area)
- if (from->used[area])
- memcpy (to->glyphs[area], from->glyphs[area],
- from->used[area] * sizeof (struct glyph));
-
- /* Increment buffer positions in TO by DELTA. */
- increment_row_positions (to, delta, delta_bytes);
-}
-
-
/* Assign glyph row FROM to glyph row TO. This works like a structure
assignment TO = FROM, except that glyph pointers are not copied but
exchanged between TO and FROM. Pointers must be exchanged to avoid
@@ -2223,8 +2197,6 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
static void
adjust_frame_glyphs_for_window_redisplay (struct frame *f)
{
- struct window *w;
-
xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
/* Allocate/reallocate window matrices. */
@@ -2236,6 +2208,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
{
/* Allocate a dummy window if not already done. */
+ struct window *w;
if (NILP (f->menu_bar_window))
{
f->menu_bar_window = make_window ();
@@ -2258,23 +2231,26 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
#endif /* HAVE_X_WINDOWS */
#ifndef USE_GTK
- /* Allocate/ reallocate matrices of the tool bar window. If we
- don't have a tool bar window yet, make one. */
- if (NILP (f->tool_bar_window))
- {
- f->tool_bar_window = make_window ();
+ {
+ /* Allocate/ reallocate matrices of the tool bar window. If we
+ don't have a tool bar window yet, make one. */
+ struct window *w;
+ if (NILP (f->tool_bar_window))
+ {
+ f->tool_bar_window = make_window ();
+ w = XWINDOW (f->tool_bar_window);
+ XSETFRAME (w->frame, f);
+ w->pseudo_window_p = 1;
+ }
+ else
w = XWINDOW (f->tool_bar_window);
- XSETFRAME (w->frame, f);
- w->pseudo_window_p = 1;
- }
- else
- w = XWINDOW (f->tool_bar_window);
- XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
- XSETFASTINT (w->left_col, 0);
- XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
- XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
- allocate_matrices_for_window_redisplay (w);
+ XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
+ XSETFASTINT (w->left_col, 0);
+ XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
+ XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
+ allocate_matrices_for_window_redisplay (w);
+ }
#endif
}
@@ -2924,7 +2900,7 @@ sync_window_with_frame_matrix_rows (struct window *w)
/* Return the window in the window tree rooted in W containing frame
row ROW. Value is null if none is found. */
-struct window *
+static struct window *
frame_row_to_window (struct window *w, int row)
{
struct window *found = NULL;
@@ -3562,12 +3538,12 @@ redraw_overlapping_rows (struct window *w, int yb)
#endif /* HAVE_WINDOW_SYSTEM */
-#ifdef GLYPH_DEBUG
+#if defined GLYPH_DEBUG && 0
/* Check that no row in the current matrix of window W is enabled
which is below what's displayed in the window. */
-void
+static void
check_current_matrix_flags (struct window *w)
{
int last_seen_p = 0;
@@ -4014,7 +3990,7 @@ update_text_area (struct window *w, int vpos)
{
/* Otherwise clear to the end of the old row. Everything
after that position should be clear already. */
- int x;
+ int xlim;
if (i >= desired_row->used[TEXT_AREA])
rif->cursor_to (vpos, i, desired_row->y,
@@ -4031,11 +4007,11 @@ update_text_area (struct window *w, int vpos)
: (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA])))
{
w->phys_cursor_on_p = 0;
- x = -1;
+ xlim = -1;
}
else
- x = current_row->pixel_width;
- rif->clear_end_of_line (x);
+ xlim = current_row->pixel_width;
+ rif->clear_end_of_line (xlim);
changed_p = 1;
}
}
@@ -4491,7 +4467,7 @@ scrolling_window (struct window *w, int header_line_p)
&& old_lines[i]->old_uses == 1
&& old_lines[i]->new_uses == 1)
{
- int j, k;
+ int p, q;
int new_line = old_lines[i]->new_line_number;
struct run *run = run_pool + run_idx++;
@@ -4504,33 +4480,33 @@ scrolling_window (struct window *w, int header_line_p)
run->height = MATRIX_ROW (current_matrix, i)->height;
/* Extend backward. */
- j = i - 1;
- k = new_line - 1;
- while (j > first_old
- && k > first_new
- && old_lines[j] == new_lines[k])
+ p = i - 1;
+ q = new_line - 1;
+ while (p > first_old
+ && q > first_new
+ && old_lines[p] == new_lines[q])
{
- int h = MATRIX_ROW (current_matrix, j)->height;
+ int h = MATRIX_ROW (current_matrix, p)->height;
--run->current_vpos;
--run->desired_vpos;
++run->nrows;
run->height += h;
run->desired_y -= h;
run->current_y -= h;
- --j, --k;
+ --p, --q;
}
/* Extend forward. */
- j = i + 1;
- k = new_line + 1;
- while (j < last_old
- && k < last_new
- && old_lines[j] == new_lines[k])
+ p = i + 1;
+ q = new_line + 1;
+ while (p < last_old
+ && q < last_new
+ && old_lines[p] == new_lines[q])
{
- int h = MATRIX_ROW (current_matrix, j)->height;
+ int h = MATRIX_ROW (current_matrix, p)->height;
++run->nrows;
run->height += h;
- ++j, ++k;
+ ++p, ++q;
}
/* Insert run into list of all runs. Order runs by copied
@@ -4538,11 +4514,11 @@ scrolling_window (struct window *w, int header_line_p)
be copied because they are already in place. This is done
because we can avoid calling update_window_line in this
case. */
- for (j = 0; j < nruns && runs[j]->height > run->height; ++j)
+ for (p = 0; p < nruns && runs[p]->height > run->height; ++p)
;
- for (k = nruns; k > j; --k)
- runs[k] = runs[k - 1];
- runs[j] = run;
+ for (q = nruns; q > p; --q)
+ runs[q] = runs[q - 1];
+ runs[p] = run;
++nruns;
i += run->nrows;
@@ -4639,7 +4615,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
struct glyph_matrix *current_matrix = f->current_matrix;
struct glyph_matrix *desired_matrix = f->desired_matrix;
int i;
- int pause;
+ int pause_p;
int preempt_count = baud_rate / 2400 + 1;
xassert (current_matrix && desired_matrix);
@@ -4653,7 +4629,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
#if !PERIODIC_PREEMPTION_CHECKING
if (!force_p && detect_input_pending_ignore_squeezables ())
{
- pause = 1;
+ pause_p = 1;
goto do_pause;
}
#endif
@@ -4733,10 +4709,10 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
}
}
- pause = (i < FRAME_LINES (f) - 1) ? i : 0;
+ pause_p = (i < FRAME_LINES (f) - 1) ? i : 0;
/* Now just clean up termcap drivers and set cursor, etc. */
- if (!pause)
+ if (!pause_p)
{
if ((cursor_in_echo_area
/* If we are showing a message instead of the mini-buffer,
@@ -4837,7 +4813,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
#endif
clear_desired_matrices (f);
- return pause;
+ return pause_p;
}
@@ -5594,7 +5570,7 @@ marginal_area_string (struct window *w, enum window_part part,
#ifdef SIGWINCH
-SIGTYPE
+static SIGTYPE
window_change_signal (int signalnum) /* If we don't have an argument, */
/* some compilers complain in signal calls. */
{
diff --git a/src/editfns.c b/src/editfns.c
index 5d6189f2a3..28690e7c76 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3523,7 +3523,7 @@ usage: (format STRING &rest OBJECTS) */)
int maybe_combine_byte;
char *this_format;
/* Precision for each spec, or -1, a flag value meaning no precision
- was given in that spec. Element 0, corresonding to the format
+ was given in that spec. Element 0, corresponding to the format
string itself, will not be used. Element NARGS, corresponding to
no argument, *will* be assigned to in the case that a `%' and `.'
occur after the final format specifier. */
diff --git a/src/fileio.c b/src/fileio.c
index 2ccad83f66..18e9dbe968 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -26,18 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <setjmp.h>
#include <unistd.h>
-#if !defined (S_ISLNK) && defined (S_IFLNK)
-# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-
-#if !defined (S_ISFIFO) && defined (S_IFIFO)
-# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-
-#if !defined (S_ISREG) && defined (S_IFREG)
-# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
@@ -95,10 +83,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "commands.h"
-#ifndef S_ISLNK
-# define lstat stat
-#endif
-
#ifndef FILE_SYSTEM_CASE
#define FILE_SYSTEM_CASE(filename) (filename)
#endif
@@ -1922,7 +1906,6 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
Fcons (file, Fcons (newname, Qnil)));
}
-#if defined (S_ISREG) && defined (S_ISLNK)
if (input_file_statable_p)
{
if (!(S_ISREG (st.st_mode)) && !(S_ISLNK (st.st_mode)))
@@ -1934,7 +1917,6 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
report_file_error ("Non-regular file", Fcons (file, Qnil));
}
}
-#endif /* S_ISREG && S_ISLNK */
#ifdef MSDOS
/* System's default file type was set to binary by _fmode in emacs.c. */
@@ -2196,14 +2178,11 @@ This is what happens in interactive use with M-x. */)
if (errno == EXDEV)
{
int count;
-#ifdef S_IFLNK
symlink_target = Ffile_symlink_p (file);
if (! NILP (symlink_target))
Fmake_symbolic_link (symlink_target, newname,
NILP (ok_if_already_exists) ? Qnil : Qt);
- else
-#endif
- if (!NILP (Ffile_directory_p (file)))
+ else if (!NILP (Ffile_directory_p (file)))
call4 (Qcopy_directory, file, newname, Qt, Qnil);
else
/* We have already prompted if it was an integer, so don't
@@ -2215,11 +2194,7 @@ This is what happens in interactive use with M-x. */)
count = SPECPDL_INDEX ();
specbind (Qdelete_by_moving_to_trash, Qnil);
- if (!NILP (Ffile_directory_p (file))
-#ifdef S_IFLNK
- && NILP (symlink_target)
-#endif
- )
+ if (!NILP (Ffile_directory_p (file)) && NILP (symlink_target))
call2 (Qdelete_directory, file, Qt);
else
Fdelete_file (file, Qnil);
@@ -2329,7 +2304,6 @@ This happens for interactive use with M-x. */)
RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
linkname, ok_if_already_exists));
-#ifdef S_IFLNK
encoded_filename = ENCODE_FILE (filename);
encoded_linkname = ENCODE_FILE (linkname);
@@ -2351,17 +2325,17 @@ This happens for interactive use with M-x. */)
return Qnil;
}
}
+ if (errno == ENOSYS)
+ {
+ UNGCPRO;
+ xsignal1 (Qfile_error,
+ build_string ("Symbolic links are not supported"));
+ }
report_file_error ("Making symbolic link", list2 (filename, linkname));
}
UNGCPRO;
return Qnil;
-
-#else
- UNGCPRO;
- xsignal1 (Qfile_error, build_string ("Symbolic links are not supported"));
-
-#endif /* S_IFLNK */
}
@@ -2408,7 +2382,7 @@ check_writable (const char *filename)
struct stat st;
if (stat (filename, &st) < 0)
return 0;
- return (st.st_mode & S_IWRITE || (st.st_mode & S_IFMT) == S_IFDIR);
+ return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode));
#else /* not MSDOS */
#ifdef HAVE_EUIDACCESS
return (euidaccess (filename, 2) >= 0);
@@ -2500,7 +2474,7 @@ See also `file-exists-p' and `file-attributes'. */)
return Qnil;
#else /* not DOS_NT and not macintosh */
flags = O_RDONLY;
-#if defined (S_ISFIFO) && defined (O_NONBLOCK)
+#ifdef O_NONBLOCK
/* Opening a fifo without O_NONBLOCK can wait.
We don't want to wait. But we don't want to mess wth O_NONBLOCK
except in the case of a fifo, on a system which handles it. */
@@ -2555,7 +2529,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
should check ACLs though, which do affect this. */
if (stat (SDATA (dir), &statbuf) < 0)
return Qnil;
- return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
+ return S_ISDIR (statbuf.st_mode) ? Qt : Qnil;
#else
return (check_writable (!NILP (dir) ? SSDATA (dir) : "")
? Qt : Qnil);
@@ -2602,6 +2576,10 @@ points to a nonexistent file. */)
(Lisp_Object filename)
{
Lisp_Object handler;
+ char *buf;
+ int bufsize;
+ int valsize;
+ Lisp_Object val;
CHECK_STRING (filename);
filename = Fexpand_file_name (filename, Qnil);
@@ -2612,13 +2590,6 @@ points to a nonexistent file. */)
if (!NILP (handler))
return call2 (handler, Qfile_symlink_p, filename);
-#ifdef S_IFLNK
- {
- char *buf;
- int bufsize;
- int valsize;
- Lisp_Object val;
-
filename = ENCODE_FILE (filename);
bufsize = 50;
@@ -2653,10 +2624,6 @@ points to a nonexistent file. */)
xfree (buf);
val = DECODE_FILE (val);
return val;
- }
-#else /* not S_IFLNK */
- return Qnil;
-#endif /* not S_IFLNK */
}
DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0,
@@ -2681,7 +2648,7 @@ See `file-symlink-p' to distinguish symlinks. */)
if (stat (SSDATA (absname), &st) < 0)
return Qnil;
- return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil;
+ return S_ISDIR (st.st_mode) ? Qt : Qnil;
}
DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p, Sfile_accessible_directory_p, 1, 1, 0,
@@ -2744,12 +2711,12 @@ See `file-symlink-p' to distinguish symlinks. */)
if (result < 0)
return Qnil;
- return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
+ return S_ISREG (st.st_mode) ? Qt : Qnil;
}
#else
if (stat (SSDATA (absname), &st) < 0)
return Qnil;
- return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil;
+ return S_ISREG (st.st_mode) ? Qt : Qnil;
#endif
}
@@ -3007,8 +2974,7 @@ Use the current time if TIME is nil. TIME is in the format of
struct stat st;
/* Setting times on a directory always fails. */
- if (stat (SDATA (encoded_absname), &st) == 0
- && (st.st_mode & S_IFMT) == S_IFDIR)
+ if (stat (SSDATA (encoded_absname), &st) == 0 && S_ISDIR (st.st_mode))
return Qnil;
#endif
report_file_error ("Setting file times", Fcons (absname, Qnil));
@@ -3267,7 +3233,6 @@ variable `last-coding-system-used' to the coding system actually used. */)
goto notfound;
}
-#ifdef S_IFREG
/* This code will need to be changed in order to work on named
pipes, and it's probably just not worth it. So we should at
least signal an error. */
@@ -3282,7 +3247,6 @@ variable `last-coding-system-used' to the coding system actually used. */)
xsignal2 (Qfile_error,
build_string ("not a regular file"), orig_filename);
}
-#endif
if (fd < 0)
if ((fd = emacs_open (SSDATA (filename), O_RDONLY, 0)) < 0)
diff --git a/src/filelock.c b/src/filelock.c
index 8e18bb7b65..7f8f0e1c0f 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -51,10 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <utmp.h>
#endif
-#if !defined (S_ISLNK) && defined (S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-
/* A file whose last-modified time is just after the most recent boot.
Define this to be NULL to disable checking for this file. */
#ifndef BOOT_TIME_FILE
diff --git a/src/font.c b/src/font.c
index d77eafb6ad..35821ae34f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2806,7 +2806,7 @@ font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size)
Lisp_Object objlist, size, val, font_object;
struct font *font;
int min_width, height;
- int scaled_pixel_size;
+ int scaled_pixel_size = pixel_size;
font_assert (FONT_ENTITY_P (entity));
size = AREF (entity, FONT_SIZE_INDEX);
@@ -3121,7 +3121,7 @@ font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c)
XSETFRAME (frame, f);
size = AREF (spec, FONT_SIZE_INDEX);
pixel_size = font_pixel_size (f, spec);
- if (pixel_size == 0)
+ if (pixel_size == 0 && INTEGERP (attrs[LFACE_HEIGHT_INDEX]))
{
double pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
diff --git a/src/frame.c b/src/frame.c
index 56e0e7ec91..05938f3e1f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2208,15 +2208,23 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
register Lisp_Object old_alist_elt;
/* The buffer-list parameters are stored in a special place and not
- in the alist. */
+ in the alist. All buffers must be live. */
if (EQ (prop, Qbuffer_list))
{
- f->buffer_list = val;
+ Lisp_Object list = Qnil;
+ for (; CONSP (val); val = XCDR (val))
+ if (!NILP (Fbuffer_live_p (XCAR (val))))
+ list = Fcons (XCAR (val), list);
+ f->buffer_list = Fnreverse (list);
return;
}
if (EQ (prop, Qburied_buffer_list))
{
- f->buried_buffer_list = val;
+ Lisp_Object list = Qnil;
+ for (; CONSP (val); val = XCDR (val))
+ if (!NILP (Fbuffer_live_p (XCAR (val))))
+ list = Fcons (XCAR (val), list);
+ f->buried_buffer_list = Fnreverse (list);
return;
}
@@ -3275,12 +3283,12 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
bgcolor = Fassq (Qbackground_color, f->param_alist);
if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
{
- Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter);
- if (NATNUMP (index)
- && (XFASTINT (index)
+ Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
+ if (NATNUMP (parm_index)
+ && (XFASTINT (parm_index)
< sizeof (frame_parms)/sizeof (frame_parms[0]))
- && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)])
- (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)])
+ && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
+ (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
(f, bgcolor, Qnil);
}
diff --git a/src/frame.h b/src/frame.h
index 9687e39a9f..756e121f67 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -841,6 +841,7 @@ extern Lisp_Object Qnoelisp;
extern struct frame *last_nonminibuf_frame;
+extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern struct frame *make_initial_frame (void);
extern struct frame *make_terminal_frame (struct terminal *);
extern struct frame *make_frame (int);
@@ -1131,17 +1132,20 @@ extern int x_figure_window_size (struct frame *, Lisp_Object, int);
extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
extern void validate_x_resource_name (void);
-
+
extern Lisp_Object display_x_get_resource (Display_Info *,
Lisp_Object attribute,
Lisp_Object class,
Lisp_Object component,
Lisp_Object subclass);
+#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
+extern char *x_get_resource_string (const char *, const char *);
+#endif
+
/* In xmenu.c */
extern void set_frame_menubar (FRAME_PTR, int, int);
#endif /* HAVE_WINDOW_SYSTEM */
#endif /* not EMACS_FRAME_H */
-
diff --git a/src/indent.c b/src/indent.c
index 85d26520cf..37ce647556 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -45,7 +45,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Some things in set last_known_column_point to -1
to mark the memorized value as invalid. */
-static double last_known_column;
+static EMACS_INT last_known_column;
/* Value of point when current_column was called. */
@@ -55,8 +55,8 @@ EMACS_INT last_known_column_point;
static int last_known_column_modified;
-static double current_column_1 (void);
-static double position_indentation (int);
+static EMACS_INT current_column_1 (void);
+static EMACS_INT position_indentation (int);
/* Cache of beginning of line found by the last call of
current_column. */
@@ -309,7 +309,7 @@ Text that has an invisible property is considered as having width 0, unless
(void)
{
Lisp_Object temp;
- XSETFASTINT (temp, (int) current_column ()); /* iftc */
+ XSETFASTINT (temp, current_column ());
return temp;
}
@@ -321,15 +321,15 @@ invalidate_current_column (void)
last_known_column_point = 0;
}
-double
+EMACS_INT
current_column (void)
{
- register int col;
+ register EMACS_INT col;
register unsigned char *ptr, *stop;
register int tab_seen;
- int post_tab;
+ EMACS_INT post_tab;
register int c;
- register int tab_width = XINT (BVAR (current_buffer, tab_width));
+ register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width));
int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow));
register struct Lisp_Char_Table *dp = buffer_display_table ();
@@ -705,7 +705,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol)
This function handles characters that are invisible
due to text properties or overlays. */
-static double
+static EMACS_INT
current_column_1 (void)
{
EMACS_INT col = MOST_POSITIVE_FIXNUM;
@@ -807,9 +807,9 @@ even if that goes past COLUMN; by default, MINIMUM is zero.
The return value is COLUMN. */)
(Lisp_Object column, Lisp_Object minimum)
{
- int mincol;
- register int fromcol;
- register int tab_width = XINT (BVAR (current_buffer, tab_width));
+ EMACS_INT mincol;
+ register EMACS_INT fromcol;
+ register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width));
CHECK_NUMBER (column);
if (NILP (minimum))
@@ -849,8 +849,6 @@ The return value is COLUMN. */)
}
-static double position_indentation (int);
-
DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation,
0, 0, 0,
doc: /* Return the indentation of the current line.
@@ -863,12 +861,12 @@ following any initial whitespace. */)
scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
- XSETFASTINT (val, (int) position_indentation (PT_BYTE)); /* iftc */
+ XSETFASTINT (val, position_indentation (PT_BYTE));
SET_PT_BOTH (opoint, opoint_byte);
return val;
}
-static double
+static EMACS_INT
position_indentation (register int pos_byte)
{
register EMACS_INT column = 0;
@@ -958,9 +956,9 @@ position_indentation (register int pos_byte)
preceding line. */
int
-indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column)
+indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT column)
{
- double val;
+ EMACS_INT val;
EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
SET_PT_BOTH (pos, pos_byte);
@@ -969,7 +967,7 @@ indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column)
val = position_indentation (PT_BYTE);
SET_PT_BOTH (opoint, opoint_byte);
- return val >= column; /* hmm, float comparison */
+ return val >= column;
}
DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p",
@@ -1126,7 +1124,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width));
register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow));
register struct Lisp_Char_Table *dp = window_display_table (win);
- int selective
+ EMACS_INT selective
= (INTEGERP (BVAR (current_buffer, selective_display))
? XINT (BVAR (current_buffer, selective_display))
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
@@ -1590,8 +1588,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
else if (c == '\n')
{
if (selective > 0
- && indented_beyond_p (pos, pos_byte,
- (double) selective)) /* iftc */
+ && indented_beyond_p (pos, pos_byte, selective))
{
/* If (pos == to), we don't have to take care of
selective display. */
@@ -1607,7 +1604,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
}
while (pos < to
&& indented_beyond_p (pos, pos_byte,
- (double) selective)); /* iftc */
+ selective));
/* Allow for the " ..." that is displayed for them. */
if (selective_rlen)
{
@@ -1837,7 +1834,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w)
register EMACS_INT first;
EMACS_INT from_byte;
EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0;
- int selective
+ EMACS_INT selective
= (INTEGERP (BVAR (current_buffer, selective_display))
? XINT (BVAR (current_buffer, selective_display))
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
@@ -1872,7 +1869,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w)
&& ((selective > 0
&& indented_beyond_p (prevline,
CHAR_TO_BYTE (prevline),
- (double) selective)) /* iftc */
+ selective))
/* Watch out for newlines with `invisible' property.
When moving upward, check the newline before. */
|| (propval = Fget_char_property (make_number (prevline - 1),
@@ -1929,7 +1926,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w)
&& ((selective > 0
&& indented_beyond_p (prevline,
CHAR_TO_BYTE (prevline),
- (double) selective)) /* iftc */
+ selective))
/* Watch out for newlines with `invisible' property.
When moving downward, check the newline after. */
|| (propval = Fget_char_property (make_number (prevline),
diff --git a/src/keymap.c b/src/keymap.c
index 0e4715e4b8..4459ef07d6 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2756,7 +2756,7 @@ remapped command in the returned list. */)
&& !NILP (firstonly)
&& !NILP (tem = Fget (definition, QCadvertised_binding)))
{
- /* We have a list of advertized bindings. */
+ /* We have a list of advertised bindings. */
while (CONSP (tem))
if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition))
return XCAR (tem);
@@ -3219,7 +3219,7 @@ static void
describe_command (Lisp_Object definition, Lisp_Object args)
{
register Lisp_Object tem1;
- int column = (int) current_column (); /* iftc */
+ EMACS_INT column = current_column ();
int description_column;
/* If column 16 is no good, go to col 32;
diff --git a/src/lisp.h b/src/lisp.h
index 223cdbc92f..ece9642825 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3151,9 +3151,9 @@ extern char *push_key_description (unsigned int, char *, int);
EXFUN (Fvertical_motion, 2);
EXFUN (Findent_to, 2);
EXFUN (Fmove_to_column, 2);
-extern double current_column (void);
+extern EMACS_INT current_column (void);
extern void invalidate_current_column (void);
-extern int indented_beyond_p (EMACS_INT, EMACS_INT, double);
+extern int indented_beyond_p (EMACS_INT, EMACS_INT, EMACS_INT);
extern void syms_of_indent (void);
/* Defined in frame.c */
diff --git a/src/lread.c b/src/lread.c
index 77b397a03d..c8c07bed47 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1509,7 +1509,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
Lisp_Object tmp = call1 (predicate, string);
exists = !NILP (tmp)
&& (EQ (tmp, Qdir_ok)
- || !NILP (Ffile_directory_p (string)));
+ || NILP (Ffile_directory_p (string)));
}
if (exists)
@@ -1527,8 +1527,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto
encoded_fn = ENCODE_FILE (string);
pfn = SSDATA (encoded_fn);
- exists = (stat (pfn, &st) >= 0
- && (st.st_mode & S_IFMT) != S_IFDIR);
+ exists = (stat (pfn, &st) == 0 && ! S_ISDIR (st.st_mode));
if (exists)
{
/* Check that we can access or open it. */
@@ -4537,7 +4536,7 @@ This variable is automatically set from the file variables of an interpreted
Qdir_ok = intern_c_string ("dir-ok");
staticpro (&Qdir_ok);
-
+
Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation");
staticpro (&Qdo_after_load_evaluation) ;
diff --git a/src/minibuf.c b/src/minibuf.c
index 9852900b60..75a24686d5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -82,6 +82,15 @@ Lisp_Object Qcase_fold_search;
Lisp_Object Qread_expression_history;
+/* Prompt to display in front of the mini-buffer contents. */
+
+static Lisp_Object minibuf_prompt;
+
+/* Width of current mini-buffer prompt. Only set after display_line
+ of the line that contains the prompt. */
+
+static EMACS_INT minibuf_prompt_width;
+
/* Put minibuf on currently selected frame's minibuffer.
We do this whenever the user starts a new minibuffer
@@ -623,7 +632,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
unbind_to (count1, Qnil);
}
- minibuf_prompt_width = (int) current_column (); /* iftc */
+ minibuf_prompt_width = current_column ();
/* Put in the initial input. */
if (!NILP (initial))
diff --git a/src/msdos.c b/src/msdos.c
index 8f0f6776aa..261a09ac85 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1389,8 +1389,6 @@ IT_delete_glyphs (struct frame *f, int n)
void
x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
- extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-
set_menu_bar_lines (f, value, oldval);
}
@@ -3922,6 +3920,18 @@ croak (char *badfunc)
*/
int setpgrp (void) {return 0; }
int setpriority (int x, int y, int z) { return 0; }
+
+#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
+ssize_t
+readlink (const char *name, char *dummy1, size_t dummy2)
+{
+ /* `access' is much faster than `stat' on MS-DOS. */
+ if (access (name, F_OK) == 0)
+ errno = EINVAL;
+ return -1;
+}
+#endif
+
#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
@@ -4236,4 +4246,3 @@ This variable is used only by MS-DOS terminals. */);
}
#endif /* MSDOS */
-
diff --git a/src/msdos.h b/src/msdos.h
index 6b076c1722..4bbe9b134d 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -40,6 +40,11 @@ void mouse_init (void);
void mouse_on (void);
void mouse_off (void);
void mouse_moveto (int, int);
+
+#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
+int readlink (const char *, char *, size_t);
+#endif
+
#ifndef HAVE_X_WINDOWS
/* Dummy types. */
diff --git a/src/nsterm.m b/src/nsterm.m
index a09c95c7d0..cc2c4cf980 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -189,7 +189,7 @@ static NSMutableArray *ns_pending_files, *ns_pending_service_names,
*ns_pending_service_args;
static BOOL inNsSelect = 0;
-/* Convert modifiers in a NeXTSTEP event to emacs style modifiers. */
+/* Convert modifiers in a NeXTstep event to emacs style modifiers. */
#define NS_FUNCTION_KEY_MASK 0x800000
#define NSLeftControlKeyMask (0x000001 | NSControlKeyMask)
#define NSRightControlKeyMask (0x002000 | NSControlKeyMask)
@@ -1072,7 +1072,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav)
: f->left_pos;
/* We use visibleFrame here to take menu bar into account.
Ideally we should also adjust left/top with visibleFrame.origin. */
-
+
f->top_pos = f->size_hint_flags & YNegative
? ([screen visibleFrame].size.height + f->top_pos
- FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f)
@@ -1154,7 +1154,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
FRAME_TOOLBAR_HEIGHT (f) = 0;
wr.size.width = pixelwidth + f->border_width;
- wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f)
+ wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f)
+ FRAME_TOOLBAR_HEIGHT (f);
/* Do not try to constrain to this screen. We may have multiple
@@ -2230,11 +2230,8 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
int x, int y, int cursor_type, int cursor_width,
int on_p, int active_p)
/* --------------------------------------------------------------------------
- External call (RIF): draw cursor
- (modeled after x_draw_window_cursor
- FIXME: cursor_width is effectively bogus -- it sometimes gets set
- in xdisp.c set_frame_cursor_types, sometimes left uninitialized;
- DON'T USE IT (no other terms do)
+ External call (RIF): draw cursor.
+ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
-------------------------------------------------------------------------- */
{
NSRect r, s;
@@ -2251,7 +2248,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
and mini-buffer. */
NSTRACE (dumpcursor);
-//fprintf(stderr, "drawcursor (%d,%d) activep = %d\tonp = %d\tc_type = %d\twidth = %d\n",x,y, active_p,on_p,cursor_type,cursor_width);
if (!on_p)
return;
@@ -2276,8 +2272,21 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
return;
}
+ /* We draw the cursor (with NSRectFill), then draw the glyph on top
+ (other terminals do it the other way round). We must set
+ w->phys_cursor_width to the cursor width. For bar cursors, that
+ is CURSOR_WIDTH; for box cursors, it is the glyph width. */
get_phys_cursor_geometry (w, glyph_row, phys_cursor_glyph, &fx, &fy, &h);
+ /* The above get_phys_cursor_geometry call set w->phys_cursor_width
+ to the glyph width; replace with CURSOR_WIDTH for bar cursors. */
+ if (cursor_type == BAR_CURSOR || cursor_type == HBAR_CURSOR)
+ {
+ if (cursor_width < 1)
+ cursor_width = max (FRAME_CURSOR_WIDTH (f), 1);
+ w->phys_cursor_width = cursor_width;
+ }
+
r.origin.x = fx, r.origin.y = fy;
r.size.height = h;
r.size.width = w->phys_cursor_width;
@@ -2285,7 +2294,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
/* FIXME: if we overwrite the internal border area, it does not get erased;
fix by truncating cursor, but better would be to erase properly */
overspill = r.origin.x + r.size.width -
- WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w)
+ WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w)
- WINDOW_TOTAL_FRINGE_WIDTH (w) - FRAME_INTERNAL_BORDER_WIDTH (f));
if (overspill > 0)
r.size.width -= overspill;
@@ -2335,8 +2344,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
break;
case BAR_CURSOR:
s = r;
- s.size.width = min (cursor_width, 2); //FIXME(see above)
-
/* If the character under cursor is R2L, draw the bar cursor
on the right of its glyph, rather than on the left. */
cursor_glyph = get_phys_cursor_glyph (w);
@@ -2984,7 +2991,7 @@ ns_draw_glyph_string (struct glyph_string *s)
NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face);
NS_FACE_FOREGROUND (s->face) = tmp;
}
-
+
ns_tmp_font->font.driver->draw
(s, 0, s->nchars, s->x, s->y,
(ns_tmp_flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p)
@@ -3010,9 +3017,9 @@ ns_draw_glyph_string (struct glyph_string *s)
else
ns_maybe_dumpglyphs_background
(s, s->first_glyph->type == COMPOSITE_GLYPH);
- /* ... */
+ /* ... */
/* Not yet implemented. */
- /* ... */
+ /* ... */
ns_unfocus (s->f);
break;
@@ -3785,7 +3792,7 @@ ns_term_init (Lisp_Object display_name)
strncpy (terminal->name, SDATA (display_name), SBYTES (display_name));
terminal->name[SBYTES (display_name)] = 0;
- UNBLOCK_INPUT;
+ UNBLOCK_INPUT;
if (!inhibit_x_resources)
{
@@ -3802,7 +3809,7 @@ ns_term_init (Lisp_Object display_name)
stringForKey: @"AppleHighlightColor"];
if (ns_selection_color == nil)
ns_selection_color = NS_SELECTION_COLOR_DEFAULT;
-
+
{
NSColorList *cl = [NSColorList colorListNamed: @"Emacs"];
@@ -3898,7 +3905,7 @@ ns_term_init (Lisp_Object display_name)
keyEquivalent: @"q"
atIndex: 9];
- item = [mainMenu insertItemWithTitle: ns_app_name
+ item = [mainMenu insertItemWithTitle: ns_app_name
action: @selector (menuDown:)
keyEquivalent: @""
atIndex: 0];
@@ -4103,7 +4110,7 @@ ns_term_shutdown (int sig)
-appShouldTerminate
Cancel -> Nothing else
Accept ->
-
+
-terminate
KEY_NS_POWER_OFF, (save-buffers-kill-emacs)
ns_term_shutdown()
@@ -4113,10 +4120,10 @@ ns_term_shutdown (int sig)
- (void) terminate: (id)sender
{
struct frame *emacsframe = SELECTED_FRAME ();
-
+
if (!emacs_event)
return;
-
+
emacs_event->kind = NS_NONKEY_EVENT;
emacs_event->code = KEY_NS_POWER_OFF;
emacs_event->arg = Qt; /* mark as non-key event */
@@ -4418,7 +4425,7 @@ ns_term_shutdown (int sig)
code = ([[theEvent charactersIgnoringModifiers] length] == 0) ?
0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0];
/* (Carbon way: [theEvent keyCode]) */
-
+
/* is it a "function key"? */
fnKeysym = ns_convert_key (code);
if (fnKeysym)
@@ -4542,6 +4549,7 @@ ns_term_shutdown (int sig)
/* if it was a function key or had modifiers, pass it directly to emacs */
if (fnKeysym || (emacs_event->modifiers
+ && (emacs_event->modifiers != shift_modifier)
&& [[theEvent charactersIgnoringModifiers] length] > 0))
/*[[theEvent characters] length] */
{
@@ -5445,7 +5453,7 @@ ns_term_shutdown (int sig)
/*
drawRect: may be called (at least in OS X 10.5) for invisible
- views as well for some reason. Thus, do not infer visibility
+ views as well for some reason. Thus, do not infer visibility
here.
emacsframe->async_visible = 1;
diff --git a/src/print.c b/src/print.c
index 00847d6731..602575b5b0 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1630,26 +1630,6 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
{
PRINTCHAR ('(');
- /* If the first element is a backquote form,
- print it old-style so it won't be misunderstood. */
- if (print_quoted && CONSP (XCAR (obj))
- && CONSP (XCDR (XCAR (obj)))
- && NILP (XCDR (XCDR (XCAR (obj))))
- && EQ (XCAR (XCAR (obj)), Qbackquote))
- {
- Lisp_Object tem;
- tem = XCAR (obj);
- PRINTCHAR ('(');
-
- print_object (Qbackquote, printcharfun, 0);
- PRINTCHAR (' ');
-
- print_object (XCAR (XCDR (tem)), printcharfun, 0);
- PRINTCHAR (')');
-
- obj = XCDR (obj);
- }
-
{
EMACS_INT print_length;
int i;
@@ -1853,25 +1833,25 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
if (!NILP (h->test))
{
strout (" test ", -1, -1, printcharfun, 0);
- print_object (h->test, printcharfun, 0);
+ print_object (h->test, printcharfun, escapeflag);
}
if (!NILP (h->weak))
{
strout (" weakness ", -1, -1, printcharfun, 0);
- print_object (h->weak, printcharfun, 0);
+ print_object (h->weak, printcharfun, escapeflag);
}
if (!NILP (h->rehash_size))
{
strout (" rehash-size ", -1, -1, printcharfun, 0);
- print_object (h->rehash_size, printcharfun, 0);
+ print_object (h->rehash_size, printcharfun, escapeflag);
}
if (!NILP (h->rehash_threshold))
{
strout (" rehash-threshold ", -1, -1, printcharfun, 0);
- print_object (h->rehash_threshold, printcharfun, 0);
+ print_object (h->rehash_threshold, printcharfun, escapeflag);
}
strout (" data ", -1, -1, printcharfun, 0);
@@ -1890,9 +1870,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
if (!NILP (HASH_HASH (h, i)))
{
if (i) PRINTCHAR (' ');
- print_object (HASH_KEY (h, i), printcharfun, 1);
+ print_object (HASH_KEY (h, i), printcharfun, escapeflag);
PRINTCHAR (' ');
- print_object (HASH_VALUE (h, i), printcharfun, 1);
+ print_object (HASH_VALUE (h, i), printcharfun, escapeflag);
}
if (size < real_size)
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 8debd28dcc..29ca062989 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -80,6 +80,12 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
strtold, so use _strtold in all versions. */
#define strtold _strtold
+#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3
+# define HAVE_LSTAT 1
+#else
+# define lstat stat
+#endif
+
/* End of gnulib-related stuff. */
/* When $TERM is "internal" then this is substituted: */
diff --git a/src/scroll.c b/src/scroll.c
index 08ae83eeee..1343b89c41 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -262,7 +262,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
for (k = 0; k < window_size; ++k)
copy_from[k] = -1;
-#define CHECK_BOUNDS \
+#if GLYPH_DEBUG
+# define CHECK_BOUNDS \
do \
{ \
int k; \
@@ -271,6 +272,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
|| (copy_from[k] >= 0 && copy_from[k] < window_size)); \
} \
while (0);
+#endif
/* When j is advanced, this corresponds to deleted lines.
When i is advanced, this corresponds to inserted lines. */
@@ -1035,4 +1037,3 @@ do_line_insertion_deletion_costs (FRAME_PTR frame,
FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame),
coefficient);
}
-
diff --git a/src/sheap.c b/src/sheap.c
index 65fbab538b..31414fbe5c 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -25,7 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <unistd.h>
-#define STATIC_HEAP_SIZE (12 * 1024 * 1024)
+#define STATIC_HEAP_SIZE (13 * 1024 * 1024)
int debug_sheap = 0;
diff --git a/src/w32.c b/src/w32.c
index d4f68544c1..ae2373be46 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -3614,6 +3614,25 @@ utime (const char *name, struct utimbuf *times)
}
+/* Symlink-related functions that always fail. Used in fileio.c to
+ avoid #ifdef's. */
+int
+symlink (char const *dummy1, char const *dummy2)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+ssize_t
+readlink (const char *name, char *dummy1, size_t dummy2)
+{
+ /* `access' is much faster than `stat' on MS-Windows. */
+ if (sys_access (name, 0) == 0)
+ errno = EINVAL;
+ return -1;
+}
+
+
/* Support for browsing other processes and their attributes. See
process.c for the Lisp bindings. */
diff --git a/src/w32proc.c b/src/w32proc.c
index 1c009c7f94..bb8b428ffe 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -831,7 +831,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
Note that using backslash to escape embedded quotes requires
additional special handling if an embedded quote is already
- preceeded by backslash, or if an arg requiring quoting ends with
+ preceded by backslash, or if an arg requiring quoting ends with
backslash. In such cases, the run of escape characters needs to be
doubled. For consistency, we apply this special handling as long
as the escape character is not quote.
diff --git a/src/w32term.c b/src/w32term.c
index 692130b514..67e853f21f 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5941,7 +5941,7 @@ w32_initialize_display_info (Lisp_Object display_name)
}
-/* Create an xrdb-style database of resources to supercede registry settings.
+/* Create an xrdb-style database of resources to supersede registry settings.
The database is just a concatenation of C strings, finished by an additional
\0. The strings are submitted to some basic normalization, so
diff --git a/src/window.c b/src/window.c
index f0555d5c96..9a0955955f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1769,8 +1769,10 @@ window_list (void)
ALL_FRAMES t means search all frames,
nil means search just current frame,
- `visible' means search just visible frames,
- 0 means search visible and iconified frames,
+ `visible' means search just visible frames on the
+ current terminal,
+ 0 means search visible and iconified frames on the
+ current terminal,
a window means search the frame that window belongs to,
a frame means consider windows on that frame, only. */
@@ -1836,8 +1838,8 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf
/* Decode arguments as allowed by Fnext_window, Fprevious_window, and
- Fwindow_list. See there for the meaning of WINDOW, MINIBUF, and
- ALL_FRAMES. */
+ Fwindow_list. See candidate_window_p for the meaning of WINDOW,
+ MINIBUF, and ALL_FRAMES. */
static void
decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames)
@@ -1871,12 +1873,6 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object
;
else if (!EQ (*all_frames, Qt))
*all_frames = Qnil;
-
- /* Now *ALL_FRAMES is t meaning search all frames, nil meaning
- search just current frame, `visible' meaning search just visible
- frames, 0 meaning search visible and iconified frames, or a
- window, meaning search the frame that window belongs to, or a
- frame, meaning consider windows on that frame, only. */
}
@@ -1974,9 +1970,9 @@ ALL-FRAMES nil or omitted means consider all windows on WINDOW's
windows on all frames that share that minibuffer too.
ALL-FRAMES t means consider all windows on all existing frames.
ALL-FRAMES `visible' means consider all windows on all visible
- frames.
+ frames on the current terminal.
ALL-FRAMES 0 means consider all windows on all visible and
- iconified frames.
+ iconified frames on the current terminal.
ALL-FRAMES a frame means consider all windows on that frame only.
Anything else means consider all windows on WINDOW's frame and no
others.
diff --git a/src/window.h b/src/window.h
index 473a43bbc3..9f0809e4f1 100644
--- a/src/window.h
+++ b/src/window.h
@@ -788,14 +788,6 @@ void run_window_configuration_change_hook (struct frame *f);
void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
int run_hooks_p, int keep_margins_p);
-/* Prompt to display in front of the minibuffer contents. */
-
-extern Lisp_Object minibuf_prompt;
-
-/* The visual width of the above. */
-
-extern int minibuf_prompt_width;
-
/* This is the window where the echo area message was displayed. It
is always a minibuffer window, but it may not be the same window
currently active as a minibuffer. */
@@ -877,4 +869,3 @@ extern void keys_of_window (void);
extern int window_box_text_cols (struct window *w);
#endif /* not WINDOW_H_INCLUDED */
-
diff --git a/src/xdisp.c b/src/xdisp.c
index e144237d34..44cb713011 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -483,15 +483,6 @@ int buffer_shared;
static Lisp_Object default_invis_vector[3];
-/* Prompt to display in front of the mini-buffer contents. */
-
-Lisp_Object minibuf_prompt;
-
-/* Width of current mini-buffer prompt. Only set after display_line
- of the line that contains the prompt. */
-
-int minibuf_prompt_width;
-
/* This is the window where the echo area message was displayed. It
is always a mini-buffer window, but it may not be the same window
currently active as a mini-buffer. */
@@ -771,7 +762,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
static void handle_line_prefix (struct it *);
-static void pint2str (char *, int, int);
+static void pint2str (char *, int, EMACS_INT);
static void pint2hrstr (char *, int, int);
static struct text_pos run_window_scroll_functions (Lisp_Object,
struct text_pos);
@@ -2477,9 +2468,9 @@ init_iterator (struct it *it, struct window *w,
&& WINDOWP (minibuf_selected_window)
&& w == XWINDOW (minibuf_selected_window))))
{
- EMACS_INT charpos = marker_position (BVAR (current_buffer, mark));
- it->region_beg_charpos = min (PT, charpos);
- it->region_end_charpos = max (PT, charpos);
+ EMACS_INT markpos = marker_position (BVAR (current_buffer, mark));
+ it->region_beg_charpos = min (PT, markpos);
+ it->region_end_charpos = max (PT, markpos);
}
else
it->region_beg_charpos = it->region_end_charpos = -1;
@@ -3183,11 +3174,11 @@ handle_fontified_prop (struct it *it)
safe_call1 (val, pos);
else
{
- Lisp_Object globals, fn;
+ Lisp_Object fns, fn;
struct gcpro gcpro1, gcpro2;
- globals = Qnil;
- GCPRO2 (val, globals);
+ fns = Qnil;
+ GCPRO2 (val, fns);
for (; CONSP (val); val = XCDR (val))
{
@@ -3200,11 +3191,11 @@ handle_fontified_prop (struct it *it)
In a global value, t should not occur. If it
does, we must ignore it to avoid an endless
loop. */
- for (globals = Fdefault_value (Qfontification_functions);
- CONSP (globals);
- globals = XCDR (globals))
+ for (fns = Fdefault_value (Qfontification_functions);
+ CONSP (fns);
+ fns = XCDR (fns))
{
- fn = XCAR (globals);
+ fn = XCAR (fns);
if (!EQ (fn, Qt))
safe_call1 (fn, pos);
}
@@ -3989,12 +3980,12 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
else if (NUMBERP (it->font_height))
{
/* Value is a multiple of the canonical char height. */
- struct face *face;
+ struct face *f;
- face = FACE_FROM_ID (it->f,
- lookup_basic_face (it->f, DEFAULT_FACE_ID));
+ f = FACE_FROM_ID (it->f,
+ lookup_basic_face (it->f, DEFAULT_FACE_ID));
new_height = (XFLOATINT (it->font_height)
- * XINT (face->lface[LFACE_HEIGHT_INDEX]));
+ * XINT (f->lface[LFACE_HEIGHT_INDEX]));
}
else
{
@@ -7982,7 +7973,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte)
if (nlflag)
{
EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte;
- int dup;
+ int dups;
insert_1 ("\n", 1, 1, 0, 0);
scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0);
@@ -7997,20 +7988,20 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte)
prev_bol = PT;
prev_bol_byte = PT_BYTE;
- dup = message_log_check_duplicate (prev_bol, prev_bol_byte,
- this_bol, this_bol_byte);
- if (dup)
+ dups = message_log_check_duplicate (prev_bol, prev_bol_byte,
+ this_bol, this_bol_byte);
+ if (dups)
{
del_range_both (prev_bol, prev_bol_byte,
this_bol, this_bol_byte, 0);
- if (dup > 1)
+ if (dups > 1)
{
char dupstr[40];
int duplen;
/* If you change this format, don't forget to also
change message_log_check_duplicate. */
- sprintf (dupstr, " [%d times]", dup);
+ sprintf (dupstr, " [%d times]", dups);
duplen = strlen (dupstr);
TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1);
insert_1 (dupstr, duplen, 1, 0, 1);
@@ -8340,20 +8331,20 @@ message_with_string (const char *m, Lisp_Object string, int log)
cmd_error, so this must be just an informative message; toss it. */
if (FRAME_MESSAGE_BUF (f))
{
- Lisp_Object args[2], message;
+ Lisp_Object args[2], msg;
struct gcpro gcpro1, gcpro2;
args[0] = build_string (m);
- args[1] = message = string;
- GCPRO2 (args[0], message);
+ args[1] = msg = string;
+ GCPRO2 (args[0], msg);
gcpro1.nvars = 2;
- message = Fformat (2, args);
+ msg = Fformat (2, args);
if (log)
- message3 (message, SBYTES (message), STRING_MULTIBYTE (message));
+ message3 (msg, SBYTES (msg), STRING_MULTIBYTE (msg));
else
- message3_nolog (message, SBYTES (message), STRING_MULTIBYTE (message));
+ message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg));
UNGCPRO;
@@ -11420,8 +11411,8 @@ redisplay_internal (int preserve_echo_area)
{
struct window *w = XWINDOW (selected_window);
struct window *sw;
- struct frame *f;
- int pause;
+ struct frame *fr;
+ int pending;
int must_finish = 0;
struct text_pos tlbufpos, tlendpos;
int number_of_visible_frames;
@@ -11446,10 +11437,10 @@ redisplay_internal (int preserve_echo_area)
/* Don't examine these until after testing Vinhibit_redisplay.
When Emacs is shutting down, perhaps because its connection to
X has dropped, we should not look at them at all. */
- f = XFRAME (w->frame);
+ fr = XFRAME (w->frame);
sf = SELECTED_FRAME ();
- if (!f->glyphs_initialized_p)
+ if (!fr->glyphs_initialized_p)
return;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
@@ -11491,7 +11482,7 @@ redisplay_internal (int preserve_echo_area)
may need to run Elisp code (via prepare_menu_bars). */
select_frame_for_redisplay (old_frame);
- pause = 0;
+ pending = 0;
reconsider_clip_changes (w, current_buffer);
last_escape_glyph_frame = NULL;
last_escape_glyph_face_id = (1 << FACE_ID_BITS);
@@ -11588,8 +11579,7 @@ redisplay_internal (int preserve_echo_area)
&& !(PT == XFASTINT (w->last_point)
&& XFASTINT (w->last_modified) >= MODIFF
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
- && (XFASTINT (w->column_number_displayed)
- != (int) current_column ())) /* iftc */
+ && (XFASTINT (w->column_number_displayed) != current_column ()))
w->update_mode_line = Qt;
unbind_to (count1, Qnil);
@@ -11963,7 +11953,7 @@ redisplay_internal (int preserve_echo_area)
/* Update the display. */
set_window_update_flags (XWINDOW (f->root_window), 1);
- pause |= update_frame (f, 0, 0);
+ pending |= update_frame (f, 0, 0);
f->updated_p = 1;
}
}
@@ -11977,7 +11967,7 @@ redisplay_internal (int preserve_echo_area)
select_frame_for_redisplay (old_frame);
eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window));
- if (!pause)
+ if (!pending)
{
/* Do the mark_window_display_accurate after all windows have
been redisplayed because this call resets flags in buffers
@@ -12026,7 +12016,7 @@ redisplay_internal (int preserve_echo_area)
goto retry;
XWINDOW (selected_window)->must_be_updated_p = 1;
- pause = update_frame (sf, 0, 0);
+ pending = update_frame (sf, 0, 0);
}
/* We may have called echo_area_display at the top of this
@@ -12040,15 +12030,15 @@ redisplay_internal (int preserve_echo_area)
if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
{
XWINDOW (mini_window)->must_be_updated_p = 1;
- pause |= update_frame (mini_frame, 0, 0);
- if (!pause && hscroll_windows (mini_window))
+ pending |= update_frame (mini_frame, 0, 0);
+ if (!pending && hscroll_windows (mini_window))
goto retry;
}
}
/* If display was paused because of pending input, make sure we do a
thorough update the next time. */
- if (pause)
+ if (pending)
{
/* Prevent the optimization at the beginning of
redisplay_internal that tries a single-line update of the
@@ -12098,7 +12088,7 @@ redisplay_internal (int preserve_echo_area)
redisplay constructing glyphs, so simply exposing a frame won't
display anything in this case. So, we have to display these
frames here explicitly. */
- if (!pause)
+ if (!pending)
{
Lisp_Object tail, frame;
int new_count = 0;
@@ -12126,7 +12116,7 @@ redisplay_internal (int preserve_echo_area)
/* If we just did a pending size change, or have additional
visible frames, or selected_window changed, redisplay again. */
- if ((windows_or_buffers_changed && !pause)
+ if ((windows_or_buffers_changed && !pending)
|| (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw))
goto retry;
@@ -12382,18 +12372,6 @@ redisplay_window_1 (Lisp_Object window)
}
-/* Increment GLYPH until it reaches END or CONDITION fails while
- adding (GLYPH)->pixel_width to X. */
-
-#define SKIP_GLYPHS(glyph, end, x, condition) \
- do \
- { \
- (x) += (glyph)->pixel_width; \
- ++(glyph); \
- } \
- while ((glyph) < (end) && (condition))
-
-
/* Set cursor position of W. PT is assumed to be displayed in ROW.
DELTA and DELTA_BYTES are the numbers of characters and bytes by
which positions recorded in ROW differ from current buffer
@@ -13719,7 +13697,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
int buffer_unchanged_p = 0;
int temp_scroll_step = 0;
int count = SPECPDL_INDEX ();
- int rc;
int centering_position = -1;
int last_line_misfit = 0;
EMACS_INT beg_unchanged, end_unchanged;
@@ -13841,8 +13818,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
&& !(PT == XFASTINT (w->last_point)
&& XFASTINT (w->last_modified) >= MODIFF
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
- && (XFASTINT (w->column_number_displayed)
- != (int) current_column ())) /* iftc */
+ && (XFASTINT (w->column_number_displayed) != current_column ()))
update_mode_line = 1;
/* Count number of windows showing the selected buffer. An indirect
@@ -14032,12 +14008,15 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
/* Handle case where text has not changed, only point, and it has
not moved off the frame, and we are not retrying after hscroll.
(current_matrix_up_to_date_p is nonzero when retrying.) */
- if (current_matrix_up_to_date_p
- && (rc = try_cursor_movement (window, startp, &temp_scroll_step),
- rc != CURSOR_MOVEMENT_CANNOT_BE_USED))
+ if (current_matrix_up_to_date_p)
{
+ int rc = try_cursor_movement (window, startp, &temp_scroll_step);
+
switch (rc)
{
+ case CURSOR_MOVEMENT_CANNOT_BE_USED:
+ break;
+
case CURSOR_MOVEMENT_SUCCESS:
used_current_matrix_p = 1;
goto done;
@@ -14347,11 +14326,10 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
|| INTEGERP (w->base_line_pos)
/* Column number is displayed and different from the one displayed. */
|| (!NILP (w->column_number_displayed)
- && (XFASTINT (w->column_number_displayed)
- != (int) current_column ()))) /* iftc */
- /* This means that the window has a mode line. */
- && (WINDOW_WANTS_MODELINE_P (w)
- || WINDOW_WANTS_HEADER_LINE_P (w)))
+ && (XFASTINT (w->column_number_displayed) != current_column ())))
+ /* This means that the window has a mode line. */
+ && (WINDOW_WANTS_MODELINE_P (w)
+ || WINDOW_WANTS_HEADER_LINE_P (w)))
{
display_mode_lines (w);
@@ -14597,7 +14575,7 @@ static int
try_window_reusing_current_matrix (struct window *w)
{
struct frame *f = XFRAME (w->frame);
- struct glyph_row *row, *bottom_row;
+ struct glyph_row *bottom_row;
struct it it;
struct run run;
struct text_pos start, new_start;
@@ -14706,6 +14684,8 @@ try_window_reusing_current_matrix (struct window *w)
have at least one reusable row. */
if (it.current_y < it.last_visible_y)
{
+ struct glyph_row *row;
+
/* IT.vpos always starts from 0; it counts text lines. */
nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix));
@@ -15491,41 +15471,41 @@ try_window_id (struct window *w)
|| (last_changed_charpos < CHARPOS (start) - 1
&& FETCH_BYTE (BYTEPOS (start) - 1) == '\n')))
{
- EMACS_INT Z_old, delta, Z_BYTE_old, delta_bytes;
+ EMACS_INT Z_old, Z_delta, Z_BYTE_old, Z_delta_bytes;
struct glyph_row *r0;
/* Compute how many chars/bytes have been added to or removed
from the buffer. */
Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
- delta = Z - Z_old;
- delta_bytes = Z_BYTE - Z_BYTE_old;
+ Z_delta = Z - Z_old;
+ Z_delta_bytes = Z_BYTE - Z_BYTE_old;
/* Give up if PT is not in the window. Note that it already has
been checked at the start of try_window_id that PT is not in
front of the window start. */
- if (PT >= MATRIX_ROW_END_CHARPOS (row) + delta)
+ if (PT >= MATRIX_ROW_END_CHARPOS (row) + Z_delta)
GIVE_UP (13);
/* If window start is unchanged, we can reuse the whole matrix
as is, after adjusting glyph positions. No need to compute
the window end again, since its offset from Z hasn't changed. */
r0 = MATRIX_FIRST_TEXT_ROW (current_matrix);
- if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + delta
- && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + delta_bytes
+ if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + Z_delta
+ && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + Z_delta_bytes
/* PT must not be in a partially visible line. */
- && !(PT >= MATRIX_ROW_START_CHARPOS (row) + delta
+ && !(PT >= MATRIX_ROW_START_CHARPOS (row) + Z_delta
&& MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w)))
{
/* Adjust positions in the glyph matrix. */
- if (delta || delta_bytes)
+ if (Z_delta || Z_delta_bytes)
{
struct glyph_row *r1
= MATRIX_BOTTOM_TEXT_ROW (current_matrix, w);
increment_matrix_positions (w->current_matrix,
MATRIX_ROW_VPOS (r0, current_matrix),
MATRIX_ROW_VPOS (r1, current_matrix),
- delta, delta_bytes);
+ Z_delta, Z_delta_bytes);
}
/* Set the cursor. */
@@ -15841,9 +15821,9 @@ try_window_id (struct window *w)
{
/* Terminal frame. In this case, dvpos gives the number of
lines to scroll by; dvpos < 0 means scroll up. */
- int first_unchanged_at_end_vpos
+ int from_vpos
= MATRIX_ROW_VPOS (first_unchanged_at_end_row, w->current_matrix);
- int from = WINDOW_TOP_EDGE_LINE (w) + first_unchanged_at_end_vpos;
+ int from = WINDOW_TOP_EDGE_LINE (w) + from_vpos;
int end = (WINDOW_TOP_EDGE_LINE (w)
+ (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0)
+ window_internal_height (w));
@@ -16574,7 +16554,6 @@ static void
compute_line_metrics (struct it *it)
{
struct glyph_row *row = it->glyph_row;
- int area, i;
if (FRAME_WINDOW_P (it->f))
{
@@ -16639,14 +16618,17 @@ compute_line_metrics (struct it *it)
}
/* Compute a hash code for this row. */
- row->hash = 0;
- for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
- for (i = 0; i < row->used[area]; ++i)
- row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff)
- + row->glyphs[area][i].u.val
- + row->glyphs[area][i].face_id
- + row->glyphs[area][i].padding_p
- + (row->glyphs[area][i].type << 2));
+ {
+ int area, i;
+ row->hash = 0;
+ for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
+ for (i = 0; i < row->used[area]; ++i)
+ row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff)
+ + row->glyphs[area][i].u.val
+ + row->glyphs[area][i].face_id
+ + row->glyphs[area][i].padding_p
+ + (row->glyphs[area][i].type << 2));
+ }
it->max_ascent = it->max_descent = 0;
it->max_phys_ascent = it->max_phys_descent = 0;
@@ -16979,7 +16961,7 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
static int
cursor_row_p (struct window *w, struct glyph_row *row)
{
- int cursor_row_p = 1;
+ int result = 1;
if (PT == CHARPOS (row->end.pos))
{
@@ -16992,7 +16974,7 @@ cursor_row_p (struct window *w, struct glyph_row *row)
if (CHARPOS (row->end.string_pos) >= 0)
{
if (row->continued_p)
- cursor_row_p = 1;
+ result = 1;
else
{
/* Check for `display' property. */
@@ -17000,14 +16982,14 @@ cursor_row_p (struct window *w, struct glyph_row *row)
struct glyph *end = beg + row->used[TEXT_AREA] - 1;
struct glyph *glyph;
- cursor_row_p = 0;
+ result = 0;
for (glyph = end; glyph >= beg; --glyph)
if (STRINGP (glyph->object))
{
Lisp_Object prop
= Fget_char_property (make_number (PT),
Qdisplay, Qnil);
- cursor_row_p =
+ result =
(!NILP (prop)
&& display_prop_string_p (prop, glyph->object));
break;
@@ -17021,23 +17003,23 @@ cursor_row_p (struct window *w, struct glyph_row *row)
That's because CHARPOS (ROW->end.pos) would equal
PT if PT is before the character. */
if (!row->ends_in_ellipsis_p)
- cursor_row_p = row->continued_p;
+ result = row->continued_p;
else
/* If the row ends in an ellipsis, then
CHARPOS (ROW->end.pos) will equal point after the
invisible text. We want that position to be displayed
after the ellipsis. */
- cursor_row_p = 0;
+ result = 0;
}
/* If the row ends at ZV, display the cursor at the end of that
row instead of at the start of the row below. */
else if (row->ends_at_zv_p)
- cursor_row_p = 1;
+ result = 1;
else
- cursor_row_p = 0;
+ result = 0;
}
- return cursor_row_p;
+ return result;
}
@@ -17345,7 +17327,7 @@ display_line (struct it *it)
while (1)
{
int n_glyphs_before, hpos_before, x_before;
- int x, i, nglyphs;
+ int x, nglyphs;
int ascent = 0, descent = 0, phys_ascent = 0, phys_descent = 0;
/* Retrieve the next thing to display. Value is zero if end of
@@ -17470,7 +17452,7 @@ display_line (struct it *it)
}
else
{
- int new_x;
+ int i, new_x;
struct glyph *glyph;
for (i = 0; i < nglyphs; ++i, x = new_x)
@@ -18998,7 +18980,7 @@ are the selected window and the WINDOW's buffer). */)
the positive integer D to BUF using a minimal field width WIDTH. */
static void
-pint2str (register char *buf, register int width, register int d)
+pint2str (register char *buf, register int width, register EMACS_INT d)
{
register char *p = buf;
@@ -19327,7 +19309,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
return "";
else
{
- int col = (int) current_column (); /* iftc */
+ EMACS_INT col = current_column ();
w->column_number_displayed = make_number (col);
pint2str (decode_mode_spec_buf, field_width, col);
return decode_mode_spec_buf;
@@ -19924,16 +19906,16 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
{
if (!FRAME_WINDOW_P (it->f))
{
- int i, n;
+ int ii, n;
if (it->current_x > it->last_visible_x)
{
- for (i = row->used[TEXT_AREA] - 1; i > 0; --i)
- if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][i]))
+ for (ii = row->used[TEXT_AREA] - 1; ii > 0; --ii)
+ if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][ii]))
break;
- for (n = row->used[TEXT_AREA]; i < n; ++i)
+ for (n = row->used[TEXT_AREA]; ii < n; ++ii)
{
- row->used[TEXT_AREA] = i;
+ row->used[TEXT_AREA] = ii;
produce_special_glyphs (it, IT_TRUNCATION);
}
}
@@ -21165,7 +21147,6 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
do \
{ \
int face_id; \
- XChar2b *char2b; \
\
face_id = (row)->glyphs[area][START].face_id; \
\
@@ -22262,7 +22243,8 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
}
else
{
- char buf[7], *str;
+ char buf[7];
+ const char *str;
unsigned int code[6];
int upper_len;
int ascent, descent;
@@ -23252,7 +23234,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width)
void
set_frame_cursor_types (struct frame *f, Lisp_Object arg)
{
- int width;
+ int width = 1;
Lisp_Object tem;
FRAME_DESIRED_CURSOR (f) = get_specified_cursor_type (arg, &width);
@@ -23783,7 +23765,7 @@ display_and_set_cursor (struct window *w, int on,
/* Switch the display of W's cursor on or off, according to the value
of ON. */
-void
+static void
update_window_cursor (struct window *w, int on)
{
/* Don't update cursor in windows whose frame is in the process
@@ -24197,7 +24179,7 @@ rows_from_pos_range (struct window *w,
for the overlay or run of text properties specifying the mouse
face. BEFORE_STRING and AFTER_STRING, if non-nil, are a
before-string and after-string that must also be highlighted.
- DISPLAY_STRING, if non-nil, is a display string that may cover some
+ COVER_STRING, if non-nil, is a display string that may cover some
or all of the highlighted text. */
static void
@@ -24208,7 +24190,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
EMACS_INT end_charpos,
Lisp_Object before_string,
Lisp_Object after_string,
- Lisp_Object display_string)
+ Lisp_Object cover_string)
{
struct window *w = XWINDOW (window);
struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
@@ -24217,7 +24199,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
EMACS_INT ignore, pos;
int x;
- xassert (NILP (display_string) || STRINGP (display_string));
+ xassert (NILP (cover_string) || STRINGP (cover_string));
xassert (NILP (before_string) || STRINGP (before_string));
xassert (NILP (after_string) || STRINGP (after_string));
@@ -24227,7 +24209,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
/* If the before-string or display-string contains newlines,
rows_from_pos_range skips to its last row. Move back. */
- if (!NILP (before_string) || !NILP (display_string))
+ if (!NILP (before_string) || !NILP (cover_string))
{
struct glyph_row *prev;
while ((prev = r1 - 1, prev >= first)
@@ -24239,7 +24221,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
while (--glyph >= beg && INTEGERP (glyph->object));
if (glyph < beg
|| !(EQ (glyph->object, before_string)
- || EQ (glyph->object, display_string)))
+ || EQ (glyph->object, cover_string)))
break;
r1 = prev;
}
@@ -24282,7 +24264,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix);
/* For a bidi-reordered row, the positions of BEFORE_STRING,
- AFTER_STRING, DISPLAY_STRING, START_CHARPOS, and END_CHARPOS
+ AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS
could be anywhere in the row and in any order. The strategy
below is to find the leftmost and the rightmost glyph that
belongs to either of these 3 strings, or whose position is
@@ -24308,11 +24290,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
x += glyph->pixel_width;
/* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
- or DISPLAY_STRING, and the first glyph from buffer whose
+ or COVER_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph < end
&& !INTEGERP (glyph->object)
- && !EQ (glyph->object, display_string)
+ && !EQ (glyph->object, cover_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
&& glyph->charpos < end_charpos));
@@ -24359,11 +24341,11 @@ mouse_face_from_buffer_pos (Lisp_Object window,
;
/* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
- or DISPLAY_STRING, and the first glyph from buffer whose
+ or COVER_STRING, and the first glyph from buffer whose
position is between START_CHARPOS and END_CHARPOS. */
for (; glyph > end
&& !INTEGERP (glyph->object)
- && !EQ (glyph->object, display_string)
+ && !EQ (glyph->object, cover_string)
&& !(BUFFERP (glyph->object)
&& (glyph->charpos >= start_charpos
&& glyph->charpos < end_charpos));
@@ -24424,12 +24406,12 @@ mouse_face_from_buffer_pos (Lisp_Object window,
--end;
/* Scan the rest of the glyph row from the end, looking for the
first glyph that comes from BEFORE_STRING, AFTER_STRING, or
- DISPLAY_STRING, or whose position is between START_CHARPOS
+ COVER_STRING, or whose position is between START_CHARPOS
and END_CHARPOS */
for (--end;
end > glyph
&& !INTEGERP (end->object)
- && !EQ (end->object, display_string)
+ && !EQ (end->object, cover_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
&& end->charpos < end_charpos));
@@ -24474,12 +24456,12 @@ mouse_face_from_buffer_pos (Lisp_Object window,
}
/* Scan the rest of the glyph row from the end, looking for the
first glyph that comes from BEFORE_STRING, AFTER_STRING, or
- DISPLAY_STRING, or whose position is between START_CHARPOS
+ COVER_STRING, or whose position is between START_CHARPOS
and END_CHARPOS */
for ( ;
end < glyph
&& !INTEGERP (end->object)
- && !EQ (end->object, display_string)
+ && !EQ (end->object, cover_string)
&& !(BUFFERP (end->object)
&& (end->charpos >= start_charpos
&& end->charpos < end_charpos));
@@ -25285,7 +25267,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
EMACS_INT pos;
struct glyph *glyph;
Lisp_Object object;
- Lisp_Object mouse_face = Qnil, overlay = Qnil, position;
+ Lisp_Object mouse_face = Qnil, position;
Lisp_Object *overlay_vec = NULL;
int noverlays;
struct buffer *obuf;
@@ -25418,7 +25400,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
&& mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
{
/* Find the highest priority overlay with a mouse-face. */
- overlay = Qnil;
+ Lisp_Object overlay = Qnil;
for (i = noverlays - 1; i >= 0 && NILP (overlay); --i)
{
mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face);
@@ -25446,19 +25428,19 @@ note_mouse_highlight (struct frame *f, int x, int y)
{
/* The mouse-highlighting comes from a display string
with a mouse-face. */
- Lisp_Object b, e;
+ Lisp_Object s, e;
EMACS_INT ignore;
- b = Fprevious_single_property_change
+ s = Fprevious_single_property_change
(make_number (pos + 1), Qmouse_face, object, Qnil);
e = Fnext_single_property_change
(position, Qmouse_face, object, Qnil);
- if (NILP (b))
- b = make_number (0);
+ if (NILP (s))
+ s = make_number (0);
if (NILP (e))
e = make_number (SCHARS (object) - 1);
mouse_face_from_string_pos (w, hlinfo, object,
- XINT (b), XINT (e));
+ XINT (s), XINT (e));
hlinfo->mouse_face_past_end = 0;
hlinfo->mouse_face_window = window;
hlinfo->mouse_face_face_id
@@ -25471,7 +25453,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
{
/* The mouse-highlighting, if any, comes from an overlay
or text property in the buffer. */
- Lisp_Object buffer, display_string;
+ Lisp_Object buffer, cover_string;
if (STRINGP (object))
{
@@ -25485,13 +25467,13 @@ note_mouse_highlight (struct frame *f, int x, int y)
mouse_face = get_char_property_and_overlay
(make_number (pos), Qmouse_face, w->buffer, &overlay);
buffer = w->buffer;
- display_string = object;
+ cover_string = object;
}
}
else
{
buffer = object;
- display_string = Qnil;
+ cover_string = Qnil;
}
if (!NILP (mouse_face))
@@ -25543,7 +25525,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
XFASTINT (before),
XFASTINT (after),
before_string, after_string,
- display_string);
+ cover_string);
cursor = No_Cursor;
}
}
@@ -25572,16 +25554,16 @@ note_mouse_highlight (struct frame *f, int x, int y)
}
else
{
- Lisp_Object object = glyph->object;
+ Lisp_Object obj = glyph->object;
EMACS_INT charpos = glyph->charpos;
/* Try text properties. */
- if (STRINGP (object)
+ if (STRINGP (obj)
&& charpos >= 0
- && charpos < SCHARS (object))
+ && charpos < SCHARS (obj))
{
help = Fget_text_property (make_number (charpos),
- Qhelp_echo, object);
+ Qhelp_echo, obj);
if (NILP (help))
{
/* If the string itself doesn't specify a help-echo,
@@ -25589,30 +25571,30 @@ note_mouse_highlight (struct frame *f, int x, int y)
struct glyph_row *r
= MATRIX_ROW (w->current_matrix, vpos);
EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
- EMACS_INT pos = string_buffer_position (w, object, start);
- if (pos > 0)
+ EMACS_INT p = string_buffer_position (w, obj, start);
+ if (p > 0)
{
- help = Fget_char_property (make_number (pos),
+ help = Fget_char_property (make_number (p),
Qhelp_echo, w->buffer);
if (!NILP (help))
{
- charpos = pos;
- object = w->buffer;
+ charpos = p;
+ obj = w->buffer;
}
}
}
}
- else if (BUFFERP (object)
+ else if (BUFFERP (obj)
&& charpos >= BEGV
&& charpos < ZV)
help = Fget_text_property (make_number (charpos), Qhelp_echo,
- object);
+ obj);
if (!NILP (help))
{
help_echo_string = help;
help_echo_window = window;
- help_echo_object = object;
+ help_echo_object = obj;
help_echo_pos = charpos;
}
}
@@ -25628,16 +25610,16 @@ note_mouse_highlight (struct frame *f, int x, int y)
if (NILP (pointer))
{
- Lisp_Object object = glyph->object;
+ Lisp_Object obj = glyph->object;
EMACS_INT charpos = glyph->charpos;
/* Try text properties. */
- if (STRINGP (object)
+ if (STRINGP (obj)
&& charpos >= 0
- && charpos < SCHARS (object))
+ && charpos < SCHARS (obj))
{
pointer = Fget_text_property (make_number (charpos),
- Qpointer, object);
+ Qpointer, obj);
if (NILP (pointer))
{
/* If the string itself doesn't specify a pointer,
@@ -25645,18 +25627,17 @@ note_mouse_highlight (struct frame *f, int x, int y)
struct glyph_row *r
= MATRIX_ROW (w->current_matrix, vpos);
EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
- EMACS_INT pos = string_buffer_position (w, object,
- start);
- if (pos > 0)
- pointer = Fget_char_property (make_number (pos),
+ EMACS_INT p = string_buffer_position (w, obj, start);
+ if (p > 0)
+ pointer = Fget_char_property (make_number (p),
Qpointer, w->buffer);
}
}
- else if (BUFFERP (object)
+ else if (BUFFERP (obj)
&& charpos >= BEGV
&& charpos < ZV)
pointer = Fget_text_property (make_number (charpos),
- Qpointer, object);
+ Qpointer, obj);
}
}
#endif /* HAVE_WINDOW_SYSTEM */
@@ -26177,10 +26158,10 @@ expose_frame (struct frame *f, int x, int y, int w, int h)
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
if (f == hlinfo->mouse_face_mouse_frame)
{
- int x = hlinfo->mouse_face_mouse_x;
- int y = hlinfo->mouse_face_mouse_y;
+ int mouse_x = hlinfo->mouse_face_mouse_x;
+ int mouse_y = hlinfo->mouse_face_mouse_y;
clear_mouse_face (hlinfo);
- note_mouse_highlight (f, x, y);
+ note_mouse_highlight (f, mouse_x, mouse_y);
}
}
}
diff --git a/src/xrdb.c b/src/xrdb.c
index 0171490075..9fb3f3474f 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -38,10 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#include <sys/stat.h>
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
#include "lisp.h"
#ifdef USE_MOTIF
@@ -764,4 +760,3 @@ main (argc, argv)
XCloseDisplay (display);
}
#endif /* TESTRM */
-