diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog.10 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.12 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.4 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.5 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.7 | 2 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 22 | ||||
| -rw-r--r-- | src/emacs-module.c | 2 | ||||
| -rw-r--r-- | src/emacsgtkfixed.c | 2 | ||||
| -rw-r--r-- | src/eval.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/frame.h | 2 | ||||
| -rw-r--r-- | src/gnutls.c | 1 | ||||
| -rw-r--r-- | src/keyboard.h | 2 | ||||
| -rw-r--r-- | src/lread.c | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 5 | ||||
| -rw-r--r-- | src/scroll.c | 2 | ||||
| -rw-r--r-- | src/sysdep.c | 92 | ||||
| -rw-r--r-- | src/termhooks.h | 2 | ||||
| -rw-r--r-- | src/w32inevt.c | 2 | ||||
| -rw-r--r-- | src/w32proc.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 1 | ||||
| -rw-r--r-- | src/xsmfns.c | 4 |
23 files changed, 102 insertions, 57 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 1bd822d492f..f5eb88be961 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -3958,7 +3958,7 @@ | |||
| 3958 | 3958 | ||
| 3959 | 2006-05-12 Chong Yidong <cyd@stupidchicken.com> | 3959 | 2006-05-12 Chong Yidong <cyd@stupidchicken.com> |
| 3960 | 3960 | ||
| 3961 | * intervals.c (set_point_both): Fix mixup before before and after | 3961 | * intervals.c (set_point_both): Fix mixup before and after |
| 3962 | in variable names. | 3962 | in variable names. |
| 3963 | 3963 | ||
| 3964 | * editfns.c (Fline_beginning_position): Inhibit point-motion hooks | 3964 | * editfns.c (Fline_beginning_position): Inhibit point-motion hooks |
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12 index 61251bfbb47..2291e85e8cb 100644 --- a/src/ChangeLog.12 +++ b/src/ChangeLog.12 | |||
| @@ -3348,7 +3348,7 @@ | |||
| 3348 | with plain -g rather than with -g3, and they need the duplicate | 3348 | with plain -g rather than with -g3, and they need the duplicate |
| 3349 | definitions for .gdbinit to work; see <https://bugs.gnu.org/12814#26>. | 3349 | definitions for .gdbinit to work; see <https://bugs.gnu.org/12814#26>. |
| 3350 | * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): | 3350 | * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): |
| 3351 | Define as macros, as well as as enums or as constants. | 3351 | Define as macros, as well as enums or constants. |
| 3352 | 3352 | ||
| 3353 | 2012-11-06 Jan Djärv <jan.h.d@swipnet.se> | 3353 | 2012-11-06 Jan Djärv <jan.h.d@swipnet.se> |
| 3354 | 3354 | ||
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4 index 2935ee52cca..70865535e96 100644 --- a/src/ChangeLog.4 +++ b/src/ChangeLog.4 | |||
| @@ -3381,7 +3381,7 @@ | |||
| 3381 | some external definitions. | 3381 | some external definitions. |
| 3382 | (Ffile_attributes) [MSDOS]: Set execute bits from file name. | 3382 | (Ffile_attributes) [MSDOS]: Set execute bits from file name. |
| 3383 | (Ffile_name_all_completions) [FILE_SYSTEM_CASE]: Convert | 3383 | (Ffile_name_all_completions) [FILE_SYSTEM_CASE]: Convert |
| 3384 | case of file name as as indicated by conditional. | 3384 | case of file name as indicated by conditional. |
| 3385 | 3385 | ||
| 3386 | * emacs.c (main) [MSDOS]: Call init_environment. Set file types to | 3386 | * emacs.c (main) [MSDOS]: Call init_environment. Set file types to |
| 3387 | binary for all files. Call init_dosfns. | 3387 | binary for all files. Call init_dosfns. |
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5 index 489ccfa5323..99d25163a4d 100644 --- a/src/ChangeLog.5 +++ b/src/ChangeLog.5 | |||
| @@ -1372,7 +1372,7 @@ | |||
| 1372 | 1995-04-11 Richard Stallman <rms@mole.gnu.ai.mit.edu> | 1372 | 1995-04-11 Richard Stallman <rms@mole.gnu.ai.mit.edu> |
| 1373 | 1373 | ||
| 1374 | * keyboard.c (read_char): Rearrange code so that getcjmp is set | 1374 | * keyboard.c (read_char): Rearrange code so that getcjmp is set |
| 1375 | only around sit_for and kbd_buffer_get_event, and | 1375 | only around sit_for and kbd_buffer_get_event, |
| 1376 | and polling is stopped only around the kbd_buffer_get_event call. | 1376 | and polling is stopped only around the kbd_buffer_get_event call. |
| 1377 | (Ftrack_mouse, tracking_off, read_char): Don't call prepare_menu_bars. | 1377 | (Ftrack_mouse, tracking_off, read_char): Don't call prepare_menu_bars. |
| 1378 | 1378 | ||
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index 32472ac074c..a1a9fb77157 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 | |||
| @@ -3381,7 +3381,7 @@ | |||
| 3381 | 1998-02-15 Richard Stallman <rms@psilocin.gnu.org> | 3381 | 1998-02-15 Richard Stallman <rms@psilocin.gnu.org> |
| 3382 | 3382 | ||
| 3383 | * minibuf.c (read_minibuf): Do use DEFALT in place of empty input | 3383 | * minibuf.c (read_minibuf): Do use DEFALT in place of empty input |
| 3384 | when when expflag is nonzero. | 3384 | when expflag is nonzero. |
| 3385 | (Fread_no_blanks_input): Arg INIT renamed to INITIAL. | 3385 | (Fread_no_blanks_input): Arg INIT renamed to INITIAL. |
| 3386 | 3386 | ||
| 3387 | 1998-02-14 Richard Stallman <rms@psilocin.gnu.org> | 3387 | 1998-02-14 Richard Stallman <rms@psilocin.gnu.org> |
diff --git a/src/buffer.c b/src/buffer.c index 76670b89545..cc6021bfb5d 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -6054,7 +6054,7 @@ and is the visited file's modification time, as of that time. If the | |||
| 6054 | modification time of the most recent save is different, this entry is | 6054 | modification time of the most recent save is different, this entry is |
| 6055 | obsolete. | 6055 | obsolete. |
| 6056 | 6056 | ||
| 6057 | An entry (t . 0) means means the buffer was previously unmodified but | 6057 | An entry (t . 0) means the buffer was previously unmodified but |
| 6058 | its time stamp was unknown because it was not associated with a file. | 6058 | its time stamp was unknown because it was not associated with a file. |
| 6059 | An entry (t . -1) is similar, except that it means the buffer's visited | 6059 | An entry (t . -1) is similar, except that it means the buffer's visited |
| 6060 | file did not exist. | 6060 | file did not exist. |
diff --git a/src/dispnew.c b/src/dispnew.c index ad59704a168..cb32f09b7c6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -66,7 +66,7 @@ struct dim | |||
| 66 | 66 | ||
| 67 | /* Function prototypes. */ | 67 | /* Function prototypes. */ |
| 68 | 68 | ||
| 69 | static void update_frame_line (struct frame *, int); | 69 | static void update_frame_line (struct frame *, int, bool); |
| 70 | static int required_matrix_height (struct window *); | 70 | static int required_matrix_height (struct window *); |
| 71 | static int required_matrix_width (struct window *); | 71 | static int required_matrix_width (struct window *); |
| 72 | static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); | 72 | static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); |
| @@ -88,7 +88,7 @@ static void check_matrix_pointers (struct glyph_matrix *, | |||
| 88 | static void mirror_line_dance (struct window *, int, int, int *, char *); | 88 | static void mirror_line_dance (struct window *, int, int, int *, char *); |
| 89 | static bool update_window_tree (struct window *, bool); | 89 | static bool update_window_tree (struct window *, bool); |
| 90 | static bool update_window (struct window *, bool); | 90 | static bool update_window (struct window *, bool); |
| 91 | static bool update_frame_1 (struct frame *, bool, bool, bool); | 91 | static bool update_frame_1 (struct frame *, bool, bool, bool, bool); |
| 92 | static bool scrolling (struct frame *); | 92 | static bool scrolling (struct frame *); |
| 93 | static void set_window_cursor_after_update (struct window *); | 93 | static void set_window_cursor_after_update (struct window *); |
| 94 | static void adjust_frame_glyphs_for_window_redisplay (struct frame *); | 94 | static void adjust_frame_glyphs_for_window_redisplay (struct frame *); |
| @@ -3121,7 +3121,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p) | |||
| 3121 | 3121 | ||
| 3122 | /* Update the display. */ | 3122 | /* Update the display. */ |
| 3123 | update_begin (f); | 3123 | update_begin (f); |
| 3124 | paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1); | 3124 | paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false); |
| 3125 | update_end (f); | 3125 | update_end (f); |
| 3126 | 3126 | ||
| 3127 | if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) | 3127 | if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) |
| @@ -3174,7 +3174,7 @@ update_frame_with_menu (struct frame *f, int row, int col) | |||
| 3174 | cursor_at_point_p = !(row >= 0 && col >= 0); | 3174 | cursor_at_point_p = !(row >= 0 && col >= 0); |
| 3175 | /* Force update_frame_1 not to stop due to pending input, and not | 3175 | /* Force update_frame_1 not to stop due to pending input, and not |
| 3176 | try scrolling. */ | 3176 | try scrolling. */ |
| 3177 | paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p); | 3177 | paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p, true); |
| 3178 | /* ROW and COL tell us where in the menu to position the cursor, so | 3178 | /* ROW and COL tell us where in the menu to position the cursor, so |
| 3179 | that screen readers know the active region on the screen. */ | 3179 | that screen readers know the active region on the screen. */ |
| 3180 | if (!cursor_at_point_p) | 3180 | if (!cursor_at_point_p) |
| @@ -4474,7 +4474,7 @@ scrolling_window (struct window *w, bool header_line_p) | |||
| 4474 | 4474 | ||
| 4475 | static bool | 4475 | static bool |
| 4476 | update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, | 4476 | update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, |
| 4477 | bool set_cursor_p) | 4477 | bool set_cursor_p, bool updating_menu_p) |
| 4478 | { | 4478 | { |
| 4479 | /* Frame matrices to work on. */ | 4479 | /* Frame matrices to work on. */ |
| 4480 | struct glyph_matrix *current_matrix = f->current_matrix; | 4480 | struct glyph_matrix *current_matrix = f->current_matrix; |
| @@ -4513,7 +4513,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, | |||
| 4513 | 4513 | ||
| 4514 | /* Update the individual lines as needed. Do bottom line first. */ | 4514 | /* Update the individual lines as needed. Do bottom line first. */ |
| 4515 | if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1)) | 4515 | if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1)) |
| 4516 | update_frame_line (f, desired_matrix->nrows - 1); | 4516 | update_frame_line (f, desired_matrix->nrows - 1, updating_menu_p); |
| 4517 | 4517 | ||
| 4518 | /* Now update the rest of the lines. */ | 4518 | /* Now update the rest of the lines. */ |
| 4519 | for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++) | 4519 | for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++) |
| @@ -4539,7 +4539,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, | |||
| 4539 | if (!force_p && (i - 1) % preempt_count == 0) | 4539 | if (!force_p && (i - 1) % preempt_count == 0) |
| 4540 | detect_input_pending_ignore_squeezables (); | 4540 | detect_input_pending_ignore_squeezables (); |
| 4541 | 4541 | ||
| 4542 | update_frame_line (f, i); | 4542 | update_frame_line (f, i, updating_menu_p); |
| 4543 | } | 4543 | } |
| 4544 | } | 4544 | } |
| 4545 | 4545 | ||
| @@ -4775,7 +4775,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct | |||
| 4775 | /* Perform a frame-based update on line VPOS in frame FRAME. */ | 4775 | /* Perform a frame-based update on line VPOS in frame FRAME. */ |
| 4776 | 4776 | ||
| 4777 | static void | 4777 | static void |
| 4778 | update_frame_line (struct frame *f, int vpos) | 4778 | update_frame_line (struct frame *f, int vpos, bool updating_menu_p) |
| 4779 | { | 4779 | { |
| 4780 | struct glyph *obody, *nbody, *op1, *op2, *np1, *nend; | 4780 | struct glyph *obody, *nbody, *op1, *op2, *np1, *nend; |
| 4781 | int tem; | 4781 | int tem; |
| @@ -4814,6 +4814,12 @@ update_frame_line (struct frame *f, int vpos) | |||
| 4814 | current_row->enabled_p = true; | 4814 | current_row->enabled_p = true; |
| 4815 | current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA]; | 4815 | current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA]; |
| 4816 | 4816 | ||
| 4817 | /* For some reason, cursor is sometimes moved behind our back when a | ||
| 4818 | frame with a TTY menu is redrawn. Homing the cursor as below | ||
| 4819 | fixes that. */ | ||
| 4820 | if (updating_menu_p) | ||
| 4821 | cursor_to (f, 0, 0); | ||
| 4822 | |||
| 4817 | /* If desired line is empty, just clear the line. */ | 4823 | /* If desired line is empty, just clear the line. */ |
| 4818 | if (!desired_row->enabled_p) | 4824 | if (!desired_row->enabled_p) |
| 4819 | { | 4825 | { |
diff --git a/src/emacs-module.c b/src/emacs-module.c index e5833a1d1f0..6bc91a7e06a 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -983,7 +983,7 @@ value_to_lisp (emacs_value v) | |||
| 983 | return o; | 983 | return o; |
| 984 | } | 984 | } |
| 985 | 985 | ||
| 986 | /* Attempt to convert O to an emacs_value. Do not do any checking or | 986 | /* Attempt to convert O to an emacs_value. Do not do any checking |
| 987 | or allocate any storage; the caller should prevent or detect | 987 | or allocate any storage; the caller should prevent or detect |
| 988 | any resulting bit pattern that is not a valid emacs_value. */ | 988 | any resulting bit pattern that is not a valid emacs_value. */ |
| 989 | static emacs_value | 989 | static emacs_value |
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 1a00e0f6806..4243b3ffd9d 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -81,7 +81,7 @@ emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget, | |||
| 81 | additional case for an xwidget view. | 81 | additional case for an xwidget view. |
| 82 | 82 | ||
| 83 | It would be nicer if the bse class method could be called first, | 83 | It would be nicer if the bse class method could be called first, |
| 84 | and the the xview modification only would remain here. It wasn't | 84 | and the xview modification only would remain here. It wasn't |
| 85 | possible to solve it that way yet. */ | 85 | possible to solve it that way yet. */ |
| 86 | EmacsFixedClass *klass; | 86 | EmacsFixedClass *klass; |
| 87 | GtkWidgetClass *parent_class; | 87 | GtkWidgetClass *parent_class; |
diff --git a/src/eval.c b/src/eval.c index acda64e7f04..52e4c96d4b2 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2681,7 +2681,7 @@ call8 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, | |||
| 2681 | } | 2681 | } |
| 2682 | 2682 | ||
| 2683 | DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, | 2683 | DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, |
| 2684 | doc: /* Non-nil if OBJECT is a function. */) | 2684 | doc: /* Return t if OBJECT is a function. */) |
| 2685 | (Lisp_Object object) | 2685 | (Lisp_Object object) |
| 2686 | { | 2686 | { |
| 2687 | if (FUNCTIONP (object)) | 2687 | if (FUNCTIONP (object)) |
diff --git a/src/fileio.c b/src/fileio.c index d460f123a82..d8ecccd7930 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -125,7 +125,7 @@ static mode_t auto_save_mode_bits; | |||
| 125 | static bool auto_save_error_occurred; | 125 | static bool auto_save_error_occurred; |
| 126 | 126 | ||
| 127 | /* If VALID_TIMESTAMP_FILE_SYSTEM, then TIMESTAMP_FILE_SYSTEM is the device | 127 | /* If VALID_TIMESTAMP_FILE_SYSTEM, then TIMESTAMP_FILE_SYSTEM is the device |
| 128 | number of a file system where time stamps were observed to to work. */ | 128 | number of a file system where time stamps were observed to work. */ |
| 129 | static bool valid_timestamp_file_system; | 129 | static bool valid_timestamp_file_system; |
| 130 | static dev_t timestamp_file_system; | 130 | static dev_t timestamp_file_system; |
| 131 | 131 | ||
diff --git a/src/frame.h b/src/frame.h index d1c21da4d2a..e610fc768d3 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -447,7 +447,7 @@ struct frame | |||
| 447 | 447 | ||
| 448 | /* New text height and width for pending size change. 0 if no change | 448 | /* New text height and width for pending size change. 0 if no change |
| 449 | pending. These values represent pixels or canonical character units | 449 | pending. These values represent pixels or canonical character units |
| 450 | according to the value of new_pixelwise and correlate to the the | 450 | according to the value of new_pixelwise and correlate to the |
| 451 | text width/height of the frame. */ | 451 | text width/height of the frame. */ |
| 452 | int new_width, new_height; | 452 | int new_width, new_height; |
| 453 | 453 | ||
diff --git a/src/gnutls.c b/src/gnutls.c index d7a1399f106..b55d1b9289f 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -2472,7 +2472,6 @@ syms_of_gnutls (void) | |||
| 2472 | DEFSYM (QCcipher_blocksize, ":cipher-blocksize"); | 2472 | DEFSYM (QCcipher_blocksize, ":cipher-blocksize"); |
| 2473 | DEFSYM (QCcipher_keysize, ":cipher-keysize"); | 2473 | DEFSYM (QCcipher_keysize, ":cipher-keysize"); |
| 2474 | DEFSYM (QCcipher_tagsize, ":cipher-tagsize"); | 2474 | DEFSYM (QCcipher_tagsize, ":cipher-tagsize"); |
| 2475 | DEFSYM (QCcipher_keysize, ":cipher-keysize"); | ||
| 2476 | DEFSYM (QCcipher_ivsize, ":cipher-ivsize"); | 2475 | DEFSYM (QCcipher_ivsize, ":cipher-ivsize"); |
| 2477 | 2476 | ||
| 2478 | DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id"); | 2477 | DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id"); |
diff --git a/src/keyboard.h b/src/keyboard.h index a2a5f8f21d9..662d8e4a4f6 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -65,7 +65,7 @@ INLINE_HEADER_BEGIN | |||
| 65 | as soon as a complete key arrives from some KBOARD or other, | 65 | as soon as a complete key arrives from some KBOARD or other, |
| 66 | Emacs starts executing that key's binding. It switches to the | 66 | Emacs starts executing that key's binding. It switches to the |
| 67 | single-kboard state for the execution of that command, | 67 | single-kboard state for the execution of that command, |
| 68 | so that that command can get input only from its own KBOARD. | 68 | so that the command can get input only from its own KBOARD. |
| 69 | 69 | ||
| 70 | While in the single-kboard state, read_char can consider input only | 70 | While in the single-kboard state, read_char can consider input only |
| 71 | from the current KBOARD. If events come from other KBOARDs, they | 71 | from the current KBOARD. If events come from other KBOARDs, they |
diff --git a/src/lread.c b/src/lread.c index 6bc93b14817..33da8667228 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4834,7 +4834,7 @@ to the specified file name if a suffix is allowed or required. */); | |||
| 4834 | build_pure_c_string (".el")); | 4834 | build_pure_c_string (".el")); |
| 4835 | #endif | 4835 | #endif |
| 4836 | DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, | 4836 | DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, |
| 4837 | doc: /* Suffix of loadable module file, or nil of modules are not supported. */); | 4837 | doc: /* Suffix of loadable module file, or nil if modules are not supported. */); |
| 4838 | #ifdef HAVE_MODULES | 4838 | #ifdef HAVE_MODULES |
| 4839 | Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX); | 4839 | Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX); |
| 4840 | #else | 4840 | #else |
diff --git a/src/nsterm.m b/src/nsterm.m index f0b6a70dae3..0b43c04c0b7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3715,7 +3715,7 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) | |||
| 3715 | /* Currently on NS img->mask is always 0. Since | 3715 | /* Currently on NS img->mask is always 0. Since |
| 3716 | get_window_cursor_type specifies a hollow box cursor when on | 3716 | get_window_cursor_type specifies a hollow box cursor when on |
| 3717 | a non-masked image we never reach this clause. But we put it | 3717 | a non-masked image we never reach this clause. But we put it |
| 3718 | in in anticipation of better support for image masks on | 3718 | in, in anticipation of better support for image masks on |
| 3719 | NS. */ | 3719 | NS. */ |
| 3720 | tdCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f); | 3720 | tdCol = ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f); |
| 3721 | } | 3721 | } |
| @@ -6893,6 +6893,9 @@ not_in_argv (NSString *arg) | |||
| 6893 | NSTRACE_RECT ("[sender frame]", [sender frame]); | 6893 | NSTRACE_RECT ("[sender frame]", [sender frame]); |
| 6894 | NSTRACE_FSTYPE ("fs_state", fs_state); | 6894 | NSTRACE_FSTYPE ("fs_state", fs_state); |
| 6895 | 6895 | ||
| 6896 | if (!FRAME_LIVE_P (emacsframe)) | ||
| 6897 | return frameSize; | ||
| 6898 | |||
| 6896 | if (fs_state == FULLSCREEN_MAXIMIZED | 6899 | if (fs_state == FULLSCREEN_MAXIMIZED |
| 6897 | && (maximized_width != (int)frameSize.width | 6900 | && (maximized_width != (int)frameSize.width |
| 6898 | || maximized_height != (int)frameSize.height)) | 6901 | || maximized_height != (int)frameSize.height)) |
diff --git a/src/scroll.c b/src/scroll.c index 7004dcd9aea..c6e0cfd7e21 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -457,7 +457,7 @@ calculate_direct_scrolling (struct frame *frame, | |||
| 457 | if (baud_rate <= 0) | 457 | if (baud_rate <= 0) |
| 458 | extra_cost = 1; | 458 | extra_cost = 1; |
| 459 | 459 | ||
| 460 | /* Overhead of setting the scroll window, plus the extra cost | 460 | /* Overhead of setting the scroll window, plus the extra |
| 461 | cost of scrolling by a distance of one. The extra cost is | 461 | cost of scrolling by a distance of one. The extra cost is |
| 462 | added once for consistency with the cost vectors */ | 462 | added once for consistency with the cost vectors */ |
| 463 | scroll_overhead | 463 | scroll_overhead |
diff --git a/src/sysdep.c b/src/sysdep.c index 8291a606bea..dd0062b6f04 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -221,10 +221,29 @@ init_standard_fds (void) | |||
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | /* Return the current working directory. The result should be freed | 223 | /* Return the current working directory. The result should be freed |
| 224 | with 'free'. Return NULL on errors. */ | 224 | with 'free'. Return NULL (setting errno) on errors. If the |
| 225 | char * | 225 | current directory is unreachable, return either NULL or a string |
| 226 | emacs_get_current_dir_name (void) | 226 | beginning with '('. */ |
| 227 | |||
| 228 | static char * | ||
| 229 | get_current_dir_name_or_unreachable (void) | ||
| 227 | { | 230 | { |
| 231 | /* Use malloc, not xmalloc, since this function can be called before | ||
| 232 | the xmalloc exception machinery is available. */ | ||
| 233 | |||
| 234 | char *pwd; | ||
| 235 | |||
| 236 | /* The maximum size of a directory name, including the terminating null. | ||
| 237 | Leave room so that the caller can append a trailing slash. */ | ||
| 238 | ptrdiff_t dirsize_max = min (PTRDIFF_MAX, SIZE_MAX) - 1; | ||
| 239 | |||
| 240 | /* The maximum size of a buffer for a file name, including the | ||
| 241 | terminating null. This is bounded by MAXPATHLEN, if available. */ | ||
| 242 | ptrdiff_t bufsize_max = dirsize_max; | ||
| 243 | #ifdef MAXPATHLEN | ||
| 244 | bufsize_max = min (bufsize_max, MAXPATHLEN); | ||
| 245 | #endif | ||
| 246 | |||
| 228 | # if HAVE_GET_CURRENT_DIR_NAME && !BROKEN_GET_CURRENT_DIR_NAME | 247 | # if HAVE_GET_CURRENT_DIR_NAME && !BROKEN_GET_CURRENT_DIR_NAME |
| 229 | # ifdef HYBRID_MALLOC | 248 | # ifdef HYBRID_MALLOC |
| 230 | bool use_libc = bss_sbrk_did_unexec; | 249 | bool use_libc = bss_sbrk_did_unexec; |
| @@ -233,65 +252,80 @@ emacs_get_current_dir_name (void) | |||
| 233 | # endif | 252 | # endif |
| 234 | if (use_libc) | 253 | if (use_libc) |
| 235 | { | 254 | { |
| 236 | /* GNU/Linux get_current_dir_name can return a string starting | 255 | /* For an unreachable directory, this returns a string that starts |
| 237 | with "(unreachable)" (Bug#27871). */ | 256 | with "(unreachable)"; see Bug#27871. */ |
| 238 | char *wd = get_current_dir_name (); | 257 | pwd = get_current_dir_name (); |
| 239 | if (wd && ! (IS_DIRECTORY_SEP (*wd) || (*wd && IS_DEVICE_SEP (wd[1])))) | 258 | if (pwd) |
| 240 | { | 259 | { |
| 241 | free (wd); | 260 | if (strlen (pwd) < dirsize_max) |
| 242 | errno = ENOENT; | 261 | return pwd; |
| 243 | return NULL; | 262 | free (pwd); |
| 263 | errno = ERANGE; | ||
| 244 | } | 264 | } |
| 245 | return wd; | 265 | return NULL; |
| 246 | } | 266 | } |
| 247 | # endif | 267 | # endif |
| 248 | 268 | ||
| 249 | char *buf; | 269 | size_t pwdlen; |
| 250 | char *pwd = getenv ("PWD"); | ||
| 251 | struct stat dotstat, pwdstat; | 270 | struct stat dotstat, pwdstat; |
| 271 | pwd = getenv ("PWD"); | ||
| 272 | |||
| 252 | /* If PWD is accurate, use it instead of calling getcwd. PWD is | 273 | /* If PWD is accurate, use it instead of calling getcwd. PWD is |
| 253 | sometimes a nicer name, and using it may avoid a fatal error if a | 274 | sometimes a nicer name, and using it may avoid a fatal error if a |
| 254 | parent directory is searchable but not readable. */ | 275 | parent directory is searchable but not readable. */ |
| 255 | if (pwd | 276 | if (pwd |
| 256 | && (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1]))) | 277 | && (pwdlen = strlen (pwd)) < bufsize_max |
| 278 | && IS_DIRECTORY_SEP (pwd[pwdlen && IS_DEVICE_SEP (pwd[1]) ? 2 : 0]) | ||
| 257 | && stat (pwd, &pwdstat) == 0 | 279 | && stat (pwd, &pwdstat) == 0 |
| 258 | && stat (".", &dotstat) == 0 | 280 | && stat (".", &dotstat) == 0 |
| 259 | && dotstat.st_ino == pwdstat.st_ino | 281 | && dotstat.st_ino == pwdstat.st_ino |
| 260 | && dotstat.st_dev == pwdstat.st_dev | 282 | && dotstat.st_dev == pwdstat.st_dev) |
| 261 | #ifdef MAXPATHLEN | ||
| 262 | && strlen (pwd) < MAXPATHLEN | ||
| 263 | #endif | ||
| 264 | ) | ||
| 265 | { | 283 | { |
| 266 | buf = malloc (strlen (pwd) + 1); | 284 | char *buf = malloc (pwdlen + 1); |
| 267 | if (!buf) | 285 | if (!buf) |
| 268 | return NULL; | 286 | return NULL; |
| 269 | strcpy (buf, pwd); | 287 | return memcpy (buf, pwd, pwdlen + 1); |
| 270 | } | 288 | } |
| 271 | else | 289 | else |
| 272 | { | 290 | { |
| 273 | size_t buf_size = 1024; | 291 | ptrdiff_t buf_size = min (bufsize_max, 1024); |
| 274 | buf = malloc (buf_size); | 292 | char *buf = malloc (buf_size); |
| 275 | if (!buf) | 293 | if (!buf) |
| 276 | return NULL; | 294 | return NULL; |
| 277 | for (;;) | 295 | for (;;) |
| 278 | { | 296 | { |
| 279 | if (getcwd (buf, buf_size) == buf) | 297 | if (getcwd (buf, buf_size) == buf) |
| 280 | break; | 298 | return buf; |
| 281 | if (errno != ERANGE) | 299 | int getcwd_errno = errno; |
| 300 | if (getcwd_errno != ERANGE || buf_size == bufsize_max) | ||
| 282 | { | 301 | { |
| 283 | int tmp_errno = errno; | ||
| 284 | free (buf); | 302 | free (buf); |
| 285 | errno = tmp_errno; | 303 | errno = getcwd_errno; |
| 286 | return NULL; | 304 | return NULL; |
| 287 | } | 305 | } |
| 288 | buf_size *= 2; | 306 | buf_size = buf_size <= bufsize_max / 2 ? 2 * buf_size : bufsize_max; |
| 289 | buf = realloc (buf, buf_size); | 307 | buf = realloc (buf, buf_size); |
| 290 | if (!buf) | 308 | if (!buf) |
| 291 | return NULL; | 309 | return NULL; |
| 292 | } | 310 | } |
| 293 | } | 311 | } |
| 294 | return buf; | 312 | } |
| 313 | |||
| 314 | /* Return the current working directory. The result should be freed | ||
| 315 | with 'free'. Return NULL (setting errno) on errors; an unreachable | ||
| 316 | directory (e.g., its name starts with '(') counts as an error. */ | ||
| 317 | |||
| 318 | char * | ||
| 319 | emacs_get_current_dir_name (void) | ||
| 320 | { | ||
| 321 | char *dir = get_current_dir_name_or_unreachable (); | ||
| 322 | if (dir && *dir == '(') | ||
| 323 | { | ||
| 324 | free (dir); | ||
| 325 | errno = ENOENT; | ||
| 326 | return NULL; | ||
| 327 | } | ||
| 328 | return dir; | ||
| 295 | } | 329 | } |
| 296 | 330 | ||
| 297 | 331 | ||
diff --git a/src/termhooks.h b/src/termhooks.h index b5171bf1229..dd6044aabd5 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -625,7 +625,7 @@ struct terminal | |||
| 625 | TERMINAL indicates which terminal device to read from. Input | 625 | TERMINAL indicates which terminal device to read from. Input |
| 626 | events should be read into HOLD_QUIT. | 626 | events should be read into HOLD_QUIT. |
| 627 | 627 | ||
| 628 | A positive return value indicates that that many input events | 628 | A positive return value N indicates that N input events |
| 629 | were read into BUF. | 629 | were read into BUF. |
| 630 | Zero means no events were immediately available. | 630 | Zero means no events were immediately available. |
| 631 | A value of -1 means a transient read error, while -2 indicates | 631 | A value of -1 means a transient read error, while -2 indicates |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 0b0f3f9e669..9d79bd46fb3 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -526,7 +526,7 @@ do_mouse_event (MOUSE_EVENT_RECORD *event, | |||
| 526 | help_echo_window, help_echo_object, | 526 | help_echo_window, help_echo_object, |
| 527 | help_echo_pos); | 527 | help_echo_pos); |
| 528 | } | 528 | } |
| 529 | /* We already called kbd_buffer_store_event, so indicate the | 529 | /* We already called kbd_buffer_store_event, so indicate to |
| 530 | the caller it shouldn't. */ | 530 | the caller it shouldn't. */ |
| 531 | return 0; | 531 | return 0; |
| 532 | } | 532 | } |
diff --git a/src/w32proc.c b/src/w32proc.c index ca59f995e63..0046c9e85dc 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -838,7 +838,7 @@ alarm (int seconds) | |||
| 838 | updates the status of the read accordingly, and signals the 2nd | 838 | updates the status of the read accordingly, and signals the 2nd |
| 839 | event object, char_avail, on whose handle sys_select is | 839 | event object, char_avail, on whose handle sys_select is |
| 840 | waiting. This tells sys_select that the file descriptor | 840 | waiting. This tells sys_select that the file descriptor |
| 841 | allocated for the subprocess or the the stream is ready to be | 841 | allocated for the subprocess or the stream is ready to be |
| 842 | read from. | 842 | read from. |
| 843 | 843 | ||
| 844 | When the subprocess exits or the network/serial stream is closed, | 844 | When the subprocess exits or the network/serial stream is closed, |
diff --git a/src/xdisp.c b/src/xdisp.c index 141275f15a0..b14b7daf2b0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -17036,6 +17036,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 17036 | = try_window_reusing_current_matrix (w))) | 17036 | = try_window_reusing_current_matrix (w))) |
| 17037 | { | 17037 | { |
| 17038 | IF_DEBUG (debug_method_add (w, "1")); | 17038 | IF_DEBUG (debug_method_add (w, "1")); |
| 17039 | clear_glyph_matrix (w->desired_matrix); | ||
| 17039 | if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) | 17040 | if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) |
| 17040 | /* -1 means we need to scroll. | 17041 | /* -1 means we need to scroll. |
| 17041 | 0 means we need new matrices, but fonts_changed | 17042 | 0 means we need new matrices, but fonts_changed |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 2cb4f3eca56..fb0d01bb66c 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -401,12 +401,14 @@ x_session_initialize (struct x_display_info *dpyinfo) | |||
| 401 | ptrdiff_t name_len = 0; | 401 | ptrdiff_t name_len = 0; |
| 402 | 402 | ||
| 403 | /* libSM seems to crash if pwd is missing - see bug#18851. */ | 403 | /* libSM seems to crash if pwd is missing - see bug#18851. */ |
| 404 | if (! emacs_get_current_dir_name ()) | 404 | char *pwd = emacs_get_current_dir_name (); |
| 405 | if (!pwd) | ||
| 405 | { | 406 | { |
| 406 | fprintf (stderr, "Disabling session management due to pwd error: %s\n", | 407 | fprintf (stderr, "Disabling session management due to pwd error: %s\n", |
| 407 | emacs_strerror (errno)); | 408 | emacs_strerror (errno)); |
| 408 | return; | 409 | return; |
| 409 | } | 410 | } |
| 411 | xfree (pwd); | ||
| 410 | 412 | ||
| 411 | ice_fd = -1; | 413 | ice_fd = -1; |
| 412 | doing_interact = false; | 414 | doing_interact = false; |