diff options
| author | Paul Eggert | 2017-11-02 21:01:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-11-02 21:01:44 -0700 |
| commit | 1441eb76fd08572c25e0128c247cc1a628a79ff2 (patch) | |
| tree | aaa9a86485836a33618d258a55d8cdbe6082c91a /src | |
| parent | 3ca4a3c8d40ea89ed717e0673fa85f5c1ac851ed (diff) | |
| parent | 460fe4a1bc40f2ba39deda6448a7baf57e0e6b76 (diff) | |
| download | emacs-1441eb76fd08572c25e0128c247cc1a628a79ff2.tar.gz emacs-1441eb76fd08572c25e0128c247cc1a628a79ff2.zip | |
Merge from origin/emacs-26
460fe4a1bc ; Doc fixes
41adf3281e Avoid duplicate calls to xfree for the same pointer
3e7ebbe1bd Don't clobber docstrings of explicitly-defined mode hook v...
9c8fe0248b Avoid fullscreen ediff control frames by default (Bug#29026)
7d32176acc Fix the bug#24034 change (revno 9eb028f) causing infloop (...
ee493663ba Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
ca5eb0d0b7 Fix a typo in the ELisp manual
d10c9479ca Fix doc and doc-strings for minibuffer window related func...
18331d00da Fix "Args out of range" error in c-determine-limit. Fixes...
edde35e6f8 * lisp/progmodes/perl-mode.el: Fix electric indentation wi...
056587c45f Extend mhtml submode region when in comment
4c4ad80848 Fix mthml submode lighting at end of buffer
557e252aa2 Remember more variables in mhtml-mode
336cd0a11a ; * lisp/select.el (select-enable-primary): Add missing pe...
134099bc90 ; * etc/NEWS (EUDC): Mark as not requiring documentation.
1a340274bf * etc/NEWS (EUDC): Deprecate BBDB 2.x backward compatibility.
4189d0ef7b Fix minibuffer window related docs and strings (Bug#28978)
2ebdde6e9c Add ChkTeX flymake backend for latex-mode
5b59841791 Fix doc typos
82a16c547b Fix some duplicate word typos
266888b1d7 * doc/lispref/commands.texi (Adjusting Point): Fix wording...
00c3c6d88d Avoid segfaults in 64-bit Windows builds
a8e6741066 Fix conversion of pixel coordinates to buffer position
d43b486f6c Fix doc strings in desktop.el
9102fb603e Add Index to ERT manual
68182a4710 Make manuals and NEWS consistent
451823b0e5 Don't allow (minibuffer-window-active-p nil) to return t
cc8f72ca22 Clarify obsolescence message for 'whitespace-tab'
50f711e7fa Fix some duplicate words typos
8bd9524a7c * lisp/button.el (button-activate): Fix doc typo.
0b0d91e60a * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Fix ...
e6b4e5ffdf Fix some doc typos
e8636ac8cc Fix startup display on Cygwin
3926c5ad83 * src/fileio.c (Fset_default_file_modes): Fix typo in doc ...
9715317dfd * lisp/dired.el (dired-find-alternate-file): Doc fix. (Bu...
9e442a001a Improve documentation of how faces are applied to display ...
1bda71ec3b Improve pixel-scroll-mode
196106d37d Support Certification Authority Authorization in dns-mode.el
ec08d70b4f Improve documentation of set-default-file-modes
# Conflicts:
# etc/NEWS
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 10 | ||||
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 23 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/fileio.c | 10 | ||||
| -rw-r--r-- | src/frame.c | 15 | ||||
| -rw-r--r-- | src/lisp.h | 6 | ||||
| -rw-r--r-- | src/thread.c | 4 | ||||
| -rw-r--r-- | src/window.c | 4 | ||||
| -rw-r--r-- | src/xterm.c | 16 |
10 files changed, 69 insertions, 23 deletions
diff --git a/src/alloc.c b/src/alloc.c index da0c3ad4b3e..11afdfd7cc0 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -621,12 +621,6 @@ buffer_memory_full (ptrdiff_t nbytes) | |||
| 621 | #endif | 621 | #endif |
| 622 | } | 622 | } |
| 623 | 623 | ||
| 624 | /* A common multiple of the positive integers A and B. Ideally this | ||
| 625 | would be the least common multiple, but there's no way to do that | ||
| 626 | as a constant expression in C, so do the best that we can easily do. */ | ||
| 627 | #define COMMON_MULTIPLE(a, b) \ | ||
| 628 | ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b)) | ||
| 629 | |||
| 630 | #ifndef XMALLOC_OVERRUN_CHECK | 624 | #ifndef XMALLOC_OVERRUN_CHECK |
| 631 | #define XMALLOC_OVERRUN_CHECK_OVERHEAD 0 | 625 | #define XMALLOC_OVERRUN_CHECK_OVERHEAD 0 |
| 632 | #else | 626 | #else |
| @@ -7030,7 +7024,9 @@ sweep_symbols (void) | |||
| 7030 | { | 7024 | { |
| 7031 | if (!sym->s.gcmarkbit) | 7025 | if (!sym->s.gcmarkbit) |
| 7032 | { | 7026 | { |
| 7033 | if (sym->s.redirect == SYMBOL_LOCALIZED) | 7027 | if (sym->s.redirect == SYMBOL_LOCALIZED |
| 7028 | /* Already freed? */ | ||
| 7029 | && !EQ (sym->s.function, Vdead)) | ||
| 7034 | xfree (SYMBOL_BLV (&sym->s)); | 7030 | xfree (SYMBOL_BLV (&sym->s)); |
| 7035 | sym->s.next = symbol_free_list; | 7031 | sym->s.next = symbol_free_list; |
| 7036 | symbol_free_list = &sym->s; | 7032 | symbol_free_list = &sym->s; |
diff --git a/src/buffer.c b/src/buffer.c index 1c8b4635086..9635733fcff 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5716,7 +5716,7 @@ word-wrapping, you might want to reduce the value of | |||
| 5716 | in narrower windows. | 5716 | in narrower windows. |
| 5717 | 5717 | ||
| 5718 | Instead of setting this variable directly, most users should use | 5718 | Instead of setting this variable directly, most users should use |
| 5719 | Visual Line mode . Visual Line mode, when enabled, sets `word-wrap' | 5719 | Visual Line mode. Visual Line mode, when enabled, sets `word-wrap' |
| 5720 | to t, and additionally redefines simple editing commands to act on | 5720 | to t, and additionally redefines simple editing commands to act on |
| 5721 | visual lines rather than logical lines. See the documentation of | 5721 | visual lines rather than logical lines. See the documentation of |
| 5722 | `visual-line-mode'. */); | 5722 | `visual-line-mode'. */); |
diff --git a/src/dispnew.c b/src/dispnew.c index cb32f09b7c6..065d06813b8 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5149,6 +5149,29 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5149 | include the hscroll. */ | 5149 | include the hscroll. */ |
| 5150 | to_x += it.first_visible_x; | 5150 | to_x += it.first_visible_x; |
| 5151 | 5151 | ||
| 5152 | /* If we are hscrolling only the current line, and Y is at the line | ||
| 5153 | containing point, augment TO_X with the hscroll amount of the | ||
| 5154 | current line. */ | ||
| 5155 | if (it.line_wrap == TRUNCATE | ||
| 5156 | && EQ (automatic_hscrolling, Qcurrent_line) && IT_CHARPOS (it) < PT) | ||
| 5157 | { | ||
| 5158 | struct it it2 = it; | ||
| 5159 | void *it2data = bidi_shelve_cache (); | ||
| 5160 | it2.last_visible_x = 1000000; | ||
| 5161 | /* If the line at Y shows point, the call below to | ||
| 5162 | move_it_in_display_line will succeed in reaching point. */ | ||
| 5163 | move_it_in_display_line (&it2, PT, -1, MOVE_TO_POS); | ||
| 5164 | if (IT_CHARPOS (it2) >= PT) | ||
| 5165 | { | ||
| 5166 | to_x += (w->hscroll - w->min_hscroll) * FRAME_COLUMN_WIDTH (it.f); | ||
| 5167 | /* We need to pretend the window is hscrolled, so that | ||
| 5168 | move_it_in_display_line below will DTRT with TO_X. */ | ||
| 5169 | it.first_visible_x += w->hscroll * FRAME_COLUMN_WIDTH (it.f); | ||
| 5170 | it.last_visible_x += w->hscroll * FRAME_COLUMN_WIDTH (it.f); | ||
| 5171 | } | ||
| 5172 | bidi_unshelve_cache (it2data, 0); | ||
| 5173 | } | ||
| 5174 | |||
| 5152 | /* Now move horizontally in the row to the glyph under *X. Second | 5175 | /* Now move horizontally in the row to the glyph under *X. Second |
| 5153 | argument is ZV to prevent move_it_in_display_line from matching | 5176 | argument is ZV to prevent move_it_in_display_line from matching |
| 5154 | based on buffer positions. */ | 5177 | based on buffer positions. */ |
diff --git a/src/editfns.c b/src/editfns.c index 47ff2a5cbfd..e250c91ecbc 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -4119,7 +4119,7 @@ The # flag means to use an alternate display form for %o, %x, %X, %e, | |||
| 4119 | \"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\"; | 4119 | \"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\"; |
| 4120 | for %e and %f, it causes a decimal point to be included even if the | 4120 | for %e and %f, it causes a decimal point to be included even if the |
| 4121 | the precision is zero; for %g, it causes a decimal point to be | 4121 | the precision is zero; for %g, it causes a decimal point to be |
| 4122 | included even if the the precision is zero, and also forces trailing | 4122 | included even if the precision is zero, and also forces trailing |
| 4123 | zeros after the decimal point to be left in place. | 4123 | zeros after the decimal point to be left in place. |
| 4124 | 4124 | ||
| 4125 | The width specifier supplies a lower limit for the length of the | 4125 | The width specifier supplies a lower limit for the length of the |
diff --git a/src/fileio.c b/src/fileio.c index ac520c2328e..fb66118905f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3126,7 +3126,15 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) | |||
| 3126 | DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0, | 3126 | DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0, |
| 3127 | doc: /* Set the file permission bits for newly created files. | 3127 | doc: /* Set the file permission bits for newly created files. |
| 3128 | The argument MODE should be an integer; only the low 9 bits are used. | 3128 | The argument MODE should be an integer; only the low 9 bits are used. |
| 3129 | This setting is inherited by subprocesses. */) | 3129 | On Posix hosts, this setting is inherited by subprocesses. |
| 3130 | |||
| 3131 | This function works by setting the Emacs's file mode creation mask. | ||
| 3132 | Each bit that is set in the mask means that the corresponding bit | ||
| 3133 | in the permissions of newly created files will be disabled. | ||
| 3134 | |||
| 3135 | Note that when `write-region' creates a file, it resets the | ||
| 3136 | execute bit, even if the mask set by this function allows that bit | ||
| 3137 | by having the corresponding bit in the mask reset. */) | ||
| 3130 | (Lisp_Object mode) | 3138 | (Lisp_Object mode) |
| 3131 | { | 3139 | { |
| 3132 | mode_t oldrealmask, oldumask, newumask; | 3140 | mode_t oldrealmask, oldumask, newumask; |
diff --git a/src/frame.c b/src/frame.c index ab801eec9c7..fe1709e6ede 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -5895,16 +5895,11 @@ or call the function `tool-bar-mode'. */); | |||
| 5895 | #endif | 5895 | #endif |
| 5896 | 5896 | ||
| 5897 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, | 5897 | DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, |
| 5898 | doc: /* Minibufferless frames use this frame's minibuffer. | 5898 | doc: /* Minibuffer-less frames by default use this frame's minibuffer. |
| 5899 | Emacs cannot create minibufferless frames unless this is set to an | 5899 | Emacs consults this variable only when creating a minibuffer-less frame |
| 5900 | appropriate surrogate. | 5900 | and no explicit minibuffer window has been specified for that frame via |
| 5901 | 5901 | the `minibuffer' frame parameter. Once such a frame has been created, | |
| 5902 | Emacs consults this variable only when creating minibufferless | 5902 | setting this variable does not change that frame's previous association. |
| 5903 | frames; once the frame is created, it sticks with its assigned | ||
| 5904 | minibuffer, no matter what this variable is set to. This means that | ||
| 5905 | this variable doesn't necessarily say anything meaningful about the | ||
| 5906 | current set of frames, or where the minibuffer is currently being | ||
| 5907 | displayed. | ||
| 5908 | 5903 | ||
| 5909 | This variable is local to the current terminal and cannot be buffer-local. */); | 5904 | This variable is local to the current terminal and cannot be buffer-local. */); |
| 5910 | 5905 | ||
diff --git a/src/lisp.h b/src/lisp.h index 266370333f5..43b3ec618f0 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -283,6 +283,12 @@ error !; | |||
| 283 | # define GCALIGNED /* empty */ | 283 | # define GCALIGNED /* empty */ |
| 284 | #endif | 284 | #endif |
| 285 | 285 | ||
| 286 | /* A common multiple of the positive integers A and B. Ideally this | ||
| 287 | would be the least common multiple, but there's no way to do that | ||
| 288 | as a constant expression in C, so do the best that we can easily do. */ | ||
| 289 | #define COMMON_MULTIPLE(a, b) \ | ||
| 290 | ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b)) | ||
| 291 | |||
| 286 | /* Some operations are so commonly executed that they are implemented | 292 | /* Some operations are so commonly executed that they are implemented |
| 287 | as macros, not functions, because otherwise runtime performance would | 293 | as macros, not functions, because otherwise runtime performance would |
| 288 | suffer too much when compiling with GCC without optimization. | 294 | suffer too much when compiling with GCC without optimization. |
diff --git a/src/thread.c b/src/thread.c index 6f12d796ff9..7a670ba410b 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -26,7 +26,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include "coding.h" | 26 | #include "coding.h" |
| 27 | #include "syssignal.h" | 27 | #include "syssignal.h" |
| 28 | 28 | ||
| 29 | static struct thread_state alignas (GCALIGNMENT) main_thread; | 29 | #define THREAD_ALIGNMENT COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT) |
| 30 | |||
| 31 | static struct thread_state alignas (THREAD_ALIGNMENT) main_thread; | ||
| 30 | 32 | ||
| 31 | struct thread_state *current_thread = &main_thread; | 33 | struct thread_state *current_thread = &main_thread; |
| 32 | 34 | ||
diff --git a/src/window.c b/src/window.c index ba86d73911f..9bb2c43a698 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5832,8 +5832,8 @@ by this function. This happens in an interactive call. */) | |||
| 5832 | } | 5832 | } |
| 5833 | 5833 | ||
| 5834 | DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, | 5834 | DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, |
| 5835 | doc: /* Return the window which was selected when entering the minibuffer. | 5835 | doc: /* Return window selected just before minibuffer window was selected. |
| 5836 | Returns nil, if selected window is not a minibuffer window. */) | 5836 | Return nil if the selected window is not a minibuffer window. */) |
| 5837 | (void) | 5837 | (void) |
| 5838 | { | 5838 | { |
| 5839 | if (minibuf_level > 0 | 5839 | if (minibuf_level > 0 |
diff --git a/src/xterm.c b/src/xterm.c index d90654b101d..dbb8349452d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11504,6 +11504,22 @@ x_make_frame_visible (struct frame *f) | |||
| 11504 | 11504 | ||
| 11505 | /* Try to wait for a MapNotify event (that is what tells us when a | 11505 | /* Try to wait for a MapNotify event (that is what tells us when a |
| 11506 | frame becomes visible). */ | 11506 | frame becomes visible). */ |
| 11507 | |||
| 11508 | #ifdef CYGWIN | ||
| 11509 | /* On Cygwin, which uses input polling, we need to force input to | ||
| 11510 | be read. See | ||
| 11511 | http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html | ||
| 11512 | and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24091#131. | ||
| 11513 | Fake an alarm signal to let the handler know that there's | ||
| 11514 | something to be read. | ||
| 11515 | |||
| 11516 | It could be confusing if a real alarm arrives while processing | ||
| 11517 | the fake one. Turn it off and let the handler reset it. */ | ||
| 11518 | int old_poll_suppress_count = poll_suppress_count; | ||
| 11519 | poll_suppress_count = 1; | ||
| 11520 | poll_for_input_1 (); | ||
| 11521 | poll_suppress_count = old_poll_suppress_count; | ||
| 11522 | #endif | ||
| 11507 | x_wait_for_event (f, MapNotify); | 11523 | x_wait_for_event (f, MapNotify); |
| 11508 | } | 11524 | } |
| 11509 | } | 11525 | } |