1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 12:20:39 -08:00
Commit graph

40158 commits

Author SHA1 Message Date
Paul Eggert
1ad2903a48 Refer to bytecode constant vectors (Bug#33014)
Backport from master.
* src/bytecode.c (exec_byte_code): Save VECTOR into stack slot
so that it survives GC.  The stack slot was otherwise unused,
so this doesn’t cost us memory, only a store insn.
2018-10-30 21:17:33 -07:00
Eli Zaretskii
ced58d3e15 Improve doc string of 'call-process'
* src/callproc.c (Fcall_process): Clarify DESTINATION in the
doc string.
2018-10-30 13:08:28 +02:00
Alan Third
f5f95838bd Improve XPM load failure message (bug#33126)
* src/image.c (xpm_load_image): Only XPM3 is supported, so make that
explicit.
2018-10-25 16:01:15 +01:00
Alan Third
7e8eee60a9 Fix some NS drawing issues (bug#32932)
* src/nsterm.m (ns_clip_to_rect):
(ns_reset_clipping): Remove gsaved variable and associated code.
(ns_flush_display): Remove function.
(ns_copy_bits): use translateRectsNeedingDisplayInRect:by: to copy any
pending drawing actions along with the image.
([EmacsView windowWillResize:toSize:]): Remove unneeded call.
([EmacsView drawRect:]): Remove redundant call to ns_clear_frame_area,
and optimize the exposed rectangles.
(ns_draw_window_cursor): Remove unneeded disabling of screen updates.
2018-10-24 11:32:23 +01:00
Alan Mackenzie
73babba26a Clarify documentation of fractional vertical scrolling and some doc strings
* doc/lispref/windows.texi (vertical scrolling): Clarify the meaning of
vertical scrolling by referring to tall screen lines, images, and the display
action.  Clarify an ambiguous English tense.

* src/window.c (window-vscroll, set-window-vscroll): Amend doc strings to
refer to display.
2018-10-15 19:04:05 +00:00
Eli Zaretskii
e724a8f669 Fix redisplay of glyphless characters
* src/conf_post.h (bool_bf): Use 'unsigned int' in the MinGW
builds.  Suggested by Tom Tromey <tom@tromey.com>.  (Bug#33017)
* src/dispnew.c (scrolling_window): Update commentary
regarding xwidget builds.
2018-10-13 19:47:01 +03:00
Robert Pluim
80e0bfa96d Call GTK functions only on GTK scrollbars
* src/gtkutil.c (xg_set_background_color) [USE_TOOLKIT_SCROLL_BARS]:
Don't call GTK functions on non-GTK scrollbars (Bug#32975).
2018-10-13 10:44:37 +02:00
Eli Zaretskii
18b42c6b4b Use the 'line-number' face for line-number fields past EOB
* src/xdisp.c (get_phys_cursor_geometry): Treat rows at and
beyond ZV specially.  Don't let the cursor exceed the
vertical dimensions of the row.
(maybe_produce_line_number): Use the 'line-number' face
instead of 'default' for blank fields beyond ZV.  Don't update
the IT metrics when displaying blank line-number fields beyond
ZV.  (Bug#32337)
2018-10-13 09:44:09 +03:00
Alan Third
a6ab8db3a3 Ensure NS frame is redrawn correctly after scroll
* src/nsterm.m (ns_copy_bits): Set needsDisplay so the previous cursor
position is redrawn.
2018-10-12 21:46:53 +01:00
Eli Zaretskii
4cf1eb8062 ; * src/data.c (Fkeywordp): Remove inaccurate commentary. (Bug#32979) 2018-10-08 23:14:59 +03:00
Scott Corley
940ae15604 Fix overflow lockup with frames > 255 lines
Backport from master.
* src/scroll.c (struct matrix_elt): Change unsigned char fields to
int to handle frames with more than 255 lines (Bug#32951).
Copyright-paperwork-exempt: yes
2018-10-07 23:22:50 -07:00
Eli Zaretskii
14c032d5f8 Avoid assertion violations in nonsensical calls to 'signal'
* src/eval.c (Fsignal): If both arguments are nil, replace the
first one with 'error', to avoid assertion violations further
down the line.  (Bug#32961)
2018-10-07 17:45:12 +03:00
Eli Zaretskii
86d2169ac3 Avoid ridiculously high stack limit requests on macOS
* src/emacs.c (main): Avoid wraparound in subtraction of
rlim_t values, in case rlim_t is an unsigned type.  (Bug#32338)
2018-10-04 19:13:17 +03:00
Charles A. Roelli
ac3622c81a Improve documentation of 'read-hide-char'
* src/minibuf.c (syms_of_minibuf) <Vread_hide_char>: Clarify
documentation and mention where else the variable is used.
* doc/lispref/minibuf.texi (Reading a Password): Add an index
entry for 'read-hide-char'.
2018-10-03 20:00:13 +02:00
Eli Zaretskii
d416109f06 Avoid returning early in 'while-no-input' due to subprocesses
* src/keyboard.c (kbd_buffer_store_buffered_event): Support
also the internal buffer-switch events.
(syms_of_keyboard) <Qbuffer_switch>: New DEFSYM.

* lisp/subr.el (while-no-input-ignore-events): Ignore
'buffer-switch' events.  Reported by Michael Heerdegen
<michael_heerdegen@web.de>.

* etc/NEWS: Mention the change in behavior of 'while-no-input'
2018-09-29 10:11:08 +03:00
John Shahid
e8a4d942dd Cleanup when opening a new terminal fails. (Bug#32794)
* src/term.c (init_tty): Call delete_terminal_internal if emacs_open
fail.
* src/terminal.c (delete_terminal): Move some code into
delete_terminal_internal and call it.
(delete_terminal_internal): New function.
* src/termhooks.h: Prototype for delete_terminal_internal.
2018-09-29 09:30:01 +03:00
Alan Third
9ad0f1d15c Fix deprecation warning
* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as
required.
2018-09-28 20:23:46 +01:00
Alan Third
7946445962 Make all NS drawing be done from drawRect
See bug#31904 and bug#32812.

* src/nsterm.m (ns_update_begin): Don't lock focus, only clip if there
is already a view focused.
(ns_update_end): Don't mess with view focusing any more.
(ns_focus): Only clip drawing if there is already a focused view,
otherwise mark area dirty for later drawing.  Renamed ns_clip_to_rect.
All callers changed.
(ns_unfocus): Don't unfocus the view any more.  Renamed
ns_reset_clipping. All callers changed.
(ns_clip_to_row): Update to match ns_clip_to_rect.
(ns_clear_frame):
(ns_clear_frame_area):
(ns_draw_fringe_bitmap):
(ns_draw_window_cursor):
(ns_draw_vertical_window_border):
(ns_draw_window_divider):
(ns_dumpglyphs_stretch):
(ns_draw_glyph_string): Only draw if ns_focus or ns_clip_to_row
return YES.
(ns_copy_bits): Remove superfluous calls to ns_(un)focus.
(ns_flush_display): New function.
2018-09-28 20:23:46 +01:00
Charles A. Roelli
25cdd65c4e ; Spellcheck two more documentation strings
* lisp/files.el (hack-local-variables):
* src/keymap.c (Ftext_char_description): Spellcheck documentation.
2018-09-25 21:33:00 +02:00
Eli Zaretskii
d28d54c767 More accurate docs for 'text-char-description'
* src/keymap.c (Ftext_char_description):
* doc/lispref/help.texi (Describing Characters): More accurate
description of 'text-char-description'.  Remove incorrect
examples from the ELisp manual.  (Bug#32743)
2018-09-20 09:41:55 +03:00
Eli Zaretskii
d4fa83baf5 Fix GnuTLS test suite with GnuTLS versions 3.4.x
* src/gnutls.c (gnutls_cipher_get_tag_size): Make it return
zero only for versions of GnuTLS < 3.2.2, where
gnutls_cipher_get_tag_size was introduced.  This fixes the
GnuTLS test suite, which assumes that any cipher whose tag
size is non-zero is AEAD-capable, and doesn't test such ciphers
if AEAD is not available, i.e. for GnuTLS < 3.5.1.  (Bug#32446)
2018-09-18 13:24:29 +03:00
Noam Postavsky
b5bee6bf48 Fix build with gnutls versions 3.0 to 3.2 (Bug#32446)
We previously used functions available only in 3.2+ for all 3.x
versions.
* src/gnutls.c [GNUTLS_VERSION_NUMBER < 0x030501]: Replace calls to
gnutls_cipher_get_tag_size with 0.
[GNUTLS_VERSION_NUMBER < 0x030200]: Alias gnutls_cipher_get_iv_size
to gnutls_cipher_get_block_size, gnutls_digest_list to
gnutls_mac_list, and gnutls_digest_get_name to gnutls_mac_get_name.
[WINDOWSNT]: Adjust DLL function definitions and declarations
accordingly.
2018-09-17 17:54:32 -04:00
Glenn Morris
6f2c471689 * src/alloc.c (Fbool_vector, Flist, Fvector): Doc tweak.
Use a simpler, consistent form.
2018-09-15 15:33:32 -07:00
Alan Mackenzie
39eecb382b * src/alloc.c (vector): Fix grammatical error in doc string: "are" -> "is". 2018-09-15 20:21:08 +00:00
Eli Zaretskii
e133b63062 Avoid adverse side effects of fixing bug#21824
* test/src/buffer-tests.el
(overlay-modification-hooks-deleted-overlay): New test.

* src/buffer.c (report_overlay_modification): Don't bypass all
the overlay-modification hooks; instead, invoke each function
only if the buffer associated with the overlay is the current
buffer.  (Bug#30823)
2018-09-15 12:21:12 +03:00
Eli Zaretskii
5cf282d65f Clarify documentation of functions reading character events
* doc/lispref/help.texi (Describing Characters):
* doc/lispref/commands.texi (Keyboard Events)
(Reading One Event, Classifying Events): Make the distinction
between characters and character events more explicit.

* src/keymap.c (Ftext_char_description)
(Fsingle_key_description):
* src/lread.c (Fread_char, Fread_char_exclusive): Doc fixes,
to make a clear distinction between a character input event
and a character code.  (Bug#32562)
2018-09-10 12:46:22 +03:00
YAMAMOTO Mitsuharu
82160cf0c1 * src/process.c (connect_network_socket): Fix memory leak. (Bug#32604) 2018-09-07 08:35:36 +09:00
Martin Rudalics
57bcdc76e0 Don't call XGetGeometry for frames without outer X window (Bug#32615)
* src/xfns.c (frame_geometry): Don't call XGetGeometry when
FRAME has no outer X window; return nil instead.  (Bug#32615)
2018-09-04 08:53:49 +02:00
Michael Albinus
ac7936cb8f Rename thread-alive-p to thread-live-p
* doc/lispref/threads.texi (Basic Thread Functions): Use thread-live-p.

* etc/NEWS: 'thread-alive-p' has been renamed to 'thread-live-p'.

* src/thread.c (thread_live_p): Rename from thread_alive_p.  Adapt
all callees.
(Fthread_live_p): Rename from Fthread_alive_p.
(syms_of_threads): Make thread-alive-p an alias of thread-live-p.

* test/src/thread-tests.el (all): Replace `thread-alive-p' by
`thread-live-p'.
(threads-live): Rename from `threads-alive'.
2018-08-31 10:47:03 +02:00
Eli Zaretskii
fe06fcc595 Avoid infinite hscrolling loops when line numbers are displayed
* src/xdisp.c (maybe_produce_line_number): Don't produce line
numbers if we don't have enough screen estate.  (Bug#32351)
2018-08-28 14:11:12 +03:00
Eli Zaretskii
63e59c8ca5 Avoid crashes in malformed defvar
* src/eval.c (Fdefvar): Don't call XSYMBOL on something that
might not be a symbol.  This avoids crashes due to malformed
'defvar' forms.  (Bug#32552)
2018-08-28 10:20:46 +03:00
Sergey Vinokurov
54fb383af6 Fix detection of freed emacs_values (Bug#32479)
* src/emacs-module.c (module_free_global_ref): Compare a value to be
freed with all entries of the list.

* test/data/emacs-module/mod-test.c (Fmod_test_globref_free): New
function.
(emacs_module_init): Make it accessible from Lisp.
* test/src/emacs-module-tests.el (mod-test-globref-free-test): New
test which uses it.
2018-08-25 18:57:56 -04:00
Eli Zaretskii
9a1329e966 Avoid crashes with very wide TTY frames on MS-Windows
* src/w32console.c <glyph_base>: Reduce the number of elements
to 80.
<glyphs, glyphs_len>: New static variables.
(w32con_clear_end_of_line): If the line is wider than the
current size of the "empty row" in 'glyphs', reallocate
'glyphs' to support the full width of the frame.  This
avoids segfaults when the frame is wider than 256 columns.
(Bug#32445)
2018-08-25 15:26:41 +03:00
Glenn Morris
624e7dc778 Update GNOME bugtracker URLs
* configure.ac, admin/notes/multi-tty, etc/PROBLEMS:
* src/emacs.c (main):
* src/xterm.c (x_connection_closed): Update GNOME bugtracker URLs.
; * src/gtkutil.c (xg_display_close):
; * src/image.c (svg_load_image): Update URLs in comments.
2018-08-24 13:13:08 -04:00
Paul Eggert
f882de8b80 Port better to x86 -fexcess-precision=fast
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00380.html
* src/data.c (arithcompare): Work around incompatibility
between gcc -fexcess-precision=fast and the C standard on x86,
by capturing the results of floating-point comparisons before
the excess precision spontaneously decays.  Although this fix
might not work in general, it does work here and is probably
good enough for the platforms we care about.

(cherry picked from commit a84cef9095)
2018-08-13 20:16:56 +03:00
Paul Eggert
ec0995c409 * src/alloc.c: Remove obsolete comments. 2018-08-11 12:14:49 -07:00
Eli Zaretskii
71c92d8913 Fix copying text properties by 'format'
* src/editfns.c (styled_format): Add the spec beginning index
to the info recorded for each format spec, and use it to
detect the case that a format spec and its text property end
where the next spec with another property begins.  (Bug#32404)

* test/src/editfns-tests.el (format-properties): Add tests for
bug#32404.
2018-08-09 18:08:35 +03:00
Lars Ingebrigtsen
18588bce36 Make async :family 'local failures fail correctly again
* src/fileio.c (get_file_errno_data): Refactor out into its own
function so that we can reuse the error handling from an async
context (bug#31901).

* src/process.c (connect_network_socket): When an async :family
'local client fails (with a file error, for instance), mark the
process as failed.

(cherry picked from commit 92ba34d89a)
2018-08-08 19:30:50 -04:00
Eli Zaretskii
5132a5856d Improve documentation of 'set-fontset-font'
* doc/lispref/display.texi (Fontsets): Fix description of
'set-fontset-font'.
* src/fontset.c (Fset_fontset_font): Doc fix.  (Bug#32401)
2018-08-08 18:24:45 +03:00
Eli Zaretskii
f0b8e64fb7 Avoid assertion violations in maybe_produce_line_number
* src/xdisp.c (redisplay_window): Make sure desired_matrix is
cleared before calling try_window.  This is important when
display-line-numbers is non-nil, because line-number display code
assumes each glyph row is completely cleared when it is called to
produce a line number.  (Bug#32358)
2018-08-02 16:58:44 +03:00
Eli Zaretskii
7669bf7880 Avoid assertion violations in set_text_properties_1
* src/textprop.c (set_text_properties): If the call to
modify_text_properties modifies the interval tree as side effect,
recalculate the correct interval for START and END.  (Bug#32265)
2018-08-02 16:29:54 +03:00
Eli Zaretskii
39d3e8b6bc Fix last change in 'char_width'
* src/character.c (char_width): Make sure variable C is always
initialized.  (Bug#32276)
2018-07-29 17:42:11 +03:00
Eli Zaretskii
d24c5f26bf Fix calls to modifications hooks in replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Call the modification
hooks on the entire region where replacements could have taken
place.  The previous attempts of being more accurate just
introduced bugs.  (Bug#32278)
2018-07-27 13:04:19 +03:00
Eli Zaretskii
71a915153a * src/character.c (char_width): Support glyphs with faces. (Bug#32276) 2018-07-27 12:33:29 +03:00
Eli Zaretskii
47f75b1ba0 Fix last change in editfns.c
* src/editfns.c (Freplace_buffer_contents): Fix last change: always
call buffer modification hooks, even if nothing was deleted/inserted.
(bug#32237)
2018-07-21 22:27:33 +03:00
Eli Zaretskii
671dc5a51e Fix calls to buffer modification hooks from replace-buffer-contents
* src/editfns.c (Freplace_buffer_contents): Don't call buffer
modification hooks if nothing was deleted/inserted.  (Bug#32237)
2018-07-21 21:05:52 +03:00
Eli Zaretskii
7308fa0e2b Improve doc strings of several variables in keyboard.c
* src/keyboard.c (syms_of_keyboard) <debug-on-event>
<attempt-stack-overflow-recovery>
<attempt-orderly-shutdown-on-fatal-signal>: Make sure the first
sentence of the doc string fits on a single line.
2018-07-21 12:28:11 +03:00
Eli Zaretskii
a4767a662b Avoid assertion violations in gnutls.c
* src/gnutls.c (Fgnutls_hash_digest, gnutls_symmetric)
(Fgnutls_hash_mac): Check CONSP before invoking XCDR.  (Bug#32187)
Report values of invalid arguments when signaling an error.
2018-07-17 19:58:27 +03:00
Michael Albinus
1c862297e4 Fix format error in Faccept_process_output
* src/process.c (Faccept_process_output): Do not use format spec
"%p", it isn't valid for error().
2018-07-13 14:27:33 +02:00
Paul Eggert
b38b91a834 Lessen stack consumption in recursive read1
* src/lread.c (read1): Shrink local buffer size from
MAX_ALLOCA to 128 (Bug#31995).
2018-07-12 20:23:47 -07:00