diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog.10 | 4 | ||||
| -rw-r--r-- | src/ChangeLog.3 | 6 | ||||
| -rw-r--r-- | src/ChangeLog.trunk | 239 | ||||
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/bytecode.c | 2 | ||||
| -rw-r--r-- | src/character.c | 2 | ||||
| -rw-r--r-- | src/cmds.c | 42 | ||||
| -rw-r--r-- | src/config.in | 24 | ||||
| -rw-r--r-- | src/dired.c | 36 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 126 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 74 | ||||
| -rw-r--r-- | src/filelock.c | 4 | ||||
| -rw-r--r-- | src/font.c | 4 | ||||
| -rw-r--r-- | src/frame.c | 24 | ||||
| -rw-r--r-- | src/frame.h | 8 | ||||
| -rw-r--r-- | src/indent.c | 49 | ||||
| -rw-r--r-- | src/keymap.c | 4 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/lread.c | 7 | ||||
| -rw-r--r-- | src/minibuf.c | 11 | ||||
| -rw-r--r-- | src/msdos.c | 15 | ||||
| -rw-r--r-- | src/msdos.h | 5 | ||||
| -rw-r--r-- | src/nsterm.m | 54 | ||||
| -rw-r--r-- | src/print.c | 32 | ||||
| -rw-r--r-- | src/s/msdos.h | 6 | ||||
| -rw-r--r-- | src/scroll.c | 5 | ||||
| -rw-r--r-- | src/sheap.c | 2 | ||||
| -rw-r--r-- | src/w32.c | 19 | ||||
| -rw-r--r-- | src/w32proc.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 2 | ||||
| -rw-r--r-- | src/window.c | 20 | ||||
| -rw-r--r-- | src/window.h | 9 | ||||
| -rw-r--r-- | src/xdisp.c | 315 | ||||
| -rw-r--r-- | src/xrdb.c | 5 |
36 files changed, 653 insertions, 514 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 869ab5b07d8..6152b4c76af 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -20002,7 +20002,7 @@ | |||
| 20002 | 20002 | ||
| 20003 | * w32reg.c (w32_get_rdb_resource): New function. | 20003 | * w32reg.c (w32_get_rdb_resource): New function. |
| 20004 | (x_get_string_resource): Use it, so resources passed with -xrm | 20004 | (x_get_string_resource): Use it, so resources passed with -xrm |
| 20005 | supercede the ones in the registry. | 20005 | supersede the ones in the registry. |
| 20006 | 20006 | ||
| 20007 | 2003-03-04 Jan Djärv <jan.h.d@swipnet.se> | 20007 | 2003-03-04 Jan Djärv <jan.h.d@swipnet.se> |
| 20008 | 20008 | ||
| @@ -25474,7 +25474,7 @@ | |||
| 25474 | recursive call unless that arg is non-nil. | 25474 | recursive call unless that arg is non-nil. |
| 25475 | (where_is_internal): New argument no_remap. Callers changed. | 25475 | (where_is_internal): New argument no_remap. Callers changed. |
| 25476 | Call recursively to find original key bindings for a remapped | 25476 | Call recursively to find original key bindings for a remapped |
| 25477 | comand unless that arg is non-nil. | 25477 | command unless that arg is non-nil. |
| 25478 | (Fwhere_is_internal): New optional argument NO-REMAP. | 25478 | (Fwhere_is_internal): New optional argument NO-REMAP. |
| 25479 | Doc updated. Callers changed. Pass arg to where_is_internal. | 25479 | Doc updated. Callers changed. Pass arg to where_is_internal. |
| 25480 | 25480 | ||
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3 index a361142faae..beb7a0a2ae1 100644 --- a/src/ChangeLog.3 +++ b/src/ChangeLog.3 | |||
| @@ -7023,7 +7023,7 @@ | |||
| 7023 | * fileio.c: There are two versions of Fexpand_file_name defined | 7023 | * fileio.c: There are two versions of Fexpand_file_name defined |
| 7024 | here; the latter is inside a `#if 0' clause. Change its DEFUN to | 7024 | here; the latter is inside a `#if 0' clause. Change its DEFUN to |
| 7025 | a DEAFUN, so that its docstring doesn't make it into the DOC file | 7025 | a DEAFUN, so that its docstring doesn't make it into the DOC file |
| 7026 | and supercede the real docstring. | 7026 | and supersede the real docstring. |
| 7027 | 7027 | ||
| 7028 | * callint.c (Fcall_interactively): For the 'K' interactive spec, | 7028 | * callint.c (Fcall_interactively): For the 'K' interactive spec, |
| 7029 | set varies[i] to -1, indicating that the mouse click should be | 7029 | set varies[i] to -1, indicating that the mouse click should be |
| @@ -11142,7 +11142,7 @@ | |||
| 11142 | wait_reading_process_input, instead of just the first two. | 11142 | wait_reading_process_input, instead of just the first two. |
| 11143 | 11143 | ||
| 11144 | * process.c (wait_reading_process_input): Remove support for | 11144 | * process.c (wait_reading_process_input): Remove support for |
| 11145 | only waiting for mouse input, since that has been superceded. | 11145 | only waiting for mouse input, since that has been superseded. |
| 11146 | This removes X dependencies from process.c, and eliminates some | 11146 | This removes X dependencies from process.c, and eliminates some |
| 11147 | references to code that should only exist when using X10. | 11147 | references to code that should only exist when using X10. |
| 11148 | 11148 | ||
| @@ -11450,7 +11450,7 @@ | |||
| 11450 | 11450 | ||
| 11451 | * minibuf.c (temp_echo_area_glyphs): Clear echo_area_glyphs and | 11451 | * minibuf.c (temp_echo_area_glyphs): Clear echo_area_glyphs and |
| 11452 | previous_echo_glyphs, so the message we're displaying will | 11452 | previous_echo_glyphs, so the message we're displaying will |
| 11453 | supercede any existing message. | 11453 | supersede any existing message. |
| 11454 | 11454 | ||
| 11455 | * keyboard.c: Removed external declaration of echo_area_glyphs, | 11455 | * keyboard.c: Removed external declaration of echo_area_glyphs, |
| 11456 | since it's declared in window.h. | 11456 | since it's declared in window.h. |
diff --git a/src/ChangeLog.trunk b/src/ChangeLog.trunk index 9713a4a6ed5..a96edcdfdca 100644 --- a/src/ChangeLog.trunk +++ b/src/ChangeLog.trunk | |||
| @@ -1,7 +1,193 @@ | |||
| 1 | 2011-03-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | current_column: Now returns EMACS_INT, fixing some iftc | ||
| 4 | that was introduced in the 2002-06-02 change "temporarily"; see | ||
| 5 | <http://lists.gnu.org/archive/html/emacs-devel/2002-06/msg00039.html>. | ||
| 6 | * bytecode.c (Fbyte_code): Don't cast current_column () to int. | ||
| 7 | * cmds.c (internal_self_insert): Likewise. | ||
| 8 | * indent.c (Fcurrent_column): Likewise. | ||
| 9 | * keymap.c (describe_command): Likewise. | ||
| 10 | * minibuf.c (read_minibuf): Likewise. | ||
| 11 | * indent.c (Fcurrent_indentation): Don't cast position_indentation () | ||
| 12 | to int. | ||
| 13 | * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec): | ||
| 14 | Likewise. | ||
| 15 | * cmds.c (internal_self_insert): Declare locals to be EMACS_INT, | ||
| 16 | not int or double, if they might contain a column number. | ||
| 17 | * indent.c (current_column, Findent_to, indented_beyond_p): | ||
| 18 | (compute_motion, vmotion): Likewise. | ||
| 19 | * keymap.c (describe_command): Likewise. | ||
| 20 | * xdisp.c (pint2str): Likewise. | ||
| 21 | * indent.c (last_known_column): Now EMACS_INT, not int. | ||
| 22 | * minibuf.c (minibuf_prompt_width): Likewise. | ||
| 23 | * indent.c (current_column, current_column_1, position_indentation): | ||
| 24 | Return EMACS_INT, not double. | ||
| 25 | * lisp.h (current_column): Likewise. | ||
| 26 | * indent.c (indented_beyond_p): Last arg is now EMACS_INT, not double. | ||
| 27 | All callers changed. | ||
| 28 | * lisp.h (indented_beyond_p): Likewise. | ||
| 29 | |||
| 30 | * minibuf.c (minibuf_prompt, minibuf_prompt_width): Move here | ||
| 31 | from xdisp.c, and make static, since these are used only here. | ||
| 32 | * window.h, xdisp.c (minibuf_prompt, minibuf_prompt_width): | ||
| 33 | Remove decls. | ||
| 34 | |||
| 35 | * cmds.c (internal_self_insert): Reindent to match Emacs style. | ||
| 36 | * xdisp.c (redisplay_window): Likewise. | ||
| 37 | |||
| 38 | * xdisp.c: Rename or move local decls to avoid shadowing. | ||
| 39 | (init_iterator, handle_fontified_prop, handle_single_display_spec): | ||
| 40 | (message_dolog, message_with_string, redisplay_internal): | ||
| 41 | (redisplay_window, try_window_reusing_current_matrix, try_window_id): | ||
| 42 | (compute_line_metrics, highlight_trailing_whitespace, cursor_row_p): | ||
| 43 | (display_line, display_string, rows_from_pos_range): | ||
| 44 | (mouse_face_from_buffer_pos, note_mouse_highlight, expose_frame): | ||
| 45 | Rename or move local decls. | ||
| 46 | * xdisp.c (BUILD_GLYPHLESS_GLYPH_STRING): Omit unused local var. | ||
| 47 | (produce_glyphless_glyph): Make a pointer "const" | ||
| 48 | since it might point to immutable storage. | ||
| 49 | (update_window_cursor): Now static, since it's not used elsewhere. | ||
| 50 | (SKIP_GLYPHS): Removed unused macro. | ||
| 51 | |||
| 52 | 2011-03-06 Michael Shields <shields@msrl.com> (tiny change) | ||
| 53 | |||
| 54 | * window.c (Fnext_window): Doc fix. (Bug#5567) | ||
| 55 | |||
| 56 | 2011-03-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 57 | |||
| 58 | * nsterm.m (ns_draw_window_cursor): Fix typo in 2011-02-23 commit. | ||
| 59 | |||
| 60 | 2011-03-02 Ken Brown <kbrown@cornell.edu> | ||
| 61 | |||
| 62 | * sheap.c (STATIC_HEAP_SIZE): Increase to 13MB. | ||
| 63 | |||
| 64 | 2011-03-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 65 | |||
| 66 | Work around some portability problems with symlinks. | ||
| 67 | |||
| 68 | * fileio.c (Fmake_symbolic_link): Treat ENOSYS specially, and | ||
| 69 | generate a special message for it. Suggested by Eli Zaretskii in | ||
| 70 | <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00995.html>. | ||
| 71 | (Frename_file, Fmake_symbolic_link, Ffile_symlink_p): | ||
| 72 | Simplify the code by assuming that the readlink and symlink calls | ||
| 73 | exist, even if they always fail on this host. | ||
| 74 | (Ffile_readable_p): Likewise, for fifos. | ||
| 75 | * config.in: Regenerate. | ||
| 76 | |||
| 77 | 2011-02-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 78 | |||
| 79 | * frame.c (store_frame_param): Don't store value directly in | ||
| 80 | buffer_list and buried_buffer_list; copy the list and remove dead | ||
| 81 | buffers (Bug#7898). | ||
| 82 | |||
| 83 | 2011-02-27 Eli Zaretskii <eliz@gnu.org> | ||
| 84 | |||
| 85 | * msdos.c (readlink) [DJGPP < 2.04]: New stub function. | ||
| 86 | |||
| 87 | * msdos.h (readlink) [DJGPP < 2.04]: Declare prototype. | ||
| 88 | |||
| 89 | * w32.c (symlink, readlink): New stub functions. | ||
| 90 | |||
| 91 | 2011-02-27 Paul Eggert <eggert@cs.ucla.edu> | ||
| 92 | |||
| 93 | * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG. | ||
| 94 | This avoids a gcc warning in some configurations. | ||
| 95 | |||
| 96 | * frame.c (x_set_screen_gamma): Rename local to avoid shadowing. | ||
| 97 | |||
| 98 | * frame.h: Avoid gcc -Wmissing-prototypes diagnostics. | ||
| 99 | (set_menu_bar_lines, x_get_resource_string): New decls. | ||
| 100 | * msdos.c (set_menu_bar_lines): Omit decl. | ||
| 101 | |||
| 102 | * dispextern.h (struct glyph): Make u.img_id int, not unsigned. | ||
| 103 | It's always given int values and used as an int. This suppresses | ||
| 104 | a gcc "comparison of unsigned expression >= 0" warning in some | ||
| 105 | configurations. | ||
| 106 | |||
| 107 | * dispnew.c: Rename locals to avoid shadowing. | ||
| 108 | (update_text_area, scrolling_window, update_frame_1): Rename locals. | ||
| 109 | |||
| 110 | 2011-02-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 111 | |||
| 112 | * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes. | ||
| 113 | (copy_glyph_row_contents): Remove; not used. | ||
| 114 | (frame_row_to_window, check_current_matrix_flags): | ||
| 115 | (window_change_signal): Now static, since they're not used elsewhere. | ||
| 116 | (check_current_matrix_flags): Surround with "#if 0", since its | ||
| 117 | only use is in a comment. Maybe both the comment and the "#if 0" | ||
| 118 | stuff should be removed? | ||
| 119 | |||
| 120 | * dispnew.c: Fix problem uncovered by gcc -Wunused-variable. | ||
| 121 | (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the | ||
| 122 | contexts that actually need it. | ||
| 123 | |||
| 124 | 2011-02-26 Eli Zaretskii <eliz@gnu.org> | ||
| 125 | |||
| 126 | * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04. | ||
| 127 | (lstat): Define for DJGPP < 2.04. | ||
| 128 | |||
| 129 | 2011-02-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 130 | |||
| 131 | * dired.c (Ffile_attributes): Increase size of modes from 10 to 12 | ||
| 132 | as per recent filemodestring API change. Reported by Jonas Öster in | ||
| 133 | <http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg01069.html>. | ||
| 134 | |||
| 135 | 2011-02-23 Ben Key <bkey76@gmail.com> (tiny change) | ||
| 136 | |||
| 137 | * nsterm.m (ns_draw_window_cursor): Obey the cursor_width argument | ||
| 138 | directly, for bar cursors. | ||
| 139 | |||
| 140 | 2011-02-23 Chong Yidong <cyd@stupidchicken.com> | ||
| 141 | |||
| 142 | * xdisp.c (set_frame_cursor_types): Don't write an undefined value | ||
| 143 | into the frame's cursor_width. | ||
| 144 | |||
| 145 | 2011-02-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 146 | |||
| 147 | * print.c (print_object): Never print old-style backquotes. | ||
| 148 | Obey escapeflag for hash tables as well. | ||
| 149 | |||
| 150 | 2011-02-23 Kenichi Handa <handa@m17n.org> | ||
| 151 | |||
| 152 | * font.c (font_open_entity): Be sure to set scaled_pixel_size. | ||
| 153 | (font_find_for_lface): Check if attrs[LFACE_HEIGHT_INDEX] is integer. | ||
| 154 | |||
| 155 | 2011-02-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 156 | |||
| 157 | * dired.c (Ffile_attributes): Simplify and avoid #ifdef. | ||
| 158 | |||
| 159 | 2011-02-22 Wolfgang Jenkner <wjenkner@inode.at> (tiny change) | ||
| 160 | |||
| 161 | * lread.c (openp): Correct Boolean typo in last commit. | ||
| 162 | |||
| 163 | 2011-02-22 Adrian Robert <Adrian.B.Robert@gmail.com> | ||
| 164 | |||
| 165 | * nsterm.m (EmacsView-keyDown:): Don't pass shift-only-modified | ||
| 166 | key to Emacs, treat as unmodified (go to input manager processing). | ||
| 167 | |||
| 168 | 2011-02-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 169 | |||
| 170 | Assume S_ISLNK etc. work, since gnulib supports this. | ||
| 171 | * config.in: Regenerate. | ||
| 172 | * dired.c (lstat): Remove. | ||
| 173 | (file_name_completion): Assume S_ISDIR works. | ||
| 174 | (file_name_completion_stat): Assume S_ISLNK works. | ||
| 175 | Do not bother calling stat unless lstat says it's a symlink. | ||
| 176 | * fileio.c (S_ISLNK, S_ISFIFO, S_ISREG, lstat): Remove. | ||
| 177 | (Fcopy_file): Assume S_ISREG and S_ISLNK work. | ||
| 178 | (check_writable, Ffile_writable_p, Fset_file_times): | ||
| 179 | Assume S_ISDIR works. | ||
| 180 | (Ffile_readable_p): Use S_IFIFO, not S_ISFIFO, to guess whether | ||
| 181 | fifos exist. | ||
| 182 | (Ffile_regular_p, Finsert_file_contents): Assume S_ISREG works. | ||
| 183 | * filelock.c (S_ISLNK): Remove. | ||
| 184 | * lread.c (openp): Assume S_ISDIR works. | ||
| 185 | * xrdb.c (S_ISDIR): Remove. | ||
| 186 | |||
| 1 | 2011-02-21 Eli Zaretskii <eliz@gnu.org> | 187 | 2011-02-21 Eli Zaretskii <eliz@gnu.org> |
| 2 | 188 | ||
| 3 | * makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to | 189 | * makefile.w32-in ($(BLD)/filemode.$(O)): Move recipe to |
| 4 | lib/makefilw.w32-in. | 190 | lib/makefile.w32-in. |
| 5 | ($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h. | 191 | ($(BLD)/dired.$(O)): Depend on $(EMACS_ROOT)/lib/filemode.h. |
| 6 | (GLOBAL_SOURCES): Remove filemode.c. | 192 | (GLOBAL_SOURCES): Remove filemode.c. |
| 7 | (OBJ1): Remove $(BLD)/filemode.$(O). | 193 | (OBJ1): Remove $(BLD)/filemode.$(O). |
| @@ -21,7 +207,7 @@ | |||
| 21 | * makefile.w32-in ($(BLD)/fns.$(O)): Depend on | 207 | * makefile.w32-in ($(BLD)/fns.$(O)): Depend on |
| 22 | $(EMACS_ROOT)/lib/md5.h and on stamp_BLD. | 208 | $(EMACS_ROOT)/lib/md5.h and on stamp_BLD. |
| 23 | 209 | ||
| 24 | 2011-02-20 Christoph Scholtes <cschol2112@gmail.com> | 210 | 2011-02-20 Christoph Scholtes <cschol2112@gmail.com> |
| 25 | 211 | ||
| 26 | * makefile.w32-in: Remove md5.$(O). | 212 | * makefile.w32-in: Remove md5.$(O). |
| 27 | ($(BLD)/md5.$(O)): Remove prerequisites, moved to | 213 | ($(BLD)/md5.$(O)): Remove prerequisites, moved to |
| @@ -725,14 +911,14 @@ | |||
| 725 | to const char *, since they're usually low-level C strings, and | 911 | to const char *, since they're usually low-level C strings, and |
| 726 | this stays compatible with C89 pointer rules. All callers changed. | 912 | this stays compatible with C89 pointer rules. All callers changed. |
| 727 | 913 | ||
| 728 | * charset.c: conform to C89 pointer rules | 914 | * charset.c: Conform to C89 pointer rules. |
| 729 | (define_charset_internal): Switch between char * and unsigned char *. | 915 | (define_charset_internal): Switch between char * and unsigned char *. |
| 730 | 916 | ||
| 731 | * xmenu.c: conform to C89 const rules | 917 | * xmenu.c: Conform to C89 const rules. |
| 732 | (xmenu_show, xdialog_show): Declare local var as char *, not | 918 | (xmenu_show, xdialog_show): Declare local var as char *, not |
| 733 | const char *, to stay compatible with C89 const rules. | 919 | const char *, to stay compatible with C89 const rules. |
| 734 | 920 | ||
| 735 | * xdisp.c: conform to C89 pointer rules | 921 | * xdisp.c: Conform to C89 pointer rules. |
| 736 | (store_mode_line_noprop, display_string, reseat_to_string): | 922 | (store_mode_line_noprop, display_string, reseat_to_string): |
| 737 | (c_string_pos, number_of_chars, message_dolog): | 923 | (c_string_pos, number_of_chars, message_dolog): |
| 738 | (message_log_check_duplicate, set_message_1, store_mode_line_noprop): | 924 | (message_log_check_duplicate, set_message_1, store_mode_line_noprop): |
| @@ -740,7 +926,7 @@ | |||
| 740 | Switch between char * and unsigned char * to stay compatible wth | 926 | Switch between char * and unsigned char * to stay compatible wth |
| 741 | C89 pointer rules. | 927 | C89 pointer rules. |
| 742 | 928 | ||
| 743 | * regex.c: conform to C89 pointer rules | 929 | * regex.c: Conform to C89 pointer rules. |
| 744 | (re_wctype): Add cast, as C89 does not allow assigning between | 930 | (re_wctype): Add cast, as C89 does not allow assigning between |
| 745 | char * and unsigned char *. | 931 | char * and unsigned char *. |
| 746 | (regex_compile): Likewise. | 932 | (regex_compile): Likewise. |
| @@ -897,10 +1083,10 @@ | |||
| 897 | (ns_string_to_pasteboard_internal): Use initWithBytesNoCopy | 1083 | (ns_string_to_pasteboard_internal): Use initWithBytesNoCopy |
| 898 | instead of stringWithUTF8String (Bug#7934). | 1084 | instead of stringWithUTF8String (Bug#7934). |
| 899 | 1085 | ||
| 900 | 2011-01-29 Anders Lindgren <andlind@gmail.com> (tiny change) | 1086 | 2011-01-29 Anders Lindgren <andlind@gmail.com> (tiny change) |
| 901 | 1087 | ||
| 902 | * nsfont.m (nsfont_open): Ensure that fonts with inexact | 1088 | * nsfont.m (nsfont_open): Ensure that fonts with inexact |
| 903 | descenders would not become one pixel too tall (Bug#7887). | 1089 | descenders would not become one pixel too tall (Bug#7887). |
| 904 | 1090 | ||
| 905 | 2011-01-28 Chong Yidong <cyd@stupidchicken.com> | 1091 | 2011-01-28 Chong Yidong <cyd@stupidchicken.com> |
| 906 | 1092 | ||
| @@ -1044,7 +1230,7 @@ | |||
| 1044 | (x_underline_at_descent_line): Remove declaration. | 1230 | (x_underline_at_descent_line): Remove declaration. |
| 1045 | (syms_of_nsterm): Remove & from DEFVAR_LISP and DEFVAR_BOOL. | 1231 | (syms_of_nsterm): Remove & from DEFVAR_LISP and DEFVAR_BOOL. |
| 1046 | 1232 | ||
| 1047 | * nsselect.m (Vns_sent_selection_hooks, Vns_lost_selection_hooks | 1233 | * nsselect.m (Vns_sent_selection_hooks, Vns_lost_selection_hooks) |
| 1048 | (Vselection_alist, Vselection_converter_alist): Move to globals.h. | 1234 | (Vselection_alist, Vselection_converter_alist): Move to globals.h. |
| 1049 | (syms_of_nsselect): Remove & from DEFVAR_LISP. | 1235 | (syms_of_nsselect): Remove & from DEFVAR_LISP. |
| 1050 | 1236 | ||
| @@ -1071,7 +1257,6 @@ | |||
| 1071 | f_Vns_lost_selection_hooks, f_Vselection_alist, f_Vns_reg_to_script | 1257 | f_Vns_lost_selection_hooks, f_Vselection_alist, f_Vns_reg_to_script |
| 1072 | and corresponding defines. | 1258 | and corresponding defines. |
| 1073 | 1259 | ||
| 1074 | |||
| 1075 | 2011-01-19 Sam Steingold <sds@gnu.org> | 1260 | 2011-01-19 Sam Steingold <sds@gnu.org> |
| 1076 | 1261 | ||
| 1077 | * w32.c (check_windows_init_file): Remove declarations of | 1262 | * w32.c (check_windows_init_file): Remove declarations of |
| @@ -2176,10 +2361,10 @@ | |||
| 2176 | * nsmenu.m: Use #include <config.h> instead of "config.h". | 2361 | * nsmenu.m: Use #include <config.h> instead of "config.h". |
| 2177 | 2362 | ||
| 2178 | * term.c (Qglyphless_char,last_glyphless_glyph_frame) | 2363 | * term.c (Qglyphless_char,last_glyphless_glyph_frame) |
| 2179 | (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id): | 2364 | (last_glyphless_glyph_face_id, last_glyphless_glyph_merged_face_id): |
| 2180 | Move declarations ... | 2365 | Move declarations ... |
| 2181 | * lisp.h (Qglyphless_char,last_glyphless_glyph_frame) | 2366 | * lisp.h (Qglyphless_char,last_glyphless_glyph_frame) |
| 2182 | (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id): | 2367 | (last_glyphless_glyph_face_id, last_glyphless_glyph_merged_face_id): |
| 2183 | ... here. | 2368 | ... here. |
| 2184 | 2369 | ||
| 2185 | * emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits) | 2370 | * emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits) |
| @@ -2283,7 +2468,7 @@ | |||
| 2283 | (Qonly): Remove declarations. | 2468 | (Qonly): Remove declarations. |
| 2284 | * lisp.h (pending_malloc_warning, Vsaved_region_selection) | 2469 | * lisp.h (pending_malloc_warning, Vsaved_region_selection) |
| 2285 | (Vselect_active_regions): | 2470 | (Vselect_active_regions): |
| 2286 | * keyboard.h (timers_run): Add declarations. | 2471 | * keyboard.h (timers_run): Add declarations. |
| 2287 | 2472 | ||
| 2288 | * strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r) | 2473 | * strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r) |
| 2289 | (tm_diff): Convert definitions to standard C. | 2474 | (tm_diff): Convert definitions to standard C. |
| @@ -2417,7 +2602,7 @@ | |||
| 2417 | 2602 | ||
| 2418 | 2010-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2603 | 2010-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2419 | 2604 | ||
| 2420 | * keyboard.c (modify_event_symbol) : Add const to array elements of | 2605 | * keyboard.c (modify_event_symbol): Add const to array elements of |
| 2421 | arg NAME_TABLE. | 2606 | arg NAME_TABLE. |
| 2422 | (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys) | 2607 | (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys) |
| 2423 | (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names) | 2608 | (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names) |
| @@ -2508,7 +2693,6 @@ | |||
| 2508 | (x_set_sticky): Pass atoms to set_wm_state. | 2693 | (x_set_sticky): Pass atoms to set_wm_state. |
| 2509 | (do_ewmh_fullscreen): Ditto. | 2694 | (do_ewmh_fullscreen): Ditto. |
| 2510 | 2695 | ||
| 2511 | |||
| 2512 | * xterm.h (x_display_info): Add Xatom_net_supported, | 2696 | * xterm.h (x_display_info): Add Xatom_net_supported, |
| 2513 | Xatom_net_supporting_wm_check, Xatom_net_active_window, | 2697 | Xatom_net_supporting_wm_check, Xatom_net_active_window, |
| 2514 | Xatom_net_wm_window_opacity, Xatom_XEMBED_INFO, SM_CLIENT_ID. | 2698 | Xatom_net_wm_window_opacity, Xatom_XEMBED_INFO, SM_CLIENT_ID. |
| @@ -2712,10 +2896,9 @@ | |||
| 2712 | * coding.c (coding-category-list): Refer to set-coding-system-priority | 2896 | * coding.c (coding-category-list): Refer to set-coding-system-priority |
| 2713 | instead of the obsolete set-coding-priority in the doc string. | 2897 | instead of the obsolete set-coding-priority in the doc string. |
| 2714 | 2898 | ||
| 2715 | |||
| 2716 | 2010-11-04 Adrian Robert <Adrian.B.Robert@gmail.com> | 2899 | 2010-11-04 Adrian Robert <Adrian.B.Robert@gmail.com> |
| 2717 | 2900 | ||
| 2718 | * nsfont.m (nsfont_draw): Correct previous patch to return | 2901 | * nsfont.m (nsfont_draw): Correct previous patch to return |
| 2719 | correct value. | 2902 | correct value. |
| 2720 | * nsimage.m (EmacsImage-setXBMColor:): Correct previous patch: | 2903 | * nsimage.m (EmacsImage-setXBMColor:): Correct previous patch: |
| 2721 | don't change the method signature, change the return. | 2904 | don't change the method signature, change the return. |
| @@ -2764,7 +2947,7 @@ | |||
| 2764 | (Qglyphless_char_display, Qhexa_code, Qempty_box, Qthin_space) | 2947 | (Qglyphless_char_display, Qhexa_code, Qempty_box, Qthin_space) |
| 2765 | (Qzero_width): New variables. | 2948 | (Qzero_width): New variables. |
| 2766 | (THIN_SPACE_WIDTH): New macro. | 2949 | (THIN_SPACE_WIDTH): New macro. |
| 2767 | (lookup_glyphless_char_display): New funciton. | 2950 | (lookup_glyphless_char_display): New function. |
| 2768 | (last_glyphless_glyph_frame, last_glyphless_glyph_face_id) | 2951 | (last_glyphless_glyph_frame, last_glyphless_glyph_face_id) |
| 2769 | (last_glyphless_glyph_merged_face_id): New variables. | 2952 | (last_glyphless_glyph_merged_face_id): New variables. |
| 2770 | (get_next_display_element): Check glyphless characters. | 2953 | (get_next_display_element): Check glyphless characters. |
| @@ -3050,7 +3233,7 @@ | |||
| 3050 | 2010-10-12 Jan Djärv <jan.h.d@swipnet.se> | 3233 | 2010-10-12 Jan Djärv <jan.h.d@swipnet.se> |
| 3051 | 3234 | ||
| 3052 | * nsterm.m (Qleft): Declare. | 3235 | * nsterm.m (Qleft): Declare. |
| 3053 | (ns_right_alternate_modifier): New variable | 3236 | (ns_right_alternate_modifier): New variable. |
| 3054 | (NSRightAlternateKeyMask): New define. | 3237 | (NSRightAlternateKeyMask): New define. |
| 3055 | (EV_MODIFIERS): Parse NSRightAlternateKeyMask if | 3238 | (EV_MODIFIERS): Parse NSRightAlternateKeyMask if |
| 3056 | ns_right_alternate_modifier isn't Qleft. | 3239 | ns_right_alternate_modifier isn't Qleft. |
| @@ -3074,7 +3257,7 @@ | |||
| 3074 | * Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line. | 3257 | * Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line. |
| 3075 | (PROFILING_LDFLAGS): Remove, not needed anymore. | 3258 | (PROFILING_LDFLAGS): Remove, not needed anymore. |
| 3076 | 3259 | ||
| 3077 | * Makefile.in: Use $(...) everywhere instead of ${...} | 3260 | * Makefile.in: Use $(...) everywhere instead of ${...}. |
| 3078 | (CRT_DIR): Move near potential user. | 3261 | (CRT_DIR): Move near potential user. |
| 3079 | (START_FILE): Move near CRT_DIR, it might use it. | 3262 | (START_FILE): Move near CRT_DIR, it might use it. |
| 3080 | 3263 | ||
| @@ -4574,7 +4757,7 @@ | |||
| 4574 | 4757 | ||
| 4575 | 2010-08-16 Jan Djärv <jan.h.d@swipnet.se> | 4758 | 2010-08-16 Jan Djärv <jan.h.d@swipnet.se> |
| 4576 | 4759 | ||
| 4577 | * nsselect.m: include keyboard.h for QPRIMARY, remove its | 4760 | * nsselect.m: Include keyboard.h for QPRIMARY, remove its |
| 4578 | declaration (Bug#6863). | 4761 | declaration (Bug#6863). |
| 4579 | (syms_of_nsselect): Don't intern QPRIMARY. | 4762 | (syms_of_nsselect): Don't intern QPRIMARY. |
| 4580 | 4763 | ||
| @@ -4635,7 +4818,7 @@ | |||
| 4635 | * w32menu.c (simple_dialog_show): Use unicode message box if available. | 4818 | * w32menu.c (simple_dialog_show): Use unicode message box if available. |
| 4636 | (MessageBoxW_Proc): New function typedef. | 4819 | (MessageBoxW_Proc): New function typedef. |
| 4637 | (unicode-message-box): New function pointer. | 4820 | (unicode-message-box): New function pointer. |
| 4638 | (globals_of_w32menu): Import it from user32.dll. (Bug#5629) | 4821 | (globals_of_w32menu): Import it from user32.dll. (Bug#5629) |
| 4639 | 4822 | ||
| 4640 | 2010-08-13 Jan Djärv <jan.h.d@swipnet.se> | 4823 | 2010-08-13 Jan Djärv <jan.h.d@swipnet.se> |
| 4641 | 4824 | ||
| @@ -6011,7 +6194,7 @@ | |||
| 6011 | 6194 | ||
| 6012 | * eval.c: Fix indentation problem. | 6195 | * eval.c: Fix indentation problem. |
| 6013 | 6196 | ||
| 6014 | * keyboard.c: Include "process.h" | 6197 | * keyboard.c: Include "process.h". |
| 6015 | 6198 | ||
| 6016 | * eval.c: Remove obsolete noinline declaration. | 6199 | * eval.c: Remove obsolete noinline declaration. |
| 6017 | * fns.c: Likewise. | 6200 | * fns.c: Likewise. |
| @@ -8135,7 +8318,7 @@ | |||
| 8135 | 8318 | ||
| 8136 | 2010-04-30 Jan Djärv <jan.h.d@swipnet.se> | 8319 | 2010-04-30 Jan Djärv <jan.h.d@swipnet.se> |
| 8137 | 8320 | ||
| 8138 | * xsettings.c: include limits.h and update file comment. | 8321 | * xsettings.c: Include limits.h and update file comment. |
| 8139 | 8322 | ||
| 8140 | 2010-04-30 Glenn Morris <rgm@gnu.org> | 8323 | 2010-04-30 Glenn Morris <rgm@gnu.org> |
| 8141 | 8324 | ||
| @@ -8417,7 +8600,7 @@ | |||
| 8417 | Qtool_bar_style. Initialize current_tool_bar_style to nil. | 8600 | Qtool_bar_style. Initialize current_tool_bar_style to nil. |
| 8418 | defsubr Stool_bar_get_system_style. Fprovide on | 8601 | defsubr Stool_bar_get_system_style. Fprovide on |
| 8419 | dynamic-setting. | 8602 | dynamic-setting. |
| 8420 | Move misplaced HAVE_GCONF | 8603 | Move misplaced HAVE_GCONF. |
| 8421 | 8604 | ||
| 8422 | * xsettings.h (Ftool_bar_get_system_style): Declare. | 8605 | * xsettings.h (Ftool_bar_get_system_style): Declare. |
| 8423 | 8606 | ||
| @@ -8912,7 +9095,7 @@ | |||
| 8912 | * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode | 9095 | * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode |
| 8913 | menu items in UTF-8. | 9096 | menu items in UTF-8. |
| 8914 | 9097 | ||
| 8915 | * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID. | 9098 | * xmenu.c: Include xsettings.h and xlwmenu.h if USE_LUCID. |
| 8916 | (apply_systemfont_to_menu): New function. | 9099 | (apply_systemfont_to_menu): New function. |
| 8917 | (set_frame_menubar, create_and_show_popup_menu): | 9100 | (set_frame_menubar, create_and_show_popup_menu): |
| 8918 | Call apply_systemfont_to_menu. | 9101 | Call apply_systemfont_to_menu. |
| @@ -9211,7 +9394,7 @@ | |||
| 9211 | rather than appending it. | 9394 | rather than appending it. |
| 9212 | (handle_stop_backwards): New function. | 9395 | (handle_stop_backwards): New function. |
| 9213 | (reseat_1, pop_it, push_it): Set prev_stop and base_level_stop. | 9396 | (reseat_1, pop_it, push_it): Set prev_stop and base_level_stop. |
| 9214 | (reseat): call handle_stop_backwards to recompute prev_stop and | 9397 | (reseat): Call handle_stop_backwards to recompute prev_stop and |
| 9215 | base_level_stop for the new position. | 9398 | base_level_stop for the new position. |
| 9216 | (handle_invisible_prop): Under bidi iteration, skip invisible text | 9399 | (handle_invisible_prop): Under bidi iteration, skip invisible text |
| 9217 | using bidi_get_next_char_visually. If we are `reseat'ed, init the | 9400 | using bidi_get_next_char_visually. If we are `reseat'ed, init the |
diff --git a/src/bidi.c b/src/bidi.c index 9740fe8f1d5..eeacf65bd5c 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -1520,7 +1520,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 1520 | bidi_check_type (bidi_it->type); | 1520 | bidi_check_type (bidi_it->type); |
| 1521 | 1521 | ||
| 1522 | /* For L1 below, we need to know, for each WS character, whether | 1522 | /* For L1 below, we need to know, for each WS character, whether |
| 1523 | it belongs to a sequence of WS characters preceeding a newline | 1523 | it belongs to a sequence of WS characters preceding a newline |
| 1524 | or a TAB or a paragraph separator. */ | 1524 | or a TAB or a paragraph separator. */ |
| 1525 | if (bidi_it->orig_type == NEUTRAL_WS | 1525 | if (bidi_it->orig_type == NEUTRAL_WS |
| 1526 | && bidi_it->next_for_ws.type == UNKNOWN_BT) | 1526 | && bidi_it->next_for_ws.type == UNKNOWN_BT) |
diff --git a/src/bytecode.c b/src/bytecode.c index dbab02886e2..b19f9687cdc 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, | |||
| 1406 | { | 1406 | { |
| 1407 | Lisp_Object v1; | 1407 | Lisp_Object v1; |
| 1408 | BEFORE_POTENTIAL_GC (); | 1408 | BEFORE_POTENTIAL_GC (); |
| 1409 | XSETFASTINT (v1, (int) current_column ()); /* iftc */ | 1409 | XSETFASTINT (v1, current_column ()); |
| 1410 | AFTER_POTENTIAL_GC (); | 1410 | AFTER_POTENTIAL_GC (); |
| 1411 | PUSH (v1); | 1411 | PUSH (v1); |
| 1412 | break; | 1412 | break; |
diff --git a/src/character.c b/src/character.c index f12c4f28d31..6f3312fec29 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -761,7 +761,7 @@ str_as_unibyte (unsigned char *str, EMACS_INT bytes) | |||
| 761 | corresponding byte and store in DST. CHARS is the number of | 761 | corresponding byte and store in DST. CHARS is the number of |
| 762 | characters in SRC. The value is the number of bytes stored in DST. | 762 | characters in SRC. The value is the number of bytes stored in DST. |
| 763 | Usually, the value is the same as CHARS, but is less than it if SRC | 763 | Usually, the value is the same as CHARS, but is less than it if SRC |
| 764 | contains a non-ASCII, non-eight-bit characater. If ACCEPT_LATIN_1 | 764 | contains a non-ASCII, non-eight-bit character. If ACCEPT_LATIN_1 |
| 765 | is nonzero, a Latin-1 character is accepted and converted to a byte | 765 | is nonzero, a Latin-1 character is accepted and converted to a byte |
| 766 | of that character code. | 766 | of that character code. |
| 767 | Note: Currently the arg ACCEPT_LATIN_1 is not used. */ | 767 | Note: Currently the arg ACCEPT_LATIN_1 is not used. */ |
diff --git a/src/cmds.c b/src/cmds.c index 336bf1154f9..5e6884c0807 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -381,33 +381,37 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 381 | { | 381 | { |
| 382 | EMACS_INT pos = PT; | 382 | EMACS_INT pos = PT; |
| 383 | EMACS_INT pos_byte = PT_BYTE; | 383 | EMACS_INT pos_byte = PT_BYTE; |
| 384 | |||
| 385 | /* FIXME: Check for integer overflow when calculating | ||
| 386 | target_clm and actual_clm. */ | ||
| 387 | |||
| 384 | /* Column the cursor should be placed at after this insertion. | 388 | /* Column the cursor should be placed at after this insertion. |
| 385 | The correct value should be calculated only when necessary. */ | 389 | The correct value should be calculated only when necessary. */ |
| 386 | int target_clm = ((int) current_column () /* iftc */ | 390 | EMACS_INT target_clm = (current_column () |
| 387 | + n * (int) XINT (Fchar_width (make_number (c)))); | 391 | + n * XINT (Fchar_width (make_number (c)))); |
| 388 | 392 | ||
| 389 | /* The actual cursor position after the trial of moving | 393 | /* The actual cursor position after the trial of moving |
| 390 | to column TARGET_CLM. It is greater than TARGET_CLM | 394 | to column TARGET_CLM. It is greater than TARGET_CLM |
| 391 | if the TARGET_CLM is middle of multi-column | 395 | if the TARGET_CLM is middle of multi-column |
| 392 | character. In that case, the new point is set after | 396 | character. In that case, the new point is set after |
| 393 | that character. */ | 397 | that character. */ |
| 394 | int actual_clm | 398 | EMACS_INT actual_clm |
| 395 | = (int) XFASTINT (Fmove_to_column (make_number (target_clm), | 399 | = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil)); |
| 396 | Qnil)); | 400 | |
| 397 | 401 | chars_to_delete = PT - pos; | |
| 398 | chars_to_delete = PT - pos; | 402 | |
| 399 | 403 | if (actual_clm > target_clm) | |
| 400 | if (actual_clm > target_clm) | 404 | { |
| 401 | { /* We will delete too many columns. Let's fill columns | 405 | /* We will delete too many columns. Let's fill columns |
| 402 | by spaces so that the remaining text won't move. */ | 406 | by spaces so that the remaining text won't move. */ |
| 403 | EMACS_INT actual = PT_BYTE; | 407 | EMACS_INT actual = PT_BYTE; |
| 404 | DEC_POS (actual); | 408 | DEC_POS (actual); |
| 405 | if (FETCH_CHAR (actual) == '\t') | 409 | if (FETCH_CHAR (actual) == '\t') |
| 406 | /* Rather than add spaces, let's just keep the tab. */ | 410 | /* Rather than add spaces, let's just keep the tab. */ |
| 407 | chars_to_delete--; | 411 | chars_to_delete--; |
| 408 | else | 412 | else |
| 409 | spaces_to_insert = actual_clm - target_clm; | 413 | spaces_to_insert = actual_clm - target_clm; |
| 410 | } | 414 | } |
| 411 | 415 | ||
| 412 | SET_PT_BOTH (pos, pos_byte); | 416 | SET_PT_BOTH (pos, pos_byte); |
| 413 | } | 417 | } |
diff --git a/src/config.in b/src/config.in index 1fd1f89ede3..7f33727c0b1 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/>. */ | |||
| 465 | /* Define to 1 if you have the `lrand48' function. */ | 465 | /* Define to 1 if you have the `lrand48' function. */ |
| 466 | #undef HAVE_LRAND48 | 466 | #undef HAVE_LRAND48 |
| 467 | 467 | ||
| 468 | /* Define to 1 if you have the `lstat' function. */ | ||
| 469 | #undef HAVE_LSTAT | ||
| 470 | |||
| 468 | /* Define to 1 if using libm17n-flt. */ | 471 | /* Define to 1 if using libm17n-flt. */ |
| 469 | #undef HAVE_M17N_FLT | 472 | #undef HAVE_M17N_FLT |
| 470 | 473 | ||
| @@ -573,6 +576,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 573 | /* Define to 1 if you have the `random' function. */ | 576 | /* Define to 1 if you have the `random' function. */ |
| 574 | #undef HAVE_RANDOM | 577 | #undef HAVE_RANDOM |
| 575 | 578 | ||
| 579 | /* Define to 1 if you have the `readlink' function. */ | ||
| 580 | #undef HAVE_READLINK | ||
| 581 | |||
| 576 | /* Define to 1 if you have the `recvfrom' function. */ | 582 | /* Define to 1 if you have the `recvfrom' function. */ |
| 577 | #undef HAVE_RECVFROM | 583 | #undef HAVE_RECVFROM |
| 578 | 584 | ||
| @@ -693,6 +699,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 693 | /* Define if struct stat has an st_dm_mode member. */ | 699 | /* Define if struct stat has an st_dm_mode member. */ |
| 694 | #undef HAVE_ST_DM_MODE | 700 | #undef HAVE_ST_DM_MODE |
| 695 | 701 | ||
| 702 | /* Define to 1 if you have the `symlink' function. */ | ||
| 703 | #undef HAVE_SYMLINK | ||
| 704 | |||
| 696 | /* Define to 1 if you have the `sync' function. */ | 705 | /* Define to 1 if you have the `sync' function. */ |
| 697 | #undef HAVE_SYNC | 706 | #undef HAVE_SYNC |
| 698 | 707 | ||
| @@ -894,6 +903,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 894 | /* Define to 1 if localtime caches TZ. */ | 903 | /* Define to 1 if localtime caches TZ. */ |
| 895 | #undef LOCALTIME_CACHE | 904 | #undef LOCALTIME_CACHE |
| 896 | 905 | ||
| 906 | /* Define to 1 if `lstat' dereferences a symlink specified with a trailing | ||
| 907 | slash. */ | ||
| 908 | #undef LSTAT_FOLLOWS_SLASHED_SYMLINK | ||
| 909 | |||
| 897 | /* String giving fallback POP mail host. */ | 910 | /* String giving fallback POP mail host. */ |
| 898 | #undef MAILHOST | 911 | #undef MAILHOST |
| 899 | 912 | ||
| @@ -965,10 +978,21 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 965 | 'ptrdiff_t'. */ | 978 | 'ptrdiff_t'. */ |
| 966 | #undef PTRDIFF_T_SUFFIX | 979 | #undef PTRDIFF_T_SUFFIX |
| 967 | 980 | ||
| 981 | /* Define to 1 if readlink fails to recognize a trailing slash. */ | ||
| 982 | #undef READLINK_TRAILING_SLASH_BUG | ||
| 983 | |||
| 968 | /* Define REL_ALLOC if you want to use the relocating allocator for buffer | 984 | /* Define REL_ALLOC if you want to use the relocating allocator for buffer |
| 969 | space. */ | 985 | space. */ |
| 970 | #undef REL_ALLOC | 986 | #undef REL_ALLOC |
| 971 | 987 | ||
| 988 | /* Define to 1 if stat needs help when passed a directory name with a trailing | ||
| 989 | slash */ | ||
| 990 | #undef REPLACE_FUNC_STAT_DIR | ||
| 991 | |||
| 992 | /* Define to 1 if stat needs help when passed a file name with a trailing | ||
| 993 | slash */ | ||
| 994 | #undef REPLACE_FUNC_STAT_FILE | ||
| 995 | |||
| 972 | /* Define as the return type of signal handlers (`int' or `void'). */ | 996 | /* Define as the return type of signal handlers (`int' or `void'). */ |
| 973 | #undef RETSIGTYPE | 997 | #undef RETSIGTYPE |
| 974 | 998 | ||
diff --git a/src/dired.c b/src/dired.c index b01ce8d4d8f..96063680d4d 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -84,13 +84,6 @@ extern struct re_pattern_buffer *compile_pattern (Lisp_Object, | |||
| 84 | struct re_registers *, | 84 | struct re_registers *, |
| 85 | Lisp_Object, int, int); | 85 | Lisp_Object, int, int); |
| 86 | 86 | ||
| 87 | /* if system does not have symbolic links, it does not have lstat. | ||
| 88 | In that case, use ordinary stat instead. */ | ||
| 89 | |||
| 90 | #ifndef S_IFLNK | ||
| 91 | #define lstat stat | ||
| 92 | #endif | ||
| 93 | |||
| 94 | Lisp_Object Qdirectory_files; | 87 | Lisp_Object Qdirectory_files; |
| 95 | Lisp_Object Qdirectory_files_and_attributes; | 88 | Lisp_Object Qdirectory_files_and_attributes; |
| 96 | Lisp_Object Qfile_name_completion; | 89 | Lisp_Object Qfile_name_completion; |
| @@ -539,7 +532,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 539 | if (file_name_completion_stat (encoded_dir, dp, &st) < 0) | 532 | if (file_name_completion_stat (encoded_dir, dp, &st) < 0) |
| 540 | continue; | 533 | continue; |
| 541 | 534 | ||
| 542 | directoryp = ((st.st_mode & S_IFMT) == S_IFDIR); | 535 | directoryp = S_ISDIR (st.st_mode); |
| 543 | tem = Qnil; | 536 | tem = Qnil; |
| 544 | /* If all_flag is set, always include all. | 537 | /* If all_flag is set, always include all. |
| 545 | It would not actually be helpful to the user to ignore any possible | 538 | 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 | |||
| 843 | memcpy (fullname + pos, dp->d_name, len); | 836 | memcpy (fullname + pos, dp->d_name, len); |
| 844 | fullname[pos + len] = 0; | 837 | fullname[pos + len] = 0; |
| 845 | 838 | ||
| 846 | #ifdef S_IFLNK | ||
| 847 | /* We want to return success if a link points to a nonexistent file, | 839 | /* We want to return success if a link points to a nonexistent file, |
| 848 | but we want to return the status for what the link points to, | 840 | but we want to return the status for what the link points to, |
| 849 | in case it is a directory. */ | 841 | in case it is a directory. */ |
| 850 | value = lstat (fullname, st_addr); | 842 | value = lstat (fullname, st_addr); |
| 851 | stat (fullname, st_addr); | 843 | if (value == 0 && S_ISLNK (st_addr->st_mode)) |
| 852 | return value; | 844 | stat (fullname, st_addr); |
| 853 | #else | ||
| 854 | value = stat (fullname, st_addr); | ||
| 855 | #ifdef MSDOS | 845 | #ifdef MSDOS |
| 856 | _djstat_flags = save_djstat_flags; | 846 | _djstat_flags = save_djstat_flags; |
| 857 | #endif /* MSDOS */ | 847 | #endif /* MSDOS */ |
| 858 | return value; | 848 | return value; |
| 859 | #endif /* S_IFLNK */ | ||
| 860 | } | 849 | } |
| 861 | 850 | ||
| 862 | Lisp_Object | 851 | Lisp_Object |
| @@ -948,7 +937,11 @@ so last access time will always be midnight of that day. */) | |||
| 948 | Lisp_Object dirname; | 937 | Lisp_Object dirname; |
| 949 | struct stat sdir; | 938 | struct stat sdir; |
| 950 | #endif /* BSD4_2 */ | 939 | #endif /* BSD4_2 */ |
| 951 | char modes[10]; | 940 | |
| 941 | /* An array to hold the mode string generated by filemodestring, | ||
| 942 | including its terminating space and null byte. */ | ||
| 943 | char modes[sizeof "-rwxr-xr-x "]; | ||
| 944 | |||
| 952 | Lisp_Object handler; | 945 | Lisp_Object handler; |
| 953 | struct gcpro gcpro1; | 946 | struct gcpro gcpro1; |
| 954 | char *uname = NULL, *gname = NULL; | 947 | char *uname = NULL, *gname = NULL; |
| @@ -974,17 +967,8 @@ so last access time will always be midnight of that day. */) | |||
| 974 | if (lstat (SSDATA (encoded), &s) < 0) | 967 | if (lstat (SSDATA (encoded), &s) < 0) |
| 975 | return Qnil; | 968 | return Qnil; |
| 976 | 969 | ||
| 977 | switch (s.st_mode & S_IFMT) | 970 | values[0] = (S_ISLNK (s.st_mode) ? Ffile_symlink_p (filename) |
| 978 | { | 971 | : S_ISDIR (s.st_mode) ? Qt : Qnil); |
| 979 | default: | ||
| 980 | values[0] = Qnil; break; | ||
| 981 | case S_IFDIR: | ||
| 982 | values[0] = Qt; break; | ||
| 983 | #ifdef S_IFLNK | ||
| 984 | case S_IFLNK: | ||
| 985 | values[0] = Ffile_symlink_p (filename); break; | ||
| 986 | #endif | ||
| 987 | } | ||
| 988 | values[1] = make_number (s.st_nlink); | 972 | values[1] = make_number (s.st_nlink); |
| 989 | 973 | ||
| 990 | if (!(NILP (id_format) || EQ (id_format, Qinteger))) | 974 | if (!(NILP (id_format) || EQ (id_format, Qinteger))) |
diff --git a/src/dispextern.h b/src/dispextern.h index 6bb0c3a6aae..37ae7ee5fd5 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -431,7 +431,7 @@ struct glyph | |||
| 431 | } cmp; | 431 | } cmp; |
| 432 | 432 | ||
| 433 | /* Image ID for image glyphs (type == IMAGE_GLYPH). */ | 433 | /* Image ID for image glyphs (type == IMAGE_GLYPH). */ |
| 434 | unsigned img_id; | 434 | int img_id; |
| 435 | 435 | ||
| 436 | /* Sub-structure for type == STRETCH_GLYPH. */ | 436 | /* Sub-structure for type == STRETCH_GLYPH. */ |
| 437 | struct | 437 | struct |
diff --git a/src/dispnew.c b/src/dispnew.c index 4e068bde536..1408bea2fc6 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) | |||
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| 1131 | 1131 | ||
| 1132 | /* Copy contents of glyph row FROM to glyph row TO. Glyph pointers in | ||
| 1133 | TO and FROM are left unchanged. Glyph contents are copied from the | ||
| 1134 | glyph memory of FROM to the glyph memory of TO. Increment buffer | ||
| 1135 | positions in row TO by DELTA/ DELTA_BYTES. */ | ||
| 1136 | |||
| 1137 | void | ||
| 1138 | copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from, | ||
| 1139 | EMACS_INT delta, EMACS_INT delta_bytes) | ||
| 1140 | { | ||
| 1141 | int area; | ||
| 1142 | |||
| 1143 | /* This is like a structure assignment TO = FROM, except that | ||
| 1144 | glyph pointers in the rows are left unchanged. */ | ||
| 1145 | copy_row_except_pointers (to, from); | ||
| 1146 | |||
| 1147 | /* Copy glyphs from FROM to TO. */ | ||
| 1148 | for (area = 0; area < LAST_AREA; ++area) | ||
| 1149 | if (from->used[area]) | ||
| 1150 | memcpy (to->glyphs[area], from->glyphs[area], | ||
| 1151 | from->used[area] * sizeof (struct glyph)); | ||
| 1152 | |||
| 1153 | /* Increment buffer positions in TO by DELTA. */ | ||
| 1154 | increment_row_positions (to, delta, delta_bytes); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | |||
| 1158 | /* Assign glyph row FROM to glyph row TO. This works like a structure | 1132 | /* Assign glyph row FROM to glyph row TO. This works like a structure |
| 1159 | assignment TO = FROM, except that glyph pointers are not copied but | 1133 | assignment TO = FROM, except that glyph pointers are not copied but |
| 1160 | exchanged between TO and FROM. Pointers must be exchanged to avoid | 1134 | exchanged between TO and FROM. Pointers must be exchanged to avoid |
| @@ -2223,8 +2197,6 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f) | |||
| 2223 | static void | 2197 | static void |
| 2224 | adjust_frame_glyphs_for_window_redisplay (struct frame *f) | 2198 | adjust_frame_glyphs_for_window_redisplay (struct frame *f) |
| 2225 | { | 2199 | { |
| 2226 | struct window *w; | ||
| 2227 | |||
| 2228 | xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); | 2200 | xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); |
| 2229 | 2201 | ||
| 2230 | /* Allocate/reallocate window matrices. */ | 2202 | /* Allocate/reallocate window matrices. */ |
| @@ -2236,6 +2208,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f) | |||
| 2236 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | 2208 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
| 2237 | { | 2209 | { |
| 2238 | /* Allocate a dummy window if not already done. */ | 2210 | /* Allocate a dummy window if not already done. */ |
| 2211 | struct window *w; | ||
| 2239 | if (NILP (f->menu_bar_window)) | 2212 | if (NILP (f->menu_bar_window)) |
| 2240 | { | 2213 | { |
| 2241 | f->menu_bar_window = make_window (); | 2214 | f->menu_bar_window = make_window (); |
| @@ -2258,23 +2231,26 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f) | |||
| 2258 | #endif /* HAVE_X_WINDOWS */ | 2231 | #endif /* HAVE_X_WINDOWS */ |
| 2259 | 2232 | ||
| 2260 | #ifndef USE_GTK | 2233 | #ifndef USE_GTK |
| 2261 | /* Allocate/ reallocate matrices of the tool bar window. If we | 2234 | { |
| 2262 | don't have a tool bar window yet, make one. */ | 2235 | /* Allocate/ reallocate matrices of the tool bar window. If we |
| 2263 | if (NILP (f->tool_bar_window)) | 2236 | don't have a tool bar window yet, make one. */ |
| 2264 | { | 2237 | struct window *w; |
| 2265 | f->tool_bar_window = make_window (); | 2238 | if (NILP (f->tool_bar_window)) |
| 2239 | { | ||
| 2240 | f->tool_bar_window = make_window (); | ||
| 2241 | w = XWINDOW (f->tool_bar_window); | ||
| 2242 | XSETFRAME (w->frame, f); | ||
| 2243 | w->pseudo_window_p = 1; | ||
| 2244 | } | ||
| 2245 | else | ||
| 2266 | w = XWINDOW (f->tool_bar_window); | 2246 | w = XWINDOW (f->tool_bar_window); |
| 2267 | XSETFRAME (w->frame, f); | ||
| 2268 | w->pseudo_window_p = 1; | ||
| 2269 | } | ||
| 2270 | else | ||
| 2271 | w = XWINDOW (f->tool_bar_window); | ||
| 2272 | 2247 | ||
| 2273 | XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); | 2248 | XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); |
| 2274 | XSETFASTINT (w->left_col, 0); | 2249 | XSETFASTINT (w->left_col, 0); |
| 2275 | XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); | 2250 | XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); |
| 2276 | XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); | 2251 | XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); |
| 2277 | allocate_matrices_for_window_redisplay (w); | 2252 | allocate_matrices_for_window_redisplay (w); |
| 2253 | } | ||
| 2278 | #endif | 2254 | #endif |
| 2279 | } | 2255 | } |
| 2280 | 2256 | ||
| @@ -2924,7 +2900,7 @@ sync_window_with_frame_matrix_rows (struct window *w) | |||
| 2924 | /* Return the window in the window tree rooted in W containing frame | 2900 | /* Return the window in the window tree rooted in W containing frame |
| 2925 | row ROW. Value is null if none is found. */ | 2901 | row ROW. Value is null if none is found. */ |
| 2926 | 2902 | ||
| 2927 | struct window * | 2903 | static struct window * |
| 2928 | frame_row_to_window (struct window *w, int row) | 2904 | frame_row_to_window (struct window *w, int row) |
| 2929 | { | 2905 | { |
| 2930 | struct window *found = NULL; | 2906 | struct window *found = NULL; |
| @@ -3562,12 +3538,12 @@ redraw_overlapping_rows (struct window *w, int yb) | |||
| 3562 | #endif /* HAVE_WINDOW_SYSTEM */ | 3538 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 3563 | 3539 | ||
| 3564 | 3540 | ||
| 3565 | #ifdef GLYPH_DEBUG | 3541 | #if defined GLYPH_DEBUG && 0 |
| 3566 | 3542 | ||
| 3567 | /* Check that no row in the current matrix of window W is enabled | 3543 | /* Check that no row in the current matrix of window W is enabled |
| 3568 | which is below what's displayed in the window. */ | 3544 | which is below what's displayed in the window. */ |
| 3569 | 3545 | ||
| 3570 | void | 3546 | static void |
| 3571 | check_current_matrix_flags (struct window *w) | 3547 | check_current_matrix_flags (struct window *w) |
| 3572 | { | 3548 | { |
| 3573 | int last_seen_p = 0; | 3549 | int last_seen_p = 0; |
| @@ -4014,7 +3990,7 @@ update_text_area (struct window *w, int vpos) | |||
| 4014 | { | 3990 | { |
| 4015 | /* Otherwise clear to the end of the old row. Everything | 3991 | /* Otherwise clear to the end of the old row. Everything |
| 4016 | after that position should be clear already. */ | 3992 | after that position should be clear already. */ |
| 4017 | int x; | 3993 | int xlim; |
| 4018 | 3994 | ||
| 4019 | if (i >= desired_row->used[TEXT_AREA]) | 3995 | if (i >= desired_row->used[TEXT_AREA]) |
| 4020 | rif->cursor_to (vpos, i, desired_row->y, | 3996 | rif->cursor_to (vpos, i, desired_row->y, |
| @@ -4031,11 +4007,11 @@ update_text_area (struct window *w, int vpos) | |||
| 4031 | : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) | 4007 | : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) |
| 4032 | { | 4008 | { |
| 4033 | w->phys_cursor_on_p = 0; | 4009 | w->phys_cursor_on_p = 0; |
| 4034 | x = -1; | 4010 | xlim = -1; |
| 4035 | } | 4011 | } |
| 4036 | else | 4012 | else |
| 4037 | x = current_row->pixel_width; | 4013 | xlim = current_row->pixel_width; |
| 4038 | rif->clear_end_of_line (x); | 4014 | rif->clear_end_of_line (xlim); |
| 4039 | changed_p = 1; | 4015 | changed_p = 1; |
| 4040 | } | 4016 | } |
| 4041 | } | 4017 | } |
| @@ -4491,7 +4467,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4491 | && old_lines[i]->old_uses == 1 | 4467 | && old_lines[i]->old_uses == 1 |
| 4492 | && old_lines[i]->new_uses == 1) | 4468 | && old_lines[i]->new_uses == 1) |
| 4493 | { | 4469 | { |
| 4494 | int j, k; | 4470 | int p, q; |
| 4495 | int new_line = old_lines[i]->new_line_number; | 4471 | int new_line = old_lines[i]->new_line_number; |
| 4496 | struct run *run = run_pool + run_idx++; | 4472 | struct run *run = run_pool + run_idx++; |
| 4497 | 4473 | ||
| @@ -4504,33 +4480,33 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4504 | run->height = MATRIX_ROW (current_matrix, i)->height; | 4480 | run->height = MATRIX_ROW (current_matrix, i)->height; |
| 4505 | 4481 | ||
| 4506 | /* Extend backward. */ | 4482 | /* Extend backward. */ |
| 4507 | j = i - 1; | 4483 | p = i - 1; |
| 4508 | k = new_line - 1; | 4484 | q = new_line - 1; |
| 4509 | while (j > first_old | 4485 | while (p > first_old |
| 4510 | && k > first_new | 4486 | && q > first_new |
| 4511 | && old_lines[j] == new_lines[k]) | 4487 | && old_lines[p] == new_lines[q]) |
| 4512 | { | 4488 | { |
| 4513 | int h = MATRIX_ROW (current_matrix, j)->height; | 4489 | int h = MATRIX_ROW (current_matrix, p)->height; |
| 4514 | --run->current_vpos; | 4490 | --run->current_vpos; |
| 4515 | --run->desired_vpos; | 4491 | --run->desired_vpos; |
| 4516 | ++run->nrows; | 4492 | ++run->nrows; |
| 4517 | run->height += h; | 4493 | run->height += h; |
| 4518 | run->desired_y -= h; | 4494 | run->desired_y -= h; |
| 4519 | run->current_y -= h; | 4495 | run->current_y -= h; |
| 4520 | --j, --k; | 4496 | --p, --q; |
| 4521 | } | 4497 | } |
| 4522 | 4498 | ||
| 4523 | /* Extend forward. */ | 4499 | /* Extend forward. */ |
| 4524 | j = i + 1; | 4500 | p = i + 1; |
| 4525 | k = new_line + 1; | 4501 | q = new_line + 1; |
| 4526 | while (j < last_old | 4502 | while (p < last_old |
| 4527 | && k < last_new | 4503 | && q < last_new |
| 4528 | && old_lines[j] == new_lines[k]) | 4504 | && old_lines[p] == new_lines[q]) |
| 4529 | { | 4505 | { |
| 4530 | int h = MATRIX_ROW (current_matrix, j)->height; | 4506 | int h = MATRIX_ROW (current_matrix, p)->height; |
| 4531 | ++run->nrows; | 4507 | ++run->nrows; |
| 4532 | run->height += h; | 4508 | run->height += h; |
| 4533 | ++j, ++k; | 4509 | ++p, ++q; |
| 4534 | } | 4510 | } |
| 4535 | 4511 | ||
| 4536 | /* Insert run into list of all runs. Order runs by copied | 4512 | /* Insert run into list of all runs. Order runs by copied |
| @@ -4538,11 +4514,11 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4538 | be copied because they are already in place. This is done | 4514 | be copied because they are already in place. This is done |
| 4539 | because we can avoid calling update_window_line in this | 4515 | because we can avoid calling update_window_line in this |
| 4540 | case. */ | 4516 | case. */ |
| 4541 | for (j = 0; j < nruns && runs[j]->height > run->height; ++j) | 4517 | for (p = 0; p < nruns && runs[p]->height > run->height; ++p) |
| 4542 | ; | 4518 | ; |
| 4543 | for (k = nruns; k > j; --k) | 4519 | for (q = nruns; q > p; --q) |
| 4544 | runs[k] = runs[k - 1]; | 4520 | runs[q] = runs[q - 1]; |
| 4545 | runs[j] = run; | 4521 | runs[p] = run; |
| 4546 | ++nruns; | 4522 | ++nruns; |
| 4547 | 4523 | ||
| 4548 | i += run->nrows; | 4524 | i += run->nrows; |
| @@ -4639,7 +4615,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4639 | struct glyph_matrix *current_matrix = f->current_matrix; | 4615 | struct glyph_matrix *current_matrix = f->current_matrix; |
| 4640 | struct glyph_matrix *desired_matrix = f->desired_matrix; | 4616 | struct glyph_matrix *desired_matrix = f->desired_matrix; |
| 4641 | int i; | 4617 | int i; |
| 4642 | int pause; | 4618 | int pause_p; |
| 4643 | int preempt_count = baud_rate / 2400 + 1; | 4619 | int preempt_count = baud_rate / 2400 + 1; |
| 4644 | 4620 | ||
| 4645 | xassert (current_matrix && desired_matrix); | 4621 | xassert (current_matrix && desired_matrix); |
| @@ -4653,7 +4629,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4653 | #if !PERIODIC_PREEMPTION_CHECKING | 4629 | #if !PERIODIC_PREEMPTION_CHECKING |
| 4654 | if (!force_p && detect_input_pending_ignore_squeezables ()) | 4630 | if (!force_p && detect_input_pending_ignore_squeezables ()) |
| 4655 | { | 4631 | { |
| 4656 | pause = 1; | 4632 | pause_p = 1; |
| 4657 | goto do_pause; | 4633 | goto do_pause; |
| 4658 | } | 4634 | } |
| 4659 | #endif | 4635 | #endif |
| @@ -4733,10 +4709,10 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4733 | } | 4709 | } |
| 4734 | } | 4710 | } |
| 4735 | 4711 | ||
| 4736 | pause = (i < FRAME_LINES (f) - 1) ? i : 0; | 4712 | pause_p = (i < FRAME_LINES (f) - 1) ? i : 0; |
| 4737 | 4713 | ||
| 4738 | /* Now just clean up termcap drivers and set cursor, etc. */ | 4714 | /* Now just clean up termcap drivers and set cursor, etc. */ |
| 4739 | if (!pause) | 4715 | if (!pause_p) |
| 4740 | { | 4716 | { |
| 4741 | if ((cursor_in_echo_area | 4717 | if ((cursor_in_echo_area |
| 4742 | /* If we are showing a message instead of the mini-buffer, | 4718 | /* 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) | |||
| 4837 | #endif | 4813 | #endif |
| 4838 | 4814 | ||
| 4839 | clear_desired_matrices (f); | 4815 | clear_desired_matrices (f); |
| 4840 | return pause; | 4816 | return pause_p; |
| 4841 | } | 4817 | } |
| 4842 | 4818 | ||
| 4843 | 4819 | ||
| @@ -5594,7 +5570,7 @@ marginal_area_string (struct window *w, enum window_part part, | |||
| 5594 | 5570 | ||
| 5595 | #ifdef SIGWINCH | 5571 | #ifdef SIGWINCH |
| 5596 | 5572 | ||
| 5597 | SIGTYPE | 5573 | static SIGTYPE |
| 5598 | window_change_signal (int signalnum) /* If we don't have an argument, */ | 5574 | window_change_signal (int signalnum) /* If we don't have an argument, */ |
| 5599 | /* some compilers complain in signal calls. */ | 5575 | /* some compilers complain in signal calls. */ |
| 5600 | { | 5576 | { |
diff --git a/src/editfns.c b/src/editfns.c index 5d6189f2a3c..28690e7c76d 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3523,7 +3523,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3523 | int maybe_combine_byte; | 3523 | int maybe_combine_byte; |
| 3524 | char *this_format; | 3524 | char *this_format; |
| 3525 | /* Precision for each spec, or -1, a flag value meaning no precision | 3525 | /* Precision for each spec, or -1, a flag value meaning no precision |
| 3526 | was given in that spec. Element 0, corresonding to the format | 3526 | was given in that spec. Element 0, corresponding to the format |
| 3527 | string itself, will not be used. Element NARGS, corresponding to | 3527 | string itself, will not be used. Element NARGS, corresponding to |
| 3528 | no argument, *will* be assigned to in the case that a `%' and `.' | 3528 | no argument, *will* be assigned to in the case that a `%' and `.' |
| 3529 | occur after the final format specifier. */ | 3529 | occur after the final format specifier. */ |
diff --git a/src/fileio.c b/src/fileio.c index 2ccad83f668..18e9dbe9680 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/>. */ | |||
| 26 | #include <setjmp.h> | 26 | #include <setjmp.h> |
| 27 | #include <unistd.h> | 27 | #include <unistd.h> |
| 28 | 28 | ||
| 29 | #if !defined (S_ISLNK) && defined (S_IFLNK) | ||
| 30 | # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #if !defined (S_ISFIFO) && defined (S_IFIFO) | ||
| 34 | # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #if !defined (S_ISREG) && defined (S_IFREG) | ||
| 38 | # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifdef HAVE_PWD_H | 29 | #ifdef HAVE_PWD_H |
| 42 | #include <pwd.h> | 30 | #include <pwd.h> |
| 43 | #endif | 31 | #endif |
| @@ -95,10 +83,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 95 | 83 | ||
| 96 | #include "commands.h" | 84 | #include "commands.h" |
| 97 | 85 | ||
| 98 | #ifndef S_ISLNK | ||
| 99 | # define lstat stat | ||
| 100 | #endif | ||
| 101 | |||
| 102 | #ifndef FILE_SYSTEM_CASE | 86 | #ifndef FILE_SYSTEM_CASE |
| 103 | #define FILE_SYSTEM_CASE(filename) (filename) | 87 | #define FILE_SYSTEM_CASE(filename) (filename) |
| 104 | #endif | 88 | #endif |
| @@ -1922,7 +1906,6 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) | |||
| 1922 | Fcons (file, Fcons (newname, Qnil))); | 1906 | Fcons (file, Fcons (newname, Qnil))); |
| 1923 | } | 1907 | } |
| 1924 | 1908 | ||
| 1925 | #if defined (S_ISREG) && defined (S_ISLNK) | ||
| 1926 | if (input_file_statable_p) | 1909 | if (input_file_statable_p) |
| 1927 | { | 1910 | { |
| 1928 | if (!(S_ISREG (st.st_mode)) && !(S_ISLNK (st.st_mode))) | 1911 | 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. */) | |||
| 1934 | report_file_error ("Non-regular file", Fcons (file, Qnil)); | 1917 | report_file_error ("Non-regular file", Fcons (file, Qnil)); |
| 1935 | } | 1918 | } |
| 1936 | } | 1919 | } |
| 1937 | #endif /* S_ISREG && S_ISLNK */ | ||
| 1938 | 1920 | ||
| 1939 | #ifdef MSDOS | 1921 | #ifdef MSDOS |
| 1940 | /* System's default file type was set to binary by _fmode in emacs.c. */ | 1922 | /* 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. */) | |||
| 2196 | if (errno == EXDEV) | 2178 | if (errno == EXDEV) |
| 2197 | { | 2179 | { |
| 2198 | int count; | 2180 | int count; |
| 2199 | #ifdef S_IFLNK | ||
| 2200 | symlink_target = Ffile_symlink_p (file); | 2181 | symlink_target = Ffile_symlink_p (file); |
| 2201 | if (! NILP (symlink_target)) | 2182 | if (! NILP (symlink_target)) |
| 2202 | Fmake_symbolic_link (symlink_target, newname, | 2183 | Fmake_symbolic_link (symlink_target, newname, |
| 2203 | NILP (ok_if_already_exists) ? Qnil : Qt); | 2184 | NILP (ok_if_already_exists) ? Qnil : Qt); |
| 2204 | else | 2185 | else if (!NILP (Ffile_directory_p (file))) |
| 2205 | #endif | ||
| 2206 | if (!NILP (Ffile_directory_p (file))) | ||
| 2207 | call4 (Qcopy_directory, file, newname, Qt, Qnil); | 2186 | call4 (Qcopy_directory, file, newname, Qt, Qnil); |
| 2208 | else | 2187 | else |
| 2209 | /* We have already prompted if it was an integer, so don't | 2188 | /* 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. */) | |||
| 2215 | count = SPECPDL_INDEX (); | 2194 | count = SPECPDL_INDEX (); |
| 2216 | specbind (Qdelete_by_moving_to_trash, Qnil); | 2195 | specbind (Qdelete_by_moving_to_trash, Qnil); |
| 2217 | 2196 | ||
| 2218 | if (!NILP (Ffile_directory_p (file)) | 2197 | if (!NILP (Ffile_directory_p (file)) && NILP (symlink_target)) |
| 2219 | #ifdef S_IFLNK | ||
| 2220 | && NILP (symlink_target) | ||
| 2221 | #endif | ||
| 2222 | ) | ||
| 2223 | call2 (Qdelete_directory, file, Qt); | 2198 | call2 (Qdelete_directory, file, Qt); |
| 2224 | else | 2199 | else |
| 2225 | Fdelete_file (file, Qnil); | 2200 | Fdelete_file (file, Qnil); |
| @@ -2329,7 +2304,6 @@ This happens for interactive use with M-x. */) | |||
| 2329 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, | 2304 | RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, |
| 2330 | linkname, ok_if_already_exists)); | 2305 | linkname, ok_if_already_exists)); |
| 2331 | 2306 | ||
| 2332 | #ifdef S_IFLNK | ||
| 2333 | encoded_filename = ENCODE_FILE (filename); | 2307 | encoded_filename = ENCODE_FILE (filename); |
| 2334 | encoded_linkname = ENCODE_FILE (linkname); | 2308 | encoded_linkname = ENCODE_FILE (linkname); |
| 2335 | 2309 | ||
| @@ -2351,17 +2325,17 @@ This happens for interactive use with M-x. */) | |||
| 2351 | return Qnil; | 2325 | return Qnil; |
| 2352 | } | 2326 | } |
| 2353 | } | 2327 | } |
| 2328 | if (errno == ENOSYS) | ||
| 2329 | { | ||
| 2330 | UNGCPRO; | ||
| 2331 | xsignal1 (Qfile_error, | ||
| 2332 | build_string ("Symbolic links are not supported")); | ||
| 2333 | } | ||
| 2354 | 2334 | ||
| 2355 | report_file_error ("Making symbolic link", list2 (filename, linkname)); | 2335 | report_file_error ("Making symbolic link", list2 (filename, linkname)); |
| 2356 | } | 2336 | } |
| 2357 | UNGCPRO; | 2337 | UNGCPRO; |
| 2358 | return Qnil; | 2338 | return Qnil; |
| 2359 | |||
| 2360 | #else | ||
| 2361 | UNGCPRO; | ||
| 2362 | xsignal1 (Qfile_error, build_string ("Symbolic links are not supported")); | ||
| 2363 | |||
| 2364 | #endif /* S_IFLNK */ | ||
| 2365 | } | 2339 | } |
| 2366 | 2340 | ||
| 2367 | 2341 | ||
| @@ -2408,7 +2382,7 @@ check_writable (const char *filename) | |||
| 2408 | struct stat st; | 2382 | struct stat st; |
| 2409 | if (stat (filename, &st) < 0) | 2383 | if (stat (filename, &st) < 0) |
| 2410 | return 0; | 2384 | return 0; |
| 2411 | return (st.st_mode & S_IWRITE || (st.st_mode & S_IFMT) == S_IFDIR); | 2385 | return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode)); |
| 2412 | #else /* not MSDOS */ | 2386 | #else /* not MSDOS */ |
| 2413 | #ifdef HAVE_EUIDACCESS | 2387 | #ifdef HAVE_EUIDACCESS |
| 2414 | return (euidaccess (filename, 2) >= 0); | 2388 | return (euidaccess (filename, 2) >= 0); |
| @@ -2500,7 +2474,7 @@ See also `file-exists-p' and `file-attributes'. */) | |||
| 2500 | return Qnil; | 2474 | return Qnil; |
| 2501 | #else /* not DOS_NT and not macintosh */ | 2475 | #else /* not DOS_NT and not macintosh */ |
| 2502 | flags = O_RDONLY; | 2476 | flags = O_RDONLY; |
| 2503 | #if defined (S_ISFIFO) && defined (O_NONBLOCK) | 2477 | #ifdef O_NONBLOCK |
| 2504 | /* Opening a fifo without O_NONBLOCK can wait. | 2478 | /* Opening a fifo without O_NONBLOCK can wait. |
| 2505 | We don't want to wait. But we don't want to mess wth O_NONBLOCK | 2479 | We don't want to wait. But we don't want to mess wth O_NONBLOCK |
| 2506 | except in the case of a fifo, on a system which handles it. */ | 2480 | 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, | |||
| 2555 | should check ACLs though, which do affect this. */ | 2529 | should check ACLs though, which do affect this. */ |
| 2556 | if (stat (SDATA (dir), &statbuf) < 0) | 2530 | if (stat (SDATA (dir), &statbuf) < 0) |
| 2557 | return Qnil; | 2531 | return Qnil; |
| 2558 | return (statbuf.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil; | 2532 | return S_ISDIR (statbuf.st_mode) ? Qt : Qnil; |
| 2559 | #else | 2533 | #else |
| 2560 | return (check_writable (!NILP (dir) ? SSDATA (dir) : "") | 2534 | return (check_writable (!NILP (dir) ? SSDATA (dir) : "") |
| 2561 | ? Qt : Qnil); | 2535 | ? Qt : Qnil); |
| @@ -2602,6 +2576,10 @@ points to a nonexistent file. */) | |||
| 2602 | (Lisp_Object filename) | 2576 | (Lisp_Object filename) |
| 2603 | { | 2577 | { |
| 2604 | Lisp_Object handler; | 2578 | Lisp_Object handler; |
| 2579 | char *buf; | ||
| 2580 | int bufsize; | ||
| 2581 | int valsize; | ||
| 2582 | Lisp_Object val; | ||
| 2605 | 2583 | ||
| 2606 | CHECK_STRING (filename); | 2584 | CHECK_STRING (filename); |
| 2607 | filename = Fexpand_file_name (filename, Qnil); | 2585 | filename = Fexpand_file_name (filename, Qnil); |
| @@ -2612,13 +2590,6 @@ points to a nonexistent file. */) | |||
| 2612 | if (!NILP (handler)) | 2590 | if (!NILP (handler)) |
| 2613 | return call2 (handler, Qfile_symlink_p, filename); | 2591 | return call2 (handler, Qfile_symlink_p, filename); |
| 2614 | 2592 | ||
| 2615 | #ifdef S_IFLNK | ||
| 2616 | { | ||
| 2617 | char *buf; | ||
| 2618 | int bufsize; | ||
| 2619 | int valsize; | ||
| 2620 | Lisp_Object val; | ||
| 2621 | |||
| 2622 | filename = ENCODE_FILE (filename); | 2593 | filename = ENCODE_FILE (filename); |
| 2623 | 2594 | ||
| 2624 | bufsize = 50; | 2595 | bufsize = 50; |
| @@ -2653,10 +2624,6 @@ points to a nonexistent file. */) | |||
| 2653 | xfree (buf); | 2624 | xfree (buf); |
| 2654 | val = DECODE_FILE (val); | 2625 | val = DECODE_FILE (val); |
| 2655 | return val; | 2626 | return val; |
| 2656 | } | ||
| 2657 | #else /* not S_IFLNK */ | ||
| 2658 | return Qnil; | ||
| 2659 | #endif /* not S_IFLNK */ | ||
| 2660 | } | 2627 | } |
| 2661 | 2628 | ||
| 2662 | DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, | 2629 | DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, |
| @@ -2681,7 +2648,7 @@ See `file-symlink-p' to distinguish symlinks. */) | |||
| 2681 | 2648 | ||
| 2682 | if (stat (SSDATA (absname), &st) < 0) | 2649 | if (stat (SSDATA (absname), &st) < 0) |
| 2683 | return Qnil; | 2650 | return Qnil; |
| 2684 | return (st.st_mode & S_IFMT) == S_IFDIR ? Qt : Qnil; | 2651 | return S_ISDIR (st.st_mode) ? Qt : Qnil; |
| 2685 | } | 2652 | } |
| 2686 | 2653 | ||
| 2687 | DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p, Sfile_accessible_directory_p, 1, 1, 0, | 2654 | 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. */) | |||
| 2744 | 2711 | ||
| 2745 | if (result < 0) | 2712 | if (result < 0) |
| 2746 | return Qnil; | 2713 | return Qnil; |
| 2747 | return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil; | 2714 | return S_ISREG (st.st_mode) ? Qt : Qnil; |
| 2748 | } | 2715 | } |
| 2749 | #else | 2716 | #else |
| 2750 | if (stat (SSDATA (absname), &st) < 0) | 2717 | if (stat (SSDATA (absname), &st) < 0) |
| 2751 | return Qnil; | 2718 | return Qnil; |
| 2752 | return (st.st_mode & S_IFMT) == S_IFREG ? Qt : Qnil; | 2719 | return S_ISREG (st.st_mode) ? Qt : Qnil; |
| 2753 | #endif | 2720 | #endif |
| 2754 | } | 2721 | } |
| 2755 | 2722 | ||
| @@ -3007,8 +2974,7 @@ Use the current time if TIME is nil. TIME is in the format of | |||
| 3007 | struct stat st; | 2974 | struct stat st; |
| 3008 | 2975 | ||
| 3009 | /* Setting times on a directory always fails. */ | 2976 | /* Setting times on a directory always fails. */ |
| 3010 | if (stat (SDATA (encoded_absname), &st) == 0 | 2977 | if (stat (SSDATA (encoded_absname), &st) == 0 && S_ISDIR (st.st_mode)) |
| 3011 | && (st.st_mode & S_IFMT) == S_IFDIR) | ||
| 3012 | return Qnil; | 2978 | return Qnil; |
| 3013 | #endif | 2979 | #endif |
| 3014 | report_file_error ("Setting file times", Fcons (absname, Qnil)); | 2980 | report_file_error ("Setting file times", Fcons (absname, Qnil)); |
| @@ -3267,7 +3233,6 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3267 | goto notfound; | 3233 | goto notfound; |
| 3268 | } | 3234 | } |
| 3269 | 3235 | ||
| 3270 | #ifdef S_IFREG | ||
| 3271 | /* This code will need to be changed in order to work on named | 3236 | /* This code will need to be changed in order to work on named |
| 3272 | pipes, and it's probably just not worth it. So we should at | 3237 | pipes, and it's probably just not worth it. So we should at |
| 3273 | least signal an error. */ | 3238 | least signal an error. */ |
| @@ -3282,7 +3247,6 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3282 | xsignal2 (Qfile_error, | 3247 | xsignal2 (Qfile_error, |
| 3283 | build_string ("not a regular file"), orig_filename); | 3248 | build_string ("not a regular file"), orig_filename); |
| 3284 | } | 3249 | } |
| 3285 | #endif | ||
| 3286 | 3250 | ||
| 3287 | if (fd < 0) | 3251 | if (fd < 0) |
| 3288 | if ((fd = emacs_open (SSDATA (filename), O_RDONLY, 0)) < 0) | 3252 | if ((fd = emacs_open (SSDATA (filename), O_RDONLY, 0)) < 0) |
diff --git a/src/filelock.c b/src/filelock.c index 8e18bb7b650..7f8f0e1c0fb 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/>. */ | |||
| 51 | #include <utmp.h> | 51 | #include <utmp.h> |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | #if !defined (S_ISLNK) && defined (S_IFLNK) | ||
| 55 | #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /* A file whose last-modified time is just after the most recent boot. | 54 | /* A file whose last-modified time is just after the most recent boot. |
| 59 | Define this to be NULL to disable checking for this file. */ | 55 | Define this to be NULL to disable checking for this file. */ |
| 60 | #ifndef BOOT_TIME_FILE | 56 | #ifndef BOOT_TIME_FILE |
diff --git a/src/font.c b/src/font.c index d77eafb6ad2..35821ae34f9 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) | |||
| 2806 | Lisp_Object objlist, size, val, font_object; | 2806 | Lisp_Object objlist, size, val, font_object; |
| 2807 | struct font *font; | 2807 | struct font *font; |
| 2808 | int min_width, height; | 2808 | int min_width, height; |
| 2809 | int scaled_pixel_size; | 2809 | int scaled_pixel_size = pixel_size; |
| 2810 | 2810 | ||
| 2811 | font_assert (FONT_ENTITY_P (entity)); | 2811 | font_assert (FONT_ENTITY_P (entity)); |
| 2812 | size = AREF (entity, FONT_SIZE_INDEX); | 2812 | 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) | |||
| 3121 | XSETFRAME (frame, f); | 3121 | XSETFRAME (frame, f); |
| 3122 | size = AREF (spec, FONT_SIZE_INDEX); | 3122 | size = AREF (spec, FONT_SIZE_INDEX); |
| 3123 | pixel_size = font_pixel_size (f, spec); | 3123 | pixel_size = font_pixel_size (f, spec); |
| 3124 | if (pixel_size == 0) | 3124 | if (pixel_size == 0 && INTEGERP (attrs[LFACE_HEIGHT_INDEX])) |
| 3125 | { | 3125 | { |
| 3126 | double pt = XINT (attrs[LFACE_HEIGHT_INDEX]); | 3126 | double pt = XINT (attrs[LFACE_HEIGHT_INDEX]); |
| 3127 | 3127 | ||
diff --git a/src/frame.c b/src/frame.c index 56e0e7ec919..05938f3e1f0 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) | |||
| 2208 | register Lisp_Object old_alist_elt; | 2208 | register Lisp_Object old_alist_elt; |
| 2209 | 2209 | ||
| 2210 | /* The buffer-list parameters are stored in a special place and not | 2210 | /* The buffer-list parameters are stored in a special place and not |
| 2211 | in the alist. */ | 2211 | in the alist. All buffers must be live. */ |
| 2212 | if (EQ (prop, Qbuffer_list)) | 2212 | if (EQ (prop, Qbuffer_list)) |
| 2213 | { | 2213 | { |
| 2214 | f->buffer_list = val; | 2214 | Lisp_Object list = Qnil; |
| 2215 | for (; CONSP (val); val = XCDR (val)) | ||
| 2216 | if (!NILP (Fbuffer_live_p (XCAR (val)))) | ||
| 2217 | list = Fcons (XCAR (val), list); | ||
| 2218 | f->buffer_list = Fnreverse (list); | ||
| 2215 | return; | 2219 | return; |
| 2216 | } | 2220 | } |
| 2217 | if (EQ (prop, Qburied_buffer_list)) | 2221 | if (EQ (prop, Qburied_buffer_list)) |
| 2218 | { | 2222 | { |
| 2219 | f->buried_buffer_list = val; | 2223 | Lisp_Object list = Qnil; |
| 2224 | for (; CONSP (val); val = XCDR (val)) | ||
| 2225 | if (!NILP (Fbuffer_live_p (XCAR (val)))) | ||
| 2226 | list = Fcons (XCAR (val), list); | ||
| 2227 | f->buried_buffer_list = Fnreverse (list); | ||
| 2220 | return; | 2228 | return; |
| 2221 | } | 2229 | } |
| 2222 | 2230 | ||
| @@ -3275,12 +3283,12 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu | |||
| 3275 | bgcolor = Fassq (Qbackground_color, f->param_alist); | 3283 | bgcolor = Fassq (Qbackground_color, f->param_alist); |
| 3276 | if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) | 3284 | if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) |
| 3277 | { | 3285 | { |
| 3278 | Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter); | 3286 | Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter); |
| 3279 | if (NATNUMP (index) | 3287 | if (NATNUMP (parm_index) |
| 3280 | && (XFASTINT (index) | 3288 | && (XFASTINT (parm_index) |
| 3281 | < sizeof (frame_parms)/sizeof (frame_parms[0])) | 3289 | < sizeof (frame_parms)/sizeof (frame_parms[0])) |
| 3282 | && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) | 3290 | && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) |
| 3283 | (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) | 3291 | (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) |
| 3284 | (f, bgcolor, Qnil); | 3292 | (f, bgcolor, Qnil); |
| 3285 | } | 3293 | } |
| 3286 | 3294 | ||
diff --git a/src/frame.h b/src/frame.h index 9687e39a9fc..756e121f678 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -841,6 +841,7 @@ extern Lisp_Object Qnoelisp; | |||
| 841 | 841 | ||
| 842 | extern struct frame *last_nonminibuf_frame; | 842 | extern struct frame *last_nonminibuf_frame; |
| 843 | 843 | ||
| 844 | extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 844 | extern struct frame *make_initial_frame (void); | 845 | extern struct frame *make_initial_frame (void); |
| 845 | extern struct frame *make_terminal_frame (struct terminal *); | 846 | extern struct frame *make_terminal_frame (struct terminal *); |
| 846 | extern struct frame *make_frame (int); | 847 | extern struct frame *make_frame (int); |
| @@ -1131,17 +1132,20 @@ extern int x_figure_window_size (struct frame *, Lisp_Object, int); | |||
| 1131 | extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); | 1132 | extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); |
| 1132 | 1133 | ||
| 1133 | extern void validate_x_resource_name (void); | 1134 | extern void validate_x_resource_name (void); |
| 1134 | 1135 | ||
| 1135 | extern Lisp_Object display_x_get_resource (Display_Info *, | 1136 | extern Lisp_Object display_x_get_resource (Display_Info *, |
| 1136 | Lisp_Object attribute, | 1137 | Lisp_Object attribute, |
| 1137 | Lisp_Object class, | 1138 | Lisp_Object class, |
| 1138 | Lisp_Object component, | 1139 | Lisp_Object component, |
| 1139 | Lisp_Object subclass); | 1140 | Lisp_Object subclass); |
| 1140 | 1141 | ||
| 1142 | #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT | ||
| 1143 | extern char *x_get_resource_string (const char *, const char *); | ||
| 1144 | #endif | ||
| 1145 | |||
| 1141 | /* In xmenu.c */ | 1146 | /* In xmenu.c */ |
| 1142 | extern void set_frame_menubar (FRAME_PTR, int, int); | 1147 | extern void set_frame_menubar (FRAME_PTR, int, int); |
| 1143 | 1148 | ||
| 1144 | #endif /* HAVE_WINDOW_SYSTEM */ | 1149 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 1145 | 1150 | ||
| 1146 | #endif /* not EMACS_FRAME_H */ | 1151 | #endif /* not EMACS_FRAME_H */ |
| 1147 | |||
diff --git a/src/indent.c b/src/indent.c index 85d26520cfb..37ce647556d 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/>. */ | |||
| 45 | Some things in set last_known_column_point to -1 | 45 | Some things in set last_known_column_point to -1 |
| 46 | to mark the memorized value as invalid. */ | 46 | to mark the memorized value as invalid. */ |
| 47 | 47 | ||
| 48 | static double last_known_column; | 48 | static EMACS_INT last_known_column; |
| 49 | 49 | ||
| 50 | /* Value of point when current_column was called. */ | 50 | /* Value of point when current_column was called. */ |
| 51 | 51 | ||
| @@ -55,8 +55,8 @@ EMACS_INT last_known_column_point; | |||
| 55 | 55 | ||
| 56 | static int last_known_column_modified; | 56 | static int last_known_column_modified; |
| 57 | 57 | ||
| 58 | static double current_column_1 (void); | 58 | static EMACS_INT current_column_1 (void); |
| 59 | static double position_indentation (int); | 59 | static EMACS_INT position_indentation (int); |
| 60 | 60 | ||
| 61 | /* Cache of beginning of line found by the last call of | 61 | /* Cache of beginning of line found by the last call of |
| 62 | current_column. */ | 62 | current_column. */ |
| @@ -309,7 +309,7 @@ Text that has an invisible property is considered as having width 0, unless | |||
| 309 | (void) | 309 | (void) |
| 310 | { | 310 | { |
| 311 | Lisp_Object temp; | 311 | Lisp_Object temp; |
| 312 | XSETFASTINT (temp, (int) current_column ()); /* iftc */ | 312 | XSETFASTINT (temp, current_column ()); |
| 313 | return temp; | 313 | return temp; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -321,15 +321,15 @@ invalidate_current_column (void) | |||
| 321 | last_known_column_point = 0; | 321 | last_known_column_point = 0; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | double | 324 | EMACS_INT |
| 325 | current_column (void) | 325 | current_column (void) |
| 326 | { | 326 | { |
| 327 | register int col; | 327 | register EMACS_INT col; |
| 328 | register unsigned char *ptr, *stop; | 328 | register unsigned char *ptr, *stop; |
| 329 | register int tab_seen; | 329 | register int tab_seen; |
| 330 | int post_tab; | 330 | EMACS_INT post_tab; |
| 331 | register int c; | 331 | register int c; |
| 332 | register int tab_width = XINT (BVAR (current_buffer, tab_width)); | 332 | register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); |
| 333 | int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); | 333 | int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); |
| 334 | register struct Lisp_Char_Table *dp = buffer_display_table (); | 334 | register struct Lisp_Char_Table *dp = buffer_display_table (); |
| 335 | 335 | ||
| @@ -705,7 +705,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) | |||
| 705 | This function handles characters that are invisible | 705 | This function handles characters that are invisible |
| 706 | due to text properties or overlays. */ | 706 | due to text properties or overlays. */ |
| 707 | 707 | ||
| 708 | static double | 708 | static EMACS_INT |
| 709 | current_column_1 (void) | 709 | current_column_1 (void) |
| 710 | { | 710 | { |
| 711 | EMACS_INT col = MOST_POSITIVE_FIXNUM; | 711 | EMACS_INT col = MOST_POSITIVE_FIXNUM; |
| @@ -807,9 +807,9 @@ even if that goes past COLUMN; by default, MINIMUM is zero. | |||
| 807 | The return value is COLUMN. */) | 807 | The return value is COLUMN. */) |
| 808 | (Lisp_Object column, Lisp_Object minimum) | 808 | (Lisp_Object column, Lisp_Object minimum) |
| 809 | { | 809 | { |
| 810 | int mincol; | 810 | EMACS_INT mincol; |
| 811 | register int fromcol; | 811 | register EMACS_INT fromcol; |
| 812 | register int tab_width = XINT (BVAR (current_buffer, tab_width)); | 812 | register EMACS_INT tab_width = XINT (BVAR (current_buffer, tab_width)); |
| 813 | 813 | ||
| 814 | CHECK_NUMBER (column); | 814 | CHECK_NUMBER (column); |
| 815 | if (NILP (minimum)) | 815 | if (NILP (minimum)) |
| @@ -849,8 +849,6 @@ The return value is COLUMN. */) | |||
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | 851 | ||
| 852 | static double position_indentation (int); | ||
| 853 | |||
| 854 | DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, | 852 | DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, |
| 855 | 0, 0, 0, | 853 | 0, 0, 0, |
| 856 | doc: /* Return the indentation of the current line. | 854 | doc: /* Return the indentation of the current line. |
| @@ -863,12 +861,12 @@ following any initial whitespace. */) | |||
| 863 | 861 | ||
| 864 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); | 862 | scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1); |
| 865 | 863 | ||
| 866 | XSETFASTINT (val, (int) position_indentation (PT_BYTE)); /* iftc */ | 864 | XSETFASTINT (val, position_indentation (PT_BYTE)); |
| 867 | SET_PT_BOTH (opoint, opoint_byte); | 865 | SET_PT_BOTH (opoint, opoint_byte); |
| 868 | return val; | 866 | return val; |
| 869 | } | 867 | } |
| 870 | 868 | ||
| 871 | static double | 869 | static EMACS_INT |
| 872 | position_indentation (register int pos_byte) | 870 | position_indentation (register int pos_byte) |
| 873 | { | 871 | { |
| 874 | register EMACS_INT column = 0; | 872 | register EMACS_INT column = 0; |
| @@ -958,9 +956,9 @@ position_indentation (register int pos_byte) | |||
| 958 | preceding line. */ | 956 | preceding line. */ |
| 959 | 957 | ||
| 960 | int | 958 | int |
| 961 | indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) | 959 | indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT column) |
| 962 | { | 960 | { |
| 963 | double val; | 961 | EMACS_INT val; |
| 964 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; | 962 | EMACS_INT opoint = PT, opoint_byte = PT_BYTE; |
| 965 | 963 | ||
| 966 | SET_PT_BOTH (pos, pos_byte); | 964 | SET_PT_BOTH (pos, pos_byte); |
| @@ -969,7 +967,7 @@ indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, double column) | |||
| 969 | 967 | ||
| 970 | val = position_indentation (PT_BYTE); | 968 | val = position_indentation (PT_BYTE); |
| 971 | SET_PT_BOTH (opoint, opoint_byte); | 969 | SET_PT_BOTH (opoint, opoint_byte); |
| 972 | return val >= column; /* hmm, float comparison */ | 970 | return val >= column; |
| 973 | } | 971 | } |
| 974 | 972 | ||
| 975 | DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", | 973 | 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_ | |||
| 1126 | register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width)); | 1124 | register EMACS_INT tab_width = XFASTINT (BVAR (current_buffer, tab_width)); |
| 1127 | register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); | 1125 | register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); |
| 1128 | register struct Lisp_Char_Table *dp = window_display_table (win); | 1126 | register struct Lisp_Char_Table *dp = window_display_table (win); |
| 1129 | int selective | 1127 | EMACS_INT selective |
| 1130 | = (INTEGERP (BVAR (current_buffer, selective_display)) | 1128 | = (INTEGERP (BVAR (current_buffer, selective_display)) |
| 1131 | ? XINT (BVAR (current_buffer, selective_display)) | 1129 | ? XINT (BVAR (current_buffer, selective_display)) |
| 1132 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); | 1130 | : !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_ | |||
| 1590 | else if (c == '\n') | 1588 | else if (c == '\n') |
| 1591 | { | 1589 | { |
| 1592 | if (selective > 0 | 1590 | if (selective > 0 |
| 1593 | && indented_beyond_p (pos, pos_byte, | 1591 | && indented_beyond_p (pos, pos_byte, selective)) |
| 1594 | (double) selective)) /* iftc */ | ||
| 1595 | { | 1592 | { |
| 1596 | /* If (pos == to), we don't have to take care of | 1593 | /* If (pos == to), we don't have to take care of |
| 1597 | selective display. */ | 1594 | selective display. */ |
| @@ -1607,7 +1604,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ | |||
| 1607 | } | 1604 | } |
| 1608 | while (pos < to | 1605 | while (pos < to |
| 1609 | && indented_beyond_p (pos, pos_byte, | 1606 | && indented_beyond_p (pos, pos_byte, |
| 1610 | (double) selective)); /* iftc */ | 1607 | selective)); |
| 1611 | /* Allow for the " ..." that is displayed for them. */ | 1608 | /* Allow for the " ..." that is displayed for them. */ |
| 1612 | if (selective_rlen) | 1609 | if (selective_rlen) |
| 1613 | { | 1610 | { |
| @@ -1837,7 +1834,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1837 | register EMACS_INT first; | 1834 | register EMACS_INT first; |
| 1838 | EMACS_INT from_byte; | 1835 | EMACS_INT from_byte; |
| 1839 | EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0; | 1836 | EMACS_INT lmargin = hscroll > 0 ? 1 - hscroll : 0; |
| 1840 | int selective | 1837 | EMACS_INT selective |
| 1841 | = (INTEGERP (BVAR (current_buffer, selective_display)) | 1838 | = (INTEGERP (BVAR (current_buffer, selective_display)) |
| 1842 | ? XINT (BVAR (current_buffer, selective_display)) | 1839 | ? XINT (BVAR (current_buffer, selective_display)) |
| 1843 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); | 1840 | : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); |
| @@ -1872,7 +1869,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1872 | && ((selective > 0 | 1869 | && ((selective > 0 |
| 1873 | && indented_beyond_p (prevline, | 1870 | && indented_beyond_p (prevline, |
| 1874 | CHAR_TO_BYTE (prevline), | 1871 | CHAR_TO_BYTE (prevline), |
| 1875 | (double) selective)) /* iftc */ | 1872 | selective)) |
| 1876 | /* Watch out for newlines with `invisible' property. | 1873 | /* Watch out for newlines with `invisible' property. |
| 1877 | When moving upward, check the newline before. */ | 1874 | When moving upward, check the newline before. */ |
| 1878 | || (propval = Fget_char_property (make_number (prevline - 1), | 1875 | || (propval = Fget_char_property (make_number (prevline - 1), |
| @@ -1929,7 +1926,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) | |||
| 1929 | && ((selective > 0 | 1926 | && ((selective > 0 |
| 1930 | && indented_beyond_p (prevline, | 1927 | && indented_beyond_p (prevline, |
| 1931 | CHAR_TO_BYTE (prevline), | 1928 | CHAR_TO_BYTE (prevline), |
| 1932 | (double) selective)) /* iftc */ | 1929 | selective)) |
| 1933 | /* Watch out for newlines with `invisible' property. | 1930 | /* Watch out for newlines with `invisible' property. |
| 1934 | When moving downward, check the newline after. */ | 1931 | When moving downward, check the newline after. */ |
| 1935 | || (propval = Fget_char_property (make_number (prevline), | 1932 | || (propval = Fget_char_property (make_number (prevline), |
diff --git a/src/keymap.c b/src/keymap.c index 0e4715e4b8b..4459ef07d68 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2756,7 +2756,7 @@ remapped command in the returned list. */) | |||
| 2756 | && !NILP (firstonly) | 2756 | && !NILP (firstonly) |
| 2757 | && !NILP (tem = Fget (definition, QCadvertised_binding))) | 2757 | && !NILP (tem = Fget (definition, QCadvertised_binding))) |
| 2758 | { | 2758 | { |
| 2759 | /* We have a list of advertized bindings. */ | 2759 | /* We have a list of advertised bindings. */ |
| 2760 | while (CONSP (tem)) | 2760 | while (CONSP (tem)) |
| 2761 | if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition)) | 2761 | if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition)) |
| 2762 | return XCAR (tem); | 2762 | return XCAR (tem); |
| @@ -3219,7 +3219,7 @@ static void | |||
| 3219 | describe_command (Lisp_Object definition, Lisp_Object args) | 3219 | describe_command (Lisp_Object definition, Lisp_Object args) |
| 3220 | { | 3220 | { |
| 3221 | register Lisp_Object tem1; | 3221 | register Lisp_Object tem1; |
| 3222 | int column = (int) current_column (); /* iftc */ | 3222 | EMACS_INT column = current_column (); |
| 3223 | int description_column; | 3223 | int description_column; |
| 3224 | 3224 | ||
| 3225 | /* If column 16 is no good, go to col 32; | 3225 | /* If column 16 is no good, go to col 32; |
diff --git a/src/lisp.h b/src/lisp.h index 223cdbc92f0..ece96428253 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3151,9 +3151,9 @@ extern char *push_key_description (unsigned int, char *, int); | |||
| 3151 | EXFUN (Fvertical_motion, 2); | 3151 | EXFUN (Fvertical_motion, 2); |
| 3152 | EXFUN (Findent_to, 2); | 3152 | EXFUN (Findent_to, 2); |
| 3153 | EXFUN (Fmove_to_column, 2); | 3153 | EXFUN (Fmove_to_column, 2); |
| 3154 | extern double current_column (void); | 3154 | extern EMACS_INT current_column (void); |
| 3155 | extern void invalidate_current_column (void); | 3155 | extern void invalidate_current_column (void); |
| 3156 | extern int indented_beyond_p (EMACS_INT, EMACS_INT, double); | 3156 | extern int indented_beyond_p (EMACS_INT, EMACS_INT, EMACS_INT); |
| 3157 | extern void syms_of_indent (void); | 3157 | extern void syms_of_indent (void); |
| 3158 | 3158 | ||
| 3159 | /* Defined in frame.c */ | 3159 | /* Defined in frame.c */ |
diff --git a/src/lread.c b/src/lread.c index 77b397a03df..c8c07bed476 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 | |||
| 1509 | Lisp_Object tmp = call1 (predicate, string); | 1509 | Lisp_Object tmp = call1 (predicate, string); |
| 1510 | exists = !NILP (tmp) | 1510 | exists = !NILP (tmp) |
| 1511 | && (EQ (tmp, Qdir_ok) | 1511 | && (EQ (tmp, Qdir_ok) |
| 1512 | || !NILP (Ffile_directory_p (string))); | 1512 | || NILP (Ffile_directory_p (string))); |
| 1513 | } | 1513 | } |
| 1514 | 1514 | ||
| 1515 | if (exists) | 1515 | if (exists) |
| @@ -1527,8 +1527,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, Lisp_Object *sto | |||
| 1527 | 1527 | ||
| 1528 | encoded_fn = ENCODE_FILE (string); | 1528 | encoded_fn = ENCODE_FILE (string); |
| 1529 | pfn = SSDATA (encoded_fn); | 1529 | pfn = SSDATA (encoded_fn); |
| 1530 | exists = (stat (pfn, &st) >= 0 | 1530 | exists = (stat (pfn, &st) == 0 && ! S_ISDIR (st.st_mode)); |
| 1531 | && (st.st_mode & S_IFMT) != S_IFDIR); | ||
| 1532 | if (exists) | 1531 | if (exists) |
| 1533 | { | 1532 | { |
| 1534 | /* Check that we can access or open it. */ | 1533 | /* Check that we can access or open it. */ |
| @@ -4537,7 +4536,7 @@ This variable is automatically set from the file variables of an interpreted | |||
| 4537 | 4536 | ||
| 4538 | Qdir_ok = intern_c_string ("dir-ok"); | 4537 | Qdir_ok = intern_c_string ("dir-ok"); |
| 4539 | staticpro (&Qdir_ok); | 4538 | staticpro (&Qdir_ok); |
| 4540 | 4539 | ||
| 4541 | Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation"); | 4540 | Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation"); |
| 4542 | staticpro (&Qdo_after_load_evaluation) ; | 4541 | staticpro (&Qdo_after_load_evaluation) ; |
| 4543 | 4542 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 9852900b60b..75a24686d5a 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -82,6 +82,15 @@ Lisp_Object Qcase_fold_search; | |||
| 82 | 82 | ||
| 83 | Lisp_Object Qread_expression_history; | 83 | Lisp_Object Qread_expression_history; |
| 84 | 84 | ||
| 85 | /* Prompt to display in front of the mini-buffer contents. */ | ||
| 86 | |||
| 87 | static Lisp_Object minibuf_prompt; | ||
| 88 | |||
| 89 | /* Width of current mini-buffer prompt. Only set after display_line | ||
| 90 | of the line that contains the prompt. */ | ||
| 91 | |||
| 92 | static EMACS_INT minibuf_prompt_width; | ||
| 93 | |||
| 85 | 94 | ||
| 86 | /* Put minibuf on currently selected frame's minibuffer. | 95 | /* Put minibuf on currently selected frame's minibuffer. |
| 87 | We do this whenever the user starts a new minibuffer | 96 | 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, | |||
| 623 | unbind_to (count1, Qnil); | 632 | unbind_to (count1, Qnil); |
| 624 | } | 633 | } |
| 625 | 634 | ||
| 626 | minibuf_prompt_width = (int) current_column (); /* iftc */ | 635 | minibuf_prompt_width = current_column (); |
| 627 | 636 | ||
| 628 | /* Put in the initial input. */ | 637 | /* Put in the initial input. */ |
| 629 | if (!NILP (initial)) | 638 | if (!NILP (initial)) |
diff --git a/src/msdos.c b/src/msdos.c index 8f0f6776aaa..261a09ac859 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1389,8 +1389,6 @@ IT_delete_glyphs (struct frame *f, int n) | |||
| 1389 | void | 1389 | void |
| 1390 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 1390 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1391 | { | 1391 | { |
| 1392 | extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1393 | |||
| 1394 | set_menu_bar_lines (f, value, oldval); | 1392 | set_menu_bar_lines (f, value, oldval); |
| 1395 | } | 1393 | } |
| 1396 | 1394 | ||
| @@ -3922,6 +3920,18 @@ croak (char *badfunc) | |||
| 3922 | */ | 3920 | */ |
| 3923 | int setpgrp (void) {return 0; } | 3921 | int setpgrp (void) {return 0; } |
| 3924 | int setpriority (int x, int y, int z) { return 0; } | 3922 | int setpriority (int x, int y, int z) { return 0; } |
| 3923 | |||
| 3924 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 | ||
| 3925 | ssize_t | ||
| 3926 | readlink (const char *name, char *dummy1, size_t dummy2) | ||
| 3927 | { | ||
| 3928 | /* `access' is much faster than `stat' on MS-DOS. */ | ||
| 3929 | if (access (name, F_OK) == 0) | ||
| 3930 | errno = EINVAL; | ||
| 3931 | return -1; | ||
| 3932 | } | ||
| 3933 | #endif | ||
| 3934 | |||
| 3925 | 3935 | ||
| 3926 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 | 3936 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 |
| 3927 | 3937 | ||
| @@ -4236,4 +4246,3 @@ This variable is used only by MS-DOS terminals. */); | |||
| 4236 | } | 4246 | } |
| 4237 | 4247 | ||
| 4238 | #endif /* MSDOS */ | 4248 | #endif /* MSDOS */ |
| 4239 | |||
diff --git a/src/msdos.h b/src/msdos.h index 6b076c1722b..4bbe9b134de 100644 --- a/src/msdos.h +++ b/src/msdos.h | |||
| @@ -40,6 +40,11 @@ void mouse_init (void); | |||
| 40 | void mouse_on (void); | 40 | void mouse_on (void); |
| 41 | void mouse_off (void); | 41 | void mouse_off (void); |
| 42 | void mouse_moveto (int, int); | 42 | void mouse_moveto (int, int); |
| 43 | |||
| 44 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 | ||
| 45 | int readlink (const char *, char *, size_t); | ||
| 46 | #endif | ||
| 47 | |||
| 43 | 48 | ||
| 44 | #ifndef HAVE_X_WINDOWS | 49 | #ifndef HAVE_X_WINDOWS |
| 45 | /* Dummy types. */ | 50 | /* Dummy types. */ |
diff --git a/src/nsterm.m b/src/nsterm.m index a09c95c7d01..cc2c4cf9807 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -189,7 +189,7 @@ static NSMutableArray *ns_pending_files, *ns_pending_service_names, | |||
| 189 | *ns_pending_service_args; | 189 | *ns_pending_service_args; |
| 190 | static BOOL inNsSelect = 0; | 190 | static BOOL inNsSelect = 0; |
| 191 | 191 | ||
| 192 | /* Convert modifiers in a NeXTSTEP event to emacs style modifiers. */ | 192 | /* Convert modifiers in a NeXTstep event to emacs style modifiers. */ |
| 193 | #define NS_FUNCTION_KEY_MASK 0x800000 | 193 | #define NS_FUNCTION_KEY_MASK 0x800000 |
| 194 | #define NSLeftControlKeyMask (0x000001 | NSControlKeyMask) | 194 | #define NSLeftControlKeyMask (0x000001 | NSControlKeyMask) |
| 195 | #define NSRightControlKeyMask (0x002000 | NSControlKeyMask) | 195 | #define NSRightControlKeyMask (0x002000 | NSControlKeyMask) |
| @@ -1072,7 +1072,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) | |||
| 1072 | : f->left_pos; | 1072 | : f->left_pos; |
| 1073 | /* We use visibleFrame here to take menu bar into account. | 1073 | /* We use visibleFrame here to take menu bar into account. |
| 1074 | Ideally we should also adjust left/top with visibleFrame.origin. */ | 1074 | Ideally we should also adjust left/top with visibleFrame.origin. */ |
| 1075 | 1075 | ||
| 1076 | f->top_pos = f->size_hint_flags & YNegative | 1076 | f->top_pos = f->size_hint_flags & YNegative |
| 1077 | ? ([screen visibleFrame].size.height + f->top_pos | 1077 | ? ([screen visibleFrame].size.height + f->top_pos |
| 1078 | - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) | 1078 | - 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) | |||
| 1154 | FRAME_TOOLBAR_HEIGHT (f) = 0; | 1154 | FRAME_TOOLBAR_HEIGHT (f) = 0; |
| 1155 | 1155 | ||
| 1156 | wr.size.width = pixelwidth + f->border_width; | 1156 | wr.size.width = pixelwidth + f->border_width; |
| 1157 | wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f) | 1157 | wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f) |
| 1158 | + FRAME_TOOLBAR_HEIGHT (f); | 1158 | + FRAME_TOOLBAR_HEIGHT (f); |
| 1159 | 1159 | ||
| 1160 | /* Do not try to constrain to this screen. We may have multiple | 1160 | /* 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, | |||
| 2230 | int x, int y, int cursor_type, int cursor_width, | 2230 | int x, int y, int cursor_type, int cursor_width, |
| 2231 | int on_p, int active_p) | 2231 | int on_p, int active_p) |
| 2232 | /* -------------------------------------------------------------------------- | 2232 | /* -------------------------------------------------------------------------- |
| 2233 | External call (RIF): draw cursor | 2233 | External call (RIF): draw cursor. |
| 2234 | (modeled after x_draw_window_cursor | 2234 | Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. |
| 2235 | FIXME: cursor_width is effectively bogus -- it sometimes gets set | ||
| 2236 | in xdisp.c set_frame_cursor_types, sometimes left uninitialized; | ||
| 2237 | DON'T USE IT (no other terms do) | ||
| 2238 | -------------------------------------------------------------------------- */ | 2235 | -------------------------------------------------------------------------- */ |
| 2239 | { | 2236 | { |
| 2240 | NSRect r, s; | 2237 | NSRect r, s; |
| @@ -2251,7 +2248,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2251 | and mini-buffer. */ | 2248 | and mini-buffer. */ |
| 2252 | 2249 | ||
| 2253 | NSTRACE (dumpcursor); | 2250 | NSTRACE (dumpcursor); |
| 2254 | //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); | ||
| 2255 | 2251 | ||
| 2256 | if (!on_p) | 2252 | if (!on_p) |
| 2257 | return; | 2253 | return; |
| @@ -2276,8 +2272,21 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2276 | return; | 2272 | return; |
| 2277 | } | 2273 | } |
| 2278 | 2274 | ||
| 2275 | /* We draw the cursor (with NSRectFill), then draw the glyph on top | ||
| 2276 | (other terminals do it the other way round). We must set | ||
| 2277 | w->phys_cursor_width to the cursor width. For bar cursors, that | ||
| 2278 | is CURSOR_WIDTH; for box cursors, it is the glyph width. */ | ||
| 2279 | get_phys_cursor_geometry (w, glyph_row, phys_cursor_glyph, &fx, &fy, &h); | 2279 | get_phys_cursor_geometry (w, glyph_row, phys_cursor_glyph, &fx, &fy, &h); |
| 2280 | 2280 | ||
| 2281 | /* The above get_phys_cursor_geometry call set w->phys_cursor_width | ||
| 2282 | to the glyph width; replace with CURSOR_WIDTH for bar cursors. */ | ||
| 2283 | if (cursor_type == BAR_CURSOR || cursor_type == HBAR_CURSOR) | ||
| 2284 | { | ||
| 2285 | if (cursor_width < 1) | ||
| 2286 | cursor_width = max (FRAME_CURSOR_WIDTH (f), 1); | ||
| 2287 | w->phys_cursor_width = cursor_width; | ||
| 2288 | } | ||
| 2289 | |||
| 2281 | r.origin.x = fx, r.origin.y = fy; | 2290 | r.origin.x = fx, r.origin.y = fy; |
| 2282 | r.size.height = h; | 2291 | r.size.height = h; |
| 2283 | r.size.width = w->phys_cursor_width; | 2292 | r.size.width = w->phys_cursor_width; |
| @@ -2285,7 +2294,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2285 | /* FIXME: if we overwrite the internal border area, it does not get erased; | 2294 | /* FIXME: if we overwrite the internal border area, it does not get erased; |
| 2286 | fix by truncating cursor, but better would be to erase properly */ | 2295 | fix by truncating cursor, but better would be to erase properly */ |
| 2287 | overspill = r.origin.x + r.size.width - | 2296 | overspill = r.origin.x + r.size.width - |
| 2288 | WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w) | 2297 | WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w) |
| 2289 | - WINDOW_TOTAL_FRINGE_WIDTH (w) - FRAME_INTERNAL_BORDER_WIDTH (f)); | 2298 | - WINDOW_TOTAL_FRINGE_WIDTH (w) - FRAME_INTERNAL_BORDER_WIDTH (f)); |
| 2290 | if (overspill > 0) | 2299 | if (overspill > 0) |
| 2291 | r.size.width -= overspill; | 2300 | r.size.width -= overspill; |
| @@ -2335,8 +2344,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2335 | break; | 2344 | break; |
| 2336 | case BAR_CURSOR: | 2345 | case BAR_CURSOR: |
| 2337 | s = r; | 2346 | s = r; |
| 2338 | s.size.width = min (cursor_width, 2); //FIXME(see above) | ||
| 2339 | |||
| 2340 | /* If the character under cursor is R2L, draw the bar cursor | 2347 | /* If the character under cursor is R2L, draw the bar cursor |
| 2341 | on the right of its glyph, rather than on the left. */ | 2348 | on the right of its glyph, rather than on the left. */ |
| 2342 | cursor_glyph = get_phys_cursor_glyph (w); | 2349 | cursor_glyph = get_phys_cursor_glyph (w); |
| @@ -2984,7 +2991,7 @@ ns_draw_glyph_string (struct glyph_string *s) | |||
| 2984 | NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face); | 2991 | NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face); |
| 2985 | NS_FACE_FOREGROUND (s->face) = tmp; | 2992 | NS_FACE_FOREGROUND (s->face) = tmp; |
| 2986 | } | 2993 | } |
| 2987 | 2994 | ||
| 2988 | ns_tmp_font->font.driver->draw | 2995 | ns_tmp_font->font.driver->draw |
| 2989 | (s, 0, s->nchars, s->x, s->y, | 2996 | (s, 0, s->nchars, s->x, s->y, |
| 2990 | (ns_tmp_flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p) | 2997 | (ns_tmp_flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p) |
| @@ -3010,9 +3017,9 @@ ns_draw_glyph_string (struct glyph_string *s) | |||
| 3010 | else | 3017 | else |
| 3011 | ns_maybe_dumpglyphs_background | 3018 | ns_maybe_dumpglyphs_background |
| 3012 | (s, s->first_glyph->type == COMPOSITE_GLYPH); | 3019 | (s, s->first_glyph->type == COMPOSITE_GLYPH); |
| 3013 | /* ... */ | 3020 | /* ... */ |
| 3014 | /* Not yet implemented. */ | 3021 | /* Not yet implemented. */ |
| 3015 | /* ... */ | 3022 | /* ... */ |
| 3016 | ns_unfocus (s->f); | 3023 | ns_unfocus (s->f); |
| 3017 | break; | 3024 | break; |
| 3018 | 3025 | ||
| @@ -3785,7 +3792,7 @@ ns_term_init (Lisp_Object display_name) | |||
| 3785 | strncpy (terminal->name, SDATA (display_name), SBYTES (display_name)); | 3792 | strncpy (terminal->name, SDATA (display_name), SBYTES (display_name)); |
| 3786 | terminal->name[SBYTES (display_name)] = 0; | 3793 | terminal->name[SBYTES (display_name)] = 0; |
| 3787 | 3794 | ||
| 3788 | UNBLOCK_INPUT; | 3795 | UNBLOCK_INPUT; |
| 3789 | 3796 | ||
| 3790 | if (!inhibit_x_resources) | 3797 | if (!inhibit_x_resources) |
| 3791 | { | 3798 | { |
| @@ -3802,7 +3809,7 @@ ns_term_init (Lisp_Object display_name) | |||
| 3802 | stringForKey: @"AppleHighlightColor"]; | 3809 | stringForKey: @"AppleHighlightColor"]; |
| 3803 | if (ns_selection_color == nil) | 3810 | if (ns_selection_color == nil) |
| 3804 | ns_selection_color = NS_SELECTION_COLOR_DEFAULT; | 3811 | ns_selection_color = NS_SELECTION_COLOR_DEFAULT; |
| 3805 | 3812 | ||
| 3806 | { | 3813 | { |
| 3807 | NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; | 3814 | NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; |
| 3808 | 3815 | ||
| @@ -3898,7 +3905,7 @@ ns_term_init (Lisp_Object display_name) | |||
| 3898 | keyEquivalent: @"q" | 3905 | keyEquivalent: @"q" |
| 3899 | atIndex: 9]; | 3906 | atIndex: 9]; |
| 3900 | 3907 | ||
| 3901 | item = [mainMenu insertItemWithTitle: ns_app_name | 3908 | item = [mainMenu insertItemWithTitle: ns_app_name |
| 3902 | action: @selector (menuDown:) | 3909 | action: @selector (menuDown:) |
| 3903 | keyEquivalent: @"" | 3910 | keyEquivalent: @"" |
| 3904 | atIndex: 0]; | 3911 | atIndex: 0]; |
| @@ -4103,7 +4110,7 @@ ns_term_shutdown (int sig) | |||
| 4103 | -appShouldTerminate | 4110 | -appShouldTerminate |
| 4104 | Cancel -> Nothing else | 4111 | Cancel -> Nothing else |
| 4105 | Accept -> | 4112 | Accept -> |
| 4106 | 4113 | ||
| 4107 | -terminate | 4114 | -terminate |
| 4108 | KEY_NS_POWER_OFF, (save-buffers-kill-emacs) | 4115 | KEY_NS_POWER_OFF, (save-buffers-kill-emacs) |
| 4109 | ns_term_shutdown() | 4116 | ns_term_shutdown() |
| @@ -4113,10 +4120,10 @@ ns_term_shutdown (int sig) | |||
| 4113 | - (void) terminate: (id)sender | 4120 | - (void) terminate: (id)sender |
| 4114 | { | 4121 | { |
| 4115 | struct frame *emacsframe = SELECTED_FRAME (); | 4122 | struct frame *emacsframe = SELECTED_FRAME (); |
| 4116 | 4123 | ||
| 4117 | if (!emacs_event) | 4124 | if (!emacs_event) |
| 4118 | return; | 4125 | return; |
| 4119 | 4126 | ||
| 4120 | emacs_event->kind = NS_NONKEY_EVENT; | 4127 | emacs_event->kind = NS_NONKEY_EVENT; |
| 4121 | emacs_event->code = KEY_NS_POWER_OFF; | 4128 | emacs_event->code = KEY_NS_POWER_OFF; |
| 4122 | emacs_event->arg = Qt; /* mark as non-key event */ | 4129 | emacs_event->arg = Qt; /* mark as non-key event */ |
| @@ -4418,7 +4425,7 @@ ns_term_shutdown (int sig) | |||
| 4418 | code = ([[theEvent charactersIgnoringModifiers] length] == 0) ? | 4425 | code = ([[theEvent charactersIgnoringModifiers] length] == 0) ? |
| 4419 | 0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0]; | 4426 | 0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0]; |
| 4420 | /* (Carbon way: [theEvent keyCode]) */ | 4427 | /* (Carbon way: [theEvent keyCode]) */ |
| 4421 | 4428 | ||
| 4422 | /* is it a "function key"? */ | 4429 | /* is it a "function key"? */ |
| 4423 | fnKeysym = ns_convert_key (code); | 4430 | fnKeysym = ns_convert_key (code); |
| 4424 | if (fnKeysym) | 4431 | if (fnKeysym) |
| @@ -4542,6 +4549,7 @@ ns_term_shutdown (int sig) | |||
| 4542 | 4549 | ||
| 4543 | /* if it was a function key or had modifiers, pass it directly to emacs */ | 4550 | /* if it was a function key or had modifiers, pass it directly to emacs */ |
| 4544 | if (fnKeysym || (emacs_event->modifiers | 4551 | if (fnKeysym || (emacs_event->modifiers |
| 4552 | && (emacs_event->modifiers != shift_modifier) | ||
| 4545 | && [[theEvent charactersIgnoringModifiers] length] > 0)) | 4553 | && [[theEvent charactersIgnoringModifiers] length] > 0)) |
| 4546 | /*[[theEvent characters] length] */ | 4554 | /*[[theEvent characters] length] */ |
| 4547 | { | 4555 | { |
| @@ -5445,7 +5453,7 @@ ns_term_shutdown (int sig) | |||
| 5445 | 5453 | ||
| 5446 | /* | 5454 | /* |
| 5447 | drawRect: may be called (at least in OS X 10.5) for invisible | 5455 | drawRect: may be called (at least in OS X 10.5) for invisible |
| 5448 | views as well for some reason. Thus, do not infer visibility | 5456 | views as well for some reason. Thus, do not infer visibility |
| 5449 | here. | 5457 | here. |
| 5450 | 5458 | ||
| 5451 | emacsframe->async_visible = 1; | 5459 | emacsframe->async_visible = 1; |
diff --git a/src/print.c b/src/print.c index 00847d67318..602575b5b08 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1630,26 +1630,6 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1630 | { | 1630 | { |
| 1631 | PRINTCHAR ('('); | 1631 | PRINTCHAR ('('); |
| 1632 | 1632 | ||
| 1633 | /* If the first element is a backquote form, | ||
| 1634 | print it old-style so it won't be misunderstood. */ | ||
| 1635 | if (print_quoted && CONSP (XCAR (obj)) | ||
| 1636 | && CONSP (XCDR (XCAR (obj))) | ||
| 1637 | && NILP (XCDR (XCDR (XCAR (obj)))) | ||
| 1638 | && EQ (XCAR (XCAR (obj)), Qbackquote)) | ||
| 1639 | { | ||
| 1640 | Lisp_Object tem; | ||
| 1641 | tem = XCAR (obj); | ||
| 1642 | PRINTCHAR ('('); | ||
| 1643 | |||
| 1644 | print_object (Qbackquote, printcharfun, 0); | ||
| 1645 | PRINTCHAR (' '); | ||
| 1646 | |||
| 1647 | print_object (XCAR (XCDR (tem)), printcharfun, 0); | ||
| 1648 | PRINTCHAR (')'); | ||
| 1649 | |||
| 1650 | obj = XCDR (obj); | ||
| 1651 | } | ||
| 1652 | |||
| 1653 | { | 1633 | { |
| 1654 | EMACS_INT print_length; | 1634 | EMACS_INT print_length; |
| 1655 | int i; | 1635 | int i; |
| @@ -1853,25 +1833,25 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1853 | if (!NILP (h->test)) | 1833 | if (!NILP (h->test)) |
| 1854 | { | 1834 | { |
| 1855 | strout (" test ", -1, -1, printcharfun, 0); | 1835 | strout (" test ", -1, -1, printcharfun, 0); |
| 1856 | print_object (h->test, printcharfun, 0); | 1836 | print_object (h->test, printcharfun, escapeflag); |
| 1857 | } | 1837 | } |
| 1858 | 1838 | ||
| 1859 | if (!NILP (h->weak)) | 1839 | if (!NILP (h->weak)) |
| 1860 | { | 1840 | { |
| 1861 | strout (" weakness ", -1, -1, printcharfun, 0); | 1841 | strout (" weakness ", -1, -1, printcharfun, 0); |
| 1862 | print_object (h->weak, printcharfun, 0); | 1842 | print_object (h->weak, printcharfun, escapeflag); |
| 1863 | } | 1843 | } |
| 1864 | 1844 | ||
| 1865 | if (!NILP (h->rehash_size)) | 1845 | if (!NILP (h->rehash_size)) |
| 1866 | { | 1846 | { |
| 1867 | strout (" rehash-size ", -1, -1, printcharfun, 0); | 1847 | strout (" rehash-size ", -1, -1, printcharfun, 0); |
| 1868 | print_object (h->rehash_size, printcharfun, 0); | 1848 | print_object (h->rehash_size, printcharfun, escapeflag); |
| 1869 | } | 1849 | } |
| 1870 | 1850 | ||
| 1871 | if (!NILP (h->rehash_threshold)) | 1851 | if (!NILP (h->rehash_threshold)) |
| 1872 | { | 1852 | { |
| 1873 | strout (" rehash-threshold ", -1, -1, printcharfun, 0); | 1853 | strout (" rehash-threshold ", -1, -1, printcharfun, 0); |
| 1874 | print_object (h->rehash_threshold, printcharfun, 0); | 1854 | print_object (h->rehash_threshold, printcharfun, escapeflag); |
| 1875 | } | 1855 | } |
| 1876 | 1856 | ||
| 1877 | strout (" data ", -1, -1, printcharfun, 0); | 1857 | strout (" data ", -1, -1, printcharfun, 0); |
| @@ -1890,9 +1870,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1890 | if (!NILP (HASH_HASH (h, i))) | 1870 | if (!NILP (HASH_HASH (h, i))) |
| 1891 | { | 1871 | { |
| 1892 | if (i) PRINTCHAR (' '); | 1872 | if (i) PRINTCHAR (' '); |
| 1893 | print_object (HASH_KEY (h, i), printcharfun, 1); | 1873 | print_object (HASH_KEY (h, i), printcharfun, escapeflag); |
| 1894 | PRINTCHAR (' '); | 1874 | PRINTCHAR (' '); |
| 1895 | print_object (HASH_VALUE (h, i), printcharfun, 1); | 1875 | print_object (HASH_VALUE (h, i), printcharfun, escapeflag); |
| 1896 | } | 1876 | } |
| 1897 | 1877 | ||
| 1898 | if (size < real_size) | 1878 | if (size < real_size) |
diff --git a/src/s/msdos.h b/src/s/msdos.h index 8debd28dccb..29ca0629899 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 */ | |||
| 80 | strtold, so use _strtold in all versions. */ | 80 | strtold, so use _strtold in all versions. */ |
| 81 | #define strtold _strtold | 81 | #define strtold _strtold |
| 82 | 82 | ||
| 83 | #if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3 | ||
| 84 | # define HAVE_LSTAT 1 | ||
| 85 | #else | ||
| 86 | # define lstat stat | ||
| 87 | #endif | ||
| 88 | |||
| 83 | /* End of gnulib-related stuff. */ | 89 | /* End of gnulib-related stuff. */ |
| 84 | 90 | ||
| 85 | /* When $TERM is "internal" then this is substituted: */ | 91 | /* When $TERM is "internal" then this is substituted: */ |
diff --git a/src/scroll.c b/src/scroll.c index 08ae83eeee8..1343b89c41e 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 | |||
| 262 | for (k = 0; k < window_size; ++k) | 262 | for (k = 0; k < window_size; ++k) |
| 263 | copy_from[k] = -1; | 263 | copy_from[k] = -1; |
| 264 | 264 | ||
| 265 | #define CHECK_BOUNDS \ | 265 | #if GLYPH_DEBUG |
| 266 | # define CHECK_BOUNDS \ | ||
| 266 | do \ | 267 | do \ |
| 267 | { \ | 268 | { \ |
| 268 | int k; \ | 269 | int k; \ |
| @@ -271,6 +272,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m | |||
| 271 | || (copy_from[k] >= 0 && copy_from[k] < window_size)); \ | 272 | || (copy_from[k] >= 0 && copy_from[k] < window_size)); \ |
| 272 | } \ | 273 | } \ |
| 273 | while (0); | 274 | while (0); |
| 275 | #endif | ||
| 274 | 276 | ||
| 275 | /* When j is advanced, this corresponds to deleted lines. | 277 | /* When j is advanced, this corresponds to deleted lines. |
| 276 | When i is advanced, this corresponds to inserted lines. */ | 278 | When i is advanced, this corresponds to inserted lines. */ |
| @@ -1035,4 +1037,3 @@ do_line_insertion_deletion_costs (FRAME_PTR frame, | |||
| 1035 | FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame), | 1037 | FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame), |
| 1036 | coefficient); | 1038 | coefficient); |
| 1037 | } | 1039 | } |
| 1038 | |||
diff --git a/src/sheap.c b/src/sheap.c index 65fbab538bb..31414fbe5c6 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/>. */ | |||
| 25 | 25 | ||
| 26 | #include <unistd.h> | 26 | #include <unistd.h> |
| 27 | 27 | ||
| 28 | #define STATIC_HEAP_SIZE (12 * 1024 * 1024) | 28 | #define STATIC_HEAP_SIZE (13 * 1024 * 1024) |
| 29 | 29 | ||
| 30 | int debug_sheap = 0; | 30 | int debug_sheap = 0; |
| 31 | 31 | ||
| @@ -3614,6 +3614,25 @@ utime (const char *name, struct utimbuf *times) | |||
| 3614 | } | 3614 | } |
| 3615 | 3615 | ||
| 3616 | 3616 | ||
| 3617 | /* Symlink-related functions that always fail. Used in fileio.c to | ||
| 3618 | avoid #ifdef's. */ | ||
| 3619 | int | ||
| 3620 | symlink (char const *dummy1, char const *dummy2) | ||
| 3621 | { | ||
| 3622 | errno = ENOSYS; | ||
| 3623 | return -1; | ||
| 3624 | } | ||
| 3625 | |||
| 3626 | ssize_t | ||
| 3627 | readlink (const char *name, char *dummy1, size_t dummy2) | ||
| 3628 | { | ||
| 3629 | /* `access' is much faster than `stat' on MS-Windows. */ | ||
| 3630 | if (sys_access (name, 0) == 0) | ||
| 3631 | errno = EINVAL; | ||
| 3632 | return -1; | ||
| 3633 | } | ||
| 3634 | |||
| 3635 | |||
| 3617 | /* Support for browsing other processes and their attributes. See | 3636 | /* Support for browsing other processes and their attributes. See |
| 3618 | process.c for the Lisp bindings. */ | 3637 | process.c for the Lisp bindings. */ |
| 3619 | 3638 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index 1c009c7f943..bb8b428ffe4 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -831,7 +831,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 831 | 831 | ||
| 832 | Note that using backslash to escape embedded quotes requires | 832 | Note that using backslash to escape embedded quotes requires |
| 833 | additional special handling if an embedded quote is already | 833 | additional special handling if an embedded quote is already |
| 834 | preceeded by backslash, or if an arg requiring quoting ends with | 834 | preceded by backslash, or if an arg requiring quoting ends with |
| 835 | backslash. In such cases, the run of escape characters needs to be | 835 | backslash. In such cases, the run of escape characters needs to be |
| 836 | doubled. For consistency, we apply this special handling as long | 836 | doubled. For consistency, we apply this special handling as long |
| 837 | as the escape character is not quote. | 837 | as the escape character is not quote. |
diff --git a/src/w32term.c b/src/w32term.c index 692130b5140..67e853f21f0 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5941,7 +5941,7 @@ w32_initialize_display_info (Lisp_Object display_name) | |||
| 5941 | 5941 | ||
| 5942 | } | 5942 | } |
| 5943 | 5943 | ||
| 5944 | /* Create an xrdb-style database of resources to supercede registry settings. | 5944 | /* Create an xrdb-style database of resources to supersede registry settings. |
| 5945 | The database is just a concatenation of C strings, finished by an additional | 5945 | The database is just a concatenation of C strings, finished by an additional |
| 5946 | \0. The strings are submitted to some basic normalization, so | 5946 | \0. The strings are submitted to some basic normalization, so |
| 5947 | 5947 | ||
diff --git a/src/window.c b/src/window.c index f0555d5c961..9a0955955fa 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1769,8 +1769,10 @@ window_list (void) | |||
| 1769 | 1769 | ||
| 1770 | ALL_FRAMES t means search all frames, | 1770 | ALL_FRAMES t means search all frames, |
| 1771 | nil means search just current frame, | 1771 | nil means search just current frame, |
| 1772 | `visible' means search just visible frames, | 1772 | `visible' means search just visible frames on the |
| 1773 | 0 means search visible and iconified frames, | 1773 | current terminal, |
| 1774 | 0 means search visible and iconified frames on the | ||
| 1775 | current terminal, | ||
| 1774 | a window means search the frame that window belongs to, | 1776 | a window means search the frame that window belongs to, |
| 1775 | a frame means consider windows on that frame, only. */ | 1777 | a frame means consider windows on that frame, only. */ |
| 1776 | 1778 | ||
| @@ -1836,8 +1838,8 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf | |||
| 1836 | 1838 | ||
| 1837 | 1839 | ||
| 1838 | /* Decode arguments as allowed by Fnext_window, Fprevious_window, and | 1840 | /* Decode arguments as allowed by Fnext_window, Fprevious_window, and |
| 1839 | Fwindow_list. See there for the meaning of WINDOW, MINIBUF, and | 1841 | Fwindow_list. See candidate_window_p for the meaning of WINDOW, |
| 1840 | ALL_FRAMES. */ | 1842 | MINIBUF, and ALL_FRAMES. */ |
| 1841 | 1843 | ||
| 1842 | static void | 1844 | static void |
| 1843 | decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames) | 1845 | 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 | |||
| 1871 | ; | 1873 | ; |
| 1872 | else if (!EQ (*all_frames, Qt)) | 1874 | else if (!EQ (*all_frames, Qt)) |
| 1873 | *all_frames = Qnil; | 1875 | *all_frames = Qnil; |
| 1874 | |||
| 1875 | /* Now *ALL_FRAMES is t meaning search all frames, nil meaning | ||
| 1876 | search just current frame, `visible' meaning search just visible | ||
| 1877 | frames, 0 meaning search visible and iconified frames, or a | ||
| 1878 | window, meaning search the frame that window belongs to, or a | ||
| 1879 | frame, meaning consider windows on that frame, only. */ | ||
| 1880 | } | 1876 | } |
| 1881 | 1877 | ||
| 1882 | 1878 | ||
| @@ -1974,9 +1970,9 @@ ALL-FRAMES nil or omitted means consider all windows on WINDOW's | |||
| 1974 | windows on all frames that share that minibuffer too. | 1970 | windows on all frames that share that minibuffer too. |
| 1975 | ALL-FRAMES t means consider all windows on all existing frames. | 1971 | ALL-FRAMES t means consider all windows on all existing frames. |
| 1976 | ALL-FRAMES `visible' means consider all windows on all visible | 1972 | ALL-FRAMES `visible' means consider all windows on all visible |
| 1977 | frames. | 1973 | frames on the current terminal. |
| 1978 | ALL-FRAMES 0 means consider all windows on all visible and | 1974 | ALL-FRAMES 0 means consider all windows on all visible and |
| 1979 | iconified frames. | 1975 | iconified frames on the current terminal. |
| 1980 | ALL-FRAMES a frame means consider all windows on that frame only. | 1976 | ALL-FRAMES a frame means consider all windows on that frame only. |
| 1981 | Anything else means consider all windows on WINDOW's frame and no | 1977 | Anything else means consider all windows on WINDOW's frame and no |
| 1982 | others. | 1978 | others. |
diff --git a/src/window.h b/src/window.h index 473a43bbc3c..9f0809e4f16 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -788,14 +788,6 @@ void run_window_configuration_change_hook (struct frame *f); | |||
| 788 | void set_window_buffer (Lisp_Object window, Lisp_Object buffer, | 788 | void set_window_buffer (Lisp_Object window, Lisp_Object buffer, |
| 789 | int run_hooks_p, int keep_margins_p); | 789 | int run_hooks_p, int keep_margins_p); |
| 790 | 790 | ||
| 791 | /* Prompt to display in front of the minibuffer contents. */ | ||
| 792 | |||
| 793 | extern Lisp_Object minibuf_prompt; | ||
| 794 | |||
| 795 | /* The visual width of the above. */ | ||
| 796 | |||
| 797 | extern int minibuf_prompt_width; | ||
| 798 | |||
| 799 | /* This is the window where the echo area message was displayed. It | 791 | /* This is the window where the echo area message was displayed. It |
| 800 | is always a minibuffer window, but it may not be the same window | 792 | is always a minibuffer window, but it may not be the same window |
| 801 | currently active as a minibuffer. */ | 793 | currently active as a minibuffer. */ |
| @@ -877,4 +869,3 @@ extern void keys_of_window (void); | |||
| 877 | extern int window_box_text_cols (struct window *w); | 869 | extern int window_box_text_cols (struct window *w); |
| 878 | 870 | ||
| 879 | #endif /* not WINDOW_H_INCLUDED */ | 871 | #endif /* not WINDOW_H_INCLUDED */ |
| 880 | |||
diff --git a/src/xdisp.c b/src/xdisp.c index e144237d34e..44cb7130119 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -483,15 +483,6 @@ int buffer_shared; | |||
| 483 | 483 | ||
| 484 | static Lisp_Object default_invis_vector[3]; | 484 | static Lisp_Object default_invis_vector[3]; |
| 485 | 485 | ||
| 486 | /* Prompt to display in front of the mini-buffer contents. */ | ||
| 487 | |||
| 488 | Lisp_Object minibuf_prompt; | ||
| 489 | |||
| 490 | /* Width of current mini-buffer prompt. Only set after display_line | ||
| 491 | of the line that contains the prompt. */ | ||
| 492 | |||
| 493 | int minibuf_prompt_width; | ||
| 494 | |||
| 495 | /* This is the window where the echo area message was displayed. It | 486 | /* This is the window where the echo area message was displayed. It |
| 496 | is always a mini-buffer window, but it may not be the same window | 487 | is always a mini-buffer window, but it may not be the same window |
| 497 | currently active as a mini-buffer. */ | 488 | currently active as a mini-buffer. */ |
| @@ -771,7 +762,7 @@ static Lisp_Object get_it_property (struct it *it, Lisp_Object prop); | |||
| 771 | 762 | ||
| 772 | static void handle_line_prefix (struct it *); | 763 | static void handle_line_prefix (struct it *); |
| 773 | 764 | ||
| 774 | static void pint2str (char *, int, int); | 765 | static void pint2str (char *, int, EMACS_INT); |
| 775 | static void pint2hrstr (char *, int, int); | 766 | static void pint2hrstr (char *, int, int); |
| 776 | static struct text_pos run_window_scroll_functions (Lisp_Object, | 767 | static struct text_pos run_window_scroll_functions (Lisp_Object, |
| 777 | struct text_pos); | 768 | struct text_pos); |
| @@ -2477,9 +2468,9 @@ init_iterator (struct it *it, struct window *w, | |||
| 2477 | && WINDOWP (minibuf_selected_window) | 2468 | && WINDOWP (minibuf_selected_window) |
| 2478 | && w == XWINDOW (minibuf_selected_window)))) | 2469 | && w == XWINDOW (minibuf_selected_window)))) |
| 2479 | { | 2470 | { |
| 2480 | EMACS_INT charpos = marker_position (BVAR (current_buffer, mark)); | 2471 | EMACS_INT markpos = marker_position (BVAR (current_buffer, mark)); |
| 2481 | it->region_beg_charpos = min (PT, charpos); | 2472 | it->region_beg_charpos = min (PT, markpos); |
| 2482 | it->region_end_charpos = max (PT, charpos); | 2473 | it->region_end_charpos = max (PT, markpos); |
| 2483 | } | 2474 | } |
| 2484 | else | 2475 | else |
| 2485 | it->region_beg_charpos = it->region_end_charpos = -1; | 2476 | it->region_beg_charpos = it->region_end_charpos = -1; |
| @@ -3183,11 +3174,11 @@ handle_fontified_prop (struct it *it) | |||
| 3183 | safe_call1 (val, pos); | 3174 | safe_call1 (val, pos); |
| 3184 | else | 3175 | else |
| 3185 | { | 3176 | { |
| 3186 | Lisp_Object globals, fn; | 3177 | Lisp_Object fns, fn; |
| 3187 | struct gcpro gcpro1, gcpro2; | 3178 | struct gcpro gcpro1, gcpro2; |
| 3188 | 3179 | ||
| 3189 | globals = Qnil; | 3180 | fns = Qnil; |
| 3190 | GCPRO2 (val, globals); | 3181 | GCPRO2 (val, fns); |
| 3191 | 3182 | ||
| 3192 | for (; CONSP (val); val = XCDR (val)) | 3183 | for (; CONSP (val); val = XCDR (val)) |
| 3193 | { | 3184 | { |
| @@ -3200,11 +3191,11 @@ handle_fontified_prop (struct it *it) | |||
| 3200 | In a global value, t should not occur. If it | 3191 | In a global value, t should not occur. If it |
| 3201 | does, we must ignore it to avoid an endless | 3192 | does, we must ignore it to avoid an endless |
| 3202 | loop. */ | 3193 | loop. */ |
| 3203 | for (globals = Fdefault_value (Qfontification_functions); | 3194 | for (fns = Fdefault_value (Qfontification_functions); |
| 3204 | CONSP (globals); | 3195 | CONSP (fns); |
| 3205 | globals = XCDR (globals)) | 3196 | fns = XCDR (fns)) |
| 3206 | { | 3197 | { |
| 3207 | fn = XCAR (globals); | 3198 | fn = XCAR (fns); |
| 3208 | if (!EQ (fn, Qt)) | 3199 | if (!EQ (fn, Qt)) |
| 3209 | safe_call1 (fn, pos); | 3200 | safe_call1 (fn, pos); |
| 3210 | } | 3201 | } |
| @@ -3989,12 +3980,12 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object, | |||
| 3989 | else if (NUMBERP (it->font_height)) | 3980 | else if (NUMBERP (it->font_height)) |
| 3990 | { | 3981 | { |
| 3991 | /* Value is a multiple of the canonical char height. */ | 3982 | /* Value is a multiple of the canonical char height. */ |
| 3992 | struct face *face; | 3983 | struct face *f; |
| 3993 | 3984 | ||
| 3994 | face = FACE_FROM_ID (it->f, | 3985 | f = FACE_FROM_ID (it->f, |
| 3995 | lookup_basic_face (it->f, DEFAULT_FACE_ID)); | 3986 | lookup_basic_face (it->f, DEFAULT_FACE_ID)); |
| 3996 | new_height = (XFLOATINT (it->font_height) | 3987 | new_height = (XFLOATINT (it->font_height) |
| 3997 | * XINT (face->lface[LFACE_HEIGHT_INDEX])); | 3988 | * XINT (f->lface[LFACE_HEIGHT_INDEX])); |
| 3998 | } | 3989 | } |
| 3999 | else | 3990 | else |
| 4000 | { | 3991 | { |
| @@ -7982,7 +7973,7 @@ message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte) | |||
| 7982 | if (nlflag) | 7973 | if (nlflag) |
| 7983 | { | 7974 | { |
| 7984 | EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte; | 7975 | EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte; |
| 7985 | int dup; | 7976 | int dups; |
| 7986 | insert_1 ("\n", 1, 1, 0, 0); | 7977 | insert_1 ("\n", 1, 1, 0, 0); |
| 7987 | 7978 | ||
| 7988 | scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); | 7979 | 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) | |||
| 7997 | prev_bol = PT; | 7988 | prev_bol = PT; |
| 7998 | prev_bol_byte = PT_BYTE; | 7989 | prev_bol_byte = PT_BYTE; |
| 7999 | 7990 | ||
| 8000 | dup = message_log_check_duplicate (prev_bol, prev_bol_byte, | 7991 | dups = message_log_check_duplicate (prev_bol, prev_bol_byte, |
| 8001 | this_bol, this_bol_byte); | 7992 | this_bol, this_bol_byte); |
| 8002 | if (dup) | 7993 | if (dups) |
| 8003 | { | 7994 | { |
| 8004 | del_range_both (prev_bol, prev_bol_byte, | 7995 | del_range_both (prev_bol, prev_bol_byte, |
| 8005 | this_bol, this_bol_byte, 0); | 7996 | this_bol, this_bol_byte, 0); |
| 8006 | if (dup > 1) | 7997 | if (dups > 1) |
| 8007 | { | 7998 | { |
| 8008 | char dupstr[40]; | 7999 | char dupstr[40]; |
| 8009 | int duplen; | 8000 | int duplen; |
| 8010 | 8001 | ||
| 8011 | /* If you change this format, don't forget to also | 8002 | /* If you change this format, don't forget to also |
| 8012 | change message_log_check_duplicate. */ | 8003 | change message_log_check_duplicate. */ |
| 8013 | sprintf (dupstr, " [%d times]", dup); | 8004 | sprintf (dupstr, " [%d times]", dups); |
| 8014 | duplen = strlen (dupstr); | 8005 | duplen = strlen (dupstr); |
| 8015 | TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); | 8006 | TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); |
| 8016 | insert_1 (dupstr, duplen, 1, 0, 1); | 8007 | insert_1 (dupstr, duplen, 1, 0, 1); |
| @@ -8340,20 +8331,20 @@ message_with_string (const char *m, Lisp_Object string, int log) | |||
| 8340 | cmd_error, so this must be just an informative message; toss it. */ | 8331 | cmd_error, so this must be just an informative message; toss it. */ |
| 8341 | if (FRAME_MESSAGE_BUF (f)) | 8332 | if (FRAME_MESSAGE_BUF (f)) |
| 8342 | { | 8333 | { |
| 8343 | Lisp_Object args[2], message; | 8334 | Lisp_Object args[2], msg; |
| 8344 | struct gcpro gcpro1, gcpro2; | 8335 | struct gcpro gcpro1, gcpro2; |
| 8345 | 8336 | ||
| 8346 | args[0] = build_string (m); | 8337 | args[0] = build_string (m); |
| 8347 | args[1] = message = string; | 8338 | args[1] = msg = string; |
| 8348 | GCPRO2 (args[0], message); | 8339 | GCPRO2 (args[0], msg); |
| 8349 | gcpro1.nvars = 2; | 8340 | gcpro1.nvars = 2; |
| 8350 | 8341 | ||
| 8351 | message = Fformat (2, args); | 8342 | msg = Fformat (2, args); |
| 8352 | 8343 | ||
| 8353 | if (log) | 8344 | if (log) |
| 8354 | message3 (message, SBYTES (message), STRING_MULTIBYTE (message)); | 8345 | message3 (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); |
| 8355 | else | 8346 | else |
| 8356 | message3_nolog (message, SBYTES (message), STRING_MULTIBYTE (message)); | 8347 | message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); |
| 8357 | 8348 | ||
| 8358 | UNGCPRO; | 8349 | UNGCPRO; |
| 8359 | 8350 | ||
| @@ -11420,8 +11411,8 @@ redisplay_internal (int preserve_echo_area) | |||
| 11420 | { | 11411 | { |
| 11421 | struct window *w = XWINDOW (selected_window); | 11412 | struct window *w = XWINDOW (selected_window); |
| 11422 | struct window *sw; | 11413 | struct window *sw; |
| 11423 | struct frame *f; | 11414 | struct frame *fr; |
| 11424 | int pause; | 11415 | int pending; |
| 11425 | int must_finish = 0; | 11416 | int must_finish = 0; |
| 11426 | struct text_pos tlbufpos, tlendpos; | 11417 | struct text_pos tlbufpos, tlendpos; |
| 11427 | int number_of_visible_frames; | 11418 | int number_of_visible_frames; |
| @@ -11446,10 +11437,10 @@ redisplay_internal (int preserve_echo_area) | |||
| 11446 | /* Don't examine these until after testing Vinhibit_redisplay. | 11437 | /* Don't examine these until after testing Vinhibit_redisplay. |
| 11447 | When Emacs is shutting down, perhaps because its connection to | 11438 | When Emacs is shutting down, perhaps because its connection to |
| 11448 | X has dropped, we should not look at them at all. */ | 11439 | X has dropped, we should not look at them at all. */ |
| 11449 | f = XFRAME (w->frame); | 11440 | fr = XFRAME (w->frame); |
| 11450 | sf = SELECTED_FRAME (); | 11441 | sf = SELECTED_FRAME (); |
| 11451 | 11442 | ||
| 11452 | if (!f->glyphs_initialized_p) | 11443 | if (!fr->glyphs_initialized_p) |
| 11453 | return; | 11444 | return; |
| 11454 | 11445 | ||
| 11455 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) | 11446 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) |
| @@ -11491,7 +11482,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 11491 | may need to run Elisp code (via prepare_menu_bars). */ | 11482 | may need to run Elisp code (via prepare_menu_bars). */ |
| 11492 | select_frame_for_redisplay (old_frame); | 11483 | select_frame_for_redisplay (old_frame); |
| 11493 | 11484 | ||
| 11494 | pause = 0; | 11485 | pending = 0; |
| 11495 | reconsider_clip_changes (w, current_buffer); | 11486 | reconsider_clip_changes (w, current_buffer); |
| 11496 | last_escape_glyph_frame = NULL; | 11487 | last_escape_glyph_frame = NULL; |
| 11497 | last_escape_glyph_face_id = (1 << FACE_ID_BITS); | 11488 | last_escape_glyph_face_id = (1 << FACE_ID_BITS); |
| @@ -11588,8 +11579,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 11588 | && !(PT == XFASTINT (w->last_point) | 11579 | && !(PT == XFASTINT (w->last_point) |
| 11589 | && XFASTINT (w->last_modified) >= MODIFF | 11580 | && XFASTINT (w->last_modified) >= MODIFF |
| 11590 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) | 11581 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) |
| 11591 | && (XFASTINT (w->column_number_displayed) | 11582 | && (XFASTINT (w->column_number_displayed) != current_column ())) |
| 11592 | != (int) current_column ())) /* iftc */ | ||
| 11593 | w->update_mode_line = Qt; | 11583 | w->update_mode_line = Qt; |
| 11594 | 11584 | ||
| 11595 | unbind_to (count1, Qnil); | 11585 | unbind_to (count1, Qnil); |
| @@ -11963,7 +11953,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 11963 | 11953 | ||
| 11964 | /* Update the display. */ | 11954 | /* Update the display. */ |
| 11965 | set_window_update_flags (XWINDOW (f->root_window), 1); | 11955 | set_window_update_flags (XWINDOW (f->root_window), 1); |
| 11966 | pause |= update_frame (f, 0, 0); | 11956 | pending |= update_frame (f, 0, 0); |
| 11967 | f->updated_p = 1; | 11957 | f->updated_p = 1; |
| 11968 | } | 11958 | } |
| 11969 | } | 11959 | } |
| @@ -11977,7 +11967,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 11977 | select_frame_for_redisplay (old_frame); | 11967 | select_frame_for_redisplay (old_frame); |
| 11978 | eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); | 11968 | eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window)); |
| 11979 | 11969 | ||
| 11980 | if (!pause) | 11970 | if (!pending) |
| 11981 | { | 11971 | { |
| 11982 | /* Do the mark_window_display_accurate after all windows have | 11972 | /* Do the mark_window_display_accurate after all windows have |
| 11983 | been redisplayed because this call resets flags in buffers | 11973 | been redisplayed because this call resets flags in buffers |
| @@ -12026,7 +12016,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 12026 | goto retry; | 12016 | goto retry; |
| 12027 | 12017 | ||
| 12028 | XWINDOW (selected_window)->must_be_updated_p = 1; | 12018 | XWINDOW (selected_window)->must_be_updated_p = 1; |
| 12029 | pause = update_frame (sf, 0, 0); | 12019 | pending = update_frame (sf, 0, 0); |
| 12030 | } | 12020 | } |
| 12031 | 12021 | ||
| 12032 | /* We may have called echo_area_display at the top of this | 12022 | /* We may have called echo_area_display at the top of this |
| @@ -12040,15 +12030,15 @@ redisplay_internal (int preserve_echo_area) | |||
| 12040 | if (mini_frame != sf && FRAME_WINDOW_P (mini_frame)) | 12030 | if (mini_frame != sf && FRAME_WINDOW_P (mini_frame)) |
| 12041 | { | 12031 | { |
| 12042 | XWINDOW (mini_window)->must_be_updated_p = 1; | 12032 | XWINDOW (mini_window)->must_be_updated_p = 1; |
| 12043 | pause |= update_frame (mini_frame, 0, 0); | 12033 | pending |= update_frame (mini_frame, 0, 0); |
| 12044 | if (!pause && hscroll_windows (mini_window)) | 12034 | if (!pending && hscroll_windows (mini_window)) |
| 12045 | goto retry; | 12035 | goto retry; |
| 12046 | } | 12036 | } |
| 12047 | } | 12037 | } |
| 12048 | 12038 | ||
| 12049 | /* If display was paused because of pending input, make sure we do a | 12039 | /* If display was paused because of pending input, make sure we do a |
| 12050 | thorough update the next time. */ | 12040 | thorough update the next time. */ |
| 12051 | if (pause) | 12041 | if (pending) |
| 12052 | { | 12042 | { |
| 12053 | /* Prevent the optimization at the beginning of | 12043 | /* Prevent the optimization at the beginning of |
| 12054 | redisplay_internal that tries a single-line update of the | 12044 | redisplay_internal that tries a single-line update of the |
| @@ -12098,7 +12088,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 12098 | redisplay constructing glyphs, so simply exposing a frame won't | 12088 | redisplay constructing glyphs, so simply exposing a frame won't |
| 12099 | display anything in this case. So, we have to display these | 12089 | display anything in this case. So, we have to display these |
| 12100 | frames here explicitly. */ | 12090 | frames here explicitly. */ |
| 12101 | if (!pause) | 12091 | if (!pending) |
| 12102 | { | 12092 | { |
| 12103 | Lisp_Object tail, frame; | 12093 | Lisp_Object tail, frame; |
| 12104 | int new_count = 0; | 12094 | int new_count = 0; |
| @@ -12126,7 +12116,7 @@ redisplay_internal (int preserve_echo_area) | |||
| 12126 | 12116 | ||
| 12127 | /* If we just did a pending size change, or have additional | 12117 | /* If we just did a pending size change, or have additional |
| 12128 | visible frames, or selected_window changed, redisplay again. */ | 12118 | visible frames, or selected_window changed, redisplay again. */ |
| 12129 | if ((windows_or_buffers_changed && !pause) | 12119 | if ((windows_or_buffers_changed && !pending) |
| 12130 | || (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)) | 12120 | || (WINDOWP (selected_window) && (w = XWINDOW (selected_window)) != sw)) |
| 12131 | goto retry; | 12121 | goto retry; |
| 12132 | 12122 | ||
| @@ -12382,18 +12372,6 @@ redisplay_window_1 (Lisp_Object window) | |||
| 12382 | } | 12372 | } |
| 12383 | 12373 | ||
| 12384 | 12374 | ||
| 12385 | /* Increment GLYPH until it reaches END or CONDITION fails while | ||
| 12386 | adding (GLYPH)->pixel_width to X. */ | ||
| 12387 | |||
| 12388 | #define SKIP_GLYPHS(glyph, end, x, condition) \ | ||
| 12389 | do \ | ||
| 12390 | { \ | ||
| 12391 | (x) += (glyph)->pixel_width; \ | ||
| 12392 | ++(glyph); \ | ||
| 12393 | } \ | ||
| 12394 | while ((glyph) < (end) && (condition)) | ||
| 12395 | |||
| 12396 | |||
| 12397 | /* Set cursor position of W. PT is assumed to be displayed in ROW. | 12375 | /* Set cursor position of W. PT is assumed to be displayed in ROW. |
| 12398 | DELTA and DELTA_BYTES are the numbers of characters and bytes by | 12376 | DELTA and DELTA_BYTES are the numbers of characters and bytes by |
| 12399 | which positions recorded in ROW differ from current buffer | 12377 | which positions recorded in ROW differ from current buffer |
| @@ -13719,7 +13697,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 13719 | int buffer_unchanged_p = 0; | 13697 | int buffer_unchanged_p = 0; |
| 13720 | int temp_scroll_step = 0; | 13698 | int temp_scroll_step = 0; |
| 13721 | int count = SPECPDL_INDEX (); | 13699 | int count = SPECPDL_INDEX (); |
| 13722 | int rc; | ||
| 13723 | int centering_position = -1; | 13700 | int centering_position = -1; |
| 13724 | int last_line_misfit = 0; | 13701 | int last_line_misfit = 0; |
| 13725 | EMACS_INT beg_unchanged, end_unchanged; | 13702 | EMACS_INT beg_unchanged, end_unchanged; |
| @@ -13841,8 +13818,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 13841 | && !(PT == XFASTINT (w->last_point) | 13818 | && !(PT == XFASTINT (w->last_point) |
| 13842 | && XFASTINT (w->last_modified) >= MODIFF | 13819 | && XFASTINT (w->last_modified) >= MODIFF |
| 13843 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) | 13820 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF) |
| 13844 | && (XFASTINT (w->column_number_displayed) | 13821 | && (XFASTINT (w->column_number_displayed) != current_column ())) |
| 13845 | != (int) current_column ())) /* iftc */ | ||
| 13846 | update_mode_line = 1; | 13822 | update_mode_line = 1; |
| 13847 | 13823 | ||
| 13848 | /* Count number of windows showing the selected buffer. An indirect | 13824 | /* Count number of windows showing the selected buffer. An indirect |
| @@ -14032,12 +14008,15 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 14032 | /* Handle case where text has not changed, only point, and it has | 14008 | /* Handle case where text has not changed, only point, and it has |
| 14033 | not moved off the frame, and we are not retrying after hscroll. | 14009 | not moved off the frame, and we are not retrying after hscroll. |
| 14034 | (current_matrix_up_to_date_p is nonzero when retrying.) */ | 14010 | (current_matrix_up_to_date_p is nonzero when retrying.) */ |
| 14035 | if (current_matrix_up_to_date_p | 14011 | if (current_matrix_up_to_date_p) |
| 14036 | && (rc = try_cursor_movement (window, startp, &temp_scroll_step), | ||
| 14037 | rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) | ||
| 14038 | { | 14012 | { |
| 14013 | int rc = try_cursor_movement (window, startp, &temp_scroll_step); | ||
| 14014 | |||
| 14039 | switch (rc) | 14015 | switch (rc) |
| 14040 | { | 14016 | { |
| 14017 | case CURSOR_MOVEMENT_CANNOT_BE_USED: | ||
| 14018 | break; | ||
| 14019 | |||
| 14041 | case CURSOR_MOVEMENT_SUCCESS: | 14020 | case CURSOR_MOVEMENT_SUCCESS: |
| 14042 | used_current_matrix_p = 1; | 14021 | used_current_matrix_p = 1; |
| 14043 | goto done; | 14022 | goto done; |
| @@ -14347,11 +14326,10 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 14347 | || INTEGERP (w->base_line_pos) | 14326 | || INTEGERP (w->base_line_pos) |
| 14348 | /* Column number is displayed and different from the one displayed. */ | 14327 | /* Column number is displayed and different from the one displayed. */ |
| 14349 | || (!NILP (w->column_number_displayed) | 14328 | || (!NILP (w->column_number_displayed) |
| 14350 | && (XFASTINT (w->column_number_displayed) | 14329 | && (XFASTINT (w->column_number_displayed) != current_column ()))) |
| 14351 | != (int) current_column ()))) /* iftc */ | 14330 | /* This means that the window has a mode line. */ |
| 14352 | /* This means that the window has a mode line. */ | 14331 | && (WINDOW_WANTS_MODELINE_P (w) |
| 14353 | && (WINDOW_WANTS_MODELINE_P (w) | 14332 | || WINDOW_WANTS_HEADER_LINE_P (w))) |
| 14354 | || WINDOW_WANTS_HEADER_LINE_P (w))) | ||
| 14355 | { | 14333 | { |
| 14356 | display_mode_lines (w); | 14334 | display_mode_lines (w); |
| 14357 | 14335 | ||
| @@ -14597,7 +14575,7 @@ static int | |||
| 14597 | try_window_reusing_current_matrix (struct window *w) | 14575 | try_window_reusing_current_matrix (struct window *w) |
| 14598 | { | 14576 | { |
| 14599 | struct frame *f = XFRAME (w->frame); | 14577 | struct frame *f = XFRAME (w->frame); |
| 14600 | struct glyph_row *row, *bottom_row; | 14578 | struct glyph_row *bottom_row; |
| 14601 | struct it it; | 14579 | struct it it; |
| 14602 | struct run run; | 14580 | struct run run; |
| 14603 | struct text_pos start, new_start; | 14581 | struct text_pos start, new_start; |
| @@ -14706,6 +14684,8 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 14706 | have at least one reusable row. */ | 14684 | have at least one reusable row. */ |
| 14707 | if (it.current_y < it.last_visible_y) | 14685 | if (it.current_y < it.last_visible_y) |
| 14708 | { | 14686 | { |
| 14687 | struct glyph_row *row; | ||
| 14688 | |||
| 14709 | /* IT.vpos always starts from 0; it counts text lines. */ | 14689 | /* IT.vpos always starts from 0; it counts text lines. */ |
| 14710 | nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix)); | 14690 | nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix)); |
| 14711 | 14691 | ||
| @@ -15491,41 +15471,41 @@ try_window_id (struct window *w) | |||
| 15491 | || (last_changed_charpos < CHARPOS (start) - 1 | 15471 | || (last_changed_charpos < CHARPOS (start) - 1 |
| 15492 | && FETCH_BYTE (BYTEPOS (start) - 1) == '\n'))) | 15472 | && FETCH_BYTE (BYTEPOS (start) - 1) == '\n'))) |
| 15493 | { | 15473 | { |
| 15494 | EMACS_INT Z_old, delta, Z_BYTE_old, delta_bytes; | 15474 | EMACS_INT Z_old, Z_delta, Z_BYTE_old, Z_delta_bytes; |
| 15495 | struct glyph_row *r0; | 15475 | struct glyph_row *r0; |
| 15496 | 15476 | ||
| 15497 | /* Compute how many chars/bytes have been added to or removed | 15477 | /* Compute how many chars/bytes have been added to or removed |
| 15498 | from the buffer. */ | 15478 | from the buffer. */ |
| 15499 | Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos); | 15479 | Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos); |
| 15500 | Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos; | 15480 | Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos; |
| 15501 | delta = Z - Z_old; | 15481 | Z_delta = Z - Z_old; |
| 15502 | delta_bytes = Z_BYTE - Z_BYTE_old; | 15482 | Z_delta_bytes = Z_BYTE - Z_BYTE_old; |
| 15503 | 15483 | ||
| 15504 | /* Give up if PT is not in the window. Note that it already has | 15484 | /* Give up if PT is not in the window. Note that it already has |
| 15505 | been checked at the start of try_window_id that PT is not in | 15485 | been checked at the start of try_window_id that PT is not in |
| 15506 | front of the window start. */ | 15486 | front of the window start. */ |
| 15507 | if (PT >= MATRIX_ROW_END_CHARPOS (row) + delta) | 15487 | if (PT >= MATRIX_ROW_END_CHARPOS (row) + Z_delta) |
| 15508 | GIVE_UP (13); | 15488 | GIVE_UP (13); |
| 15509 | 15489 | ||
| 15510 | /* If window start is unchanged, we can reuse the whole matrix | 15490 | /* If window start is unchanged, we can reuse the whole matrix |
| 15511 | as is, after adjusting glyph positions. No need to compute | 15491 | as is, after adjusting glyph positions. No need to compute |
| 15512 | the window end again, since its offset from Z hasn't changed. */ | 15492 | the window end again, since its offset from Z hasn't changed. */ |
| 15513 | r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); | 15493 | r0 = MATRIX_FIRST_TEXT_ROW (current_matrix); |
| 15514 | if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + delta | 15494 | if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + Z_delta |
| 15515 | && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + delta_bytes | 15495 | && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + Z_delta_bytes |
| 15516 | /* PT must not be in a partially visible line. */ | 15496 | /* PT must not be in a partially visible line. */ |
| 15517 | && !(PT >= MATRIX_ROW_START_CHARPOS (row) + delta | 15497 | && !(PT >= MATRIX_ROW_START_CHARPOS (row) + Z_delta |
| 15518 | && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) | 15498 | && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w))) |
| 15519 | { | 15499 | { |
| 15520 | /* Adjust positions in the glyph matrix. */ | 15500 | /* Adjust positions in the glyph matrix. */ |
| 15521 | if (delta || delta_bytes) | 15501 | if (Z_delta || Z_delta_bytes) |
| 15522 | { | 15502 | { |
| 15523 | struct glyph_row *r1 | 15503 | struct glyph_row *r1 |
| 15524 | = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); | 15504 | = MATRIX_BOTTOM_TEXT_ROW (current_matrix, w); |
| 15525 | increment_matrix_positions (w->current_matrix, | 15505 | increment_matrix_positions (w->current_matrix, |
| 15526 | MATRIX_ROW_VPOS (r0, current_matrix), | 15506 | MATRIX_ROW_VPOS (r0, current_matrix), |
| 15527 | MATRIX_ROW_VPOS (r1, current_matrix), | 15507 | MATRIX_ROW_VPOS (r1, current_matrix), |
| 15528 | delta, delta_bytes); | 15508 | Z_delta, Z_delta_bytes); |
| 15529 | } | 15509 | } |
| 15530 | 15510 | ||
| 15531 | /* Set the cursor. */ | 15511 | /* Set the cursor. */ |
| @@ -15841,9 +15821,9 @@ try_window_id (struct window *w) | |||
| 15841 | { | 15821 | { |
| 15842 | /* Terminal frame. In this case, dvpos gives the number of | 15822 | /* Terminal frame. In this case, dvpos gives the number of |
| 15843 | lines to scroll by; dvpos < 0 means scroll up. */ | 15823 | lines to scroll by; dvpos < 0 means scroll up. */ |
| 15844 | int first_unchanged_at_end_vpos | 15824 | int from_vpos |
| 15845 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, w->current_matrix); | 15825 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, w->current_matrix); |
| 15846 | int from = WINDOW_TOP_EDGE_LINE (w) + first_unchanged_at_end_vpos; | 15826 | int from = WINDOW_TOP_EDGE_LINE (w) + from_vpos; |
| 15847 | int end = (WINDOW_TOP_EDGE_LINE (w) | 15827 | int end = (WINDOW_TOP_EDGE_LINE (w) |
| 15848 | + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) | 15828 | + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) |
| 15849 | + window_internal_height (w)); | 15829 | + window_internal_height (w)); |
| @@ -16574,7 +16554,6 @@ static void | |||
| 16574 | compute_line_metrics (struct it *it) | 16554 | compute_line_metrics (struct it *it) |
| 16575 | { | 16555 | { |
| 16576 | struct glyph_row *row = it->glyph_row; | 16556 | struct glyph_row *row = it->glyph_row; |
| 16577 | int area, i; | ||
| 16578 | 16557 | ||
| 16579 | if (FRAME_WINDOW_P (it->f)) | 16558 | if (FRAME_WINDOW_P (it->f)) |
| 16580 | { | 16559 | { |
| @@ -16639,14 +16618,17 @@ compute_line_metrics (struct it *it) | |||
| 16639 | } | 16618 | } |
| 16640 | 16619 | ||
| 16641 | /* Compute a hash code for this row. */ | 16620 | /* Compute a hash code for this row. */ |
| 16642 | row->hash = 0; | 16621 | { |
| 16643 | for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) | 16622 | int area, i; |
| 16644 | for (i = 0; i < row->used[area]; ++i) | 16623 | row->hash = 0; |
| 16645 | row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff) | 16624 | for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) |
| 16646 | + row->glyphs[area][i].u.val | 16625 | for (i = 0; i < row->used[area]; ++i) |
| 16647 | + row->glyphs[area][i].face_id | 16626 | row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff) |
| 16648 | + row->glyphs[area][i].padding_p | 16627 | + row->glyphs[area][i].u.val |
| 16649 | + (row->glyphs[area][i].type << 2)); | 16628 | + row->glyphs[area][i].face_id |
| 16629 | + row->glyphs[area][i].padding_p | ||
| 16630 | + (row->glyphs[area][i].type << 2)); | ||
| 16631 | } | ||
| 16650 | 16632 | ||
| 16651 | it->max_ascent = it->max_descent = 0; | 16633 | it->max_ascent = it->max_descent = 0; |
| 16652 | it->max_phys_ascent = it->max_phys_descent = 0; | 16634 | it->max_phys_ascent = it->max_phys_descent = 0; |
| @@ -16979,7 +16961,7 @@ highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | |||
| 16979 | static int | 16961 | static int |
| 16980 | cursor_row_p (struct window *w, struct glyph_row *row) | 16962 | cursor_row_p (struct window *w, struct glyph_row *row) |
| 16981 | { | 16963 | { |
| 16982 | int cursor_row_p = 1; | 16964 | int result = 1; |
| 16983 | 16965 | ||
| 16984 | if (PT == CHARPOS (row->end.pos)) | 16966 | if (PT == CHARPOS (row->end.pos)) |
| 16985 | { | 16967 | { |
| @@ -16992,7 +16974,7 @@ cursor_row_p (struct window *w, struct glyph_row *row) | |||
| 16992 | if (CHARPOS (row->end.string_pos) >= 0) | 16974 | if (CHARPOS (row->end.string_pos) >= 0) |
| 16993 | { | 16975 | { |
| 16994 | if (row->continued_p) | 16976 | if (row->continued_p) |
| 16995 | cursor_row_p = 1; | 16977 | result = 1; |
| 16996 | else | 16978 | else |
| 16997 | { | 16979 | { |
| 16998 | /* Check for `display' property. */ | 16980 | /* Check for `display' property. */ |
| @@ -17000,14 +16982,14 @@ cursor_row_p (struct window *w, struct glyph_row *row) | |||
| 17000 | struct glyph *end = beg + row->used[TEXT_AREA] - 1; | 16982 | struct glyph *end = beg + row->used[TEXT_AREA] - 1; |
| 17001 | struct glyph *glyph; | 16983 | struct glyph *glyph; |
| 17002 | 16984 | ||
| 17003 | cursor_row_p = 0; | 16985 | result = 0; |
| 17004 | for (glyph = end; glyph >= beg; --glyph) | 16986 | for (glyph = end; glyph >= beg; --glyph) |
| 17005 | if (STRINGP (glyph->object)) | 16987 | if (STRINGP (glyph->object)) |
| 17006 | { | 16988 | { |
| 17007 | Lisp_Object prop | 16989 | Lisp_Object prop |
| 17008 | = Fget_char_property (make_number (PT), | 16990 | = Fget_char_property (make_number (PT), |
| 17009 | Qdisplay, Qnil); | 16991 | Qdisplay, Qnil); |
| 17010 | cursor_row_p = | 16992 | result = |
| 17011 | (!NILP (prop) | 16993 | (!NILP (prop) |
| 17012 | && display_prop_string_p (prop, glyph->object)); | 16994 | && display_prop_string_p (prop, glyph->object)); |
| 17013 | break; | 16995 | break; |
| @@ -17021,23 +17003,23 @@ cursor_row_p (struct window *w, struct glyph_row *row) | |||
| 17021 | That's because CHARPOS (ROW->end.pos) would equal | 17003 | That's because CHARPOS (ROW->end.pos) would equal |
| 17022 | PT if PT is before the character. */ | 17004 | PT if PT is before the character. */ |
| 17023 | if (!row->ends_in_ellipsis_p) | 17005 | if (!row->ends_in_ellipsis_p) |
| 17024 | cursor_row_p = row->continued_p; | 17006 | result = row->continued_p; |
| 17025 | else | 17007 | else |
| 17026 | /* If the row ends in an ellipsis, then | 17008 | /* If the row ends in an ellipsis, then |
| 17027 | CHARPOS (ROW->end.pos) will equal point after the | 17009 | CHARPOS (ROW->end.pos) will equal point after the |
| 17028 | invisible text. We want that position to be displayed | 17010 | invisible text. We want that position to be displayed |
| 17029 | after the ellipsis. */ | 17011 | after the ellipsis. */ |
| 17030 | cursor_row_p = 0; | 17012 | result = 0; |
| 17031 | } | 17013 | } |
| 17032 | /* If the row ends at ZV, display the cursor at the end of that | 17014 | /* If the row ends at ZV, display the cursor at the end of that |
| 17033 | row instead of at the start of the row below. */ | 17015 | row instead of at the start of the row below. */ |
| 17034 | else if (row->ends_at_zv_p) | 17016 | else if (row->ends_at_zv_p) |
| 17035 | cursor_row_p = 1; | 17017 | result = 1; |
| 17036 | else | 17018 | else |
| 17037 | cursor_row_p = 0; | 17019 | result = 0; |
| 17038 | } | 17020 | } |
| 17039 | 17021 | ||
| 17040 | return cursor_row_p; | 17022 | return result; |
| 17041 | } | 17023 | } |
| 17042 | 17024 | ||
| 17043 | 17025 | ||
| @@ -17345,7 +17327,7 @@ display_line (struct it *it) | |||
| 17345 | while (1) | 17327 | while (1) |
| 17346 | { | 17328 | { |
| 17347 | int n_glyphs_before, hpos_before, x_before; | 17329 | int n_glyphs_before, hpos_before, x_before; |
| 17348 | int x, i, nglyphs; | 17330 | int x, nglyphs; |
| 17349 | int ascent = 0, descent = 0, phys_ascent = 0, phys_descent = 0; | 17331 | int ascent = 0, descent = 0, phys_ascent = 0, phys_descent = 0; |
| 17350 | 17332 | ||
| 17351 | /* Retrieve the next thing to display. Value is zero if end of | 17333 | /* Retrieve the next thing to display. Value is zero if end of |
| @@ -17470,7 +17452,7 @@ display_line (struct it *it) | |||
| 17470 | } | 17452 | } |
| 17471 | else | 17453 | else |
| 17472 | { | 17454 | { |
| 17473 | int new_x; | 17455 | int i, new_x; |
| 17474 | struct glyph *glyph; | 17456 | struct glyph *glyph; |
| 17475 | 17457 | ||
| 17476 | for (i = 0; i < nglyphs; ++i, x = new_x) | 17458 | for (i = 0; i < nglyphs; ++i, x = new_x) |
| @@ -18998,7 +18980,7 @@ are the selected window and the WINDOW's buffer). */) | |||
| 18998 | the positive integer D to BUF using a minimal field width WIDTH. */ | 18980 | the positive integer D to BUF using a minimal field width WIDTH. */ |
| 18999 | 18981 | ||
| 19000 | static void | 18982 | static void |
| 19001 | pint2str (register char *buf, register int width, register int d) | 18983 | pint2str (register char *buf, register int width, register EMACS_INT d) |
| 19002 | { | 18984 | { |
| 19003 | register char *p = buf; | 18985 | register char *p = buf; |
| 19004 | 18986 | ||
| @@ -19327,7 +19309,7 @@ decode_mode_spec (struct window *w, register int c, int field_width, | |||
| 19327 | return ""; | 19309 | return ""; |
| 19328 | else | 19310 | else |
| 19329 | { | 19311 | { |
| 19330 | int col = (int) current_column (); /* iftc */ | 19312 | EMACS_INT col = current_column (); |
| 19331 | w->column_number_displayed = make_number (col); | 19313 | w->column_number_displayed = make_number (col); |
| 19332 | pint2str (decode_mode_spec_buf, field_width, col); | 19314 | pint2str (decode_mode_spec_buf, field_width, col); |
| 19333 | return decode_mode_spec_buf; | 19315 | return decode_mode_spec_buf; |
| @@ -19924,16 +19906,16 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st | |||
| 19924 | { | 19906 | { |
| 19925 | if (!FRAME_WINDOW_P (it->f)) | 19907 | if (!FRAME_WINDOW_P (it->f)) |
| 19926 | { | 19908 | { |
| 19927 | int i, n; | 19909 | int ii, n; |
| 19928 | 19910 | ||
| 19929 | if (it->current_x > it->last_visible_x) | 19911 | if (it->current_x > it->last_visible_x) |
| 19930 | { | 19912 | { |
| 19931 | for (i = row->used[TEXT_AREA] - 1; i > 0; --i) | 19913 | for (ii = row->used[TEXT_AREA] - 1; ii > 0; --ii) |
| 19932 | if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][i])) | 19914 | if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][ii])) |
| 19933 | break; | 19915 | break; |
| 19934 | for (n = row->used[TEXT_AREA]; i < n; ++i) | 19916 | for (n = row->used[TEXT_AREA]; ii < n; ++ii) |
| 19935 | { | 19917 | { |
| 19936 | row->used[TEXT_AREA] = i; | 19918 | row->used[TEXT_AREA] = ii; |
| 19937 | produce_special_glyphs (it, IT_TRUNCATION); | 19919 | produce_special_glyphs (it, IT_TRUNCATION); |
| 19938 | } | 19920 | } |
| 19939 | } | 19921 | } |
| @@ -21165,7 +21147,6 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p) | |||
| 21165 | do \ | 21147 | do \ |
| 21166 | { \ | 21148 | { \ |
| 21167 | int face_id; \ | 21149 | int face_id; \ |
| 21168 | XChar2b *char2b; \ | ||
| 21169 | \ | 21150 | \ |
| 21170 | face_id = (row)->glyphs[area][START].face_id; \ | 21151 | face_id = (row)->glyphs[area][START].face_id; \ |
| 21171 | \ | 21152 | \ |
| @@ -22262,7 +22243,8 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) | |||
| 22262 | } | 22243 | } |
| 22263 | else | 22244 | else |
| 22264 | { | 22245 | { |
| 22265 | char buf[7], *str; | 22246 | char buf[7]; |
| 22247 | const char *str; | ||
| 22266 | unsigned int code[6]; | 22248 | unsigned int code[6]; |
| 22267 | int upper_len; | 22249 | int upper_len; |
| 22268 | int ascent, descent; | 22250 | int ascent, descent; |
| @@ -23252,7 +23234,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width) | |||
| 23252 | void | 23234 | void |
| 23253 | set_frame_cursor_types (struct frame *f, Lisp_Object arg) | 23235 | set_frame_cursor_types (struct frame *f, Lisp_Object arg) |
| 23254 | { | 23236 | { |
| 23255 | int width; | 23237 | int width = 1; |
| 23256 | Lisp_Object tem; | 23238 | Lisp_Object tem; |
| 23257 | 23239 | ||
| 23258 | FRAME_DESIRED_CURSOR (f) = get_specified_cursor_type (arg, &width); | 23240 | FRAME_DESIRED_CURSOR (f) = get_specified_cursor_type (arg, &width); |
| @@ -23783,7 +23765,7 @@ display_and_set_cursor (struct window *w, int on, | |||
| 23783 | /* Switch the display of W's cursor on or off, according to the value | 23765 | /* Switch the display of W's cursor on or off, according to the value |
| 23784 | of ON. */ | 23766 | of ON. */ |
| 23785 | 23767 | ||
| 23786 | void | 23768 | static void |
| 23787 | update_window_cursor (struct window *w, int on) | 23769 | update_window_cursor (struct window *w, int on) |
| 23788 | { | 23770 | { |
| 23789 | /* Don't update cursor in windows whose frame is in the process | 23771 | /* Don't update cursor in windows whose frame is in the process |
| @@ -24197,7 +24179,7 @@ rows_from_pos_range (struct window *w, | |||
| 24197 | for the overlay or run of text properties specifying the mouse | 24179 | for the overlay or run of text properties specifying the mouse |
| 24198 | face. BEFORE_STRING and AFTER_STRING, if non-nil, are a | 24180 | face. BEFORE_STRING and AFTER_STRING, if non-nil, are a |
| 24199 | before-string and after-string that must also be highlighted. | 24181 | before-string and after-string that must also be highlighted. |
| 24200 | DISPLAY_STRING, if non-nil, is a display string that may cover some | 24182 | COVER_STRING, if non-nil, is a display string that may cover some |
| 24201 | or all of the highlighted text. */ | 24183 | or all of the highlighted text. */ |
| 24202 | 24184 | ||
| 24203 | static void | 24185 | static void |
| @@ -24208,7 +24190,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24208 | EMACS_INT end_charpos, | 24190 | EMACS_INT end_charpos, |
| 24209 | Lisp_Object before_string, | 24191 | Lisp_Object before_string, |
| 24210 | Lisp_Object after_string, | 24192 | Lisp_Object after_string, |
| 24211 | Lisp_Object display_string) | 24193 | Lisp_Object cover_string) |
| 24212 | { | 24194 | { |
| 24213 | struct window *w = XWINDOW (window); | 24195 | struct window *w = XWINDOW (window); |
| 24214 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 24196 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| @@ -24217,7 +24199,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24217 | EMACS_INT ignore, pos; | 24199 | EMACS_INT ignore, pos; |
| 24218 | int x; | 24200 | int x; |
| 24219 | 24201 | ||
| 24220 | xassert (NILP (display_string) || STRINGP (display_string)); | 24202 | xassert (NILP (cover_string) || STRINGP (cover_string)); |
| 24221 | xassert (NILP (before_string) || STRINGP (before_string)); | 24203 | xassert (NILP (before_string) || STRINGP (before_string)); |
| 24222 | xassert (NILP (after_string) || STRINGP (after_string)); | 24204 | xassert (NILP (after_string) || STRINGP (after_string)); |
| 24223 | 24205 | ||
| @@ -24227,7 +24209,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24227 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); | 24209 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); |
| 24228 | /* If the before-string or display-string contains newlines, | 24210 | /* If the before-string or display-string contains newlines, |
| 24229 | rows_from_pos_range skips to its last row. Move back. */ | 24211 | rows_from_pos_range skips to its last row. Move back. */ |
| 24230 | if (!NILP (before_string) || !NILP (display_string)) | 24212 | if (!NILP (before_string) || !NILP (cover_string)) |
| 24231 | { | 24213 | { |
| 24232 | struct glyph_row *prev; | 24214 | struct glyph_row *prev; |
| 24233 | while ((prev = r1 - 1, prev >= first) | 24215 | while ((prev = r1 - 1, prev >= first) |
| @@ -24239,7 +24221,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24239 | while (--glyph >= beg && INTEGERP (glyph->object)); | 24221 | while (--glyph >= beg && INTEGERP (glyph->object)); |
| 24240 | if (glyph < beg | 24222 | if (glyph < beg |
| 24241 | || !(EQ (glyph->object, before_string) | 24223 | || !(EQ (glyph->object, before_string) |
| 24242 | || EQ (glyph->object, display_string))) | 24224 | || EQ (glyph->object, cover_string))) |
| 24243 | break; | 24225 | break; |
| 24244 | r1 = prev; | 24226 | r1 = prev; |
| 24245 | } | 24227 | } |
| @@ -24282,7 +24264,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24282 | hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); | 24264 | hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); |
| 24283 | 24265 | ||
| 24284 | /* For a bidi-reordered row, the positions of BEFORE_STRING, | 24266 | /* For a bidi-reordered row, the positions of BEFORE_STRING, |
| 24285 | AFTER_STRING, DISPLAY_STRING, START_CHARPOS, and END_CHARPOS | 24267 | AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS |
| 24286 | could be anywhere in the row and in any order. The strategy | 24268 | could be anywhere in the row and in any order. The strategy |
| 24287 | below is to find the leftmost and the rightmost glyph that | 24269 | below is to find the leftmost and the rightmost glyph that |
| 24288 | belongs to either of these 3 strings, or whose position is | 24270 | belongs to either of these 3 strings, or whose position is |
| @@ -24308,11 +24290,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24308 | x += glyph->pixel_width; | 24290 | x += glyph->pixel_width; |
| 24309 | 24291 | ||
| 24310 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, | 24292 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, |
| 24311 | or DISPLAY_STRING, and the first glyph from buffer whose | 24293 | or COVER_STRING, and the first glyph from buffer whose |
| 24312 | position is between START_CHARPOS and END_CHARPOS. */ | 24294 | position is between START_CHARPOS and END_CHARPOS. */ |
| 24313 | for (; glyph < end | 24295 | for (; glyph < end |
| 24314 | && !INTEGERP (glyph->object) | 24296 | && !INTEGERP (glyph->object) |
| 24315 | && !EQ (glyph->object, display_string) | 24297 | && !EQ (glyph->object, cover_string) |
| 24316 | && !(BUFFERP (glyph->object) | 24298 | && !(BUFFERP (glyph->object) |
| 24317 | && (glyph->charpos >= start_charpos | 24299 | && (glyph->charpos >= start_charpos |
| 24318 | && glyph->charpos < end_charpos)); | 24300 | && glyph->charpos < end_charpos)); |
| @@ -24359,11 +24341,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24359 | ; | 24341 | ; |
| 24360 | 24342 | ||
| 24361 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, | 24343 | /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, |
| 24362 | or DISPLAY_STRING, and the first glyph from buffer whose | 24344 | or COVER_STRING, and the first glyph from buffer whose |
| 24363 | position is between START_CHARPOS and END_CHARPOS. */ | 24345 | position is between START_CHARPOS and END_CHARPOS. */ |
| 24364 | for (; glyph > end | 24346 | for (; glyph > end |
| 24365 | && !INTEGERP (glyph->object) | 24347 | && !INTEGERP (glyph->object) |
| 24366 | && !EQ (glyph->object, display_string) | 24348 | && !EQ (glyph->object, cover_string) |
| 24367 | && !(BUFFERP (glyph->object) | 24349 | && !(BUFFERP (glyph->object) |
| 24368 | && (glyph->charpos >= start_charpos | 24350 | && (glyph->charpos >= start_charpos |
| 24369 | && glyph->charpos < end_charpos)); | 24351 | && glyph->charpos < end_charpos)); |
| @@ -24424,12 +24406,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24424 | --end; | 24406 | --end; |
| 24425 | /* Scan the rest of the glyph row from the end, looking for the | 24407 | /* Scan the rest of the glyph row from the end, looking for the |
| 24426 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or | 24408 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or |
| 24427 | DISPLAY_STRING, or whose position is between START_CHARPOS | 24409 | COVER_STRING, or whose position is between START_CHARPOS |
| 24428 | and END_CHARPOS */ | 24410 | and END_CHARPOS */ |
| 24429 | for (--end; | 24411 | for (--end; |
| 24430 | end > glyph | 24412 | end > glyph |
| 24431 | && !INTEGERP (end->object) | 24413 | && !INTEGERP (end->object) |
| 24432 | && !EQ (end->object, display_string) | 24414 | && !EQ (end->object, cover_string) |
| 24433 | && !(BUFFERP (end->object) | 24415 | && !(BUFFERP (end->object) |
| 24434 | && (end->charpos >= start_charpos | 24416 | && (end->charpos >= start_charpos |
| 24435 | && end->charpos < end_charpos)); | 24417 | && end->charpos < end_charpos)); |
| @@ -24474,12 +24456,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 24474 | } | 24456 | } |
| 24475 | /* Scan the rest of the glyph row from the end, looking for the | 24457 | /* Scan the rest of the glyph row from the end, looking for the |
| 24476 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or | 24458 | first glyph that comes from BEFORE_STRING, AFTER_STRING, or |
| 24477 | DISPLAY_STRING, or whose position is between START_CHARPOS | 24459 | COVER_STRING, or whose position is between START_CHARPOS |
| 24478 | and END_CHARPOS */ | 24460 | and END_CHARPOS */ |
| 24479 | for ( ; | 24461 | for ( ; |
| 24480 | end < glyph | 24462 | end < glyph |
| 24481 | && !INTEGERP (end->object) | 24463 | && !INTEGERP (end->object) |
| 24482 | && !EQ (end->object, display_string) | 24464 | && !EQ (end->object, cover_string) |
| 24483 | && !(BUFFERP (end->object) | 24465 | && !(BUFFERP (end->object) |
| 24484 | && (end->charpos >= start_charpos | 24466 | && (end->charpos >= start_charpos |
| 24485 | && end->charpos < end_charpos)); | 24467 | && end->charpos < end_charpos)); |
| @@ -25285,7 +25267,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25285 | EMACS_INT pos; | 25267 | EMACS_INT pos; |
| 25286 | struct glyph *glyph; | 25268 | struct glyph *glyph; |
| 25287 | Lisp_Object object; | 25269 | Lisp_Object object; |
| 25288 | Lisp_Object mouse_face = Qnil, overlay = Qnil, position; | 25270 | Lisp_Object mouse_face = Qnil, position; |
| 25289 | Lisp_Object *overlay_vec = NULL; | 25271 | Lisp_Object *overlay_vec = NULL; |
| 25290 | int noverlays; | 25272 | int noverlays; |
| 25291 | struct buffer *obuf; | 25273 | struct buffer *obuf; |
| @@ -25418,7 +25400,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25418 | && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay))) | 25400 | && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay))) |
| 25419 | { | 25401 | { |
| 25420 | /* Find the highest priority overlay with a mouse-face. */ | 25402 | /* Find the highest priority overlay with a mouse-face. */ |
| 25421 | overlay = Qnil; | 25403 | Lisp_Object overlay = Qnil; |
| 25422 | for (i = noverlays - 1; i >= 0 && NILP (overlay); --i) | 25404 | for (i = noverlays - 1; i >= 0 && NILP (overlay); --i) |
| 25423 | { | 25405 | { |
| 25424 | mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face); | 25406 | mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face); |
| @@ -25446,19 +25428,19 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25446 | { | 25428 | { |
| 25447 | /* The mouse-highlighting comes from a display string | 25429 | /* The mouse-highlighting comes from a display string |
| 25448 | with a mouse-face. */ | 25430 | with a mouse-face. */ |
| 25449 | Lisp_Object b, e; | 25431 | Lisp_Object s, e; |
| 25450 | EMACS_INT ignore; | 25432 | EMACS_INT ignore; |
| 25451 | 25433 | ||
| 25452 | b = Fprevious_single_property_change | 25434 | s = Fprevious_single_property_change |
| 25453 | (make_number (pos + 1), Qmouse_face, object, Qnil); | 25435 | (make_number (pos + 1), Qmouse_face, object, Qnil); |
| 25454 | e = Fnext_single_property_change | 25436 | e = Fnext_single_property_change |
| 25455 | (position, Qmouse_face, object, Qnil); | 25437 | (position, Qmouse_face, object, Qnil); |
| 25456 | if (NILP (b)) | 25438 | if (NILP (s)) |
| 25457 | b = make_number (0); | 25439 | s = make_number (0); |
| 25458 | if (NILP (e)) | 25440 | if (NILP (e)) |
| 25459 | e = make_number (SCHARS (object) - 1); | 25441 | e = make_number (SCHARS (object) - 1); |
| 25460 | mouse_face_from_string_pos (w, hlinfo, object, | 25442 | mouse_face_from_string_pos (w, hlinfo, object, |
| 25461 | XINT (b), XINT (e)); | 25443 | XINT (s), XINT (e)); |
| 25462 | hlinfo->mouse_face_past_end = 0; | 25444 | hlinfo->mouse_face_past_end = 0; |
| 25463 | hlinfo->mouse_face_window = window; | 25445 | hlinfo->mouse_face_window = window; |
| 25464 | hlinfo->mouse_face_face_id | 25446 | hlinfo->mouse_face_face_id |
| @@ -25471,7 +25453,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25471 | { | 25453 | { |
| 25472 | /* The mouse-highlighting, if any, comes from an overlay | 25454 | /* The mouse-highlighting, if any, comes from an overlay |
| 25473 | or text property in the buffer. */ | 25455 | or text property in the buffer. */ |
| 25474 | Lisp_Object buffer, display_string; | 25456 | Lisp_Object buffer, cover_string; |
| 25475 | 25457 | ||
| 25476 | if (STRINGP (object)) | 25458 | if (STRINGP (object)) |
| 25477 | { | 25459 | { |
| @@ -25485,13 +25467,13 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25485 | mouse_face = get_char_property_and_overlay | 25467 | mouse_face = get_char_property_and_overlay |
| 25486 | (make_number (pos), Qmouse_face, w->buffer, &overlay); | 25468 | (make_number (pos), Qmouse_face, w->buffer, &overlay); |
| 25487 | buffer = w->buffer; | 25469 | buffer = w->buffer; |
| 25488 | display_string = object; | 25470 | cover_string = object; |
| 25489 | } | 25471 | } |
| 25490 | } | 25472 | } |
| 25491 | else | 25473 | else |
| 25492 | { | 25474 | { |
| 25493 | buffer = object; | 25475 | buffer = object; |
| 25494 | display_string = Qnil; | 25476 | cover_string = Qnil; |
| 25495 | } | 25477 | } |
| 25496 | 25478 | ||
| 25497 | if (!NILP (mouse_face)) | 25479 | if (!NILP (mouse_face)) |
| @@ -25543,7 +25525,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25543 | XFASTINT (before), | 25525 | XFASTINT (before), |
| 25544 | XFASTINT (after), | 25526 | XFASTINT (after), |
| 25545 | before_string, after_string, | 25527 | before_string, after_string, |
| 25546 | display_string); | 25528 | cover_string); |
| 25547 | cursor = No_Cursor; | 25529 | cursor = No_Cursor; |
| 25548 | } | 25530 | } |
| 25549 | } | 25531 | } |
| @@ -25572,16 +25554,16 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25572 | } | 25554 | } |
| 25573 | else | 25555 | else |
| 25574 | { | 25556 | { |
| 25575 | Lisp_Object object = glyph->object; | 25557 | Lisp_Object obj = glyph->object; |
| 25576 | EMACS_INT charpos = glyph->charpos; | 25558 | EMACS_INT charpos = glyph->charpos; |
| 25577 | 25559 | ||
| 25578 | /* Try text properties. */ | 25560 | /* Try text properties. */ |
| 25579 | if (STRINGP (object) | 25561 | if (STRINGP (obj) |
| 25580 | && charpos >= 0 | 25562 | && charpos >= 0 |
| 25581 | && charpos < SCHARS (object)) | 25563 | && charpos < SCHARS (obj)) |
| 25582 | { | 25564 | { |
| 25583 | help = Fget_text_property (make_number (charpos), | 25565 | help = Fget_text_property (make_number (charpos), |
| 25584 | Qhelp_echo, object); | 25566 | Qhelp_echo, obj); |
| 25585 | if (NILP (help)) | 25567 | if (NILP (help)) |
| 25586 | { | 25568 | { |
| 25587 | /* If the string itself doesn't specify a help-echo, | 25569 | /* If the string itself doesn't specify a help-echo, |
| @@ -25589,30 +25571,30 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25589 | struct glyph_row *r | 25571 | struct glyph_row *r |
| 25590 | = MATRIX_ROW (w->current_matrix, vpos); | 25572 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25591 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25573 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25592 | EMACS_INT pos = string_buffer_position (w, object, start); | 25574 | EMACS_INT p = string_buffer_position (w, obj, start); |
| 25593 | if (pos > 0) | 25575 | if (p > 0) |
| 25594 | { | 25576 | { |
| 25595 | help = Fget_char_property (make_number (pos), | 25577 | help = Fget_char_property (make_number (p), |
| 25596 | Qhelp_echo, w->buffer); | 25578 | Qhelp_echo, w->buffer); |
| 25597 | if (!NILP (help)) | 25579 | if (!NILP (help)) |
| 25598 | { | 25580 | { |
| 25599 | charpos = pos; | 25581 | charpos = p; |
| 25600 | object = w->buffer; | 25582 | obj = w->buffer; |
| 25601 | } | 25583 | } |
| 25602 | } | 25584 | } |
| 25603 | } | 25585 | } |
| 25604 | } | 25586 | } |
| 25605 | else if (BUFFERP (object) | 25587 | else if (BUFFERP (obj) |
| 25606 | && charpos >= BEGV | 25588 | && charpos >= BEGV |
| 25607 | && charpos < ZV) | 25589 | && charpos < ZV) |
| 25608 | help = Fget_text_property (make_number (charpos), Qhelp_echo, | 25590 | help = Fget_text_property (make_number (charpos), Qhelp_echo, |
| 25609 | object); | 25591 | obj); |
| 25610 | 25592 | ||
| 25611 | if (!NILP (help)) | 25593 | if (!NILP (help)) |
| 25612 | { | 25594 | { |
| 25613 | help_echo_string = help; | 25595 | help_echo_string = help; |
| 25614 | help_echo_window = window; | 25596 | help_echo_window = window; |
| 25615 | help_echo_object = object; | 25597 | help_echo_object = obj; |
| 25616 | help_echo_pos = charpos; | 25598 | help_echo_pos = charpos; |
| 25617 | } | 25599 | } |
| 25618 | } | 25600 | } |
| @@ -25628,16 +25610,16 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25628 | 25610 | ||
| 25629 | if (NILP (pointer)) | 25611 | if (NILP (pointer)) |
| 25630 | { | 25612 | { |
| 25631 | Lisp_Object object = glyph->object; | 25613 | Lisp_Object obj = glyph->object; |
| 25632 | EMACS_INT charpos = glyph->charpos; | 25614 | EMACS_INT charpos = glyph->charpos; |
| 25633 | 25615 | ||
| 25634 | /* Try text properties. */ | 25616 | /* Try text properties. */ |
| 25635 | if (STRINGP (object) | 25617 | if (STRINGP (obj) |
| 25636 | && charpos >= 0 | 25618 | && charpos >= 0 |
| 25637 | && charpos < SCHARS (object)) | 25619 | && charpos < SCHARS (obj)) |
| 25638 | { | 25620 | { |
| 25639 | pointer = Fget_text_property (make_number (charpos), | 25621 | pointer = Fget_text_property (make_number (charpos), |
| 25640 | Qpointer, object); | 25622 | Qpointer, obj); |
| 25641 | if (NILP (pointer)) | 25623 | if (NILP (pointer)) |
| 25642 | { | 25624 | { |
| 25643 | /* If the string itself doesn't specify a pointer, | 25625 | /* If the string itself doesn't specify a pointer, |
| @@ -25645,18 +25627,17 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 25645 | struct glyph_row *r | 25627 | struct glyph_row *r |
| 25646 | = MATRIX_ROW (w->current_matrix, vpos); | 25628 | = MATRIX_ROW (w->current_matrix, vpos); |
| 25647 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); | 25629 | EMACS_INT start = MATRIX_ROW_START_CHARPOS (r); |
| 25648 | EMACS_INT pos = string_buffer_position (w, object, | 25630 | EMACS_INT p = string_buffer_position (w, obj, start); |
| 25649 | start); | 25631 | if (p > 0) |
| 25650 | if (pos > 0) | 25632 | pointer = Fget_char_property (make_number (p), |
| 25651 | pointer = Fget_char_property (make_number (pos), | ||
| 25652 | Qpointer, w->buffer); | 25633 | Qpointer, w->buffer); |
| 25653 | } | 25634 | } |
| 25654 | } | 25635 | } |
| 25655 | else if (BUFFERP (object) | 25636 | else if (BUFFERP (obj) |
| 25656 | && charpos >= BEGV | 25637 | && charpos >= BEGV |
| 25657 | && charpos < ZV) | 25638 | && charpos < ZV) |
| 25658 | pointer = Fget_text_property (make_number (charpos), | 25639 | pointer = Fget_text_property (make_number (charpos), |
| 25659 | Qpointer, object); | 25640 | Qpointer, obj); |
| 25660 | } | 25641 | } |
| 25661 | } | 25642 | } |
| 25662 | #endif /* HAVE_WINDOW_SYSTEM */ | 25643 | #endif /* HAVE_WINDOW_SYSTEM */ |
| @@ -26177,10 +26158,10 @@ expose_frame (struct frame *f, int x, int y, int w, int h) | |||
| 26177 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); | 26158 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); |
| 26178 | if (f == hlinfo->mouse_face_mouse_frame) | 26159 | if (f == hlinfo->mouse_face_mouse_frame) |
| 26179 | { | 26160 | { |
| 26180 | int x = hlinfo->mouse_face_mouse_x; | 26161 | int mouse_x = hlinfo->mouse_face_mouse_x; |
| 26181 | int y = hlinfo->mouse_face_mouse_y; | 26162 | int mouse_y = hlinfo->mouse_face_mouse_y; |
| 26182 | clear_mouse_face (hlinfo); | 26163 | clear_mouse_face (hlinfo); |
| 26183 | note_mouse_highlight (f, x, y); | 26164 | note_mouse_highlight (f, mouse_x, mouse_y); |
| 26184 | } | 26165 | } |
| 26185 | } | 26166 | } |
| 26186 | } | 26167 | } |
diff --git a/src/xrdb.c b/src/xrdb.c index 01714900752..9fb3f3474fb 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/>. */ | |||
| 38 | #endif | 38 | #endif |
| 39 | #include <sys/stat.h> | 39 | #include <sys/stat.h> |
| 40 | 40 | ||
| 41 | #if !defined(S_ISDIR) && defined(S_IFDIR) | ||
| 42 | #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #include "lisp.h" | 41 | #include "lisp.h" |
| 46 | 42 | ||
| 47 | #ifdef USE_MOTIF | 43 | #ifdef USE_MOTIF |
| @@ -764,4 +760,3 @@ main (argc, argv) | |||
| 764 | XCloseDisplay (display); | 760 | XCloseDisplay (display); |
| 765 | } | 761 | } |
| 766 | #endif /* TESTRM */ | 762 | #endif /* TESTRM */ |
| 767 | |||